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-mv78xx0 | |
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-mv78xx0')
-rw-r--r-- | arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/common.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/include/mach/bridge-regs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | 1 |
6 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c index 29e390e89ff4..20f3f125ed2b 100644 --- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | |||
@@ -148,6 +148,7 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") | |||
148 | .boot_params = 0x00000100, | 148 | .boot_params = 0x00000100, |
149 | .init_machine = wxl_init, | 149 | .init_machine = wxl_init, |
150 | .map_io = mv78xx0_map_io, | 150 | .map_io = mv78xx0_map_io, |
151 | .init_early = mv78xx0_init_early, | ||
151 | .init_irq = mv78xx0_init_irq, | 152 | .init_irq = mv78xx0_init_irq, |
152 | .timer = &mv78xx0_timer, | 153 | .timer = &mv78xx0_timer, |
153 | MACHINE_END | 154 | MACHINE_END |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 08465eb6a2c2..44fb4e55be0d 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -818,9 +818,15 @@ void __init mv78xx0_uart3_init(void) | |||
818 | /***************************************************************************** | 818 | /***************************************************************************** |
819 | * Time handling | 819 | * Time handling |
820 | ****************************************************************************/ | 820 | ****************************************************************************/ |
821 | void __init mv78xx0_init_early(void) | ||
822 | { | ||
823 | orion_time_set_base(TIMER_VIRT_BASE); | ||
824 | } | ||
825 | |||
821 | static void mv78xx0_timer_init(void) | 826 | static void mv78xx0_timer_init(void) |
822 | { | 827 | { |
823 | orion_time_init(IRQ_MV78XX0_TIMER_1, get_tclk()); | 828 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
829 | IRQ_MV78XX0_TIMER_1, get_tclk()); | ||
824 | } | 830 | } |
825 | 831 | ||
826 | struct sys_timer mv78xx0_timer = { | 832 | struct sys_timer mv78xx0_timer = { |
diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h index befc22475469..632e63d65e7a 100644 --- a/arch/arm/mach-mv78xx0/common.h +++ b/arch/arm/mach-mv78xx0/common.h | |||
@@ -20,6 +20,7 @@ struct mv_sata_platform_data; | |||
20 | int mv78xx0_core_index(void); | 20 | int mv78xx0_core_index(void); |
21 | void mv78xx0_map_io(void); | 21 | void mv78xx0_map_io(void); |
22 | void mv78xx0_init(void); | 22 | void mv78xx0_init(void); |
23 | void mv78xx0_init_early(void); | ||
23 | void mv78xx0_init_irq(void); | 24 | void mv78xx0_init_irq(void); |
24 | 25 | ||
25 | extern struct mbus_dram_target_info mv78xx0_mbus_dram_info; | 26 | extern struct mbus_dram_target_info mv78xx0_mbus_dram_info; |
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c index 207c95e403b9..df5aebe5b0fa 100644 --- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c | |||
@@ -96,6 +96,7 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board") | |||
96 | .boot_params = 0x00000100, | 96 | .boot_params = 0x00000100, |
97 | .init_machine = db78x00_init, | 97 | .init_machine = db78x00_init, |
98 | .map_io = mv78xx0_map_io, | 98 | .map_io = mv78xx0_map_io, |
99 | .init_early = mv78xx0_init_early, | ||
99 | .init_irq = mv78xx0_init_irq, | 100 | .init_irq = mv78xx0_init_irq, |
100 | .timer = &mv78xx0_timer, | 101 | .timer = &mv78xx0_timer, |
101 | MACHINE_END | 102 | MACHINE_END |
diff --git a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h b/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h index 2d14c4fe294d..c64dbb96dbad 100644 --- a/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h +++ b/arch/arm/mach-mv78xx0/include/mach/bridge-regs.h | |||
@@ -20,10 +20,6 @@ | |||
20 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | 20 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) |
21 | #define SOFT_RESET 0x00000001 | 21 | #define SOFT_RESET 0x00000001 |
22 | 22 | ||
23 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
24 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
25 | #define BRIDGE_INT_TIMER0 0x0002 | ||
26 | #define BRIDGE_INT_TIMER1 0x0004 | ||
27 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 23 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
28 | 24 | ||
29 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 25 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) |
diff --git a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c index 3511ad4d973b..d927f14c6810 100644 --- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c +++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c | |||
@@ -81,6 +81,7 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board") | |||
81 | .boot_params = 0x00000100, | 81 | .boot_params = 0x00000100, |
82 | .init_machine = rd78x00_masa_init, | 82 | .init_machine = rd78x00_masa_init, |
83 | .map_io = mv78xx0_map_io, | 83 | .map_io = mv78xx0_map_io, |
84 | .init_early = mv78xx0_init_early, | ||
84 | .init_irq = mv78xx0_init_irq, | 85 | .init_irq = mv78xx0_init_irq, |
85 | .timer = &mv78xx0_timer, | 86 | .timer = &mv78xx0_timer, |
86 | MACHINE_END | 87 | MACHINE_END |