All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/22] spl: Support hash, input, pch, pci, rtc, tpm in SPL
Date: Wed, 26 Sep 2018 15:55:06 -0600	[thread overview]
Message-ID: <20180926215520.87168-9-sjg@chromium.org> (raw)
In-Reply-To: <20180926215520.87168-1-sjg@chromium.org>

At present these subsystems are only supported in U-Boot proper but it is
sometimes necessary to support them in SPL, or even TPL. Update the
Kconfig and Makefile to support this. Also adjust GPIO so that it can be
used in TPL if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/spl/Kconfig | 48 +++++++++++++++++++++++++++++++++++++++++++++-
 drivers/Makefile   | 11 ++++++-----
 2 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 280496fbe0b..71d36f087bc 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -295,6 +295,16 @@ config SPL_HASH_SUPPORT
 	  this option to build system-specific drivers for hash acceleration
 	  as part of an SPL build.
 
+config TPL_HASH_SUPPORT
+	bool "Support hashing drivers in TPL"
+	select SHA1
+	select SHA256
+	help
+	  Enable hashing drivers in SPL. These drivers can be used to
+	  accelerate secure boot processing in secure applications. Enable
+	  this option to build system-specific drivers for hash acceleration
+	  as part of an SPL build.
+
 config SPL_DMA_SUPPORT
 	bool "Support DMA drivers"
 	help
@@ -376,7 +386,7 @@ config SPL_FPGA_SUPPORT
 	  within SPL.
 
 config SPL_GPIO_SUPPORT
-	bool "Support GPIO"
+	bool "Support GPIO in SPL"
 	help
 	  Enable support for GPIOs (General-purpose Input/Output) in SPL.
 	  GPIOs allow U-Boot to read the state of an input line (high or
@@ -921,6 +931,17 @@ config TPL_ENV_SUPPORT
 	help
 	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
 
+config TPL_GPIO_SUPPORT
+	bool "Support GPIO in TPL"
+	help
+	  Enable support for GPIOs (General-purpose Input/Output) in TPL.
+	  GPIOs allow U-Boot to read the state of an input line (high or
+	  low) and set the state of an output line. This can be used to
+	  drive LEDs, control power to various system parts and read user
+	  input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
+	  for example. Enable this option to build the drivers in
+	  drivers/gpio as part of an TPL build.
+
 config TPL_I2C_SUPPORT
 	bool "Support I2C"
 	help
@@ -956,6 +977,22 @@ config TPL_NAND_SUPPORT
 	help
 	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
 
+config TPL_PCI_SUPPORT
+	bool "Support PCI drivers"
+	help
+	  Enable support for PCI in TPL. For platforms that need PCI to boot,
+	  or must perform some init using PCI in SPL, this provides the
+	  necessary driver support. This enables the drivers in drivers/pci
+	  as part of a TPL build.
+
+config TPL_PCH_SUPPORT
+	bool "Support PCH drivers"
+	help
+	  Enable support for PCH (Platform Controller Hub) devices in TPL.
+	  These are used to set up GPIOs and the SPI peripheral early in
+	  boot. This enables the drivers in drivers/pch as part of a TPL
+	  build.
+
 config TPL_RAM_SUPPORT
 	bool "Support booting from RAM"
 	help
@@ -970,6 +1007,15 @@ config TPL_RAM_DEVICE
 	  be already in memory when TPL takes over, e.g. loaded by the boot
 	  ROM.
 
+config TPL_RTC_SUPPORT
+	bool "Support RTC drivers"
+	help
+	  Enable RTC (Real-time Clock) support in TPL. This includes support
+	  for reading and setting the time. Some RTC devices also have some
+	  non-volatile (battery-backed) memory which is accessible if
+	  needed. This enables the drivers in drivers/rtc as part of an TPL
+	  build.
+
 config TPL_SERIAL_SUPPORT
 	bool "Support serial"
 	select TPL_PRINTF
diff --git a/drivers/Makefile b/drivers/Makefile
index 23ea609b094..47d291948cd 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -2,20 +2,26 @@
 
 obj-$(CONFIG_$(SPL_TPL_)CLK) += clk/
 obj-$(CONFIG_$(SPL_TPL_)DM) += core/
+obj-$(CONFIG_$(SPL_TPL_)GPIO_SUPPORT) += gpio/
 obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/
 obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/
+obj-$(CONFIG_$(SPL_TPL_)INPUT) += input/
 obj-$(CONFIG_$(SPL_TPL_)LED) += led/
 obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/
 obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/
+obj-$(CONFIG_$(SPL_TPL_)PCI_SUPPORT) += pci/
+obj-$(CONFIG_$(SPL_TPL_)PCH_SUPPORT) += pch/
 obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/
 obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/
 obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/
+obj-$(CONFIG_$(SPL_TPL_)RTC_SUPPORT) += rtc/
 obj-$(CONFIG_$(SPL_TPL_)SERIAL_SUPPORT) += serial/
 obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += mtd/spi/
 obj-$(CONFIG_$(SPL_TPL_)SPI_SUPPORT) += spi/
 obj-$(CONFIG_$(SPL_TPL_)TIMER) += timer/
 obj-$(CONFIG_$(SPL_)DM_MAILBOX) += mailbox/
 obj-$(CONFIG_$(SPL_)REMOTEPROC) += remoteproc/
+obj-$(CONFIG_$(SPL_TPL_)TPM) += tpm/
 
 ifndef CONFIG_TPL_BUILD
 ifdef CONFIG_SPL_BUILD
@@ -23,7 +29,6 @@ ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_BOOTCOUNT_LIMIT) += bootcount/
 obj-$(CONFIG_SPL_CPU_SUPPORT) += cpu/
 obj-$(CONFIG_SPL_CRYPTO_SUPPORT) += crypto/
