aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-12-07 15:48:07 -0500
committerNicolas Pitre <nico@fluxnic.net>2011-12-13 18:46:55 -0500
commit63a9332b232bdab0df6ef18a9f39e8d58a82bda4 (patch)
tree52906e5888de9e634824d6005d9dbd3eb109bd2d /drivers/net
parent45173d5ed4c9a397db31623bf6469efbd3a239cd (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 'drivers/net')
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 194a0311380..e93be7954a1 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 ************************************************************/
2510static void 2510static void
2511mv643xx_eth_conf_mbus_windows(struct mv643xx_eth_shared_private *msp, 2511mv643xx_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.