]> err.no Git - linux-2.6/commitdiff
[ARM] ecard: add ecardm_iomap() / ecardm_iounmap()
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 10 May 2007 17:40:51 +0000 (18:40 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 May 2007 16:19:02 +0000 (17:19 +0100)
Add devres ecardm_iomap() and ecardm_iounmap() for Acorn expansion
cards.  Convert all expansion card drivers to use them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 files changed:
arch/arm/kernel/ecard.c
drivers/ata/pata_icside.c
drivers/ide/arm/icside.c
drivers/ide/arm/rapide.c
drivers/net/arm/ether1.c
drivers/net/arm/ether3.c
drivers/net/arm/etherh.c
drivers/scsi/arm/arxescsi.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/powertec.c
drivers/serial/8250_acorn.c
include/asm-arm/ecard.h

index 65f1398723a4e86a54b522002438ab6dc8a5a775..f56d48c451ea8dc4438a92e0539de21a7b3fc100 100644 (file)
 #include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/kthread.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
 #include <asm/ecard.h>
 #include <asm/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mmu_context.h>
 #include <asm/mach/irq.h>
@@ -966,6 +966,23 @@ void ecard_setirq(struct expansion_card *ec, const struct expansion_card_ops *op
 }
 EXPORT_SYMBOL(ecard_setirq);
 
+void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
+                          unsigned long offset, unsigned long maxsize)
+{
+       unsigned long start = ecard_resource_start(ec, res);
+       unsigned long end = ecard_resource_end(ec, res);
+
+       if (offset > (end - start))
+               return NULL;
+
+       start += offset;
+       if (maxsize && end - start > maxsize)
+               end = start + maxsize;
+       
+       return devm_ioremap(&ec->dev, start, end - start);
+}
+EXPORT_SYMBOL(ecardm_iomap);
+
 /*
  * Probe for an expansion card.
  *
index d7621a39ed0919f29275a195b4e3f361196c436f..d323e75b05d5b8862893de09c7e74e235417666f 100644 (file)
@@ -425,8 +425,7 @@ pata_icside_register_v5(struct ata_probe_ent *ae, struct expansion_card *ec)
        struct pata_icside_state *state = ae->private_data;
        void __iomem *base;
 
-       base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
-                      ecard_resource_len(ec, ECARD_RES_MEMC));
+       base = ecardm_iomap(info->ec, ECARD_RES_MEMC, 0, 0);
        if (!base)
                return -ENOMEM;
 
@@ -453,24 +452,17 @@ pata_icside_register_v6(struct ata_probe_ent *ae, struct expansion_card *ec)
        struct pata_icside_state *state = ae->private_data;
        void __iomem *ioc_base, *easi_base;
        unsigned int sel = 0;
-       int ret;
 
-       ioc_base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST),
-                          ecard_resource_len(ec, ECARD_RES_IOCFAST));
-       if (!ioc_base) {
-               ret = -ENOMEM;
-               goto out;
-       }
+       ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
+       if (!ioc_base)
+               return -ENOMEM;
 
        easi_base = ioc_base;
 
        if (ecard_resource_flags(ec, ECARD_RES_EASI)) {
-               easi_base = ioremap(ecard_resource_start(ec, ECARD_RES_EASI),
-                                   ecard_resource_len(ec, ECARD_RES_EASI));
-               if (!easi_base) {
-                       ret = -ENOMEM;
-                       goto unmap_slot;
-               }
+               easi_base = ecardm_iomap(ec, ECARD_RES_EASI, 0, 0);
+               if (!easi_base)
+                       return -ENOMEM;
 
                /*
                 * Enable access to the EASI region.
@@ -507,10 +499,6 @@ pata_icside_register_v6(struct ata_probe_ent *ae, struct expansion_card *ec)
 
        return icside_dma_init(ae, ec);
 
- unmap_slot:
-       iounmap(ioc_base);
- out:
-       return ret;
 }
 
 static int __devinit
@@ -534,8 +522,7 @@ pata_icside_probe(struct expansion_card *ec, const struct ecard_id *id)
        state->type = ICS_TYPE_NOTYPE;
        state->dma = NO_DMA;
 
-       idmem = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST),
-                       ecard_resource_len(ec, ECARD_RES_IOCFAST));
+       idmem = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (idmem) {
                unsigned int type;
 
@@ -543,7 +530,7 @@ pata_icside_probe(struct expansion_card *ec, const struct ecard_id *id)
                type |= (readb(idmem + ICS_IDENT_OFFSET + 4) & 1) << 1;
                type |= (readb(idmem + ICS_IDENT_OFFSET + 8) & 1) << 2;
                type |= (readb(idmem + ICS_IDENT_OFFSET + 12) & 1) << 3;
-               iounmap(idmem);
+               ecardm_iounmap(ec, idmem);
 
                state->type = type;
        }
@@ -638,10 +625,6 @@ static void __devexit pata_icside_remove(struct expansion_card *ec)
         */
        if (state->dma != NO_DMA)
                free_dma(state->dma);
