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

Signed-off-by: Wenyou Yang <wenyou.y...@microchip.com>
---
The patch is based on,
        [PATCH] timer: Add Atmel PIT timer driver
        https://lists.denx.de/pipermail/u-boot/2017-August/300788.html

 arch/arm/dts/sama5d2.dtsi                     | 28 +++++++++++++++++++++++++++
 arch/arm/mach-at91/include/mach/at91sam9g45.h |  3 ---
 arch/arm/mach-at91/include/mach/at91sam9x5.h  |  3 ---
 arch/arm/mach-at91/include/mach/sama5d2.h     |  3 ---
 arch/arm/mach-at91/include/mach/sama5d3.h     |  3 ---
 arch/arm/mach-at91/include/mach/sama5d4.h     |  3 ---
 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/at91sam9x5ek_dataflash_defconfig      |  2 ++
 configs/at91sam9x5ek_mmc_defconfig            |  2 ++
 configs/at91sam9x5ek_nandflash_defconfig      |  2 ++
 configs/at91sam9x5ek_spiflash_defconfig       |  2 ++
 configs/gurnard_defconfig                     |  2 ++
 configs/sama5d2_xplained_mmc_defconfig        |  3 +++
 configs/sama5d2_xplained_spiflash_defconfig   |  3 +++
 configs/sama5d36ek_cmp_mmc_defconfig          |  4 +++-
 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        |  5 ++++-
 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 +++
 include/configs/corvus.h                      |  3 +++
 include/configs/picosam9g45.h                 |  3 +++
 include/configs/pm9g45.h                      |  3 +++
 include/configs/sama5d2_ptc.h                 |  3 +++
 36 files changed, 107 insertions(+), 17 deletions(-)

diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi
index fbaac0834c..4bdbb70cd5 100644
--- a/arch/arm/dts/sama5d2.dtsi
+++ b/arch/arm/dts/sama5d2.dtsi
@@ -639,6 +639,34 @@
                                status = "disabled";
                        };
 
+                       rstc@f8048000 {
+                               compatible = "atmel,sama5d3-rstc";
+                               reg = <0xf8048000 0x10>;
+                               clocks = <&clk32k>;
+                       };
+
+                       shdwc@f8048010 {
+                               compatible = "atmel,sama5d2-shdwc";
+                               reg = <0xf8048010 0x10>;
+                               clocks = <&clk32k>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               atmel,wakeup-rtc-timer;
+                       };
+
+                       pit: timer@f8048030 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xf8048030 0x10>;
+                               clocks = <&h32ck>;
+                       };
+
+                       watchdog@f8048040 {
+                               compatible = "atmel,sama5d4-wdt";
+                               reg = <0xf8048040 0x10>;
+                               clocks = <&clk32k>;
+                               status = "disabled";
+                       };
+
                        sckc@f8048050 {
                                compatible = "atmel,at91sam9x5-sckc";
                                reg = <0xf8048050 0x4>;
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h 
b/arch/arm/mach-at91/include/mach/at91sam9g45.h
index 5c32e24ed0..c3b3a8fdc8 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h
@@ -137,9 +137,6 @@
 #define ATMEL_BASE_CS6         0x70000000
 #define ATMEL_BASE_CS7         0x80000000
 
-/* Timer */
-#define CONFIG_SYS_TIMER_COUNTER       0xfffffd3c
-
 /*
  * Other misc defines
  */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h 
b/arch/arm/mach-at91/include/mach/at91sam9x5.h
index e7224e432d..8f460f016d 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9x5.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h
@@ -164,9 +164,6 @@
 #define ATMEL_CPU_NAME get_cpu_name()
 #endif
 
-/* Timer */
-#define CONFIG_SYS_TIMER_COUNTER       0xfffffe3c
-
 /*
  * Other misc defines
  */
diff --git a/arch/arm/mach-at91/include/mach/sama5d2.h 
b/arch/arm/mach-at91/include/mach/sama5d2.h
index 25c85411e5..9fe572621c 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2.h
+++ b/arch/arm/mach-at91/include/mach/sama5d2.h
@@ -224,9 +224,6 @@
 
 #define cpu_is_sama5d2()       (get_chip_id() == ARCH_ID_SAMA5D2)
 
-/* PIT Timer(PIT_PIIR) */
-#define CONFIG_SYS_TIMER_COUNTER       0xf804803c
-
 /* No PMECC Galois table in ROM */
 #define NO_GALOIS_TABLE_IN_ROM
 
diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h 
b/arch/arm/mach-at91/include/mach/sama5d3.h
index d558f95141..eb9f7e5658 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3.h
+++ b/arch/arm/mach-at91/include/mach/sama5d3.h
@@ -190,9 +190,6 @@
 #define ATMEL_PIO_PORTS                5
 #define CPU_HAS_PCR
 
-/* Timer */
-#define CONFIG_SYS_TIMER_COUNTER       0xfffffe3c
-
 /*
  * PMECC table in ROM
  */
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h 
b/arch/arm/mach-at91/include/mach/sama5d4.h
index 78cc2a7a0a..90e7f01464 100644
--- a/arch/arm/mach-at91/include/mach/sama5d4.h
+++ b/arch/arm/mach-at91/include/mach/sama5d4.h
@@ -222,9 +222,6 @@
 #define cpu_is_sama5d44()      (cpu_is_sama5d4() && \
                (get_extension_chip_id() == ARCH_EXID_SAMA5D44))
 
