Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E2E3C433EF for ; Mon, 4 Apr 2022 08:36:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C23580E94; Mon, 4 Apr 2022 10:36:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="MMzyXnp0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 74900808BA; Mon, 4 Apr 2022 10:36:19 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 524BE80E94 for ; Mon, 4 Apr 2022 10:36:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1649061369; x=1680597369; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Cb0HYymbix2eM3K9/GPY+ptB1k1tFg+zVUZH1IRtqH0=; b=MMzyXnp0K70h8VkM4WfjCGP8IHxHSVgQxd05wPYrjnHWwvP2VYB7t0Fb AlepS7N13moGtCFY8kWFksFXM2dOWXVuG8W/Xw4NnBqyVEBkZrAvlsVIy 6JbHYLCkmCYgieDslhjLW3Nzzfa44nGmixSOBKa+Ux6ddVnSQlGrfRJhB b1NzYllKiD9tF3X1Y9BaGf7zSuN2R5y5ZwlNRwZaqnZJaSh1VVl6JtTfX wuDdg2Wr2rZAxXK/nmVqx+KqFWIrV3XdYFkzp24GlDZwiFJZbKajpFCKu HJUp4Tht/Usgk3qDZMCuhRrTmlVJKYKXNZrnjMREmMpwIBEl9XIv5mstf A==; X-IronPort-AV: E=Sophos;i="5.90,233,1643698800"; d="scan'208";a="159176261" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Apr 2022 01:36:07 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 4 Apr 2022 01:36:06 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 4 Apr 2022 01:36:01 -0700 From: Eugen Hristev To: , CC: , , , Eugen Hristev Subject: [PATCH 1/2] timers: atmel_tcb: introduce CONFIG_SPL_ATMEL_TCB Date: Mon, 4 Apr 2022 11:35:50 +0300 Message-ID: <20220404083551.1872623-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- 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