diff mbox series

[3/3] highbank: switch to use the Arm SP804 DM_TIMER driver

Message ID 20221020221025.2473281-4-andre.przywara@arm.com
State Accepted
Delegated to: Tom Rini
Headers show
Series timer: add SP804 DM_TIMER driver (and use it) | expand

Commit Message

Andre Przywara Oct. 20, 2022, 10:10 p.m. UTC
So far the Calxeda machines were using the CONFIG_SYS_TIMER_* macros to
simply hardcode the address of the counter register of the SP804 timer.
This method is deprecated and scheduled for removal.

Use the newly introduced SP804 DM_TIMER driver to provide timer
functionality on Highbank and Midway machines. The base address and base
frequency are taken from the devicetree.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/Kconfig           | 2 ++
 include/configs/highbank.h | 4 ----
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Tom Rini Nov. 3, 2022, 4:57 p.m. UTC | #1
On Thu, Oct 20, 2022 at 11:10:25PM +0100, Andre Przywara wrote:

> So far the Calxeda machines were using the CONFIG_SYS_TIMER_* macros to
> simply hardcode the address of the counter register of the SP804 timer.
> This method is deprecated and scheduled for removal.
> 
> Use the newly introduced SP804 DM_TIMER driver to provide timer
> functionality on Highbank and Midway machines. The base address and base
> frequency are taken from the devicetree.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2e833940525..3269d0c5196 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -793,6 +793,8 @@  config ARCH_HIGHBANK
 	select AHCI
 	select DM_ETH
 	select PHYS_64BIT
+	select TIMER
+	select SP804_TIMER
 	imply OF_HAS_PRIOR_STAGE
 
 config ARCH_INTEGRATOR
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index bb6cc957261..5e2b50bbac1 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -8,10 +8,6 @@ 
 
 #define CONFIG_SYS_BOOTMAPSZ		(16 << 20)
 
-#define CONFIG_SYS_TIMER_RATE		(150000000/256)
-#define CONFIG_SYS_TIMER_COUNTER	(0xFFF34000 + 0x4)
-#define CONFIG_SYS_TIMER_COUNTS_DOWN
-
 #define CONFIG_PL011_CLOCK		150000000
 
 /*