From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Thu, 31 Jan 2019 10:38:58 +0100 Subject: [U-Boot] [PATCH v2 02/10] spl: misc: Allow misc drivers in SPL and TPL In-Reply-To: References: <20181118151435.111676-1-sjg@chromium.org> <20181118151435.111676-3-sjg@chromium.org> Message-ID: <8acffd02-e837-0a37-ccc0-d2a8fddf2f78@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 31/01/2019 03:57, Simon Glass wrote: > Hi Jean-Jacques, > > On Tue, 20 Nov 2018 at 06:49, Jean-Jacques Hiblot 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 >>> --- >>> >>> 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. Ok. that makes sense now. > > Regards, > Simon >