public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/2] driver: timer: Add Atmel PIT timer driver
@ 2017-08-15  9:40 Wenyou Yang
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 1/2] driver: timer: Add the " Wenyou Yang
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 2/2] board: atmel: Use the new " Wenyou Yang
  0 siblings, 2 replies; 7+ messages in thread
From: Wenyou Yang @ 2017-08-15  9:40 UTC (permalink / raw)
  To: u-boot

Add the Atmel PIT timer driver which supports the driver model
and device tree, and covert the boards to support the new Atmel
PIT timer driver.

Changes in v2:
 - Integrate the PATCH {timer: Add Atmel PIT timer driver} to
   one patch set.
 - Rebase on latest commit of uboot/master (2d3c4ae35).
 - Retain the CONFIG_SYS_TIMER_COUNTER macro in <soc.h>.
 - Convert all atmel boards to support the new timer driver.

Wenyou Yang (2):
  driver: timer: Add the Atmel PIT timer driver
  board: atmel: Use the new PIT timer driver

 arch/arm/dts/sama5d2.dtsi                      | 28 ++++++++
 arch/arm/mach-at91/arm926ejs/Makefile          |  2 +
 arch/arm/mach-at91/armv7/Makefile              |  2 +
 configs/at91sam9260ek_dataflash_cs0_defconfig  |  2 +
 configs/at91sam9260ek_dataflash_cs1_defconfig  |  2 +
 configs/at91sam9260ek_nandflash_defconfig      |  2 +
 configs/at91sam9261ek_dataflash_cs0_defconfig  |  2 +
 configs/at91sam9261ek_dataflash_cs3_defconfig  |  2 +
 configs/at91sam9261ek_nandflash_defconfig      |  2 +
 configs/at91sam9263ek_dataflash_cs0_defconfig  |  2 +
 configs/at91sam9263ek_dataflash_defconfig      |  2 +
 configs/at91sam9263ek_nandflash_defconfig      |  2 +
 configs/at91sam9263ek_norflash_boot_defconfig  |  2 +
 configs/at91sam9263ek_norflash_defconfig       |  2 +
 configs/at91sam9g20ek_2mmc_defconfig           |  2 +
 configs/at91sam9g20ek_2mmc_nandflash_defconfig |  2 +
 configs/at91sam9g20ek_dataflash_cs0_defconfig  |  2 +
 configs/at91sam9g20ek_dataflash_cs1_defconfig  |  2 +
 configs/at91sam9g20ek_nandflash_defconfig      |  2 +
 configs/at91sam9m10g45ek_mmc_defconfig         |  2 +
 configs/at91sam9m10g45ek_nandflash_defconfig   |  2 +
 configs/at91sam9n12ek_mmc_defconfig            |  2 +
 configs/at91sam9n12ek_nandflash_defconfig      |  2 +
 configs/at91sam9n12ek_spiflash_defconfig       |  2 +
 configs/at91sam9rlek_dataflash_defconfig       |  2 +
 configs/at91sam9rlek_mmc_defconfig             |  2 +
 configs/at91sam9rlek_nandflash_defconfig       |  2 +
 configs/at91sam9x5ek_dataflash_defconfig       |  2 +
 configs/at91sam9x5ek_mmc_defconfig             |  2 +
 configs/at91sam9x5ek_nandflash_defconfig       |  2 +
 configs/at91sam9x5ek_spiflash_defconfig        |  2 +
 configs/at91sam9xeek_dataflash_cs0_defconfig   |  2 +
 configs/at91sam9xeek_dataflash_cs1_defconfig   |  2 +
 configs/at91sam9xeek_nandflash_defconfig       |  2 +
 configs/gurnard_defconfig                      |  2 +
 configs/sama5d2_xplained_mmc_defconfig         |  3 +
 configs/sama5d2_xplained_spiflash_defconfig    |  3 +
 configs/sama5d36ek_cmp_mmc_defconfig           |  2 +
 configs/sama5d36ek_cmp_nandflash_defconfig     |  2 +
 configs/sama5d36ek_cmp_spiflash_defconfig      |  2 +
 configs/sama5d3_xplained_mmc_defconfig         |  3 +
 configs/sama5d3_xplained_nandflash_defconfig   |  3 +
 configs/sama5d3xek_mmc_defconfig               |  3 +
 configs/sama5d3xek_nandflash_defconfig         |  3 +
 configs/sama5d3xek_spiflash_defconfig          |  3 +
 configs/sama5d4_xplained_mmc_defconfig         |  3 +
 configs/sama5d4_xplained_nandflash_defconfig   |  3 +
 configs/sama5d4_xplained_spiflash_defconfig    |  3 +
 configs/sama5d4ek_mmc_defconfig                |  3 +
 configs/sama5d4ek_nandflash_defconfig          |  3 +
 configs/sama5d4ek_spiflash_defconfig           |  3 +
 drivers/timer/Kconfig                          |  8 +++
 drivers/timer/Makefile                         |  1 +
 drivers/timer/atmel_pit_timer.c                | 90 ++++++++++++++++++++++++++
 54 files changed, 240 insertions(+)
 create mode 100644 drivers/timer/atmel_pit_timer.c

