diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2010-10-15 10:50:26 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-03-03 16:27:01 -0500 |
commit | 4ee1f6b574765a6c97f945e6b0277e5ccac38cb5 (patch) | |
tree | c5e0667c637bd13ddcaca694a571b82254e278eb /arch/arm/mach-dove | |
parent | 40ff15a6cb9e7e84b72ef962d9d27551fb00f54b (diff) |
ARM: Remove dependency of plat-orion time code on mach directory includes.
This patch makes the various mach dirs that use the plat-orion time
code pass in timer and bridge addresses explicitly, instead of having
plat-orion get those values by including a mach dir include file --
the latter mechanism is problematic if you want to support multiple
ARM platforms in the same kernel image.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-dove')
-rw-r--r-- | arch/arm/mach-dove/cm-a510.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-dove/common.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-dove/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-dove/dove-db-setup.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-dove/include/mach/bridge-regs.h | 4 |
5 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c index 96e0e94e5fa9..03e11f9dca97 100644 --- a/arch/arm/mach-dove/cm-a510.c +++ b/arch/arm/mach-dove/cm-a510.c | |||
@@ -90,6 +90,7 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board") | |||
90 | .boot_params = 0x00000100, | 90 | .boot_params = 0x00000100, |
91 | .init_machine = cm_a510_init, | 91 | .init_machine = cm_a510_init, |
92 | .map_io = dove_map_io, | 92 | .map_io = dove_map_io, |
93 | .init_early = dove_init_early, | ||
93 | .init_irq = dove_init_irq, | 94 | .init_irq = dove_init_irq, |
94 | .timer = &dove_timer, | 95 | .timer = &dove_timer, |
95 | MACHINE_END | 96 | MACHINE_END |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index fe627aba6da7..e06a88f1f81d 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -532,6 +532,11 @@ void __init dove_i2c_init(void) | |||
532 | /***************************************************************************** | 532 | /***************************************************************************** |
533 | * Time handling | 533 | * Time handling |
534 | ****************************************************************************/ | 534 | ****************************************************************************/ |
535 | void __init dove_init_early(void) | ||
536 | { | ||
537 | orion_time_set_base(TIMER_VIRT_BASE); | ||
538 | } | ||
539 | |||
535 | static int get_tclk(void) | 540 | static int get_tclk(void) |
536 | { | 541 | { |
537 | /* use DOVE_RESET_SAMPLE_HI/LO to detect tclk */ | 542 | /* use DOVE_RESET_SAMPLE_HI/LO to detect tclk */ |
@@ -540,7 +545,8 @@ static int get_tclk(void) | |||
540 | 545 | ||
541 | static void dove_timer_init(void) | 546 | static void dove_timer_init(void) |
542 | { | 547 | { |
543 | orion_time_init(IRQ_DOVE_BRIDGE, get_tclk()); | 548 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
549 | IRQ_DOVE_BRIDGE, get_tclk()); | ||
544 | } | 550 | } |
545 | 551 | ||
546 | struct sys_timer dove_timer = { | 552 | struct sys_timer dove_timer = { |
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h index a51517c3fe76..6a2046e44706 100644 --- a/arch/arm/mach-dove/common.h +++ b/arch/arm/mach-dove/common.h | |||
@@ -22,6 +22,7 @@ extern struct mbus_dram_target_info dove_mbus_dram_info; | |||
22 | */ | 22 | */ |
23 | void dove_map_io(void); | 23 | void dove_map_io(void); |
24 | void dove_init(void); | 24 | void dove_init(void); |
25 | void dove_init_early(void); | ||
25 | void dove_init_irq(void); | 26 | void dove_init_irq(void); |
26 | void dove_setup_cpu_mbus(void); | 27 | void dove_setup_cpu_mbus(void); |
27 | void dove_ge00_init(struct mv643xx_eth_platform_data *eth_data); | 28 | void dove_ge00_init(struct mv643xx_eth_platform_data *eth_data); |
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index 95925aa76dd9..2ac34ecfa745 100644 --- a/arch/arm/mach-dove/dove-db-setup.c +++ b/arch/arm/mach-dove/dove-db-setup.c | |||
@@ -97,6 +97,7 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board") | |||
97 | .boot_params = 0x00000100, | 97 | .boot_params = 0x00000100, |
98 | .init_machine = dove_db_init, | 98 | .init_machine = dove_db_init, |
99 | .map_io = dove_map_io, | 99 | .map_io = dove_map_io, |
100 | .init_early = dove_init_early, | ||
100 | .init_irq = dove_init_irq, | 101 | .init_irq = dove_init_irq, |
101 | .timer = &dove_timer, | 102 | .timer = &dove_timer, |
102 | MACHINE_END | 103 | MACHINE_END |
diff --git a/arch/arm/mach-dove/include/mach/bridge-regs.h b/arch/arm/mach-dove/include/mach/bridge-regs.h index 214a4c31f069..226949dc4ac0 100644 --- a/arch/arm/mach-dove/include/mach/bridge-regs.h +++ b/arch/arm/mach-dove/include/mach/bridge-regs.h | |||
@@ -26,10 +26,6 @@ | |||
26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 26 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) |
27 | #define SOFT_RESET 0x00000001 | 27 | #define SOFT_RESET 0x00000001 |
28 | 28 | ||
29 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
30 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
31 | #define BRIDGE_INT_TIMER0 0x0002 | ||
32 | #define BRIDGE_INT_TIMER1 0x0004 | ||
33 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 29 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
34 | 30 | ||
35 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 31 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) |