availability of interrupts during bootup process

John Baldwin jhb at freebsd.org
Tue Sep 4 19:12:59 UTC 2012


On Sunday, September 02, 2012 5:31:21 pm Aleksander Dutkowski wrote:
> hello!
> 
> I have PMIC (TWL4030) module connected to the SoC (ARM/OMAP3) via i2c 
(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.

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).

-- 
John Baldwin


More information about the freebsd-hackers mailing list