summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-19 19:17:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-20 08:25:43 +0200
commit358ab3eb849081e5d99a4b4d7d79a9edbd711e28 (patch)
tree81c836cf4182c974ef214e83d3529eb115070249 /drivers
parenteb18395e0743974fd9fad8c0e5005932074ffe84 (diff)
downloadbarebox-358ab3eb849081e5d99a4b4d7d79a9edbd711e28.tar.gz
barebox-358ab3eb849081e5d99a4b4d7d79a9edbd711e28.tar.xz
atmel/drivers: switch to dev_request_mem_region
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mci/atmel_mci.c2
-rw-r--r--drivers/mtd/nand/atmel_nand.c2
-rw-r--r--drivers/net/macb.c2
-rw-r--r--drivers/serial/atmel.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 70041bad66..b4489dd19e 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -456,7 +456,7 @@ static int mci_probe(struct device_d *hw_dev)
if (pd->bus_width == 8)
host->mci.host_caps |= MMC_MODE_8BIT;
- host->base = (void __iomem *)hw_dev->resource[0].start;
+ host->base = dev_request_mem_region(hw_dev, 0);
host->hw_dev = hw_dev;
hw_dev->priv = host;
host->clk = clk_get(hw_dev, "mci_clk");
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 937bb70d6d..f79be9a3c6 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -381,7 +381,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
if (!host)
return -ENOMEM;
- host->io_base = (void __iomem *)dev->resource[0].start;
+ host->io_base = dev_request_mem_region(dev, 0);
mtd = &host->mtd;
nand_chip = &host->nand_chip;
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e030154c95..95ad3d7289 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -446,7 +446,7 @@ static int macb_probe(struct device_d *dev)
macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
- macb->regs = (void __iomem *)dev->resource[0].start;
+ macb->regs = dev_request_mem_region(dev, 0);
/*
* Do some basic initialization so that we at least can talk
diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c
index d8713b3ddb..ff0e75e2b3 100644
--- a/drivers/serial/atmel.c
+++ b/drivers/serial/atmel.c
@@ -375,7 +375,7 @@ static int atmel_serial_init_port(struct console_device *cdev)
struct device_d *dev = cdev->dev;
struct atmel_uart_port *uart = to_atmel_uart_port(cdev);
- uart->base = (void __iomem *)dev->resource[0].start;
+ uart->base = dev_request_mem_region(dev, 0);
uart->clk = clk_get(dev, "usart");
clk_enable(uart->clk);
uart->uartclk = clk_get_rate(uart->clk);