aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/xirc2ps_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-28 04:59:06 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:21 -0400
commitcdb138080b78146d1cdadba9f5dadbeb97445b91 (patch)
treefae26f709ed0f19648db79059234faf9fa028051 /drivers/net/pcmcia/xirc2ps_cs.c
parent899611ee7d373e5eeda08e9a8632684e1ebbbf00 (diff)
pcmcia: do not use win_req_t when calling pcmcia_request_window()
Instead of win_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four iomem ranges. After a call to pcmcia_request_window(), the windows found there are reserved and may be used until pcmcia_release_window() is called. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-mtd@lists.infradead.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia/xirc2ps_cs.c')
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index f5819526b5ee..4308bda0e96d 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -869,8 +869,6 @@ xirc2ps_config(struct pcmcia_device * link)
869 goto config_error; 869 goto config_error;
870 870
871 if (local->dingo) { 871 if (local->dingo) {
872 win_req_t req;
873
874 /* Reset the modem's BAR to the correct value 872 /* Reset the modem's BAR to the correct value
875 * This is necessary because in the RequestConfiguration call, 873 * This is necessary because in the RequestConfiguration call,
876 * the base address of the ethernet port (BasePort1) is written 874 * the base address of the ethernet port (BasePort1) is written
@@ -890,14 +888,14 @@ xirc2ps_config(struct pcmcia_device * link)
890 * is at 0x0800. So we allocate a window into the attribute 888 * is at 0x0800. So we allocate a window into the attribute
891 * memory and write direct to the CIS registers 889 * memory and write direct to the CIS registers
892 */ 890 */
893 req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE; 891 link->resource[2]->flags = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_AM |
894 req.Base = req.Size = 0; 892 WIN_ENABLE;
895 req.AccessSpeed = 0; 893 link->resource[2]->start = link->resource[2]->end = 0;
896 if ((err = pcmcia_request_window(link, &req, &link->win))) 894 if ((err = pcmcia_request_window(link, link->resource[2], 0)))
897 goto config_error; 895 goto config_error;
898 896
899 local->dingo_ccr = ioremap(req.Base,0x1000) + 0x0800; 897 local->dingo_ccr = ioremap(link->resource[2]->start, 0x1000) + 0x0800;
900 if ((err = pcmcia_map_mem_page(link, link->win, 0))) 898 if ((err = pcmcia_map_mem_page(link, link->resource[2], 0)))
901 goto config_error; 899 goto config_error;
902 900
903 /* Setup the CCRs; there are no infos in the CIS about the Ethernet 901 /* Setup the CCRs; there are no infos in the CIS about the Ethernet
@@ -988,7 +986,7 @@ xirc2ps_release(struct pcmcia_device *link)
988{ 986{
989 dev_dbg(&link->dev, "release\n"); 987 dev_dbg(&link->dev, "release\n");
990 988
991 if (link->win) { 989 if (link->resource[2]->end) {
992 struct net_device *dev = link->priv; 990 struct net_device *dev = link->priv;
993 local_info_t *local = netdev_priv(dev); 991 local_info_t *local = netdev_priv(dev);
994 if (local->dingo) 992 if (local->dingo)