-/* Timer */
-#define CONFIG_SYS_TIMER_COUNTER       0xfc06863c
-
 /*
  * No PMECC Galois table in ROM
  */
diff --git a/configs/at91sam9m10g45ek_mmc_defconfig 
b/configs/at91sam9m10g45ek_mmc_defconfig
index ed9e9c20b9..e4f8e0c516 100644
--- a/configs/at91sam9m10g45ek_mmc_defconfig
+++ b/configs/at91sam9m10g45ek_mmc_defconfig
@@ -45,6 +45,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 c6e75fd285..6f7a533c1d 100644
--- a/configs/at91sam9m10g45ek_nandflash_defconfig
+++ b/configs/at91sam9m10g45ek_nandflash_defconfig
@@ -45,6 +45,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 16e9c4cec2..c2d2639b16 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -46,6 +46,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 3407fd3983..86cca59d96 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -46,6 +46,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 eb17acfca8..d960e0c6b8 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -46,6 +46,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/at91sam9x5ek_dataflash_defconfig 
b/configs/at91sam9x5ek_dataflash_defconfig
index fa1f7dffd9..a60aeba7fa 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -50,6 +50,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 04ff0a21c8..69f7efc33e 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -50,6 +50,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 da983408b7..644b31ea82 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -50,6 +50,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 bc81f7ab50..be57e9751b 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -50,6 +50,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/gurnard_defconfig b/configs/gurnard_defconfig
index d90dbe6a83..fe2f329431 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -21,6 +21,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_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 b4405854ff..d84a16f1db 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -19,6 +19,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -70,6 +71,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/sama5d2_xplained_spiflash_defconfig 
b/configs/sama5d2_xplained_spiflash_defconfig
index e2b41eab15..c7778fc580 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -17,6 +17,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -68,6 +69,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/sama5d36ek_cmp_mmc_defconfig 
b/configs/sama5d36ek_cmp_mmc_defconfig
index a19fc0ba73..5037533c92 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -49,6 +49,8 @@ CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
 CONFIG_ATMEL_SPI=y
-CONFIG_FAT_WRITE=y
+CONFIG_TIMER=y
+CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
 CONFIG_ATMEL_HLCD=y
+CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig 
b/configs/sama5d36ek_cmp_nandflash_defconfig
index 06448253da..01619d569a 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -49,6 +49,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_DM_VIDEO=y
 CONFIG_ATMEL_HLCD=y
 CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig 
b/configs/sama5d36ek_cmp_spiflash_defconfig
index 734379a889..99d08b8183 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -49,6 +49,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_DM_VIDEO=y
 CONFIG_ATMEL_HLCD=y
 CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig 
b/configs/sama5d3_xplained_mmc_defconfig
index acd74994c4..5fd23da054 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -19,6 +19,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -62,6 +63,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/sama5d3_xplained_nandflash_defconfig 
b/configs/sama5d3_xplained_nandflash_defconfig
index af8d1ef16d..be6ec8dd3c 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -16,6 +16,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -59,6 +60,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/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index bf620e58cd..94be286a65 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -68,6 +69,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/sama5d3xek_nandflash_defconfig 
b/configs/sama5d3xek_nandflash_defconfig
index 252fd54f5d..ee0ca0cebe 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -18,6 +18,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -63,6 +64,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/sama5d3xek_spiflash_defconfig 
b/configs/sama5d3xek_spiflash_defconfig
index d99d1aae9f..e81f52c86e 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -17,6 +17,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -64,6 +65,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/sama5d4_xplained_mmc_defconfig 
b/configs/sama5d4_xplained_mmc_defconfig
index ecc92ba9b3..a29b269dfb 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -19,6 +19,7 @@ CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -66,12 +67,14 @@ 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
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_ATMEL_USBA=y
-CONFIG_FAT_WRITE=y
 CONFIG_DM_VIDEO=y
 CONFIG_ATMEL_HLCD=y
+CONFIG_FAT_WRITE=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig 
b/configs/sama5d4_xplained_nandflash_defconfig
index c88c461244..4b2e8334d0 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -16,6 +16,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -63,6 +64,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/sama5d4_xplained_spiflash_defconfig 
b/configs/sama5d4_xplained_spiflash_defconfig
index cc0d16586f..e01c1cc8d0 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -17,6 +17,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -65,6 +66,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/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index c1eefe3f45..5bd20d1155 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -66,6 +67,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/sama5d4ek_nandflash_defconfig 
b/configs/sama5d4ek_nandflash_defconfig
index fb18ba8959..cb4fd0214d 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -18,6 +18,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -63,6 +64,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/sama5d4ek_spiflash_defconfig 
b/configs/sama5d4ek_spiflash_defconfig
index 88357bbcc4..ccc09a539a 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -17,6 +17,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTDELAY=3
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_TIMER_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
@@ -62,6 +63,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/include/configs/corvus.h b/include/configs/corvus.h
index 015072720e..dfb3a686fd 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -32,6 +32,9 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK      32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK      12000000 /* from 12 MHz crystal */
 
+/* Timer */
+#define CONFIG_SYS_TIMER_COUNTER       0xfffffd3c
+
 #define CONFIG_CMDLINE_TAG             /* enable passing of ATAGs      */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
diff --git a/include/configs/picosam9g45.h b/include/configs/picosam9g45.h
index a14739f282..f5857241b9 100644
--- a/include/configs/picosam9g45.h
+++ b/include/configs/picosam9g45.h
@@ -26,6 +26,9 @@
 
 #define CONFIG_PICOSAM
 
+/* Timer */
+#define CONFIG_SYS_TIMER_COUNTER       0xfffffd3c
+
 #define CONFIG_CMDLINE_TAG             /* enable passing of ATAGs      */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h
index dc4ebeab31..d3340ed67e 100644
--- a/include/configs/pm9g45.h
+++ b/include/configs/pm9g45.h
@@ -40,6 +40,9 @@
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
+/* Timer */
+#define CONFIG_SYS_TIMER_COUNTER       0xfffffd3c
+
 /*
  * Hardware drivers
  */
diff --git a/include/configs/sama5d2_ptc.h b/include/configs/sama5d2_ptc.h
index 401f1987ee..bff9f8eb48 100644
--- a/include/configs/sama5d2_ptc.h
+++ b/include/configs/sama5d2_ptc.h
@@ -29,6 +29,9 @@
 
 #define CONFIG_SYS_LOAD_ADDR           0x22000000 /* load address */
 
+/* PIT Timer(PIT_PIIR) */
+#define CONFIG_SYS_TIMER_COUNTER       0xf804803c
+
 #undef CONFIG_AT91_GPIO
 #define CONFIG_ATMEL_PIO4
 
-- 
2.13.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to