-       if (state->ioc_base)
-               iounmap(state->ioc_base);
-       if (state->ioc_base != state->irq_port)
-               iounmap(state->irq_port);
 
        kfree(state);
        ecard_release_resources(ec);
index 69c949ea93e3706b3c99b7098047c80b8157e0c8..66f826252aee4d6c66fa606a2348c25f4d3a4dad 100644 (file)
@@ -565,8 +565,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
        ide_hwif_t *hwif;
        void __iomem *base;
 
-       base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
-                      ecard_resource_len(ec, ECARD_RES_MEMC));
+       base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!base)
                return -ENOMEM;
 
@@ -583,10 +582,8 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
        icside_irqdisable_arcin_v5(ec, 0);
 
        hwif = icside_setup(base, &icside_cardinfo_v5, ec);
-       if (!hwif) {
-               iounmap(base);
+       if (!hwif)
                return -ENODEV;
-       }
 
        state->hwif[0] = hwif;
 
@@ -605,8 +602,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
        unsigned int sel = 0;
        int ret;
 
-       ioc_base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST),
-                          ecard_resource_len(ec, ECARD_RES_IOCFAST));
+       ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (!ioc_base) {
                ret = -ENOMEM;
                goto out;
@@ -615,11 +611,10 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
        easi_base = ioc_base;
 
        if (ecard_resource_flags(ec, ECARD_RES_EASI)) {
-               easi_base = ioremap(ecard_resource_start(ec, ECARD_RES_EASI),
-                                   ecard_resource_len(ec, ECARD_RES_EASI));
+               easi_base = ecardm_iomap(ec, ECARD_RES_EASI, 0, 0);
                if (!easi_base) {
                        ret = -ENOMEM;
-                       goto unmap_slot;
+                       goto out;
                }
 
                /*
@@ -648,7 +643,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
 
        if (!hwif || !mate) {
                ret = -ENODEV;
-               goto unmap_port;
+               goto out;
        }
 
        state->hwif[0]    = hwif;
@@ -685,11 +680,6 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
 
        return 0;
 
- unmap_port:
-       if (easi_base != ioc_base)
-               iounmap(easi_base);
- unmap_slot:
-       iounmap(ioc_base);
  out:
        return ret;
 }
@@ -715,8 +705,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
        state->type     = ICS_TYPE_NOTYPE;
        state->dev      = &ec->dev;
 
-       idmem = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST),
-                       ecard_resource_len(ec, ECARD_RES_IOCFAST));
+       idmem = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (idmem) {
                unsigned int type;
 
@@ -724,7 +713,7 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
                type |= (readb(idmem + ICS_IDENT_OFFSET + 4) & 1) << 1;
                type |= (readb(idmem + ICS_IDENT_OFFSET + 8) & 1) << 2;
                type |= (readb(idmem + ICS_IDENT_OFFSET + 12) & 1) << 3;
-               iounmap(idmem);
+               ecardm_iounmap(ec, idmem);
 
                state->type = type;
        }
@@ -793,11 +782,6 @@ static void __devexit icside_remove(struct expansion_card *ec)
 
        ecard_set_drvdata(ec, NULL);
 
-       if (state->ioc_base)
-               iounmap(state->ioc_base);
-       if (state->ioc_base != state->irq_port)
-               iounmap(state->irq_port);
-
        kfree(state);
        ecard_release_resources(ec);
 }
index 890ea3fac3c6feb80bb50f8ced8a392fe9369aed..83811af11610d91a371825ca5e937af6ec327927 100644 (file)
@@ -63,8 +63,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
-                      ecard_resource_len(ec, ECARD_RES_MEMC));
+       base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto release;
@@ -81,7 +80,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
                goto out;
        }
 
-       iounmap(base);
  release:
        ecard_release_resources(ec);
  out:
@@ -96,7 +94,6 @@ static void __devexit rapide_remove(struct expansion_card *ec)
 
        /* there must be a better way */
        ide_unregister(hwif - ide_hwifs);
-       iounmap(hwif->hwif_data);
        ecard_release_resources(ec);
 }
 
index f075cebe84ad5ec025ade8e491e215a3bc38c035..f21148e7b579ec3e2242b77394d3431e0a0d3700 100644 (file)
@@ -1014,8 +1014,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
        SET_NETDEV_DEV(dev, &ec->dev);
 
        dev->irq = ec->irq;
-       priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST),
-                                 ecard_resource_len(ec, ECARD_RES_IOCFAST));
+       priv(dev)->base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (!priv(dev)->base) {
                ret = -ENOMEM;
                goto free;
@@ -1056,8 +1055,6 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
        return 0;
 
  free:
-       if (priv(dev)->base)
-               iounmap(priv(dev)->base);
        free_netdev(dev);
  release:
        ecard_release_resources(ec);
@@ -1072,7 +1069,6 @@ static void __devexit ether1_remove(struct expansion_card *ec)
        ecard_set_drvdata(ec, NULL);    
 
        unregister_netdev(dev);
-       iounmap(priv(dev)->base);
        free_netdev(dev);
        ecard_release_resources(ec);
 }
