From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 5 01:30:13 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EF22106566C for ; Wed, 5 Sep 2012 01:30:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8156A8FC16 for ; Wed, 5 Sep 2012 01:30:12 +0000 (UTC) Received: by dadr6 with SMTP id r6so4629758dad.13 for ; Tue, 04 Sep 2012 18:30:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=MgCmdp7Y2OPNjUYt0RwQJrXJ8mIt01YXUGfrzawU9bo=; b=Jv9CdmW9BwkGfWoB+qZXeDkCA1wcAbhD/JC2ixcywQIdEZdqboD/iDw2SfyUhjJk01 InIn2UxXiYK+ZI5oPVa2YoPNqhW1M0wmGaleKvLhGPpjCkLvtHslrsjf0Pvb8gTLY2Xi 1wS0Fg+qyha9LE7IQdQkOa9xk517C/q+vj6YC1FDreB1+CuI3lMSQmuAR1HH5cUDPG96 Ppqlywdjt1I/V2NmmDQ/I1J7m5LHfYtBUOlZx84+5PnYl+YOPAuv+TGcXsc3WNaSFwe3 CG1YEvhna9lE9AoMrjjL+TDdRZXBpMhJKVBy6SGP+upy3KfWZQH9xhBI19CFC9m+75aP Hf9A== Received: by 10.66.84.130 with SMTP id z2mr45086929pay.77.1346808611583; Tue, 04 Sep 2012 18:30:11 -0700 (PDT) Received: from [10.0.0.63] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id kt8sm247384pbc.1.2012.09.04.18.30.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 18:30:11 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201209041205.19794.jhb@freebsd.org> Date: Tue, 4 Sep 2012 19:30:08 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <13628135-18C7-4D98-B2DC-60C8AB65A643@bsdimp.com> References: <201209041205.19794.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlJxdjSRPAzuXINVayFbEnqKmSVSSTWl+rlut6ErALmpeGEVLODVmaf/7f9jev748ATZwtN Cc: freebsd-hackers@freebsd.org, freebsd-arm@freebsd.org, Aleksander Dutkowski Subject: Re: availability of interrupts during bootup process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 01:30:13 -0000 On Sep 4, 2012, at 10:05 AM, John Baldwin wrote: > On Sunday, September 02, 2012 5:31:21 pm Aleksander Dutkowski wrote: >> hello! >>=20 >> I have PMIC (TWL4030) module connected to the SoC (ARM/OMAP3) via i2c=20= > (iicbus). >> Current solution is that i2c_attach calls bus_generic_attach(dev); >> which calls my pmic probe/attach functions, but main configuration of >> PMIC in done after drivers setup by config_intrhook. >> But I need it to be configured during device attaching, because usb >> ehci driver depends on it. >> Is it possbile? I've tried it but it hangs on waiting for i2c >> interrupt, but someone told me, that interrupts are available during >> bootup for some time. >=20 > No, interrupts do not work during bootup. If you can poll your = hardware > you could use polling until interrupts are enabled (using 'if (cold)' = to > check for the boot time before interrupts are enabled). Are interrupts off, or ithreads not scheduled? I thought I had some = stuff working that needed interrupts, but didn't need scheduling.. Am I = nuts? Warner