-- 
2.13.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/2] driver: timer: Add the Atmel PIT timer driver
  2017-08-15  9:40 [U-Boot] [PATCH v2 0/2] driver: timer: Add Atmel PIT timer driver Wenyou Yang
@ 2017-08-15  9:40 ` Wenyou Yang
  2017-08-26 13:38   ` Simon Glass
  2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 2/2] board: atmel: Use the new " Wenyou Yang
  1 sibling, 2 replies; 7+ messages in thread
From: Wenyou Yang @ 2017-08-15  9:40 UTC (permalink / raw)
  To: u-boot

Add the new Atmel PIT timer driver, which supports the driver model
and device tree.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
---

Changes in v2: None

 arch/arm/mach-at91/arm926ejs/Makefile |  2 +
 arch/arm/mach-at91/armv7/Makefile     |  2 +
 drivers/timer/Kconfig                 |  8 ++++
 drivers/timer/Makefile                |  1 +
 drivers/timer/atmel_pit_timer.c       | 90 +++++++++++++++++++++++++++++++++++
 5 files changed, 103 insertions(+)
 create mode 100644 drivers/timer/atmel_pit_timer.c

diff --git a/arch/arm/mach-at91/arm926ejs/Makefile b/arch/arm/mach-at91/arm926ejs/Makefile
index 624ccd7c2f..dc935fd9e5 100644
--- a/arch/arm/mach-at91/arm926ejs/Makefile
+++ b/arch/arm/mach-at91/arm926ejs/Makefile
@@ -22,7 +22,9 @@ obj-y += cache.o
 obj-y += clock.o
 obj-y += cpu.o
 obj-y	+= reset.o
+ifeq ($(CONFIG_ATMEL_PIT_TIMER),)
 obj-y	+= timer.o
+endif
 
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
 obj-y	+= lowlevel_init.o
diff --git a/arch/arm/mach-at91/armv7/Makefile b/arch/arm/mach-at91/armv7/Makefile
index 9538bc1fad..1ede4cb10a 100644
--- a/arch/arm/mach-at91/armv7/Makefile
+++ b/arch/arm/mach-at91/armv7/Makefile
@@ -14,4 +14,6 @@ obj-$(CONFIG_SAMA5D4)	+= sama5d4_devices.o
 obj-y += clock.o
 obj-y += cpu.o
 obj-y += reset.o
+ifeq ($(CONFIG_ATMEL_PIT_TIMER),)
 obj-y += timer.o
