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 D50AAC433EF for ; Mon, 4 Apr 2022 08:37:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B48A5838B5; Mon, 4 Apr 2022 10:37:39 +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="tkdsHe/z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 77BDC839FD; Mon, 4 Apr 2022 10:37:02 +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 0053681DDF for ; Mon, 4 Apr 2022 10:36:11 +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=1649061372; x=1680597372; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rAqtY2YDzjVLQeBF+tsDNcK1p0WA7+JX67zGLZh8aTU=; b=tkdsHe/z73Mb+2Xv+O5qkrvCgUsLgdF4ISsv+ZKcUUBZrSLykzbyuAla 070N+TtCXmPZQzCdo2HGZHwU3lEhF1szF+Gxe5n435HFnu1Qf2ynfQpeP AOufYMGBR4dHT1rdqTYNifU4D1PwY5qfJ/57sSpRNTv/Es6UlTyZlvzzx wnWciFHO/8nSJ5Uq4Vfh1TXPirDQlnHGFmaajHggCEkReR9jTxMro+0nV SZEqYfPsrKDhyKVqM2mNqyd/xrwkq3KLINI9o46CtI6n5Y1rApjdjpBn3 GKinHPoM6bK8AEld6cr9690HqxDksjniQ7rOEmFuJrJDCO/lYlkPoXRU7 Q==; X-IronPort-AV: E=Sophos;i="5.90,233,1643698800"; d="scan'208";a="159176271" 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:10 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) 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:09 -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:07 -0700 From: Eugen Hristev To: , CC: , , , Eugen Hristev Subject: [PATCH 2/2] timers: atmel_pit: introduce CONFIG_SPL_ATMEL_PIT_TIMER Date: Mon, 4 Apr 2022 11:35:51 +0300 Message-ID: <20220404083551.1872623-2-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220404083551.1872623-1-eugen.hristev@microchip.com> References: <20220404083551.1872623-1-eugen.hristev@microchip.com> 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_PIT_TIMER 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 0.3 KBytes. Signed-off-by: Eugen Hristev --- configs/gardena-smart-gateway-at91sam_defconfig | 1 + configs/sama5d27_giantboard_defconfig | 1 + configs/sama5d27_som1_ek_mmc1_defconfig | 1 + configs/sama5d27_som1_ek_mmc_defconfig | 1 + configs/sama5d27_som1_ek_qspiflash_defconfig | 1 + configs/sama5d27_wlsom1_ek_mmc_defconfig | 1 + configs/sama5d27_wlsom1_ek_qspiflash_defconfig | 1 + configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + configs/sama5d3xek_mmc_defconfig | 1 + configs/sama5d3xek_nandflash_defconfig | 1 + configs/sama5d3xek_spiflash_defconfig | 1 + configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 1 + configs/sama5d4_xplained_spiflash_defconfig | 1 + configs/sama5d4ek_mmc_defconfig | 1 + configs/sama5d4ek_nandflash_defconfig | 1 + configs/sama5d4ek_spiflash_defconfig | 1 + drivers/timer/Kconfig | 9 +++++++++ drivers/timer/Makefile | 2 +- 20 files changed, 28 insertions(+), 1 deletion(-) diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig index 450ff86a37..efeb854892 100644 --- a/configs/gardena-smart-gateway-at91sam_defconfig +++ b/configs/gardena-smart-gateway-at91sam_defconfig @@ -102,6 +102,7 @@ CONFIG_ATMEL_USART=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y # CONFIG_SYS_WHITE_ON_BLACK is not set CONFIG_WDT=y CONFIG_WDT_AT91=y diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig index 69b7e90aa6..afcff0888a 100644 --- a/configs/sama5d27_giantboard_defconfig +++ b/configs/sama5d27_giantboard_defconfig @@ -78,6 +78,7 @@ CONFIG_DM_SPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_mmc1_defconfig b/configs/sama5d27_som1_ek_mmc1_defconfig index 1a9f7d58f4..d9e9d71cc8 100644 --- a/configs/sama5d27_som1_ek_mmc1_defconfig +++ b/configs/sama5d27_som1_ek_mmc1_defconfig @@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig index f94f1c76dc..5439cd914b 100644 --- a/configs/sama5d27_som1_ek_mmc_defconfig +++ b/configs/sama5d27_som1_ek_mmc_defconfig @@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_som1_ek_qspiflash_defconfig b/configs/sama5d27_som1_ek_qspiflash_defconfig index 1b8ba65bf5..09de735d56 100644 --- a/configs/sama5d27_som1_ek_qspiflash_defconfig +++ b/configs/sama5d27_som1_ek_qspiflash_defconfig @@ -95,6 +95,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_wlsom1_ek_mmc_defconfig b/configs/sama5d27_wlsom1_ek_mmc_defconfig index 097031fe04..04250c53cb 100644 --- a/configs/sama5d27_wlsom1_ek_mmc_defconfig +++ b/configs/sama5d27_wlsom1_ek_mmc_defconfig @@ -101,6 +101,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig index 090ab26ef8..03337e0c65 100644 --- a/configs/sama5d27_wlsom1_ek_qspiflash_defconfig +++ b/configs/sama5d27_wlsom1_ek_qspiflash_defconfig @@ -105,6 +105,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index a2bbde9f47..0a143ceb4a 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -91,6 +91,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index 64946f5d74..580a3cfb21 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -94,6 +94,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig index 2e640ffc99..c7cd90dbfd 100644 --- a/configs/sama5d3xek_mmc_defconfig +++ b/configs/sama5d3xek_mmc_defconfig @@ -99,6 +99,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig index f97faff02b..0513f9e6aa 100644 --- a/configs/sama5d3xek_nandflash_defconfig +++ b/configs/sama5d3xek_nandflash_defconfig @@ -101,6 +101,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig index 33a4550277..333299dc44 100644 --- a/configs/sama5d3xek_spiflash_defconfig +++ b/configs/sama5d3xek_spiflash_defconfig @@ -100,6 +100,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index 3e60b7c9d5..1d9fb26239 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -92,6 +92,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index c44d30cbe0..e0d654b4e5 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -96,6 +96,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index 9567cb1218..29b64debd5 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -98,6 +98,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig index e31599af3f..3de34fbf2c 100644 --- a/configs/sama5d4ek_mmc_defconfig +++ b/configs/sama5d4ek_mmc_defconfig @@ -90,6 +90,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig index 0a6ae70cc9..7c2ab76a71 100644 --- a/configs/sama5d4ek_nandflash_defconfig +++ b/configs/sama5d4ek_nandflash_defconfig @@ -94,6 +94,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig index ef659d1706..dd1d27820c 100644 --- a/configs/sama5d4ek_spiflash_defconfig +++ b/configs/sama5d4ek_spiflash_defconfig @@ -93,6 +93,7 @@ CONFIG_SYSRESET_CMD_RESET=y CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SPL_ATMEL_PIT_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 5c0de382b0..625449fdaa 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -96,6 +96,15 @@ config ATMEL_PIT_TIMER it is designed to offer maximum accuracy and efficient management, even for systems with long response time. +config SPL_ATMEL_PIT_TIMER + bool "Atmel periodic interval timer support in SPL" + depends on SPL_TIMER + help + Select this to enable a periodic interval timer for Atmel devices, + it is designed to offer maximum accuracy and efficient management, + even for systems with long response time. + Select this to be available in SPL. + config ATMEL_TCB_TIMER bool "Atmel timer counter support" depends on TIMER diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile index ff1b172b2a..7d6e82f9b8 100644 --- a/drivers/timer/Makefile +++ b/drivers/timer/Makefile @@ -9,7 +9,7 @@ obj-$(CONFIG_ANDES_PLMT_TIMER) += andes_plmt_timer.o 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_$(SPL_)ATMEL_PIT_TIMER) += atmel_pit_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 -- 2.25.1