summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c8
-rw-r--r--drivers/ata/intf_platform_ide.c11
-rw-r--r--drivers/ata/pata-imx.c8
-rw-r--r--drivers/ata/sata-imx.c8
4 files changed, 24 insertions, 11 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 4e42180d9e..c31b337ba2 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -659,15 +659,17 @@ int ahci_add_host(struct ahci_device *ahci)
static int ahci_probe(struct device_d *dev)
{
+ struct resource *iores;
struct ahci_device *ahci;
void __iomem *regs;
int ret;
ahci = xzalloc(sizeof(*ahci));
- regs = dev_request_mem_region(dev, 0);
- if (IS_ERR(regs))
- return PTR_ERR(regs);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ regs = IOMEM(iores->start);
ahci->dev = dev;
ahci->mmio_base = regs;
diff --git a/drivers/ata/intf_platform_ide.c b/drivers/ata/intf_platform_ide.c
index d0f7984a2c..6e74bfb089 100644
--- a/drivers/ata/intf_platform_ide.c
+++ b/drivers/ata/intf_platform_ide.c
@@ -80,6 +80,7 @@ static void platform_ide_setup_port(void *reg_base, void *alt_base,
static int platform_ide_probe(struct device_d *dev)
{
+ struct resource *iores;
int rc;
struct ide_port_info *pdata = dev->platform_data;
struct ide_port *ide;
@@ -102,11 +103,17 @@ static int platform_ide_probe(struct device_d *dev)
return -EINVAL;
}
- reg_base = dev_request_mem_region(dev, 0);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ reg_base = IOMEM(iores->start);
if (!IS_ERR(reg_base)) {
mmio = 1;
- alt_base = dev_request_mem_region(dev, 1);
+ iores = dev_request_mem_resource(dev, 1);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ alt_base = IOMEM(iores->start);
if (IS_ERR(alt_base))
alt_base = NULL;
} else {
diff --git a/drivers/ata/pata-imx.c b/drivers/ata/pata-imx.c
index d8deba1461..842957331e 100644
--- a/drivers/ata/pata-imx.c
+++ b/drivers/ata/pata-imx.c
@@ -153,6 +153,7 @@ static int pata_imx_detect(struct device_d *dev)
static int imx_pata_probe(struct device_d *dev)
{
+ struct resource *iores;
struct ide_port *ide;
struct clk *clk;
void __iomem *base;
@@ -160,9 +161,10 @@ static int imx_pata_probe(struct device_d *dev)
const char *devname = NULL;
ide = xzalloc(sizeof(*ide));
- base = dev_request_mem_region(dev, 0);
- if (IS_ERR(base))
- return PTR_ERR(base);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ base = IOMEM(iores->start);
clk = clk_get(dev, NULL);
if (IS_ERR(clk)) {
diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
index 612762e229..6a601956db 100644
--- a/drivers/ata/sata-imx.c
+++ b/drivers/ata/sata-imx.c
@@ -84,6 +84,7 @@ static int imx_sata_init_1ms(struct imx_ahci *imx_ahci)
static int imx_sata_probe(struct device_d *dev)
{
+ struct resource *iores;
struct imx_ahci *imx_ahci;
struct imx_sata_data *data;
int ret;
@@ -100,9 +101,10 @@ static int imx_sata_probe(struct device_d *dev)
goto err_free;
}
- imx_ahci->ahci.mmio_base = dev_request_mem_region(dev, 0);
- if (IS_ERR(imx_ahci->ahci.mmio_base))
- return PTR_ERR(imx_ahci->ahci.mmio_base);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ imx_ahci->ahci.mmio_base = IOMEM(iores->start);
data->init(imx_ahci);