+endif
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 13f122350b..6305bbf01c 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -44,6 +44,14 @@ config ALTERA_TIMER
 	  Select this to enable a timer for Altera devices. Please find
 	  details on the "Embedded Peripherals IP User Guide" of Altera.
 
+config ATMEL_PIT_TIMER
+	bool "Atmel periodic interval timer support"
+	depends on 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.
+
 config SANDBOX_TIMER
 	bool "Sandbox timer support"
 	depends on SANDBOX && TIMER
diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
index fa7ce7c835..69e8961a7b 100644
--- a/drivers/timer/Makefile
+++ b/drivers/timer/Makefile
@@ -15,3 +15,4 @@ obj-$(CONFIG_ARC_TIMER)	+= arc_timer.o
 obj-$(CONFIG_AG101P_TIMER) += ag101p_timer.o
 obj-$(CONFIG_AE3XX_TIMER) += ae3xx_timer.o
 obj-$(CONFIG_ROCKCHIP_TIMER) += rockchip_timer.o
+obj-$(CONFIG_ATMEL_PIT_TIMER) += atmel_pit_timer.o
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
new file mode 100644
index 0000000000..999717b91f
--- /dev/null
+++ b/drivers/timer/atmel_pit_timer.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2017 Microchip Corporation
+ * 		      Wenyou.Yang <wenyou.yang@microchip.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <clk.h>
+#include <dm.h>
+#include <timer.h>
+#include <asm/io.h>
+
+#define AT91_PIT_VALUE		0xfffff
+#define AT91_PIT_PITEN		BIT(24)		/* Timer Enabled */
+
+struct atmel_pit_regs {
+	u32	mode;
+	u32	status;
+	u32	value;
+	u32	value_image;
+};
+
+struct atmel_pit_platdata {
+	struct atmel_pit_regs *regs;
+};
+
+static int atmel_pit_get_count(struct udevice *dev, u64 *count)
+{
+	struct atmel_pit_platdata *plat = dev_get_platdata(dev);
+	struct atmel_pit_regs *const regs = plat->regs;
+	u32 val = readl(&regs->value_image);
+
+	*count = timer_conv_64(val);
+
+	return 0;
+}
+
+static int atmel_pit_probe(struct udevice *dev)
+{
+	struct atmel_pit_platdata *plat = dev_get_platdata(dev);
+	struct atmel_pit_regs *const regs = plat->regs;
+	struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
+	struct clk clk;
+	ulong clk_rate;
+	int ret;
+
+	ret = clk_get_by_index(dev, 0, &clk);
+	if (ret)
+		return -EINVAL;
+
+	clk_rate = clk_get_rate(&clk);
+	if (!clk_rate)
+		return -EINVAL;
+
+	uc_priv->clock_rate = clk_rate / 16;
+
+	writel(AT91_PIT_VALUE | AT91_PIT_PITEN, &regs->mode);
+
+	return 0;
+}
+
+static int atmel_pit_ofdata_to_platdata(struct udevice *dev)
+{
+	struct atmel_pit_platdata *plat = dev_get_platdata(dev);
+
+	plat->regs = (struct atmel_pit_regs *)devfdt_get_addr_ptr(dev);
+
+	return 0;
+}
+
+static const struct timer_ops atmel_pit_ops = {
+	.get_count = atmel_pit_get_count,
+};
+
+static const struct udevice_id atmel_pit_ids[] = {
+	{ .compatible = "atmel,at91sam9260-pit" },
+	{ }
+};
+
+U_BOOT_DRIVER(atmel_pit) = {
+	.name	= "atmel_pit",
+	.id	= UCLASS_TIMER,
+	.of_match = atmel_pit_ids,
+	.ofdata_to_platdata = atmel_pit_ofdata_to_platdata,
+	.platdata_auto_alloc_size = sizeof(struct atmel_pit_platdata),
+	.probe	= atmel_pit_probe,
+	.ops	= &atmel_pit_ops,
+	.flags	= DM_FLAG_PRE_RELOC,
+};
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/2] board: atmel: Use the new PIT timer driver
  2017-08-15  9:40 [U-Boot] [PATCH v2 0/2] driver: timer: Add Atmel PIT timer driver Wenyou Yang
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 1/2] driver: timer: Add the " Wenyou Yang
@ 2017-08-15  9:40 ` Wenyou Yang
  2017-08-26 13:38   ` Simon Glass
  2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 2 replies; 7+ messages in thread
