[U-Boot] [PATCH v2 02/10] spl: misc: Allow misc drivers in SPL and TPL

Simon Glass sjg at chromium.org
Thu Jan 31 02:57:10 UTC 2019


Hi Jean-Jacques,

On Tue, 20 Nov 2018 at 06:49, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>
> Hi Simon,
>
> On 18/11/2018 16:14, Simon Glass wrote:
> > In some cases it is necessary to read the keyboard in early phases of
> > U-Boot. The cros_ec keyboard is kept in the misc directory. Update the
> > config to allow this.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > Changes in v2:
> > - Leave the misc uclass alone since it stops sandbox_spl working
> >
> >   drivers/misc/Kconfig  | 72 +++++++++++++++++++++++++++++++++++++++++++
> >   drivers/misc/Makefile |  8 +++--
> >   2 files changed, 77 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> > index 48febc47d26..802046cf966 100644
> > --- a/drivers/misc/Kconfig
> > +++ b/drivers/misc/Kconfig
> > @@ -13,6 +13,24 @@ config MISC
> >         set of generic read, write and ioctl methods may be used to
> >         access the device.
> >
> > +config SPL_MISC
> > +     bool "Enable Driver Model for Misc drivers in SPL"
> > +     depends on SPL_DM
> > +     help
> > +       Enable driver model for miscellaneous devices. This class is
> > +       used only for those do not fit other more general classes. A
> > +       set of generic read, write and ioctl methods may be used to
> > +       access the device.
>
> Platforms currently use CONFIG_SPL_DRIVERS_MISC_SUPPORT and CONFIG_MISC
> to enable the MISC drivers in the SPL.

This is a bit confusing but that is not my understanding of the situation.

CONFIG_MISC enables UCLASS_MISC devices. The 'misc' drivers directory
is included always in U-Boot proper. Yes the
CONFIG_SPL_DRIVERS_MISC_SUPPORT option is for SPL only.

But in my case I want an option to enable driver-model MISC devices in
SPL/TPL. Oddly this is orthogonal to whether the drivers/misc
directory itself is included in the build.

Regards,
Simon


More information about the U-Boot mailing list