RE: [PATCH V5 0/6] Support building i.MX ARMv7/ARMv8 platforms clock driver as module

From: Anson Huang
Date: Mon Jul 06 2020 - 22:26:58 EST


Hi, Laurent

> Subject: Re: [PATCH V5 0/6] Support building i.MX ARMv7/ARMv8 platforms
> clock driver as module
>
> Hi Anson,
>
> On Thu, Jul 02, 2020 at 11:23:55PM +0800, Anson Huang wrote:
> > Nowdays, there are more and more requirements of building SoC specific
> > drivers as modules, such as Android GKI (generic kernel image), this
> > patch set supports building i.MX ARMv6/ARMv7 SoCs clock drivers as
> > modules,
>
> I'm curious, how does the system boot to userspace to be able to load
> modules without clock support in the kernel ? What if the driver for the device
> storing the rootfs cope with clocks not being available ? Does this require an
> initramfs with the clock module ? Even then, how does the serial port driver
> cope with not having clocks ?

Yes, this requires an initramfs, and in the initramfs, it will insmod those .ko with
correct sequence, as per my test and Android GKI test from our Andoird team,
the clock and pinctrl need to be insmod first, then the debug console, then other
module devices....And this patch series ONLY provides the capability of loadable
clock module for this scenario, Linux will still use built-in by default.

Thanks,
Anson