From: Wenyou Yang @ 2017-08-15  9:40 UTC (permalink / raw)
  To: u-boot

Use the Atmel PIT timer driver which supports the driver model
and device tree.

Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
---

Changes in v2:
 - Integrate the PATCH {timer: Add Atmel PIT timer driver} to
   one patch set.
 - Rebase on latest commit of uboot/master (2d3c4ae35).
 - Retain the CONFIG_SYS_TIMER_COUNTER macro in <soc.h>.
 - Convert all atmel boards to support the new timer driver.

 arch/arm/dts/sama5d2.dtsi                      | 28 ++++++++++++++++++++++++++
 configs/at91sam9260ek_dataflash_cs0_defconfig  |  2 ++
 configs/at91sam9260ek_dataflash_cs1_defconfig  |  2 ++
 configs/at91sam9260ek_nandflash_defconfig      |  2 ++
 configs/at91sam9261ek_dataflash_cs0_defconfig  |  2 ++
 configs/at91sam9261ek_dataflash_cs3_defconfig  |  2 ++
 configs/at91sam9261ek_nandflash_defconfig      |  2 ++
 configs/at91sam9263ek_dataflash_cs0_defconfig  |  2 ++
 configs/at91sam9263ek_dataflash_defconfig      |  2 ++
 configs/at91sam9263ek_nandflash_defconfig      |  2 ++
 configs/at91sam9263ek_norflash_boot_defconfig  |  2 ++
 configs/at91sam9263ek_norflash_defconfig       |  2 ++
 configs/at91sam9g20ek_2mmc_defconfig           |  2 ++
 configs/at91sam9g20ek_2mmc_nandflash_defconfig |  2 ++
 configs/at91sam9g20ek_dataflash_cs0_defconfig  |  2 ++
 configs/at91sam9g20ek_dataflash_cs1_defconfig  |  2 ++
 configs/at91sam9g20ek_nandflash_defconfig      |  2 ++
 configs/at91sam9m10g45ek_mmc_defconfig         |  2 ++
 configs/at91sam9m10g45ek_nandflash_defconfig   |  2 ++
 configs/at91sam9n12ek_mmc_defconfig            |  2 ++
 configs/at91sam9n12ek_nandflash_defconfig      |  2 ++
 configs/at91sam9n12ek_spiflash_defconfig       |  2 ++
 configs/at91sam9rlek_dataflash_defconfig       |  2 ++
 configs/at91sam9rlek_mmc_defconfig             |  2 ++
 configs/at91sam9rlek_nandflash_defconfig       |  2 ++
 configs/at91sam9x5ek_dataflash_defconfig       |  2 ++
 configs/at91sam9x5ek_mmc_defconfig             |  2 ++
 configs/at91sam9x5ek_nandflash_defconfig       |  2 ++
 configs/at91sam9x5ek_spiflash_defconfig        |  2 ++
 configs/at91sam9xeek_dataflash_cs0_defconfig   |  2 ++
 configs/at91sam9xeek_dataflash_cs1_defconfig   |  2 ++
 configs/at91sam9xeek_nandflash_defconfig       |  2 ++
 configs/gurnard_defconfig                      |  2 ++
 configs/sama5d2_xplained_mmc_defconfig         |  3 +++
 configs/sama5d2_xplained_spiflash_defconfig    |  3 +++
 configs/sama5d36ek_cmp_mmc_defconfig           |  2 ++
 configs/sama5d36ek_cmp_nandflash_defconfig     |  2 ++
 configs/sama5d36ek_cmp_spiflash_defconfig      |  2 ++
 configs/sama5d3_xplained_mmc_defconfig         |  3 +++
 configs/sama5d3_xplained_nandflash_defconfig   |  3 +++
 configs/sama5d3xek_mmc_defconfig               |  3 +++
 configs/sama5d3xek_nandflash_defconfig         |  3 +++
 configs/sama5d3xek_spiflash_defconfig          |  3 +++
 configs/sama5d4_xplained_mmc_defconfig         |  3 +++
 configs/sama5d4_xplained_nandflash_defconfig   |  3 +++
 configs/sama5d4_xplained_spiflash_defconfig    |  3 +++
 configs/sama5d4ek_mmc_defconfig                |  3 +++
 configs/sama5d4ek_nandflash_defconfig          |  3 +++
 configs/sama5d4ek_spiflash_defconfig           |  3 +++
 49 files changed, 137 insertions(+)

diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi
index 8d89b83b53..d8a65145d6 100644
--- a/arch/arm/dts/sama5d2.dtsi
+++ b/arch/arm/dts/sama5d2.dtsi
@@ -632,6 +632,34 @@
 				status = "disabled";
 			};
 
+			rstc at f8048000 {
+				compatible = "atmel,sama5d3-rstc";
+				reg = <0xf8048000 0x10>;
+				clocks = <&clk32k>;
+			};
+
+			shdwc at f8048010 {
+				compatible = "atmel,sama5d2-shdwc";
+				reg = <0xf8048010 0x10>;
+				clocks = <&clk32k>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				atmel,wakeup-rtc-timer;
+			};
+
+			pit: timer at f8048030 {
+				compatible = "atmel,at91sam9260-pit";
+				reg = <0xf8048030 0x10>;
+				clocks = <&h32ck>;
+			};
+
+			watchdog at f8048040 {
+				compatible = "atmel,sama5d4-wdt";
+				reg = <0xf8048040 0x10>;
+				clocks = <&clk32k>;
+				status = "disabled";
+			};
+
 			sckc at f8048050 {
 				compatible = "atmel,at91sam9x5-sckc";
 				reg = <0xf8048050 0x4>;
diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
index 8661d9f098..c231f5f8ab 100644
--- a/configs/at91sam9260ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
index 4c0595d7a2..e19d564eaf 100644
--- a/configs/at91sam9260ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
index d8c981983e..f183c42e64 100644
--- a/configs/at91sam9260ek_nandflash_defconfig
+++ b/configs/at91sam9260ek_nandflash_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index b87255fa38..dbeae9d26a 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index be221a6cd1..e84c139254 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index 78faadfd8a..148d71fca3 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
index a4a65c9b80..f9de34ed5b 100644
--- a/configs/at91sam9263ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
index a4a65c9b80..f9de34ed5b 100644
--- a/configs/at91sam9263ek_dataflash_defconfig
+++ b/configs/at91sam9263ek_dataflash_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
index 13ba9de56f..ef7a79d7b6 100644
--- a/configs/at91sam9263ek_nandflash_defconfig
+++ b/configs/at91sam9263ek_nandflash_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
index f08e7ae9a4..462e500afc 100644
--- a/configs/at91sam9263ek_norflash_boot_defconfig
+++ b/configs/at91sam9263ek_norflash_boot_defconfig
@@ -53,6 +53,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
index 52811596b4..3aee6f51af 100644
--- a/configs/at91sam9263ek_norflash_defconfig
+++ b/configs/at91sam9263ek_norflash_defconfig
@@ -53,6 +53,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
index bac13a3fbc..08dc34eab8 100644
--- a/configs/at91sam9g20ek_2mmc_defconfig
+++ b/configs/at91sam9g20ek_2mmc_defconfig
@@ -51,6 +51,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
index c1d52149e7..9a07b6f6fc 100644
--- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
+++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
@@ -51,6 +51,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
index 8a7d8777d2..71f8864371 100644
--- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
index 170242b24b..a14471c795 100644
--- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
index 8715728845..fb47c04c75 100644
--- a/configs/at91sam9g20ek_nandflash_defconfig
+++ b/configs/at91sam9g20ek_nandflash_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9m10g45ek_mmc_defconfig b/configs/at91sam9m10g45ek_mmc_defconfig
index e51a827395..57013f8982 100644
--- a/configs/at91sam9m10g45ek_mmc_defconfig
+++ b/configs/at91sam9m10g45ek_mmc_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_CLOCK=132000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9m10g45ek_nandflash_defconfig b/configs/at91sam9m10g45ek_nandflash_defconfig
index 9c36b6b18a..c8ce33542f 100644
--- a/configs/at91sam9m10g45ek_nandflash_defconfig
+++ b/configs/at91sam9m10g45ek_nandflash_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_CLOCK=132000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index 1e5d78f46c..99632c6429 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index 9f7a3aa062..6cdcb04a40 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 9fa6894eb2..6279d1f63c 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -48,6 +48,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig
index 9eec6e8980..1ccc21c3f8 100644
--- a/configs/at91sam9rlek_dataflash_defconfig
+++ b/configs/at91sam9rlek_dataflash_defconfig
@@ -52,4 +52,6 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig
index af7643d4c0..b7497bff2f 100644
--- a/configs/at91sam9rlek_mmc_defconfig
+++ b/configs/at91sam9rlek_mmc_defconfig
@@ -52,4 +52,6 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig
index 7a756f6713..4bdd1c0615 100644
--- a/configs/at91sam9rlek_nandflash_defconfig
+++ b/configs/at91sam9rlek_nandflash_defconfig
@@ -52,4 +52,6 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index 2e940398f8..9bd1e54bdd 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index 98612dd56a..6b2933549c 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index 6a007fd3e9..656af4f705 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 9f09997f0c..8ec0c8f0cb 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -54,6 +54,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
index c69d27f1c8..d1390fb540 100644
--- a/configs/at91sam9xeek_dataflash_cs0_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
index cf734a5063..8e2009b524 100644
--- a/configs/at91sam9xeek_dataflash_cs1_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
index 226e54f9f9..a530cf2454 100644
--- a/configs/at91sam9xeek_nandflash_defconfig
+++ b/configs/at91sam9xeek_nandflash_defconfig
@@ -49,5 +49,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index 1a27fcfcaa..c3e22daa61 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -22,6 +22,8 @@ CONFIG_CMD_PART=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 2bfd61b08f..d59fd8216c 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -71,6 +71,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 07fb71b769..a997aa74bd 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -69,6 +69,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
index 6cc9bb64c6..930700f7c3 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -53,4 +53,6 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
index 6c24a0d22f..b75e4269bc 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -53,5 +53,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
 CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
index 168bf1961e..e3f67da1c4 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -53,5 +53,7 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
 CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index e8a9ee9d2d..b7d445ad68 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -66,6 +66,9 @@ CONFIG_DEBUG_UART_CLOCK=132000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index f3c338c0ac..5539616163 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -63,6 +63,9 @@ CONFIG_DEBUG_UART_CLOCK=132000000
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index 32b4c422aa..2843e3b5de 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -72,6 +72,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index c1ddfd03d6..fd4d5311f4 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -67,6 +67,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index 823cdcce7d..9434017341 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -68,6 +68,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index 09da2e0855..de0ce40a56 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -66,6 +66,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 5ac5d08527..cba3c8b640 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -63,6 +63,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index 131d0e5b9d..174e2bc5ba 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -65,6 +65,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index 395a01760f..ade4d30eaf 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -69,6 +69,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index 9eab7f712b..378a03c17a 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -66,6 +66,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index f25ca9cfdb..ff94d7a113 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -65,6 +65,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 1/2] driver: timer: Add the Atmel PIT timer driver
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 1/2] driver: timer: Add the " Wenyou Yang
@ 2017-08-26 13:38   ` Simon Glass
  2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-08-26 13:38 UTC (permalink / raw)
  To: u-boot

On 15 August 2017 at 03:40, Wenyou Yang <wenyou.yang@microchip.com> wrote:
> Add the new Atmel PIT timer driver, which supports the driver model
> and device tree.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
> ---
>
> Changes in v2: None
>
>  arch/arm/mach-at91/arm926ejs/Makefile |  2 +
>  arch/arm/mach-at91/armv7/Makefile     |  2 +
>  drivers/timer/Kconfig                 |  8 ++++
>  drivers/timer/Makefile                |  1 +
>  drivers/timer/atmel_pit_timer.c       | 90 +++++++++++++++++++++++++++++++++++
>  5 files changed, 103 insertions(+)
>  create mode 100644 drivers/timer/atmel_pit_timer.c

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v2 2/2] board: atmel: Use the new PIT timer driver
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 2/2] board: atmel: Use the new " Wenyou Yang
@ 2017-08-26 13:38   ` Simon Glass
  2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2017-08-26 13:38 UTC (permalink / raw)
  To: u-boot

