diff options
-rw-r--r-- | arch/arm/mach-dove/pcie.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/mpp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/pcie.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/mpp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/pcie.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/mpp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/pci.c | 2 | ||||
-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 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 19 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 11 | ||||
-rw-r--r-- | drivers/mmc/host/mvsdio.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/mv643xx_eth.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 10 | ||||
-rw-r--r-- | include/linux/mbus.h | 13 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-dma.c | 15 |
17 files changed, 73 insertions, 48 deletions
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 42e7d22a00f5..6c11a4df7178 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/mbus.h> | ||
14 | #include <video/vga.h> | 13 | #include <video/vga.h> |
15 | #include <asm/mach/pci.h> | 14 | #include <asm/mach/pci.h> |
16 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
@@ -51,7 +50,7 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) | |||
51 | */ | 50 | */ |
52 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); | 51 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); |
53 | 52 | ||
54 | orion_pcie_setup(pp->base, &orion_mbus_dram_info); | 53 | orion_pcie_setup(pp->base); |
55 | 54 | ||
56 | /* | 55 | /* |
57 | * IORESOURCE_IO | 56 | * IORESOURCE_IO |
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index cc431fa22ccb..0c6ad63f10c7 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | ||
14 | #include <linux/io.h> | 13 | #include <linux/io.h> |
15 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
16 | #include <plat/mpp.h> | 15 | #include <plat/mpp.h> |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 8def894f3296..fb451bfe478b 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/mbus.h> | ||
15 | #include <video/vga.h> | 14 | #include <video/vga.h> |
16 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
17 | #include <asm/mach/pci.h> | 16 | #include <asm/mach/pci.h> |
@@ -209,7 +208,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
209 | */ | 208 | */ |
210 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); | 209 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); |
211 | 210 | ||
212 | orion_pcie_setup(pp->base, &orion_mbus_dram_info); | 211 | orion_pcie_setup(pp->base); |
213 | 212 | ||
214 | return 1; | 213 | return 1; |
215 | } | 214 | } |
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-mv78xx0/mpp.c index cf4e494d44bf..df50342179e2 100644 --- a/arch/arm/mach-mv78xx0/mpp.c +++ b/arch/arm/mach-mv78xx0/mpp.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | ||
14 | #include <linux/io.h> | 13 | #include <linux/io.h> |
15 | #include <plat/mpp.h> | 14 | #include <plat/mpp.h> |
16 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 9208667c478a..12fcb108b0e1 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/mbus.h> | ||
14 | #include <video/vga.h> | 13 | #include <video/vga.h> |
15 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
16 | #include <asm/mach/pci.h> | 15 | #include <asm/mach/pci.h> |
@@ -154,7 +153,7 @@ static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys) | |||
154 | * Generic PCIe unit setup. | 153 | * Generic PCIe unit setup. |
155 | */ | 154 | */ |
156 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); | 155 | orion_pcie_set_local_bus_nr(pp->base, sys->busnr); |
157 | orion_pcie_setup(pp->base, &orion_mbus_dram_info); | 156 | orion_pcie_setup(pp->base); |
158 | 157 | ||
159 | sys->resource[0] = &pp->res[0]; | 158 | sys->resource[0] = &pp->res[0]; |
160 | sys->resource[1] = &pp->res[1]; | 159 | sys->resource[1] = &pp->res[1]; |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index b6ddd7a5db6a..5b70026f478c 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | ||
14 | #include <linux/io.h> | 13 | #include <linux/io.h> |
15 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
16 | #include <plat/mpp.h> | 15 | #include <plat/mpp.h> |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index ddfa01acdaaa..a494c470e3e4 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -146,7 +146,7 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
146 | /* | 146 | /* |
147 | * Generic PCIe unit setup. | 147 | * Generic PCIe unit setup. |
148 | */ | 148 | */ |
149 | orion_pcie_setup(PCIE_BASE, &orion_mbus_dram_info); | 149 | orion_pcie_setup(PCIE_BASE); |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * Check whether to apply Orion-1/Orion-NAS PCIe config | 152 | * Check whether to apply Orion-1/Orion-NAS PCIe config |
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. |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 0b8b8b488ee8..38950ea8398a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -3988,7 +3988,7 @@ static int mv_create_dma_pools(struct mv_host_priv *hpriv, struct device *dev) | |||
3988 | } | 3988 | } |
3989 | 3989 | ||
3990 | static void mv_conf_mbus_windows(struct mv_host_priv *hpriv, | 3990 | static void mv_conf_mbus_windows(struct mv_host_priv *hpriv, |
3991 | struct mbus_dram_target_info *dram) | 3991 | const struct mbus_dram_target_info *dram) |
3992 | { | 3992 | { |
3993 | int i; | 3993 | int i; |
3994 | 3994 | ||
@@ -3998,7 +3998,7 @@ static void mv_conf_mbus_windows(struct mv_host_priv *hpriv, | |||
3998 | } | 3998 | } |
3999 | 3999 | ||
4000 | for (i = 0; i < dram->num_cs; i++) { | 4000 | for (i = 0; i < dram->num_cs; i++) { |
4001 | struct mbus_dram_window *cs = dram->cs + i; | 4001 | const struct mbus_dram_window *cs = dram->cs + i; |
4002 | 4002 | ||
4003 | writel(((cs->size - 1) & 0xffff0000) | | 4003 | writel(((cs->size - 1) & 0xffff0000) | |
4004 | (cs->mbus_attr << 8) | | 4004 | (cs->mbus_attr << 8) | |
@@ -4019,6 +4019,7 @@ static void mv_conf_mbus_windows(struct mv_host_priv *hpriv, | |||
4019 | static int mv_platform_probe(struct platform_device *pdev) | 4019 | static int mv_platform_probe(struct platform_device *pdev) |
4020 | { | 4020 | { |
4021 | const struct mv_sata_platform_data *mv_platform_data; | 4021 | const struct mv_sata_platform_data *mv_platform_data; |
4022 | const struct mbus_dram_target_info *dram; | ||
4022 | const struct ata_port_info *ppi[] = | 4023 | const struct ata_port_info *ppi[] = |
4023 | { &mv_port_info[chip_soc], NULL }; | 4024 | { &mv_port_info[chip_soc], NULL }; |
4024 | struct ata_host *host; | 4025 | struct ata_host *host; |
@@ -4072,8 +4073,9 @@ static int mv_platform_probe(struct platform_device *pdev) | |||
4072 | /* | 4073 | /* |
4073 | * (Re-)program MBUS remapping windows if we are asked to. | 4074 | * (Re-)program MBUS remapping windows if we are asked to. |
4074 | */ | 4075 | */ |
4075 | if (mv_platform_data->dram != NULL) | 4076 | dram = mv_mbus_dram_info(); |
4076 | mv_conf_mbus_windows(hpriv, mv_platform_data->dram); | 4077 | if (dram) |
4078 | mv_conf_mbus_windows(hpriv, dram); | ||
4077 | 4079 | ||
4078 | rc = mv_create_dma_pools(hpriv, &pdev->dev); | 4080 | rc = mv_create_dma_pools(hpriv, &pdev->dev); |
4079 | if (rc) | 4081 | if (rc) |
@@ -4141,17 +4143,18 @@ static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) | |||
4141 | static int mv_platform_resume(struct platform_device *pdev) | 4143 | static int mv_platform_resume(struct platform_device *pdev) |
4142 | { | 4144 | { |
4143 | struct ata_host *host = platform_get_drvdata(pdev); | 4145 | struct ata_host *host = platform_get_drvdata(pdev); |
4146 | const struct mbus_dram_target_info *dram; | ||
4144 | int ret; | 4147 | int ret; |
4145 | 4148 | ||
4146 | if (host) { | 4149 | if (host) { |
4147 | struct mv_host_priv *hpriv = host->private_data; | 4150 | struct mv_host_priv *hpriv = host->private_data; |
4148 | const struct mv_sata_platform_data *mv_platform_data = \ | 4151 | |
4149 | pdev->dev.platform_data; | ||
4150 | /* | 4152 | /* |
4151 | * (Re-)program MBUS remapping windows if we are asked to. | 4153 | * (Re-)program MBUS remapping windows if we are asked to. |
4152 | */ | 4154 | */ |
4153 | if (mv_platform_data->dram != NULL) | 4155 | dram = mv_mbus_dram_info(); |
4154 | mv_conf_mbus_windows(hpriv, mv_platform_data->dram); | 4156 | if (dram) |
4157 | mv_conf_mbus_windows(hpriv, dram); | ||
4155 | 4158 | ||
4156 | /* initialize adapter */ | 4159 | /* initialize adapter */ |
4157 | ret = mv_init_host(host); | 4160 | ret = mv_init_host(host); |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 9a353c2216d0..e779b434af45 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -1250,7 +1250,7 @@ static int __devinit mv_xor_probe(struct platform_device *pdev) | |||
1250 | 1250 | ||
1251 | static void | 1251 | static void |
1252 | mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, | 1252 | mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, |
1253 | struct mbus_dram_target_info *dram) | 1253 | const struct mbus_dram_target_info *dram) |
1254 | { | 1254 | { |
1255 | void __iomem *base = msp->xor_base; | 1255 | void __iomem *base = msp->xor_base; |
1256 | u32 win_enable = 0; | 1256 | u32 win_enable = 0; |
@@ -1264,7 +1264,7 @@ mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, | |||
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | for (i = 0; i < dram->num_cs; i++) { | 1266 | for (i = 0; i < dram->num_cs; i++) { |
1267 | struct mbus_dram_window *cs = dram->cs + i; | 1267 | const struct mbus_dram_window *cs = dram->cs + i; |
1268 | 1268 | ||
1269 | writel((cs->base & 0xffff0000) | | 1269 | writel((cs->base & 0xffff0000) | |
1270 | (cs->mbus_attr << 8) | | 1270 | (cs->mbus_attr << 8) | |
@@ -1290,7 +1290,7 @@ static struct platform_driver mv_xor_driver = { | |||
1290 | 1290 | ||
1291 | static int mv_xor_shared_probe(struct platform_device *pdev) | 1291 | static int mv_xor_shared_probe(struct platform_device *pdev) |
1292 | { | 1292 | { |
1293 | struct mv_xor_platform_shared_data *msd = pdev->dev.platform_data; | 1293 | const struct mbus_dram_target_info *dram; |
1294 | struct mv_xor_shared_private *msp; | 1294 | struct mv_xor_shared_private *msp; |
1295 | struct resource *res; | 1295 | struct resource *res; |
1296 | 1296 | ||
@@ -1323,8 +1323,9 @@ static int mv_xor_shared_probe(struct platform_device *pdev) | |||
1323 | /* | 1323 | /* |
1324 | * (Re-)program MBUS remapping windows if we are asked to. | 1324 | * (Re-)program MBUS remapping windows if we are asked to. |
1325 | */ | 1325 | */ |
1326 | if (msd != NULL && msd->dram != NULL) | 1326 | dram = mv_mbus_dram_info(); |
1327 | mv_xor_conf_mbus_windows(msp, msd->dram); | 1327 | if (dram) |
1328 | mv_xor_conf_mbus_windows(msp, dram); | ||
1328 | 1329 | ||
1329 | return 0; | 1330 | return 0; |
1330 | } | 1331 | } |
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 211a4959c293..eeb8cd125b0c 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c | |||
@@ -679,8 +679,9 @@ static const struct mmc_host_ops mvsd_ops = { | |||
679 | .enable_sdio_irq = mvsd_enable_sdio_irq, | 679 | .enable_sdio_irq = mvsd_enable_sdio_irq, |
680 | }; | 680 | }; |
681 | 681 | ||
682 | static void __init mv_conf_mbus_windows(struct mvsd_host *host, | 682 | static void __init |
683 | struct mbus_dram_target_info *dram) | 683 | mv_conf_mbus_windows(struct mvsd_host *host, |
684 | const struct mbus_dram_target_info *dram) | ||
684 | { | 685 | { |
685 | void __iomem *iobase = host->base; | 686 | void __iomem *iobase = host->base; |
686 | int i; | 687 | int i; |
@@ -691,7 +692,7 @@ static void __init mv_conf_mbus_windows(struct mvsd_host *host, | |||
691 | } | 692 | } |
692 | 693 | ||
693 | for (i = 0; i < dram->num_cs; i++) { | 694 | for (i = 0; i < dram->num_cs; i++) { |
694 | struct mbus_dram_window *cs = dram->cs + i; | 695 | const struct mbus_dram_window *cs = dram->cs + i; |
695 | writel(((cs->size - 1) & 0xffff0000) | | 696 | writel(((cs->size - 1) & 0xffff0000) | |
696 | (cs->mbus_attr << 8) | | 697 | (cs->mbus_attr << 8) | |
697 | (dram->mbus_dram_target_id << 4) | 1, | 698 | (dram->mbus_dram_target_id << 4) | 1, |
@@ -705,6 +706,7 @@ static int __init mvsd_probe(struct platform_device *pdev) | |||
705 | struct mmc_host *mmc = NULL; | 706 | struct mmc_host *mmc = NULL; |
706 | struct mvsd_host *host = NULL; | 707 | struct mvsd_host *host = NULL; |
707 | const struct mvsdio_platform_data *mvsd_data; | 708 | const struct mvsdio_platform_data *mvsd_data; |
709 | const struct mbus_dram_target_info *dram; | ||
708 | struct resource *r; | 710 | struct resource *r; |
709 | int ret, irq; | 711 | int ret, irq; |
710 | 712 | ||
@@ -755,8 +757,9 @@ static int __init mvsd_probe(struct platform_device *pdev) | |||
755 | } | 757 | } |
756 | 758 | ||
757 | /* (Re-)program MBUS remapping windows if we are asked to. */ | 759 | /* (Re-)program MBUS remapping windows if we are asked to. */ |
758 | if (mvsd_data->dram != NULL) | 760 | dram = mv_mbus_dram_info(); |
759 | mv_conf_mbus_windows(host, mvsd_data->dram); | 761 | if (dram) |
762 | mv_conf_mbus_windows(host, dram); | ||
760 | 763 | ||
761 | mvsd_power_down(host); | 764 | mvsd_power_down(host); |
762 | 765 | ||
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 194a03113802..e93be7954a19 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -2509,7 +2509,7 @@ static void mv643xx_eth_netpoll(struct net_device *dev) | |||
2509 | /* platform glue ************************************************************/ | 2509 | /* platform glue ************************************************************/ |
2510 | static void | 2510 | static void |
2511 | mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp, | 2511 | mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp, |
2512 | struct mbus_dram_target_info *dram) | 2512 | const struct mbus_dram_target_info *dram) |
2513 | { | 2513 | { |
2514 | void __iomem *base = msp->base; | 2514 | void __iomem *base = msp->base; |
2515 | u32 win_enable; | 2515 | u32 win_enable; |
@@ -2527,7 +2527,7 @@ mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp, | |||
2527 | win_protect = 0; | 2527 | win_protect = 0; |
2528 | 2528 | ||
2529 | for (i = 0; i < dram->num_cs; i++) { | 2529 | for (i = 0; i < dram->num_cs; i++) { |
2530 | struct mbus_dram_window *cs = dram->cs + i; | 2530 | const struct mbus_dram_window *cs = dram->cs + i; |
2531 | 2531 | ||
2532 | writel((cs->base & 0xffff0000) | | 2532 | writel((cs->base & 0xffff0000) | |
2533 | (cs->mbus_attr << 8) | | 2533 | (cs->mbus_attr << 8) | |
@@ -2577,6 +2577,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2577 | static int mv643xx_eth_version_printed; | 2577 | static int mv643xx_eth_version_printed; |
2578 | struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data; | 2578 | struct mv643xx_eth_shared_platform_data *pd = pdev->dev.platform_data; |
2579 | struct mv643xx_eth_shared_private *msp; | 2579 | struct mv643xx_eth_shared_private *msp; |
2580 | const struct mbus_dram_target_info *dram; | ||
2580 | struct resource *res; | 2581 | struct resource *res; |
2581 | int ret; | 2582 | int ret; |
2582 | 2583 | ||
@@ -2641,8 +2642,9 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev) | |||
2641 | /* | 2642 | /* |
2642 | * (Re-)program MBUS remapping windows if we are asked to. | 2643 | * (Re-)program MBUS remapping windows if we are asked to. |
2643 | */ | 2644 | */ |
2644 | if (pd != NULL && pd->dram != NULL) | 2645 | dram = mv_mbus_dram_info(); |
2645 | mv643xx_eth_conf_mbus_windows(msp, pd->dram); | 2646 | if (dram) |
2647 | mv643xx_eth_conf_mbus_windows(msp, dram); | ||
2646 | 2648 | ||
2647 | /* | 2649 | /* |
2648 | * Detect hardware parameters. | 2650 | * Detect hardware parameters. |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index a68a2a5c4b83..6c6a5a3b4ea7 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -172,7 +172,7 @@ static const struct hc_driver ehci_orion_hc_driver = { | |||
172 | 172 | ||
173 | static void __init | 173 | static void __init |
174 | ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | 174 | ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, |
175 | struct mbus_dram_target_info *dram) | 175 | const struct mbus_dram_target_info *dram) |
176 | { | 176 | { |
177 | int i; | 177 | int i; |
178 | 178 | ||
@@ -182,7 +182,7 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
182 | } | 182 | } |
183 | 183 | ||
184 | for (i = 0; i < dram->num_cs; i++) { | 184 | for (i = 0; i < dram->num_cs; i++) { |
185 | struct mbus_dram_window *cs = dram->cs + i; | 185 | const struct mbus_dram_window *cs = dram->cs + i; |
186 | 186 | ||
187 | wrl(USB_WINDOW_CTRL(i), ((cs->size - 1) & 0xffff0000) | | 187 | wrl(USB_WINDOW_CTRL(i), ((cs->size - 1) & 0xffff0000) | |
188 | (cs->mbus_attr << 8) | | 188 | (cs->mbus_attr << 8) | |
@@ -194,6 +194,7 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
194 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | 194 | static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) |
195 | { | 195 | { |
196 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 196 | struct orion_ehci_data *pd = pdev->dev.platform_data; |
197 | const struct mbus_dram_target_info *dram; | ||
197 | struct resource *res; | 198 | struct resource *res; |
198 | struct usb_hcd *hcd; | 199 | struct usb_hcd *hcd; |
199 | struct ehci_hcd *ehci; | 200 | struct ehci_hcd *ehci; |
@@ -259,8 +260,9 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev) | |||
259 | /* | 260 | /* |
260 | * (Re-)program MBUS remapping windows if we are asked to. | 261 | * (Re-)program MBUS remapping windows if we are asked to. |
261 | */ | 262 | */ |
262 | if (pd != NULL && pd->dram != NULL) | 263 | dram = mv_mbus_dram_info(); |
263 | ehci_orion_conf_mbus_windows(hcd, pd->dram); | 264 | if (dram) |
265 | ehci_orion_conf_mbus_windows(hcd, dram); | ||
264 | 266 | ||
265 | /* | 267 | /* |
266 | * setup Orion USB controller. | 268 | * setup Orion USB controller. |
diff --git a/include/linux/mbus.h b/include/linux/mbus.h index c11ff2932549..efa1a6d7aca8 100644 --- a/include/linux/mbus.h +++ b/include/linux/mbus.h | |||
@@ -32,5 +32,16 @@ struct mbus_dram_target_info | |||
32 | } cs[4]; | 32 | } cs[4]; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | 35 | /* | |
36 | * The Marvell mbus is to be found only on SOCs from the Orion family | ||
37 | * at the moment. Provide a dummy stub for other architectures. | ||
38 | */ | ||
39 | #ifdef CONFIG_PLAT_ORION | ||
40 | extern const struct mbus_dram_target_info *mv_mbus_dram_info(void); | ||
41 | #else | ||
42 | static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void) | ||
43 | { | ||
44 | return NULL; | ||
45 | } | ||
46 | #endif | ||
36 | #endif | 47 | #endif |
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index cd33de1c5b7a..df12e0993f5a 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c | |||
@@ -94,9 +94,10 @@ static irqreturn_t kirkwood_dma_irq(int irq, void *dev_id) | |||
94 | return IRQ_HANDLED; | 94 | return IRQ_HANDLED; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void kirkwood_dma_conf_mbus_windows(void __iomem *base, int win, | 97 | static void |
98 | unsigned long dma, | 98 | kirkwood_dma_conf_mbus_windows(void __iomem *base, int win, |
99 | struct mbus_dram_target_info *dram) | 99 | unsigned long dma, |
100 | const struct mbus_dram_target_info *dram) | ||
100 | { | 101 | { |
101 | int i; | 102 | int i; |
102 | 103 | ||
@@ -106,7 +107,7 @@ static void kirkwood_dma_conf_mbus_windows(void __iomem *base, int win, | |||
106 | 107 | ||
107 | /* try to find matching cs for current dma address */ | 108 | /* try to find matching cs for current dma address */ |
108 | for (i = 0; i < dram->num_cs; i++) { | 109 | for (i = 0; i < dram->num_cs; i++) { |
109 | struct mbus_dram_window *cs = dram->cs + i; | 110 | const struct mbus_dram_window *cs = dram->cs + i; |
110 | if ((cs->base & 0xffff0000) < (dma & 0xffff0000)) { | 111 | if ((cs->base & 0xffff0000) < (dma & 0xffff0000)) { |
111 | writel(cs->base & 0xffff0000, | 112 | writel(cs->base & 0xffff0000, |
112 | base + KIRKWOOD_AUDIO_WIN_BASE_REG(win)); | 113 | base + KIRKWOOD_AUDIO_WIN_BASE_REG(win)); |
@@ -127,6 +128,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream) | |||
127 | struct snd_soc_dai *cpu_dai = soc_runtime->cpu_dai; | 128 | struct snd_soc_dai *cpu_dai = soc_runtime->cpu_dai; |
128 | struct kirkwood_dma_data *priv; | 129 | struct kirkwood_dma_data *priv; |
129 | struct kirkwood_dma_priv *prdata = snd_soc_platform_get_drvdata(platform); | 130 | struct kirkwood_dma_priv *prdata = snd_soc_platform_get_drvdata(platform); |
131 | const struct mbus_dram_target_info *dram; | ||
130 | unsigned long addr; | 132 | unsigned long addr; |
131 | 133 | ||
132 | priv = snd_soc_dai_get_dma_data(cpu_dai, substream); | 134 | priv = snd_soc_dai_get_dma_data(cpu_dai, substream); |
@@ -175,15 +177,16 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream) | |||
175 | writel((unsigned long)-1, priv->io + KIRKWOOD_ERR_MASK); | 177 | writel((unsigned long)-1, priv->io + KIRKWOOD_ERR_MASK); |
176 | } | 178 | } |
177 | 179 | ||
180 | dram = mv_mbus_dram_info(); | ||
178 | addr = virt_to_phys(substream->dma_buffer.area); | 181 | addr = virt_to_phys(substream->dma_buffer.area); |
179 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 182 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
180 | prdata->play_stream = substream; | 183 | prdata->play_stream = substream; |
181 | kirkwood_dma_conf_mbus_windows(priv->io, | 184 | kirkwood_dma_conf_mbus_windows(priv->io, |
182 | KIRKWOOD_PLAYBACK_WIN, addr, priv->dram); | 185 | KIRKWOOD_PLAYBACK_WIN, addr, dram); |
183 | } else { | 186 | } else { |
184 | prdata->rec_stream = substream; | 187 | prdata->rec_stream = substream; |
185 | kirkwood_dma_conf_mbus_windows(priv->io, | 188 | kirkwood_dma_conf_mbus_windows(priv->io, |
186 | KIRKWOOD_RECORD_WIN, addr, priv->dram); | 189 | KIRKWOOD_RECORD_WIN, addr, dram); |
187 | } | 190 | } |
188 | 191 | ||
189 | return 0; | 192 | return 0; |