On Thu, 3 Aug 2000, Arjan Opmeer (EMN) wrote:
>
> Hi,
>
> This message is in repsonse to my troubles writing the SKPCR register on
> the SA-1111 development board to enable the USB clock.
>
> It seems John was right after all, only I wasn't paying attention and
> missed the real cause of the problem. The USB initialisation is performed
> before the code in sa1111_init() is executed. Hence, my code added to the
> USB driver cannot work because the RAB hasn't been initialised properly
> at this point in the bootsequence. Only after puting some more printks in
> different parts of the kernel did I notice this... :(
>
> This leads me to my next question. What controls in what sequence the
> different parts of the kernel are executed during system boot and why is
> the code in sa1111_init() executed at such a late stage in the sequence?
This function is referenced by the module_init() macro. This allows for
the linker to automatically build a list of pointers for all
initialization functions to be called upon booting the kernel. The order
for those calls is the same as the link order.
> It seems to me that it would be beneficial to have the SA-1111
> initalisation code executed earlier, so other kernel parts, like the
> USB driver or the Ethernet driver, can also initialise while compiled
> into the kernel. Compiling the drivers as modules would solve the problem,
> but would be the wrong solution to the problem in my opinion.
The right solution would require linux/arch/arm/kernel/kernel.o to be
linked before any drivers.
Nicolas
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++