diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-22 17:09:21 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-22 17:22:47 -0400 |
commit | 0d601f613b8557cf6489f06251ae5dc383b811d0 (patch) | |
tree | 05f3a4d054e0bddc308af479918ce67cd02e8eba /arch/arm/plat-orion | |
parent | d7ffa2234c186ce040e79b43639628c1c482b115 (diff) | |
parent | 5b40baee4a39d96d4d6a48a2b2383982912c429b (diff) |
Merge branch 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
* 'kirkwood/addr_decode' of git://git.infradead.org/users/jcooper/linux:
arm: mvebu: add address decoding controller to the DT
arm: mvebu: add basic address decoding support to Armada 370/XP
arm: plat-orion: make bridge_virt_base non-const to support DT use case
arm: plat-orion: introduce PLAT_ORION_LEGACY hidden config option
arm: plat-orion: use void __iomem pointers for addr-map functions
arm: plat-orion: use void __iomem pointers for time functions
arm: plat-orion: use void __iomem pointers for MPP functions
arm: plat-orion: use void __iomem pointers for UART registration functions
arm: mach-mvebu: use IOMEM() for base address definitions
arm: mach-orion5x: use IOMEM() for base address definitions
arm: mach-mv78xx0: use IOMEM() for base address definitions
arm: mach-kirkwood: use IOMEM() for base address definitions
arm: mach-dove: use IOMEM() for base address definitions
arm: mach-orion5x: use plus instead of or for address definitions
arm: mach-mv78xx0: use plus instead of or for address definitions
arm: mach-kirkwood: use plus instead of or for address definitions
arm: mach-dove: use plus instead of or for address definitions
This branch had quite a few conflicts, in particular with the PCI static
map rework from Rob Herring, and a few other context conflicts due to
changes in Kconfig, etc.
I fixed up conflicts in:
arch/arm/Kconfig
arch/arm/mach-dove/common.c
arch/arm/mach-dove/include/mach/dove.h
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/include/mach/kirkwood.h
arch/arm/mach-mv78xx0/common.c
arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/include/mach/orion5x.h
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r-- | arch/arm/plat-orion/Makefile | 9 | ||||
-rw-r--r-- | arch/arm/plat-orion/addr-map.c | 11 | ||||
-rw-r--r-- | arch/arm/plat-orion/common.c | 12 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/addr-map.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 8 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/mpp.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/time.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-orion/mpp.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-orion/time.c | 8 |
9 files changed, 30 insertions, 34 deletions
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile index c20ce0f5ce33..1251e5bd41c5 100644 --- a/arch/arm/plat-orion/Makefile +++ b/arch/arm/plat-orion/Makefile | |||
@@ -2,9 +2,8 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := irq.o pcie.o time.o common.o mpp.o addr-map.o | 5 | obj-y += addr-map.o |
6 | obj-m := | ||
7 | obj-n := | ||
8 | obj- := | ||
9 | 6 | ||
10 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | 7 | orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o |
8 | obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o | ||
9 | obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y) | ||
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c index 367ca89ac403..a7b8060c293a 100644 --- a/arch/arm/plat-orion/addr-map.c +++ b/arch/arm/plat-orion/addr-map.c | |||
@@ -48,7 +48,7 @@ EXPORT_SYMBOL_GPL(mv_mbus_dram_info); | |||
48 | static void __init __iomem * | 48 | static void __init __iomem * |
49 | orion_win_cfg_base(const struct orion_addr_map_cfg *cfg, int win) | 49 | orion_win_cfg_base(const struct orion_addr_map_cfg *cfg, int win) |
50 | { | 50 | { |
51 | return (void __iomem *)(cfg->bridge_virt_base + (win << 4)); | 51 | return cfg->bridge_virt_base + (win << 4); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -143,19 +143,16 @@ void __init orion_config_wins(struct orion_addr_map_cfg * cfg, | |||
143 | * Setup MBUS dram target info. | 143 | * Setup MBUS dram target info. |
144 | */ | 144 | */ |
145 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, | 145 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, |
146 | const u32 ddr_window_cpu_base) | 146 | const void __iomem *ddr_window_cpu_base) |
147 | { | 147 | { |
148 | void __iomem *addr; | ||
149 | int i; | 148 | int i; |
150 | int cs; | 149 | int cs; |
151 | 150 | ||
152 | orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; | 151 | orion_mbus_dram_info.mbus_dram_target_id = TARGET_DDR; |
153 | 152 | ||
154 | addr = (void __iomem *)ddr_window_cpu_base; | ||
155 | |||
156 | for (i = 0, cs = 0; i < 4; i++) { | 153 | for (i = 0, cs = 0; i < 4; i++) { |
157 | u32 base = readl(addr + DDR_BASE_CS_OFF(i)); | 154 | u32 base = readl(ddr_window_cpu_base + DDR_BASE_CS_OFF(i)); |
158 | u32 size = readl(addr + DDR_SIZE_CS_OFF(i)); | 155 | u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i)); |
159 | 156 | ||
160 | /* | 157 | /* |
161 | * Chip select enabled? | 158 | * Chip select enabled? |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 87f53caef655..b8a688cad4c2 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -86,13 +86,13 @@ static void __init uart_complete( | |||
86 | struct platform_device *orion_uart, | 86 | struct platform_device *orion_uart, |
87 | struct plat_serial8250_port *data, | 87 | struct plat_serial8250_port *data, |
88 | struct resource *resources, | 88 | struct resource *resources, |
89 | unsigned int membase, | 89 | void __iomem *membase, |
90 | resource_size_t mapbase, | 90 | resource_size_t mapbase, |
91 | unsigned int irq, | 91 | unsigned int irq, |
92 | struct clk *clk) | 92 | struct clk *clk) |
93 | { | 93 | { |
94 | data->mapbase = mapbase; | 94 | data->mapbase = mapbase; |
95 | data->membase = (void __iomem *)membase; | 95 | data->membase = membase; |
96 | data->irq = irq; | 96 | data->irq = irq; |
97 | data->uartclk = uart_get_clk_rate(clk); | 97 | data->uartclk = uart_get_clk_rate(clk); |
98 | orion_uart->dev.platform_data = data; | 98 | orion_uart->dev.platform_data = data; |
@@ -120,7 +120,7 @@ static struct platform_device orion_uart0 = { | |||
120 | .id = PLAT8250_DEV_PLATFORM, | 120 | .id = PLAT8250_DEV_PLATFORM, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | void __init orion_uart0_init(unsigned int membase, | 123 | void __init orion_uart0_init(void __iomem *membase, |
124 | resource_size_t mapbase, | 124 | resource_size_t mapbase, |
125 | unsigned int irq, | 125 | unsigned int irq, |
126 | struct clk *clk) | 126 | struct clk *clk) |
@@ -148,7 +148,7 @@ static struct platform_device orion_uart1 = { | |||
148 | .id = PLAT8250_DEV_PLATFORM1, | 148 | .id = PLAT8250_DEV_PLATFORM1, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | void __init orion_uart1_init(unsigned int membase, | 151 | void __init orion_uart1_init(void __iomem *membase, |
152 | resource_size_t mapbase, | 152 | resource_size_t mapbase, |
153 | unsigned int irq, | 153 | unsigned int irq, |
154 | struct clk *clk) | 154 | struct clk *clk) |
@@ -176,7 +176,7 @@ static struct platform_device orion_uart2 = { | |||
176 | .id = PLAT8250_DEV_PLATFORM2, | 176 | .id = PLAT8250_DEV_PLATFORM2, |
177 | }; | 177 | }; |
178 | 178 | ||
179 | void __init orion_uart2_init(unsigned int membase, | 179 | void __init orion_uart2_init(void __iomem *membase, |
180 | resource_size_t mapbase, | 180 | resource_size_t mapbase, |
181 | unsigned int irq, | 181 | unsigned int irq, |
182 | struct clk *clk) | 182 | struct clk *clk) |
@@ -204,7 +204,7 @@ static struct platform_device orion_uart3 = { | |||
204 | .id = 3, | 204 | .id = 3, |
205 | }; | 205 | }; |
206 | 206 | ||
207 | void __init orion_uart3_init(unsigned int membase, | 207 | void __init orion_uart3_init(void __iomem *membase, |
208 | resource_size_t mapbase, | 208 | resource_size_t mapbase, |
209 | unsigned int irq, | 209 | unsigned int irq, |
210 | struct clk *clk) | 210 | struct clk *clk) |
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h index fd556f77562c..ec63e4a627d0 100644 --- a/arch/arm/plat-orion/include/plat/addr-map.h +++ b/arch/arm/plat-orion/include/plat/addr-map.h | |||
@@ -16,7 +16,7 @@ extern struct mbus_dram_target_info orion_mbus_dram_info; | |||
16 | struct orion_addr_map_cfg { | 16 | struct orion_addr_map_cfg { |
17 | const int num_wins; /* Total number of windows */ | 17 | const int num_wins; /* Total number of windows */ |
18 | const int remappable_wins; | 18 | const int remappable_wins; |
19 | const u32 bridge_virt_base; | 19 | void __iomem *bridge_virt_base; |
20 | 20 | ||
21 | /* If NULL, the default cpu_win_can_remap will be used, using | 21 | /* If NULL, the default cpu_win_can_remap will be used, using |
22 | the value in remappable_wins */ | 22 | the value in remappable_wins */ |
@@ -49,5 +49,5 @@ void __init orion_setup_cpu_win(const struct orion_addr_map_cfg *cfg, | |||
49 | const u8 attr, const int remap); | 49 | const u8 attr, const int remap); |
50 | 50 | ||
51 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, | 51 | void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, |
52 | const u32 ddr_window_cpu_base); | 52 | const void __iomem *ddr_window_cpu_base); |
53 | #endif | 53 | #endif |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index ae2377ef63e5..6bbc3fe5f58e 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -13,22 +13,22 @@ | |||
13 | 13 | ||
14 | struct dsa_platform_data; | 14 | struct dsa_platform_data; |
15 | 15 | ||
16 | void __init orion_uart0_init(unsigned int membase, | 16 | void __init orion_uart0_init(void __iomem *membase, |
17 | resource_size_t mapbase, | 17 | resource_size_t mapbase, |
18 | unsigned int irq, | 18 | unsigned int irq, |
19 | struct clk *clk); | 19 | struct clk *clk); |
20 | 20 | ||
21 | void __init orion_uart1_init(unsigned int membase, | 21 | void __init orion_uart1_init(void __iomem *membase, |
22 | resource_size_t mapbase, | 22 | resource_size_t mapbase, |
23 | unsigned int irq, | 23 | unsigned int irq, |
24 | struct clk *clk); | 24 | struct clk *clk); |
25 | 25 | ||
26 | void __init orion_uart2_init(unsigned int membase, | 26 | void __init orion_uart2_init(void __iomem *membase, |
27 | resource_size_t mapbase, | 27 | resource_size_t mapbase, |
28 | unsigned int irq, | 28 | unsigned int irq, |
29 | struct clk *clk); | 29 | struct clk *clk); |
30 | 30 | ||
31 | void __init orion_uart3_init(unsigned int membase, | 31 | void __init orion_uart3_init(void __iomem *membase, |
32 | resource_size_t mapbase, | 32 | resource_size_t mapbase, |
33 | unsigned int irq, | 33 | unsigned int irq, |
34 | struct clk *clk); | 34 | struct clk *clk); |
diff --git a/arch/arm/plat-orion/include/plat/mpp.h b/arch/arm/plat-orion/include/plat/mpp.h index 723adce99f41..254552fee889 100644 --- a/arch/arm/plat-orion/include/plat/mpp.h +++ b/arch/arm/plat-orion/include/plat/mpp.h | |||
@@ -29,6 +29,6 @@ | |||
29 | #define MPP_OUTPUT_MASK GENERIC_MPP(0, 0x0, 0, 1) | 29 | #define MPP_OUTPUT_MASK GENERIC_MPP(0, 0x0, 0, 1) |
30 | 30 | ||
31 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, | 31 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, |
32 | unsigned int mpp_max, unsigned int dev_bus); | 32 | unsigned int mpp_max, void __iomem *dev_bus); |
33 | 33 | ||
34 | #endif | 34 | #endif |
diff --git a/arch/arm/plat-orion/include/plat/time.h b/arch/arm/plat-orion/include/plat/time.h index 4d5f1f6e18df..07527e417c62 100644 --- a/arch/arm/plat-orion/include/plat/time.h +++ b/arch/arm/plat-orion/include/plat/time.h | |||
@@ -11,9 +11,9 @@ | |||
11 | #ifndef __PLAT_TIME_H | 11 | #ifndef __PLAT_TIME_H |
12 | #define __PLAT_TIME_H | 12 | #define __PLAT_TIME_H |
13 | 13 | ||
14 | void orion_time_set_base(u32 timer_base); | 14 | void orion_time_set_base(void __iomem *timer_base); |
15 | 15 | ||
16 | void orion_time_init(u32 bridge_base, u32 bridge_timer1_clr_mask, | 16 | void orion_time_init(void __iomem *bridge_base, u32 bridge_timer1_clr_mask, |
17 | unsigned int irq, unsigned int tclk); | 17 | unsigned int irq, unsigned int tclk); |
18 | 18 | ||
19 | 19 | ||
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c index 7740bb31d662..e686fe76a96b 100644 --- a/arch/arm/plat-orion/mpp.c +++ b/arch/arm/plat-orion/mpp.c | |||
@@ -18,15 +18,15 @@ | |||
18 | #include <plat/mpp.h> | 18 | #include <plat/mpp.h> |
19 | 19 | ||
20 | /* Address of the ith MPP control register */ | 20 | /* Address of the ith MPP control register */ |
21 | static __init unsigned long mpp_ctrl_addr(unsigned int i, | 21 | static __init void __iomem *mpp_ctrl_addr(unsigned int i, |
22 | unsigned long dev_bus) | 22 | void __iomem *dev_bus) |
23 | { | 23 | { |
24 | return dev_bus + (i) * 4; | 24 | return dev_bus + (i) * 4; |
25 | } | 25 | } |
26 | 26 | ||
27 | 27 | ||
28 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, | 28 | void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, |
29 | unsigned int mpp_max, unsigned int dev_bus) | 29 | unsigned int mpp_max, void __iomem *dev_bus) |
30 | { | 30 | { |
31 | unsigned int mpp_nr_regs = (1 + mpp_max/8); | 31 | unsigned int mpp_nr_regs = (1 + mpp_max/8); |
32 | u32 mpp_ctrl[mpp_nr_regs]; | 32 | u32 mpp_ctrl[mpp_nr_regs]; |
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 1ed8d1397fcf..0f4fa863dd55 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -180,13 +180,13 @@ static struct irqaction orion_timer_irq = { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | void __init | 182 | void __init |
183 | orion_time_set_base(u32 _timer_base) | 183 | orion_time_set_base(void __iomem *_timer_base) |
184 | { | 184 | { |
185 | timer_base = (void __iomem *)_timer_base; | 185 | timer_base = _timer_base; |
186 | } | 186 | } |
187 | 187 | ||
188 | void __init | 188 | void __init |
189 | orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, | 189 | orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask, |
190 | unsigned int irq, unsigned int tclk) | 190 | unsigned int irq, unsigned int tclk) |
191 | { | 191 | { |
192 | u32 u; | 192 | u32 u; |
@@ -194,7 +194,7 @@ orion_time_init(u32 _bridge_base, u32 _bridge_timer1_clr_mask, | |||
194 | /* | 194 | /* |
195 | * Set SoC-specific data. | 195 | * Set SoC-specific data. |
196 | */ | 196 | */ |
197 | bridge_base = (void __iomem *)_bridge_base; | 197 | bridge_base = _bridge_base; |
198 | bridge_timer1_clr_mask = _bridge_timer1_clr_mask; | 198 | bridge_timer1_clr_mask = _bridge_timer1_clr_mask; |
199 | 199 | ||
200 | ticks_per_jiffy = (tclk + HZ/2) / HZ; | 200 | ticks_per_jiffy = (tclk + HZ/2) / HZ; |