[PATCH 1/2] timers: atmel_tcb: introduce CONFIG_SPL_ATMEL_TCB
Eugen Hristev
eugen.hristev at microchip.com
Mon Apr 4 10:35:50 CEST 2022
This commit allows the ATMEL_TCB driver to be unselected in SPL and be
selected in u-boot proper. The SPL can use a different timer.
By having a separate Kconfig for ATMEL_TCB in SPL, the size of the SPL
decreases by 1 KByte.
Signed-off-by: Eugen Hristev <eugen.hristev at microchip.com>
---
configs/sama5d2_icp_mmc_defconfig | 1 +
configs/sama5d2_xplained_emmc_defconfig | 1 +
configs/sama5d2_xplained_mmc_defconfig | 1 +
configs/sama5d2_xplained_qspiflash_defconfig | 1 +
configs/sama5d2_xplained_spiflash_defconfig | 1 +
drivers/timer/Kconfig | 8 ++++++++
drivers/timer/Makefile | 2 +-
7 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig
index 29203b175c..4da4d803da 100644
--- a/configs/sama5d2_icp_mmc_defconfig
+++ b/configs/sama5d2_icp_mmc_defconfig
@@ -87,5 +87,6 @@ CONFIG_SYSRESET_CMD_RESET=y
CONFIG_SYSRESET_AT91=y
CONFIG_SPL_TIMER=y
CONFIG_ATMEL_TCB_TIMER=y
+CONFIG_SPL_ATMEL_TCB_TIMER=y
CONFIG_OF_LIBFDT_OVERLAY=y
# CONFIG_EFI_LOADER_HII is not set
diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig
index 380f320357..03461bdad6 100644
--- a/configs/sama5d2_xplained_emmc_defconfig
+++ b/configs/sama5d2_xplained_emmc_defconfig
@@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y
CONFIG_SYSRESET_AT91=y
CONFIG_SPL_TIMER=y
CONFIG_ATMEL_TCB_TIMER=y
+CONFIG_SPL_ATMEL_TCB_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 49184e271c..9c0406f18a 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -98,6 +98,7 @@ CONFIG_SYSRESET_CMD_RESET=y
CONFIG_SYSRESET_AT91=y
CONFIG_SPL_TIMER=y
CONFIG_ATMEL_TCB_TIMER=y
+CONFIG_SPL_ATMEL_TCB_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig
index e973999360..2350a94172 100644
--- a/configs/sama5d2_xplained_qspiflash_defconfig
+++ b/configs/sama5d2_xplained_qspiflash_defconfig
@@ -97,6 +97,7 @@ CONFIG_SYSRESET_CMD_RESET=y
CONFIG_SYSRESET_AT91=y
CONFIG_SPL_TIMER=y
CONFIG_ATMEL_TCB_TIMER=y
+CONFIG_SPL_ATMEL_TCB_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 2109da1b50..61e3e8a995 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -101,6 +101,7 @@ CONFIG_SYSRESET_CMD_RESET=y
CONFIG_SYSRESET_AT91=y
CONFIG_SPL_TIMER=y
CONFIG_ATMEL_TCB_TIMER=y
+CONFIG_SPL_ATMEL_TCB_TIMER=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 8fad59b81a..5c0de382b0 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -104,6 +104,14 @@ config ATMEL_TCB_TIMER
Select this to enable the use of the timer counter as a monotonic
counter.
+config SPL_ATMEL_TCB_TIMER
+ bool "Atmel timer counter support in SPL"
+ depends on SPL_TIMER
+ depends on ARCH_AT91
+ help
+ Select this to enable the use of the timer counter as a monotonic
+ counter in SPL.
+
config CADENCE_TTC_TIMER
bool "Cadence TTC (Triple Timer Counter)"
depends on TIMER
diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
index 58da6c1e84..ff1b172b2a 100644
--- a/drivers/timer/Makefile
+++ b/drivers/timer/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_ARC_TIMER) += arc_timer.o
obj-$(CONFIG_AST_TIMER) += ast_timer.o
obj-$(CONFIG_ATCPIT100_TIMER) += atcpit100_timer.o
obj-$(CONFIG_ATMEL_PIT_TIMER) += atmel_pit_timer.o
-obj-$(CONFIG_ATMEL_TCB_TIMER) += atmel_tcb_timer.o
+obj-$(CONFIG_$(SPL_)ATMEL_TCB_TIMER) += atmel_tcb_timer.o
obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence-ttc.o
obj-$(CONFIG_DESIGNWARE_APB_TIMER) += dw-apb-timer.o
obj-$(CONFIG_MPC83XX_TIMER) += mpc83xx_timer.o
--
2.25.1
More information about the U-Boot
mailing list