On 15 August 2017 at 03:40, Wenyou Yang <wenyou.yang@microchip.com> wrote:
> Use the Atmel PIT timer driver which supports the driver model
> and device tree.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
> ---
>
> Changes in v2:
>  - Integrate the PATCH {timer: Add Atmel PIT timer driver} to
>    one patch set.
>  - Rebase on latest commit of uboot/master (2d3c4ae35).
>  - Retain the CONFIG_SYS_TIMER_COUNTER macro in <soc.h>.
>  - Convert all atmel boards to support the new timer driver.
>
>  arch/arm/dts/sama5d2.dtsi                      | 28 ++++++++++++++++++++++++++
>  configs/at91sam9260ek_dataflash_cs0_defconfig  |  2 ++
>  configs/at91sam9260ek_dataflash_cs1_defconfig  |  2 ++
>  configs/at91sam9260ek_nandflash_defconfig      |  2 ++
>  configs/at91sam9261ek_dataflash_cs0_defconfig  |  2 ++
>  configs/at91sam9261ek_dataflash_cs3_defconfig  |  2 ++
>  configs/at91sam9261ek_nandflash_defconfig      |  2 ++
>  configs/at91sam9263ek_dataflash_cs0_defconfig  |  2 ++
>  configs/at91sam9263ek_dataflash_defconfig      |  2 ++
>  configs/at91sam9263ek_nandflash_defconfig      |  2 ++
>  configs/at91sam9263ek_norflash_boot_defconfig  |  2 ++
>  configs/at91sam9263ek_norflash_defconfig       |  2 ++
>  configs/at91sam9g20ek_2mmc_defconfig           |  2 ++
>  configs/at91sam9g20ek_2mmc_nandflash_defconfig |  2 ++
>  configs/at91sam9g20ek_dataflash_cs0_defconfig  |  2 ++
>  configs/at91sam9g20ek_dataflash_cs1_defconfig  |  2 ++
>  configs/at91sam9g20ek_nandflash_defconfig      |  2 ++
>  configs/at91sam9m10g45ek_mmc_defconfig         |  2 ++
>  configs/at91sam9m10g45ek_nandflash_defconfig   |  2 ++
>  configs/at91sam9n12ek_mmc_defconfig            |  2 ++
>  configs/at91sam9n12ek_nandflash_defconfig      |  2 ++
>  configs/at91sam9n12ek_spiflash_defconfig       |  2 ++
>  configs/at91sam9rlek_dataflash_defconfig       |  2 ++
>  configs/at91sam9rlek_mmc_defconfig             |  2 ++
>  configs/at91sam9rlek_nandflash_defconfig       |  2 ++
>  configs/at91sam9x5ek_dataflash_defconfig       |  2 ++
>  configs/at91sam9x5ek_mmc_defconfig             |  2 ++
>  configs/at91sam9x5ek_nandflash_defconfig       |  2 ++
>  configs/at91sam9x5ek_spiflash_defconfig        |  2 ++
>  configs/at91sam9xeek_dataflash_cs0_defconfig   |  2 ++
>  configs/at91sam9xeek_dataflash_cs1_defconfig   |  2 ++
>  configs/at91sam9xeek_nandflash_defconfig       |  2 ++
>  configs/gurnard_defconfig                      |  2 ++
>  configs/sama5d2_xplained_mmc_defconfig         |  3 +++
>  configs/sama5d2_xplained_spiflash_defconfig    |  3 +++
>  configs/sama5d36ek_cmp_mmc_defconfig           |  2 ++
>  configs/sama5d36ek_cmp_nandflash_defconfig     |  2 ++
>  configs/sama5d36ek_cmp_spiflash_defconfig      |  2 ++
>  configs/sama5d3_xplained_mmc_defconfig         |  3 +++
>  configs/sama5d3_xplained_nandflash_defconfig   |  3 +++
>  configs/sama5d3xek_mmc_defconfig               |  3 +++
>  configs/sama5d3xek_nandflash_defconfig         |  3 +++
>  configs/sama5d3xek_spiflash_defconfig          |  3 +++
>  configs/sama5d4_xplained_mmc_defconfig         |  3 +++
>  configs/sama5d4_xplained_nandflash_defconfig   |  3 +++
>  configs/sama5d4_xplained_spiflash_defconfig    |  3 +++
>  configs/sama5d4ek_mmc_defconfig                |  3 +++
>  configs/sama5d4ek_nandflash_defconfig          |  3 +++
>  configs/sama5d4ek_spiflash_defconfig           |  3 +++
>  49 files changed, 137 insertions(+)

