Patchwork [U-Boot,v2,03/15] zynq: Move scutimer baseaddr to hardware.h

login
register
mail settings
Submitter Michal Simek
Date April 23, 2013, 10:46 a.m.
Message ID <fa8c19e6e2682e40c8e27f0213f44a211e31b289.1366713845.git.michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/238865/
State Accepted
Delegated to: Michal Simek
Headers show

Comments

Michal Simek - April 23, 2013, 10:46 a.m.
Move baseaddr to hardware.h to be shared between
configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

---
Changes in v2:
- Remove CONFIG_ prefix from non configurable macros (scutimer)

 arch/arm/cpu/armv7/zynq/timer.c           | 3 ++-
 arch/arm/include/asm/arch-zynq/hardware.h | 1 +
 include/configs/zynq.h                    | 3 ---
 3 files changed, 3 insertions(+), 4 deletions(-)

--
1.8.2.1

Patch

diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c
index 5d8bb24..8c4357d 100644
--- a/arch/arm/cpu/armv7/zynq/timer.c
+++ b/arch/arm/cpu/armv7/zynq/timer.c
@@ -44,6 +44,7 @@ 
 #include <common.h>
 #include <div64.h>
 #include <asm/io.h>
+#include <asm/arch/hardware.h>

 DECLARE_GLOBAL_DATA_PTR;

@@ -54,7 +55,7 @@  struct scu_timer {
 };

 static struct scu_timer *timer_base =
-			      (struct scu_timer *) CONFIG_SCUTIMER_BASEADDR;
+			      (struct scu_timer *)ZYNQ_SCUTIMER_BASEADDR;

 #define SCUTIMER_CONTROL_PRESCALER_MASK	0x0000FF00 /* Prescaler */
 #define SCUTIMER_CONTROL_PRESCALER_SHIFT	8
diff --git a/arch/arm/include/asm/arch-zynq/hardware.h b/arch/arm/include/asm/arch-zynq/hardware.h
index a99edbe..ccbf54e 100644
--- a/arch/arm/include/asm/arch-zynq/hardware.h
+++ b/arch/arm/include/asm/arch-zynq/hardware.h
@@ -26,6 +26,7 @@ 
 #define ZYNQ_SYS_CTRL_BASEADDR		0xF8000000
 #define ZYNQ_DEV_CFG_APB_BASEADDR	0xF8007000
 #define ZYNQ_SCU_BASEADDR		0xF8F00000
+#define ZYNQ_SCUTIMER_BASEADDR		0xF8F00600

 /* Reflect slcr offsets */
 struct slcr_regs {
diff --git a/include/configs/zynq.h b/include/configs/zynq.h
index 2989e72..1147689 100644
--- a/include/configs/zynq.h
+++ b/include/configs/zynq.h
@@ -50,9 +50,6 @@ 
 #define CONFIG_ZYNQ_SERIAL_BAUDRATE0	CONFIG_BAUDRATE
 #define CONFIG_ZYNQ_SERIAL_CLOCK0	50000000

-/* SCU timer address is hardcoded */
-#define CONFIG_SCUTIMER_BASEADDR	0xF8F00600
-
 /* Ethernet driver */
 #define CONFIG_NET_MULTI
 #define CONFIG_ZYNQ_GEM