index 32da2eb9bcee8074c0e62819710dd9599bd480ad..da713500654da0d94331c7b9bcbeb981738ac81a 100644 (file)
@@ -793,8 +793,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
        SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, &ec->dev);
 
-       priv(dev)->base = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC),
-                                 ecard_resource_len(ec, ECARD_RES_MEMC));
+       priv(dev)->base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!priv(dev)->base) {
                ret = -ENOMEM;
                goto free;
@@ -869,8 +868,6 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
        return 0;
 
  free:
-       if (priv(dev)->base)
-               iounmap(priv(dev)->base);
        free_netdev(dev);
  release:
        ecard_release_resources(ec);
@@ -885,7 +882,6 @@ static void __devexit ether3_remove(struct expansion_card *ec)
        ecard_set_drvdata(ec, NULL);
 
        unregister_netdev(dev);
-       iounmap(priv(dev)->base);
        free_netdev(dev);
        ecard_release_resources(ec);
 }
index 387f1e3a4e84ede326de8539f583bac98458fca4..769ba69451f4f7887037d2c43fea94b4295a61db 100644 (file)
@@ -686,7 +686,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
        eh->supported           = data->supported;
        eh->ctrl                = 0;
        eh->id                  = ec->cid.product;
-       eh->memc                = ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), PAGE_SIZE);
+       eh->memc                = ecardm_iomap(ec, ECARD_RES_MEMC, 0, PAGE_SIZE);
        if (!eh->memc) {
                ret = -ENOMEM;
                goto free;
@@ -694,7 +694,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
 
        eh->ctrl_port = eh->memc;
        if (data->ctrl_ioc) {
-               eh->ioc_fast = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), PAGE_SIZE);
+               eh->ioc_fast = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, PAGE_SIZE);
                if (!eh->ioc_fast) {
                        ret = -ENOMEM;
                        goto free;
@@ -758,10 +758,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
        return 0;
 
  free:
-       if (eh->ioc_fast)
-               iounmap(eh->ioc_fast);
-       if (eh->memc)
-               iounmap(eh->memc);
        free_netdev(dev);
  release:
        ecard_release_resources(ec);
@@ -772,16 +768,11 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
 static void __devexit etherh_remove(struct expansion_card *ec)
 {
        struct net_device *dev = ecard_get_drvdata(ec);
-       struct etherh_priv *eh = etherh_priv(dev);
 
        ecard_set_drvdata(ec, NULL);
 
        unregister_netdev(dev);
 
-       if (eh->ioc_fast)
-               iounmap(eh->ioc_fast);
-       iounmap(eh->memc);
-
        free_netdev(dev);
 
        ecard_release_resources(ec);
index 7e132c5bacf83a705bdfcf767b5e93c78de7155e..2836fe248df9ef5ab1cc42a939e468ec0602bfe3 100644 (file)
@@ -281,7 +281,6 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
        struct Scsi_Host *host;
        struct arxescsi_info *info;
-       unsigned long resbase, reslen;
        void __iomem *base;
        int ret;
 
@@ -289,9 +288,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
-       reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
-       base = ioremap(resbase, reslen);
+       base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto out_region;
@@ -300,7 +297,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        host = scsi_host_alloc(&arxescsi_template, sizeof(struct arxescsi_info));
        if (!host) {
                ret = -ENOMEM;
-               goto out_unmap;
+               goto out_region;
        }
 
        info = (struct arxescsi_info *)host->hostdata;
@@ -337,8 +334,6 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        fas216_release(host);
  out_unregister:
        scsi_host_put(host);
- out_unmap:
-       iounmap(base);
  out_region:
        ecard_release_resources(ec);
  out:
@@ -348,13 +343,10 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
 static void __devexit arxescsi_remove(struct expansion_card *ec)
 {
        struct Scsi_Host *host = ecard_get_drvdata(ec);
-       struct arxescsi_info *info = (struct arxescsi_info *)host->hostdata;
 
        ecard_set_drvdata(ec, NULL);
        fas216_remove(host);
 
-       iounmap(info->base);
-
        fas216_release(host);
        scsi_host_put(host);
        ecard_release_resources(ec);
index f51aa3446bc7c8ff136669db8f85d639497ad884..68a64123af8f9fd28379a640d7a00b4f6ddcdd39 100644 (file)
@@ -401,7 +401,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
        struct Scsi_Host *host;
        struct cumanascsi2_info *info;
-       unsigned long resbase, reslen;
        void __iomem *base;
        int ret;
 
@@ -409,9 +408,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
-       reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
-       base = ioremap(resbase, reslen);
+       base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto out_region;
@@ -421,7 +418,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
                               sizeof(struct cumanascsi2_info));
        if (!host) {
                ret = -ENOMEM;
-               goto out_unmap;
+               goto out_region;
        }
 
        ecard_set_drvdata(ec, host);
@@ -490,9 +487,6 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
  out_free:
        scsi_host_put(host);
 
- out_unmap:
-       iounmap(base);
-
  out_region:
        ecard_release_resources(ec);
 
@@ -512,8 +506,6 @@ static void __devexit cumanascsi2_remove(struct expansion_card *ec)
                free_dma(info->info.scsi.dma);
        free_irq(ec->irq, info);
 
-       iounmap(info->base);
-
        fas216_release(host);
        scsi_host_put(host);
        ecard_release_resources(ec);
index cc5d513aa99af4b39e28f54cf02baadb4f6e1b43..bb2477b3fb0be49051010ec15842303265cc8de9 100644 (file)
@@ -519,7 +519,6 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
        struct Scsi_Host *host;
        struct eesoxscsi_info *info;
-       unsigned long resbase, reslen;
        void __iomem *base;
        int ret;
 
@@ -527,9 +526,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
-       reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
-       base = ioremap(resbase, reslen);
+       base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto out_region;
@@ -539,7 +536,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
                               sizeof(struct eesoxscsi_info));
        if (!host) {
                ret = -ENOMEM;
-               goto out_unmap;
+               goto out_region;
        }
 
        ecard_set_drvdata(ec, host);
@@ -612,9 +609,6 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        device_remove_file(&ec->dev, &dev_attr_bus_term);
        scsi_host_put(host);
 
- out_unmap:
-       iounmap(base);
-
  out_region:
        ecard_release_resources(ec);
 
@@ -636,8 +630,6 @@ static void __devexit eesoxscsi_remove(struct expansion_card *ec)
 
        device_remove_file(&ec->dev, &dev_attr_bus_term);
 
-       iounmap(info->base);
-
        fas216_release(host);
        scsi_host_put(host);
        ecard_release_resources(ec);
index 3cbd525b58c5a906deec54de925d809d45aa5abb..d9a546d1917ce560435084bde443325f47cb22be 100644 (file)
@@ -313,7 +313,6 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
 {
        struct Scsi_Host *host;
        struct powertec_info *info;
-       unsigned long resbase, reslen;
        void __iomem *base;
        int ret;
 
@@ -321,9 +320,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        if (ret)
                goto out;
 
-       resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
-       reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
-       base = ioremap(resbase, reslen);
+       base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
        if (!base) {
                ret = -ENOMEM;
                goto out_region;
@@ -333,7 +330,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
                               sizeof (struct powertec_info));
        if (!host) {
                ret = -ENOMEM;
-               goto out_unmap;
+               goto out_region;
        }
 
        ecard_set_drvdata(ec, host);
@@ -404,9 +401,6 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
        device_remove_file(&ec->dev, &dev_attr_bus_term);
        scsi_host_put(host);
 
- out_unmap:
-       iounmap(base);
-
  out_region:
        ecard_release_resources(ec);
 
@@ -428,8 +422,6 @@ static void __devexit powertecscsi_remove(struct expansion_card *ec)
                free_dma(info->info.scsi.dma);
        free_irq(ec->irq, info);
 
-       iounmap(info->base);
-
        fas216_release(host);
        scsi_host_put(host);
        ecard_release_resources(ec);
index 562ba745a044ae7f30d46ace434d6ba4af72b3d6..b0ce8c56f1a4dcdb8ac077888ed3973756b8f2e6 100644 (file)
@@ -54,7 +54,7 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id)
        info->num_ports = type->num_ports;
 
        bus_addr = ecard_resource_start(ec, type->type);
-       info->vaddr = ioremap(bus_addr, ecard_resource_len(ec, type->type));
+       info->vaddr = ecardm_iomap(ec, type->type, 0, 0);
        if (!info->vaddr) {
                kfree(info);
                return -ENOMEM;
@@ -91,7 +91,6 @@ static void __devexit serial_card_remove(struct expansion_card *ec)
                if (info->ports[i] > 0)
                        serial8250_unregister_port(info->ports[i]);
 
-       iounmap(info->vaddr);
        kfree(info);
 }
 
index 8f1000eac91fd499fa99068e309801f508bfd43a..684fe0645239f981df0a6f2ed47191323b2fbe4a 100644 (file)
@@ -226,6 +226,10 @@ ecard_address(struct expansion_card *ec, card_type_t type, card_speed_t speed)
 extern int ecard_request_resources(struct expansion_card *ec);
 extern void ecard_release_resources(struct expansion_card *ec);
 
+void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
+                          unsigned long offset, unsigned long maxsize);
+#define ecardm_iounmap(__ec, __addr)   devm_iounmap(&(__ec)->dev, __addr)
+
 extern struct bus_type ecard_bus_type;
 
 #define ECARD_DEV(_d)  container_of((_d), struct expansion_card, dev)