I wonder if you could 'imply' these options in Kconfig instead?

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, v2, 1/2] driver: timer: Add the Atmel PIT timer driver
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 1/2] driver: timer: Add the " Wenyou Yang
  2017-08-26 13:38   ` Simon Glass
@ 2017-08-26 20:45   ` Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2017-08-26 20:45 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 15, 2017 at 05:40:26PM +0800, Wenyou.Yang at microchip.com wrote:

> Add the new Atmel PIT timer driver, which supports the driver model
> and device tree.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/1e384e7a/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, v2, 2/2] board: atmel: Use the new PIT timer driver
  2017-08-15  9:40 ` [U-Boot] [PATCH v2 2/2] board: atmel: Use the new " Wenyou Yang
  2017-08-26 13:38   ` Simon Glass
@ 2017-08-26 20:45   ` Tom Rini
  1 sibling, 0 replies; 7+ messages in thread
From: Tom Rini @ 2017-08-26 20:45 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 15, 2017 at 05:40:27PM +0800, Wenyou.Yang at microchip.com wrote:

> Use the Atmel PIT timer driver which supports the driver model
> and device tree.
> 
> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170826/f580c5b9/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-26 20:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15  9:40 [U-Boot] [PATCH v2 0/2] driver: timer: Add Atmel PIT timer driver Wenyou Yang
2017-08-15  9:40 ` [U-Boot] [PATCH v2 1/2] driver: timer: Add the " Wenyou Yang
2017-08-26 13:38   ` Simon Glass
2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-08-15  9:40 ` [U-Boot] [PATCH v2 2/2] board: atmel: Use the new " Wenyou Yang
2017-08-26 13:38   ` Simon Glass
2017-08-26 20:45   ` [U-Boot] [U-Boot, v2, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox