lkml.org 
[lkml]   [2022]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] clk: imx8mp: register driver at arch_initcall time
    On Wed, Sep 28, 2022 at 9:41 AM Rasmus Villemoes
    <linux@rasmusvillemoes.dk> wrote:
    >
    > We have an imx8mp-based board with an external gpio-triggered
    > watchdog. Currently, we don't get to handle that in time before it
    > resets the board.
    >
    > The probe of the watchdog device gets deferred because the SOC's GPIO
    > controller is not yet ready, and the probe of that in turn gets deferred
    > because its clock provider (namely, this driver) is not yet
    > ready. Altogether, the watchdog does not get handled until the late
    > initcall deferred_probe_initcall has made sure all leftover devices
    > have been probed, and that's way too late.
    >
    > Aside from being necessary for our board, this also reduces total boot
    > time because fewer device probes get deferred.
    >
    > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    > ---
    > It would probably be reasonable to do the same to the other imx8m* clk
    > drivers, but I don't have any such hardware to test on.

    Agreed.

    > +static void __exit imx8mp_clk_exit(void)
    > +{
    > + platform_driver_unregister(&imx8mp_clk_driver);
    > +}
    > +module_exit(imx8mp_clk_exit);

    Isn't module_exit() unnecessary here, since we pass suppress_bind_attrs = true?

    With module_exit() removed:

    Reviewed-by: Fabio Estevam <festevam@gmail.com>

    \
     
     \ /
      Last update: 2022-11-19 22:40    [W:4.229 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site