-obj-$(CONFIG_SPL_GPIO_SUPPORT) += gpio/
 obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/
 obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/
 obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/
@@ -39,9 +44,6 @@ obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/
 obj-$(CONFIG_SPL_USB_ETHER) += net/phy/
-obj-$(CONFIG_SPL_PCI_SUPPORT) += pci/
-obj-$(CONFIG_SPL_PCH_SUPPORT) += pch/
-obj-$(CONFIG_SPL_RTC_SUPPORT) += rtc/
 obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/
 obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/
 obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/udc/
@@ -90,7 +92,6 @@ obj-y += scsi/
 obj-y += sound/
 obj-y += spmi/
 obj-y += sysreset/
-obj-y += tpm/
 obj-y += video/
 obj-y += watchdog/
 obj-$(CONFIG_QE) += qe/
-- 
2.19.0.605.g01d371f741-goog

  parent reply	other threads:[~2018-09-26 21:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 21:54 [U-Boot] [PATCH 00/22] spl: Add features for passing info from SPL to U-Boot proper Simon Glass
2018-09-26 21:54 ` [U-Boot] [PATCH 01/22] log: Correct definition of log_msg_ret() Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 02/22] spl: Add support for logging in SPL and TPL Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 03/22] Add core support for a bloblist to convey data from SPL Simon Glass
2018-09-27  4:54   ` Andreas Dannenberg
2018-10-02 11:21     ` Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 04/22] spl: Set up the bloblist in SPL Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 05/22] bloblist: Locate bloblist in U-Boot Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 06/22] test: Add a simple test for bloblist Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 07/22] Add bloblist documentation Simon Glass
2018-09-26 21:55 ` Simon Glass [this message]
2018-09-26 21:55 ` [U-Boot] [PATCH 09/22] spl: Add a define for SPL_TPL_PROMPT Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 10/22] spl: Make SPL_DISABLE_BANNER_PRINT a positive option Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 11/22] spl: Add a comment to spl_set_bd() Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 12/22] spl: Print a message if we are unable to load an image Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 13/22] sandbox: Add a memory map to the sandbox README Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 14/22] test/py: Add a way to pass flags to sandbox Simon Glass
2018-10-01 15:59   ` Stephen Warren
2018-09-26 21:55 ` [U-Boot] [PATCH 15/22] sandbox: Add an option to display of-platdata in SPL Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 16/22] sandbox: Add a new 'sb' command Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 17/22] sandbox: Allow puts() output before global_data is set up Simon Glass
2018-09-26 22:24   ` Joe Hershberger
2018-09-26 21:55 ` [U-Boot] [PATCH 18/22] sandbox: Refactor code to create os_jump_to_file() Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 19/22] sandbox: Use malloc() and free() from os layer Simon Glass
2018-09-26 22:22   ` Joe Hershberger
2018-09-26 21:55 ` [U-Boot] [PATCH 20/22] sandbox: Filter arguments when starting U-Boot Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 21/22] sandbox: Boot in U-Boot through the standard call Simon Glass
2018-09-26 21:55 ` [U-Boot] [PATCH 22/22] spl: Add support for passing handoff info to U-Boot proper Simon Glass
2018-10-01 13:06 ` [U-Boot] [PATCH 00/22] spl: Add features for passing info from SPL " Lukasz Majewski
2018-10-01 17:32   ` Simon Glass
2018-10-08  2:30 ` Kever Yang
2018-10-09  3:40   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180926215520.87168-9-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.