diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-12-07 15:48:07 -0500 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-12-13 18:46:55 -0500 |
commit | 63a9332b232bdab0df6ef18a9f39e8d58a82bda4 (patch) | |
tree | 52906e5888de9e634824d6005d9dbd3eb109bd2d /arch/arm/plat-orion | |
parent | 45173d5ed4c9a397db31623bf6469efbd3a239cd (diff) |
ARM: Orion: Get address map from plat-orion instead of via platform_data
Use an getter function in plat-orion/addr-map.c to get the address map
structure, rather than pass it to drivers in the platform_data
structures. When the drivers are built for none orion platforms, a
dummy function is provided instead which returns NULL.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Michael Walle <michael@walle.cc>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r-- | arch/arm/plat-orion/addr-map.c | 7 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/pcie.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-orion/pcie.c | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c index c27ad88bc400..367ca89ac403 100644 --- a/arch/arm/plat-orion/addr-map.c +++ b/arch/arm/plat-orion/addr-map.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 14 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 15 | #include <linux/io.h> |
@@ -16,6 +17,12 @@ | |||
16 | 17 | ||
17 | struct mbus_dram_target_info orion_mbus_dram_info; | 18 | struct mbus_dram_target_info orion_mbus_dram_info; |
18 | 19 | ||
20 | const struct mbus_dram_target_info *mv_mbus_dram_info(void) | ||
21 | { | ||
22 | return &orion_mbus_dram_info; | ||
23 | } | ||
24 | EXPORT_SYMBOL_GPL(mv_mbus_dram_info); | ||
25 | |||
19 | /* | 26 | /* |
20 | * DDR target is the same on all Orion platforms. | 27 | * DDR target is the same on all Orion platforms. |
21 | */ | 28 | */ |
diff --git a/arch/arm/plat-orion/include/plat/pcie.h b/arch/arm/plat-orion/include/plat/pcie.h index cc99163e73fd..fe5b9e862747 100644 --- a/arch/arm/plat-orion/include/plat/pcie.h +++ b/arch/arm/plat-orion/include/plat/pcie.h | |||
@@ -20,8 +20,7 @@ int orion_pcie_x4_mode(void __iomem *base); | |||
20 | int orion_pcie_get_local_bus_nr(void __iomem *base); | 20 | int orion_pcie_get_local_bus_nr(void __iomem *base); |
21 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); | 21 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); |
22 | void orion_pcie_reset(void __iomem *base); | 22 | void orion_pcie_reset(void __iomem *base); |
23 | void orion_pcie_setup(void __iomem *base, | 23 | void orion_pcie_setup(void __iomem *base); |
24 | struct mbus_dram_target_info *dram); | ||
25 | int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus, | 24 | int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus, |
26 | u32 devfn, int where, int size, u32 *val); | 25 | u32 devfn, int where, int size, u32 *val); |
27 | int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus, | 26 | int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus, |
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c index af2d733c50b5..86dbb5bdb172 100644 --- a/arch/arm/plat-orion/pcie.c +++ b/arch/arm/plat-orion/pcie.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <asm/mach/pci.h> | 14 | #include <asm/mach/pci.h> |
15 | #include <plat/pcie.h> | 15 | #include <plat/pcie.h> |
16 | #include <plat/addr-map.h> | ||
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | 18 | ||
18 | /* | 19 | /* |
@@ -175,8 +176,7 @@ static void __init orion_pcie_setup_wins(void __iomem *base, | |||
175 | writel(((size - 1) & 0xffff0000) | 1, base + PCIE_BAR_CTRL_OFF(1)); | 176 | writel(((size - 1) & 0xffff0000) | 1, base + PCIE_BAR_CTRL_OFF(1)); |
176 | } | 177 | } |
177 | 178 | ||
178 | void __init orion_pcie_setup(void __iomem *base, | 179 | void __init orion_pcie_setup(void __iomem *base) |
179 | struct mbus_dram_target_info *dram) | ||
180 | { | 180 | { |
181 | u16 cmd; | 181 | u16 cmd; |
182 | u32 mask; | 182 | u32 mask; |
@@ -184,7 +184,7 @@ void __init orion_pcie_setup(void __iomem *base, | |||
184 | /* | 184 | /* |
185 | * Point PCIe unit MBUS decode windows to DRAM space. | 185 | * Point PCIe unit MBUS decode windows to DRAM space. |
186 | */ | 186 | */ |
187 | orion_pcie_setup_wins(base, dram); | 187 | orion_pcie_setup_wins(base, &orion_mbus_dram_info); |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Master + slave enable. | 190 | * Master + slave enable. |