spl: Allow RTC drivers to be used in SPL
authorSimon Glass <sjg@chromium.org>
Mon, 16 Jan 2017 14:03:31 +0000 (07:03 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 6 Feb 2017 03:38:46 +0000 (11:38 +0800)
Add a new Kconfig option to allow RTC drivers to be used in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
common/spl/Kconfig
drivers/Makefile

index b7e316f..bdbab19 100644 (file)
@@ -484,6 +484,16 @@ config SPL_RAM_DEVICE
          be already in memory when SPL takes over, e.g. loaded by the boot
          ROM.
 
+config SPL_RTC_SUPPORT
+       bool "Support RTC drivers"
+       depends on SPL
+       help
+         Enable RTC (Real-time Clock) support in SPL. 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 SPL
+         build.
+
 config SPL_SATA_SUPPORT
        bool "Support loading from SATA"
        depends on SPL
index 553577a..f070ea9 100644 (file)
@@ -34,6 +34,7 @@ obj-$(CONFIG_SPL_ETH_SUPPORT) += net/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/
 obj-$(CONFIG_SPL_USBETH_SUPPORT) += net/phy/
 obj-$(CONFIG_SPL_PCI_SUPPORT) += pci/
+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/