PCMCIA updates for 2.6.36
Subsystems (21)
Dominik Brodowski
maintainerLinus,
several PCMCIA updates for 2.6.37 are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git master
Please pull from that location. The diffstat and list of changes is below, the individual diffs are sent (at least) to the linux-pcmcia list.
Thanks,
Dominik
Dominik Brodowski (16):
pcmcia: do not use win_req_t when calling pcmcia_request_window()
pcmcia: split up modify_configuration() into two fixup functions
pcmcia: move Vpp setup to struct pcmcia_device
pcmcia: remove Pin, Copy configuration register access
pcmcia: simplify Status, ExtStatus register access
pcmcia: simplify IntType
pcmcia: move config_{base,index,regs} to struct pcmcia_device
pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
pcmcia: Documentation update
pcmcia: introduce autoconfiguration feature
pcmcia: use autoconfiguration feature for ioports and iomem
pcmcia: remove the "Finally, report what we've done" message
pcmcia: move driver name to struct pcmcia_driver
pcmcia: avoid messages on module (un)loading
pcmcia: remove obsolete and wrong comments
pcmcia: add a few debug statements
Maciej Żenczykowski (1):
pcmcia: fix unused function compile warning
Rahul Ruikar (1):
pcmcia: vrc4173_cardu: Fix error path for pci_release_regions and pci_disable_device
Tejun Heo (2):
serial_cs: drop spurious flush_scheduled_work() call
pcmcia: don't call flush_scheduled_work() spuriously
Vasiliy Kulikov (1):
pcmcia: synclink_cs: fix information leak to userland
Wolfram Sang (1):
pcmcia/yenta: guide users in case of problems with O2-bridges
Documentation/pcmcia/driver-changes.txt | 25 ++ drivers/ata/pata_pcmcia.c | 104 ++---- drivers/bluetooth/bluecard_cs.c | 12 +- drivers/bluetooth/bt3c_cs.c | 64 ++-- drivers/bluetooth/btuart_cs.c | 62 ++-- drivers/bluetooth/dtl1_cs.c | 27 +- drivers/char/pcmcia/cm4000_cs.c | 31 +-- drivers/char/pcmcia/cm4040_cs.c | 40 +-- drivers/char/pcmcia/ipwireless/main.c | 117 +++---- drivers/char/pcmcia/ipwireless/main.h | 5 - drivers/char/pcmcia/ipwireless/tty.h | 1 - drivers/char/pcmcia/synclink_cs.c | 46 +-- drivers/ide/ide-cs.c | 156 ++------- drivers/isdn/hardware/avm/avm_cs.c | 83 +---- drivers/isdn/hisax/avma1_cs.c | 97 +----- drivers/isdn/hisax/elsa_cs.c | 100 +----- drivers/isdn/hisax/sedlbauer_cs.c | 168 +--------- drivers/isdn/hisax/teles_cs.c | 98 +----- drivers/mmc/host/sdricoh_cs.c | 5 +- drivers/mtd/maps/pcmciamtd.c | 102 ++---- drivers/net/pcmcia/3c574_cs.c | 35 +-- drivers/net/pcmcia/3c589_cs.c | 47 +--- drivers/net/pcmcia/axnet_cs.c | 87 +---- drivers/net/pcmcia/com20020_cs.c | 43 +--- drivers/net/pcmcia/fmvj18x_cs.c | 67 ++--- drivers/net/pcmcia/ibmtr_cs.c | 89 ++---- drivers/net/pcmcia/nmclan_cs.c | 42 +-- drivers/net/pcmcia/pcnet_cs.c | 146 ++------ drivers/net/pcmcia/smc91c92_cs.c | 114 ++----- drivers/net/pcmcia/xirc2ps_cs.c | 161 +++------ drivers/net/wireless/airo_cs.c | 154 +-------- drivers/net/wireless/atmel_cs.c | 135 +------- drivers/net/wireless/b43/pcmcia.c | 24 +- drivers/net/wireless/hostap/hostap_cs.c | 102 +----- drivers/net/wireless/libertas/if_cs.c | 58 +--- drivers/net/wireless/orinoco/orinoco_cs.c | 137 +------- drivers/net/wireless/orinoco/spectrum_cs.c | 134 +------- drivers/net/wireless/ray_cs.c | 91 ++---- drivers/net/wireless/ray_cs.h | 2 - drivers/net/wireless/wl3501_cs.c | 47 +--- drivers/parport/parport_cs.c | 76 +---- drivers/pcmcia/au1000_generic.c | 3 - drivers/pcmcia/au1000_generic.h | 1 - drivers/pcmcia/au1000_pb1x00.c | 1 - drivers/pcmcia/cistpl.c | 1 - drivers/pcmcia/cs.c | 3 +- drivers/pcmcia/cs_internal.h | 9 - drivers/pcmcia/ds.c | 37 ++- drivers/pcmcia/i82092.c | 1 - drivers/pcmcia/i82365.c | 1 - drivers/pcmcia/m32r_cfc.c | 1 - drivers/pcmcia/m32r_pcc.c | 1 - drivers/pcmcia/m8xx_pcmcia.c | 1 - drivers/pcmcia/o2micro.h | 4 +- drivers/pcmcia/pcmcia_cis.c | 117 ++++++- drivers/pcmcia/pcmcia_resource.c | 409 +++++++++++++--------- drivers/pcmcia/pd6729.c | 1 - drivers/pcmcia/rsrc_iodyn.c | 1 - drivers/pcmcia/rsrc_mgr.c | 1 - drivers/pcmcia/rsrc_nonstatic.c | 1 - drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/soc_common.c | 4 - drivers/pcmcia/soc_common.h | 1 - drivers/pcmcia/socket_sysfs.c | 1 - drivers/pcmcia/tcic.c | 1 - drivers/pcmcia/vrc4173_cardu.c | 58 ++- drivers/pcmcia/xxs1500_ss.c | 1 - drivers/pcmcia/yenta_socket.c | 1 - drivers/scsi/pcmcia/aha152x_stub.c | 48 +-- drivers/scsi/pcmcia/fdomain_stub.c | 24 +- drivers/scsi/pcmcia/nsp_cs.c | 182 ++-------- drivers/scsi/pcmcia/qlogic_stub.c | 24 +- drivers/scsi/pcmcia/sym53c500_cs.c | 22 +- drivers/serial/serial_cs.c | 205 ++++------- drivers/ssb/main.c | 1 - drivers/ssb/pcmcia.c | 1 - drivers/ssb/scan.c | 1 - drivers/staging/comedi/drivers/cb_das16_cs.c | 58 +--- drivers/staging/comedi/drivers/das08_cs.c | 129 +------- drivers/staging/comedi/drivers/ni_daq_700.c | 130 +------- drivers/staging/comedi/drivers/ni_daq_dio24.c | 130 +------- drivers/staging/comedi/drivers/ni_labpc_cs.c | 144 +------- drivers/staging/comedi/drivers/ni_mio_cs.c | 23 +- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 124 +------ drivers/staging/wlags49_h2/wl_cs.c | 77 +---- drivers/staging/wlags49_h2/wl_internal.h | 1 - drivers/staging/wlags49_h2/wl_main.c | 19 - drivers/telephony/ixj_pcmcia.c | 41 +-- drivers/usb/host/sl811_cs.c | 68 +--- include/pcmcia/cs.h | 95 ----- include/pcmcia/ds.h | 85 +++-- include/pcmcia/ss.h | 1 - sound/pcmcia/pdaudiocf/pdaudiocf.c | 16 +- sound/pcmcia/pdaudiocf/pdaudiocf.h | 1 - sound/pcmcia/vx/vxpocket.c | 15 +- sound/pcmcia/vx/vxpocket.h | 1 - 96 files changed, 1327 insertions(+), 4135 deletions(-) delete mode 100644 include/pcmcia/cs.h
A message that is not in the archive (sent off-list or not yet received): 20101021153450.GA12405-S7uyTPAaJ/[email protected]
PATCH 1/22 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.
--- Documentation/pcmcia/driver-changes.txt | 7 +++ drivers/char/pcmcia/ipwireless/main.c | 87 +++++++++++++------------------ drivers/char/pcmcia/ipwireless/main.h | 4 -- drivers/mtd/maps/pcmciamtd.c | 53 ++++++++++--------- drivers/net/pcmcia/fmvj18x_cs.c | 29 ++++------ drivers/net/pcmcia/ibmtr_cs.c | 42 +++++++-------- drivers/net/pcmcia/pcnet_cs.c | 44 ++++++++-------- drivers/net/pcmcia/smc91c92_cs.c | 15 +++--- drivers/net/pcmcia/xirc2ps_cs.c | 16 +++--- drivers/net/wireless/b43/pcmcia.c | 14 ++--- drivers/net/wireless/ray_cs.c | 44 +++++++-------- drivers/net/wireless/ray_cs.h | 2 - drivers/pcmcia/pcmcia_resource.c | 60 ++++++++++++---------- drivers/scsi/pcmcia/nsp_cs.c | 49 +++++++----------- include/pcmcia/cs.h | 24 --------- include/pcmcia/ds.h | 28 +++++++--- 16 files changed, 241 insertions(+), 277 deletions(-)
Documentation/pcmcia/driver-changes.txt +7 -0
@@ -1,4 +1,11 @@ This file details changes in 2.6 which affect PCMCIA card driver authors: +* pcmcia_request_window changes (as of 2.6.36) + 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 ioport + ranges. After a call to pcmcia_request_window(), the regions found there + are reserved and may be used immediately -- until pcmcia_release_window() + is called. + * pcmcia_request_io changes (as of 2.6.36) Instead of io_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
drivers/char/pcmcia/ipwireless/main.c +37 -50
142 lines not on this page · raw message
drivers/char/pcmcia/ipwireless/main.h +0 -4
@@ -45,13 +45,9 @@ struct ipw_dev {struct pcmcia_device *link;int is_v2_card; -window_handle_t handle_attr_memory;void __iomem *attr_memory; -win_req_t request_attr_memory; -window_handle_t handle_common_memory;void __iomem *common_memory; -win_req_t request_common_memory;/* Reference to attribute memory, containing CIS data */ void *attribute_memory;
drivers/mtd/maps/pcmciamtd.c +29 -24
100 lines not on this page · raw message
drivers/net/pcmcia/fmvj18x_cs.c +12 -17
@@ -544,20 +544,18 @@ failed:static int fmvj18x_get_hwinfo (struct pcmcia_device *link,u_char *node_id) { -win_req_t req;u_char __iomem *base;int i, j;/* Allocate a small memory window */ - req.Attributes =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; - req.Base =0 ; req.Size =0 ; - req.AccessSpeed =0 ; - i =pcmcia_request_window (link, &req, &link->win); + link->resource[2 ]->flags |=WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; + link->resource[2 ]->start =0 ; link->resource[2 ]->end =0 ; + i =pcmcia_request_window (link, link->resource[2 ],0 );if (i !=0 )return -1 ; - base =ioremap (req.Base, req.Size); -pcmcia_map_mem_page (link, link->win,0 ); + base =ioremap (link->resource[2 ]->start,resource_size (link->resource[2 ])); +pcmcia_map_mem_page (link, link->resource[2 ],0 );/* * MBH10304 CISTPL_FUNCE_LAN_NODE_ID format
@@ -582,7 +580,7 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id) }iounmap (base); - j =pcmcia_release_window (link, link->win); + j =pcmcia_release_window (link, link->resource[2 ]);return (i !=0x200 ) ?0 :-1 ; }/* fmvj18x_get_hwinfo */
@@ -590,27 +588,26 @@ static int fmvj18x_get_hwinfo(struct pcmcia_device *link, u_char *node_id)static int fmvj18x_setup_mfc (struct pcmcia_device *link) { -win_req_t req;int i;struct net_device *dev = link->priv;unsigned int ioaddr;local_info_t *lp =netdev_priv (dev);/* Allocate a small memory window */ - req.Attributes =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; - req.Base =0 ; req.Size =0 ; - req.AccessSpeed =0 ; - i =pcmcia_request_window (link, &req, &link->win); + link->resource[3 ]->flags =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; + link->resource[3 ]->start = link->resource[3 ]->end =0 ; + i =pcmcia_request_window (link, link->resource[3 ],0 );if (i !=0 )return -1 ; - lp->base =ioremap (req.Base, req.Size); + lp->base =ioremap (link->resource[3 ]->start, +resource_size (link->resource[3 ]));if (lp->base ==NULL ) {printk (KERN_NOTICE "fmvj18x_cs: ioremap failed\n" );return -1 ; } - i =pcmcia_map_mem_page (link, link->win,0 ); + i =pcmcia_map_mem_page (link, link->resource[3 ],0 );if (i !=0 ) {iounmap (lp->base); lp->base =NULL ;
@@ -638,7 +635,6 @@ static void fmvj18x_release(struct pcmcia_device *link)struct net_device *dev = link->priv;local_info_t *lp =netdev_priv (dev);u_char __iomem *tmp; -int j;dev_dbg (&link->dev,"fmvj18x_release\n" );
@@ -646,7 +642,6 @@ static void fmvj18x_release(struct pcmcia_device *link) tmp = lp->base; lp->base =NULL ;/* set NULL before iounmap */ iounmap (tmp); - j =pcmcia_release_window (link, link->win); }pcmcia_disable_device (link);
drivers/net/pcmcia/ibmtr_cs.c +20 -22
80 lines not on this page · raw message
drivers/net/pcmcia/pcnet_cs.c +22 -22
99 lines not on this page · raw message
drivers/net/pcmcia/smc91c92_cs.c +7 -8
@@ -442,7 +442,6 @@ static int mhz_mfc_config(struct pcmcia_device *link) {struct net_device *dev = link->priv;struct smc_private *smc =netdev_priv (dev); -win_req_t req;unsigned int offset;int i;
@@ -459,16 +458,16 @@ static int mhz_mfc_config(struct pcmcia_device *link) dev->base_addr = link->resource[0 ]->start;/* Allocate a memory window, for accessing the ISR */ - req.Attributes =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; - req.Base = req.Size =0 ; - req.AccessSpeed =0 ; - i =pcmcia_request_window (link, &req, &link->win); + link->resource[2 ]->flags =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; + link->resource[2 ]->start = link->resource[2 ]->end =0 ; + i =pcmcia_request_window (link, link->resource[2 ],0 );if (i !=0 )return -ENODEV ; - smc->base =ioremap (req.Base, req.Size); + smc->base =ioremap (link->resource[2 ]->start, +resource_size (link->resource[2 ])); offset = (smc->manfid ==MANFID_MOTOROLA ) ? link->conf.ConfigBase :0 ; - i =pcmcia_map_mem_page (link, link->win, offset); + i =pcmcia_map_mem_page (link, link->resource[2 ], offset);if ((i ==0 ) && (smc->manfid ==MANFID_MEGAHERTZ ) && (smc->cardid ==PRODID_MEGAHERTZ_EM3288 ))
@@ -999,7 +998,7 @@ config_failed:static void smc91c92_release (struct pcmcia_device *link) {dev_dbg (&link->dev,"smc91c92_release\n" ); -if (link->win) { +if (link->resource[2 ]->end) {struct net_device *dev = link->priv;struct smc_private *smc =netdev_priv (dev);iounmap (smc->base);
drivers/net/pcmcia/xirc2ps_cs.c +7 -9
@@ -869,8 +869,6 @@ xirc2ps_config(struct pcmcia_device * link) goto config_error;if (local->dingo) { -win_req_t req; -/* Reset the modem's BAR to the correct value * This is necessary because in the RequestConfiguration call, * the base address of the ethernet port (BasePort1) is written
@@ -890,14 +888,14 @@ xirc2ps_config(struct pcmcia_device * link)* is at 0x0800. So we allocate a window into the attribute * memory and write direct to the CIS registers */ - req.Attributes =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM |WIN_ENABLE ; - req.Base = req.Size =0 ; - req.AccessSpeed =0 ; -if ((err =pcmcia_request_window (link, &req, &link->win))) + link->resource[2 ]->flags =WIN_DATA_WIDTH_8 |WIN_MEMORY_TYPE_AM | +WIN_ENABLE ; + link->resource[2 ]->start = link->resource[2 ]->end =0 ; +if ((err =pcmcia_request_window (link, link->resource[2 ],0 ))) goto config_error; - local->dingo_ccr =ioremap (req.Base,0x1000 ) +0x0800 ; -if ((err =pcmcia_map_mem_page (link, link->win,0 ))) + local->dingo_ccr =ioremap (link->resource[2 ]->start,0x1000 ) +0x0800 ; +if ((err =pcmcia_map_mem_page (link, link->resource[2 ],0 ))) goto config_error;/* Setup the CCRs; there are no infos in the CIS about the Ethernet
@@ -988,7 +986,7 @@ xirc2ps_release(struct pcmcia_device *link) {dev_dbg (&link->dev,"release\n" ); -if (link->win) { +if (link->resource[2 ]->end) {struct net_device *dev = link->priv;local_info_t *local =netdev_priv (dev);if (local->dingo)
drivers/net/wireless/b43/pcmcia.c +6 -8
@@ -63,7 +63,6 @@ static int b43_pcmcia_resume(struct pcmcia_device *dev)static int __devinit b43_pcmcia_probe (struct pcmcia_device *dev) {struct ssb_bus *ssb; -win_req_t win;int err = -ENOMEM ;int res =0 ;
@@ -76,16 +75,15 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) dev->conf.Attributes =CONF_ENABLE_IRQ ; dev->conf.IntType =INT_MEMORY_AND_IO ; - win.Attributes =WIN_ENABLE |WIN_DATA_WIDTH_16 | + dev->resource[2 ]->flags |=WIN_ENABLE |WIN_DATA_WIDTH_16 |WIN_USE_WAIT ; - win.Base =0 ; - win.Size =SSB_CORE_SIZE ; - win.AccessSpeed =250 ; - res =pcmcia_request_window (dev, &win, &dev->win); + dev->resource[2 ]->start =0 ; + dev->resource[2 ]->end =SSB_CORE_SIZE ; + res =pcmcia_request_window (dev, dev->resource[2 ],250 );if (res !=0 ) goto err_kfree_ssb; - res =pcmcia_map_mem_page (dev, dev->win,0 ); + res =pcmcia_map_mem_page (dev, dev->resource[2 ],0 );if (res !=0 ) goto err_disable;
@@ -96,7 +94,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)if (res !=0 ) goto err_disable; - err =ssb_bus_pcmciabus_register (ssb, dev, win.Base); + err =ssb_bus_pcmciabus_register (ssb, dev, dev->resource[2 ]->start);if (err) goto err_disable; dev->priv = ssb;
drivers/net/wireless/ray_cs.c +21 -23
74 lines not on this page · raw message
drivers/net/wireless/ray_cs.h +0 -2
@@ -25,8 +25,6 @@ struct beacon_rx { typedef struct ray_dev_t { int card_status; int authentication_state; - window_handle_t amem_handle; /* handle to window for attribute memory */ - window_handle_t rmem_handle; /* handle to window for rx buffer on card */ void __iomem *sram; /* pointer to beginning of shared RAM */ void __iomem *amem; /* pointer to attribute mem window */ void __iomem *rmem; /* pointer to receive buffer window */
drivers/pcmcia/pcmcia_resource.c +33 -27
132 lines not on this page · raw message
drivers/scsi/pcmcia/nsp_cs.c +19 -30
101 lines not on this page · raw message
include/pcmcia/cs.h +0 -24
@@ -68,28 +68,4 @@ typedef struct config_req_t {#define PRESENT_IOBASE_3 0x100#define PRESENT_IOSIZE 0x200 -/* For RequestWindow */ -typedef struct win_req_t { -u_int Attributes; -u_long Base; -u_int Size; -u_int AccessSpeed; -}win_req_t ; - -/* Attributes for RequestWindow */ -#define WIN_MEMORY_TYPE_CM 0x00/* default */ -#define WIN_MEMORY_TYPE_AM 0x20/* MAP_ATTRIB */ -#define WIN_DATA_WIDTH_8 0x00/* default */ -#define WIN_DATA_WIDTH_16 0x02/* MAP_16BIT */ -#define WIN_ENABLE 0x01/* MAP_ACTIVE */ -#define WIN_USE_WAIT 0x40/* MAP_USE_WAIT */ - -#define WIN_FLAGS_MAP 0x63/* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE | -MAP_USE_WAIT */ -#define WIN_FLAGS_REQ 0x1c/* mapping to socket->win[i]: -0x04 -> 0 -0x08 -> 1 -0x0c -> 2 -0x10 -> 3 */ -#endif /* _LINUX_CS_H */
include/pcmcia/ds.h +21 -7
@@ -36,8 +36,6 @@ struct pcmcia_device;struct config_t ;struct net_device ; -typedef struct resource *window_handle_t ; -/* dynamic device IDs for PCMCIA device drivers. See * Documentation/pcmcia/driver.txt for details. */
@@ -92,7 +90,6 @@ struct pcmcia_device {/* deprecated, will be cleaned up soon */ config_req_t conf; -window_handle_t win;/* device setup */ unsigned int irq;
@@ -209,10 +206,10 @@ int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev,int pcmcia_request_configuration (struct pcmcia_device *p_dev,config_req_t *req); -int pcmcia_request_window (struct pcmcia_device *p_dev,win_req_t *req, -window_handle_t *wh); -int pcmcia_release_window (struct pcmcia_device *p_dev,window_handle_t win); -int pcmcia_map_mem_page (struct pcmcia_device *p_dev,window_handle_t win, +int pcmcia_request_window (struct pcmcia_device *p_dev,struct resource *res, +unsigned int speed); +int pcmcia_release_window (struct pcmcia_device *p_dev,struct resource *res); +int pcmcia_map_mem_page (struct pcmcia_device *p_dev,struct resource *res,unsigned int offset);int pcmcia_modify_configuration (struct pcmcia_device *p_dev,modconf_t *mod);
@@ -234,6 +231,23 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)return IO_DATA_PATH_WIDTH_AUTO ; } +/* IO memory */ +#define WIN_MEMORY_TYPE_CM 0x00/* default */ +#define WIN_MEMORY_TYPE_AM 0x20/* MAP_ATTRIB */ +#define WIN_DATA_WIDTH_8 0x00/* default */ +#define WIN_DATA_WIDTH_16 0x02/* MAP_16BIT */ +#define WIN_ENABLE 0x01/* MAP_ACTIVE */ +#define WIN_USE_WAIT 0x40/* MAP_USE_WAIT */ + +#define WIN_FLAGS_MAP 0x63/* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE | +MAP_USE_WAIT */ +#define WIN_FLAGS_REQ 0x1c/* mapping to socket->win[i]: +0x04 -> 0 +0x08 -> 1 +0x0c -> 2 +0x10 -> 3 */ + +#endif /* __KERNEL__ */ #endif /* _LINUX_DS_H */
Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Dominik Brodowski
maintainerPATCH 2/22 pcmcia: split up modify_configuration() into two fixup functions
In reply to Dominik Brodowskipcmcia_modify_configuration() was only used by two drivers to fix up one issue each: setting the Vpp to a different value, and reducing the IO width to 8 bit. Introduce two explicitly named functions handling these things, and remove one further typedef.
--- drivers/mtd/maps/pcmciamtd.c | 8 +-- drivers/net/pcmcia/smc91c92_cs.c | 5 +- drivers/pcmcia/pcmcia_resource.c | 130 +++++++++++++++++++------------------- include/pcmcia/cs.h | 13 ---- include/pcmcia/ds.h | 4 +- 5 files changed, 69 insertions(+), 91 deletions(-)
drivers/mtd/maps/pcmciamtd.c +1 -7
@@ -316,15 +316,9 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on) {struct pcmciamtd_dev *dev = (struct pcmciamtd_dev *)map->map_priv_1;struct pcmcia_device *link = dev->p_dev; -modconf_t mod; -int ret; - - mod.Attributes =CONF_VPP1_CHANGE_VALID |CONF_VPP2_CHANGE_VALID ; - mod.Vcc =0 ; - mod.Vpp1 = mod.Vpp2 = on ? dev->vpp :0 ;DEBUG (2 ,"dev = %p on = %d vpp = %d\n" , dev, on, dev->vpp); - ret =pcmcia_modify_configuration (link, &mod); +pcmcia_fixup_vpp (link, on ? dev->vpp :0 ); }
drivers/net/pcmcia/smc91c92_cs.c +1 -4
@@ -816,13 +816,10 @@ static int check_sig(struct pcmcia_device *link) }if (width) { -modconf_t mod = { - .Attributes =CONF_IO_CHANGE_WIDTH , - };printk (KERN_INFO "smc91c92_cs: using 8-bit IO window.\n" );smc91c92_suspend (link); -pcmcia_modify_configuration (link, &mod); +pcmcia_fixup_iowidth (link);smc91c92_resume (link);return check_sig (link); }
drivers/pcmcia/pcmcia_resource.c +63 -65
155 lines not on this page · raw message
include/pcmcia/cs.h +0 -13
@@ -19,19 +19,6 @@#include <linux/interrupt.h> #endif -/* ModifyConfiguration */ -typedef struct modconf_t { -u_int Attributes; -u_int Vcc, Vpp1, Vpp2; -}modconf_t ; - -/* Attributes for ModifyConfiguration */ -#define CONF_IRQ_CHANGE_VALID 0x0100 -#define CONF_VCC_CHANGE_VALID 0x0200 -#define CONF_VPP1_CHANGE_VALID 0x0400 -#define CONF_VPP2_CHANGE_VALID 0x0800 -#define CONF_IO_CHANGE_WIDTH 0x1000 -/* For RequestConfiguration */ typedef struct config_req_t { u_int Attributes;
include/pcmcia/ds.h +3 -1
@@ -212,7 +212,9 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res);int pcmcia_map_mem_page (struct pcmcia_device *p_dev,struct resource *res,unsigned int offset); -int pcmcia_modify_configuration (struct pcmcia_device *p_dev,modconf_t *mod); +int pcmcia_fixup_vpp (struct pcmcia_device *p_dev,unsigned char new_vpp); +int pcmcia_fixup_iowidth (struct pcmcia_device *p_dev); +void pcmcia_disable_device (struct pcmcia_device *p_dev);/* IO ports */
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 3/22 pcmcia: move Vpp setup to struct pcmcia_device
In reply to Dominik BrodowskiSome drivers prefer to explicitly set Vpp. Instead of passing the voltage inside config_req_t, store it in struct pcmcia_device.
--- drivers/ata/pata_pcmcia.c | 4 ++-- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/ide/ide-cs.c | 6 +++--- drivers/isdn/hisax/sedlbauer_cs.c | 8 ++++---- drivers/mtd/maps/pcmciamtd.c | 4 ++-- drivers/net/wireless/airo_cs.c | 8 ++++---- drivers/net/wireless/atmel_cs.c | 4 ++-- drivers/net/wireless/hostap/hostap_cs.c | 10 +++++----- drivers/net/wireless/orinoco/orinoco_cs.c | 4 ++-- drivers/net/wireless/orinoco/spectrum_cs.c | 4 ++-- drivers/pcmcia/pcmcia_resource.c | 3 ++- drivers/scsi/pcmcia/nsp_cs.c | 8 ++++---- drivers/serial/serial_cs.c | 2 +- drivers/usb/host/sl811_cs.c | 8 ++++---- include/pcmcia/cs.h | 1 - include/pcmcia/ds.h | 1 + 17 files changed, 40 insertions(+), 39 deletions(-)
drivers/ata/pata_pcmcia.c +2 -2
@@ -194,9 +194,9 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + pdev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + pdev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
drivers/bluetooth/bt3c_cs.c +1 -1
@@ -686,7 +686,7 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, p_dev->io_lines = (try ==0 ) ?16 : cf->io.flags &CISTPL_IO_LINES_MASK ;if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + p_dev->vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cf->io.nwin >0 ) && (cf->io.win[0 ].len ==8 ) && (cf->io.win[0 ].base !=0 )) { p_dev->resource[0 ]->start = cf->io.win[0 ].base;
drivers/bluetooth/btuart_cs.c +1 -1
@@ -615,7 +615,7 @@ static int btuart_check_config(struct pcmcia_device *p_dev, p_dev->io_lines = (try ==0 ) ?16 : cf->io.flags &CISTPL_IO_LINES_MASK ;if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + p_dev->vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cf->io.nwin >0 ) && (cf->io.win[0 ].len ==8 ) && (cf->io.win[0 ].base !=0 )) { p_dev->resource[0 ]->start = cf->io.win[0 ].base;
drivers/ide/ide-cs.c +3 -3
@@ -221,9 +221,9 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + pdev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + pdev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
@@ -311,7 +311,7 @@ static int ide_config(struct pcmcia_device *link) info->host = host;dev_info (&link->dev,"ide-cs: hd%c: Vpp = %d.%d\n" ,'a' + host->ports[0 ]->index *2 , - link->conf.Vpp /10 , link->conf.Vpp %10 ); + link->vpp /10 , link->vpp %10 );kfree (stk);return 0 ;
drivers/isdn/hisax/sedlbauer_cs.c +4 -4
@@ -191,9 +191,9 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
@@ -257,8 +257,8 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x:" , link->conf.ConfigIndex); -if (link->conf.Vpp) -printk (", Vpp %d.%d" , link->conf.Vpp/10 , link->conf.Vpp%10 ); +if (link->vpp) +printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/mtd/maps/pcmciamtd.c +2 -2
@@ -570,9 +570,9 @@ static int pcmciamtd_config(struct pcmcia_device *link) dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp; link->conf.Attributes =0 ;if (setvpp ==2 ) { - link->conf.Vpp = dev->vpp; + link->vpp = dev->vpp; }else { - link->conf.Vpp =0 ; + link->vpp =0 ; } link->conf.IntType =INT_MEMORY ;
drivers/net/wireless/airo_cs.c +4 -4
@@ -166,9 +166,9 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
@@ -244,8 +244,8 @@ static int airo_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x: " , link->conf.ConfigIndex); -if (link->conf.Vpp) -printk (", Vpp %d.%d" , link->conf.Vpp/10 , link->conf.Vpp%10 ); +if (link->vpp) +printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);
drivers/net/wireless/atmel_cs.c +2 -2
@@ -183,9 +183,9 @@ static int atmel_config_check(struct pcmcia_device *p_dev,/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
drivers/net/wireless/hostap/hostap_cs.c +5 -5
@@ -508,9 +508,9 @@ static int prism2_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */ p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
@@ -605,9 +605,9 @@ static int prism2_config(struct pcmcia_device *link)/* Finally, report what we've done */ printk (KERN_INFO "%s: index 0x%02x: " , dev_info, link->conf.ConfigIndex); -if (link->conf.Vpp) -printk (", Vpp %d.%d" , link->conf.Vpp /10 , - link->conf.Vpp %10 ); +if (link->vpp) +printk (", Vpp %d.%d" , link->vpp /10 , + link->vpp %10 );if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/net/wireless/orinoco/orinoco_cs.c +2 -2
@@ -181,10 +181,10 @@ static int orinoco_cs_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */
drivers/net/wireless/orinoco/spectrum_cs.c +2 -2
@@ -243,10 +243,10 @@ static int spectrum_cs_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */
drivers/pcmcia/pcmcia_resource.c +2 -1
@@ -303,6 +303,7 @@ int pcmcia_fixup_vpp(struct pcmcia_device *p_dev, unsigned char new_vpp) ret = -EIO ; goto unlock; } + p_dev->vpp = new_vpp; unlock:mutex_unlock (&s->ops_mutex);
@@ -458,7 +459,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, }/* Do power control. We don't allow changes in Vcc. */ - s->socket.Vpp = req->Vpp; + s->socket.Vpp = p_dev->vpp;if (s->ops->set_socket (s, &s->socket)) {mutex_unlock (&s->ops_mutex); dev_printk(KERN_WARNING, &p_dev->dev,
drivers/scsi/pcmcia/nsp_cs.c +4 -4
@@ -1624,10 +1624,10 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) { - p_dev->conf.Vpp = + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; }else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) { - p_dev->conf.Vpp = + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; }
@@ -1749,8 +1749,8 @@ static int nsp_cs_config(struct pcmcia_device *link)/* Finally, report what we've done */ printk (KERN_INFO "nsp_cs: index 0x%02x: " , link->conf.ConfigIndex); -if (link->conf.Vpp) { -printk (", Vpp %d.%d" , link->conf.Vpp/10 , link->conf.Vpp%10 ); +if (link->vpp) { +printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); }if (link->conf.Attributes &CONF_ENABLE_IRQ ) {printk (", irq %d" , link->irq);
drivers/serial/serial_cs.c +1 -1
@@ -440,7 +440,7 @@ static int simple_config_check(struct pcmcia_device *p_dev,int *try = priv_data;if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; p_dev->io_lines = ((*try & 0x1) == 0) ?
drivers/usb/host/sl811_cs.c +4 -4
@@ -152,10 +152,10 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, }if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->conf.Vpp = + p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;/* we need an interrupt */
@@ -201,8 +201,8 @@ static int sl811_cs_config(struct pcmcia_device *link)dev_info (&link->dev,"index 0x%02x: " , link->conf.ConfigIndex); -if (link->conf.Vpp) -printk (", Vpp %d.%d" , link->conf.Vpp/10 , link->conf.Vpp%10 ); +if (link->vpp) +printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );printk (", irq %d" , link->irq);printk (", io %pR" , link->resource[0 ]);printk ("\n" );
include/pcmcia/cs.h +0 -1
@@ -22,7 +22,6 @@/* For RequestConfiguration */ typedef struct config_req_t { u_int Attributes; - u_int Vpp; /* both Vpp1 and Vpp2 */ u_int IntType; u_int ConfigBase; u_char Status, Pin, Copy, ExtStatus;
include/pcmcia/ds.h +1 -0
@@ -94,6 +94,7 @@ struct pcmcia_device {/* device setup */ unsigned int irq;struct resource *resource[PCMCIA_NUM_RESOURCES ]; +unsigned int vpp;unsigned int io_lines;/* number of I/O lines */
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 5/22 pcmcia: simplify Status, ExtStatus register access
In reply to Dominik BrodowskiThe Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were only accessed to enable audio output for some drivers and IRQ for serial_cs.c. The former also required setting config_req_t.Attributes to CONF_ENABLE_SPKR; the latter can be simplified to setting this field to CONF_ENABLE_ESR.
--- drivers/isdn/hisax/sedlbauer_cs.c | 4 +-- drivers/net/pcmcia/axnet_cs.c | 4 +-- drivers/net/pcmcia/pcnet_cs.c | 5 +-- drivers/net/pcmcia/smc91c92_cs.c | 2 - drivers/net/pcmcia/xirc2ps_cs.c | 5 +-- drivers/net/wireless/airo_cs.c | 4 +-- drivers/net/wireless/atmel_cs.c | 4 +-- drivers/net/wireless/hostap/hostap_cs.c | 4 +-- drivers/pcmcia/cs_internal.h | 2 +- drivers/pcmcia/pcmcia_resource.c | 28 +++++++++++++++++-------- drivers/scsi/pcmcia/nsp_cs.c | 4 +-- drivers/serial/serial_cs.c | 11 +++------ drivers/staging/comedi/drivers/ni_daq_700.c | 4 +-- drivers/staging/comedi/drivers/ni_daq_dio24.c | 4 +-- drivers/staging/comedi/drivers/ni_labpc_cs.c | 4 +-- include/pcmcia/cs.h | 2 +- 16 files changed, 38 insertions(+), 53 deletions(-)
drivers/isdn/hisax/sedlbauer_cs.c +1 -3
@@ -175,10 +175,8 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
drivers/net/pcmcia/axnet_cs.c +1 -3
@@ -334,10 +334,8 @@ static int axnet_config(struct pcmcia_device *link)if (!link->irq) goto failed; -if (resource_size (link->resource[1 ]) ==8 ) { +if (resource_size (link->resource[1 ]) ==8 ) link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status =CCSR_AUDIO_ENA ; - } ret =pcmcia_request_configuration (link, &link->conf);if (ret)
drivers/net/pcmcia/pcnet_cs.c +2 -3
@@ -560,10 +560,9 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,if (!link->irq)return NULL ; -if (resource_size (link->resource[1 ]) ==8 ) { +if (resource_size (link->resource[1 ]) ==8 ) link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status =CCSR_AUDIO_ENA ; - } +if ((link->manf_id ==MANFID_IBM ) && (link->card_id ==PRODID_IBM_HOME_AND_AWAY )) link->conf.ConfigIndex |=0x10 ;
drivers/net/pcmcia/smc91c92_cs.c +0 -2
@@ -446,7 +446,6 @@ static int mhz_mfc_config(struct pcmcia_device *link)int i; link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status =CCSR_AUDIO_ENA ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->end =8 ;
@@ -640,7 +639,6 @@ static int osi_config(struct pcmcia_device *link)int i, j; link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status =CCSR_AUDIO_ENA ; link->resource[0 ]->end =64 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->end =8 ;
drivers/net/pcmcia/xirc2ps_cs.c +2 -3
@@ -812,10 +812,9 @@ xirc2ps_config(struct pcmcia_device * link)if (local->modem) {int pass; -if (do_sound) { +if (do_sound) link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status |=CCSR_AUDIO_ENA ; - } + link->resource[1 ]->end =8 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ;if (local->dingo) {
drivers/net/wireless/airo_cs.c +1 -3
@@ -158,10 +158,8 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
drivers/net/wireless/atmel_cs.c +1 -3
@@ -175,10 +175,8 @@ static int atmel_config_check(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
drivers/net/wireless/hostap/hostap_cs.c +1 -3
@@ -484,10 +484,8 @@ static int prism2_config_check(struct pcmcia_device *p_dev, "(default 0x%02X)\n", cfg->index, dflt->index);/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
drivers/pcmcia/cs_internal.h +1 -1
@@ -36,7 +36,7 @@ typedef struct config_t {unsigned int Attributes;unsigned int IntType;unsigned int ConfigBase; -unsigned char Status, Option, ExtStatus; +unsigned char Option;unsigned int CardValues;struct resource io[MAX_IO_WIN ];/* io ports */
drivers/pcmcia/pcmcia_resource.c +19 -9
@@ -441,6 +441,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,struct pcmcia_socket *s = p_dev->socket;config_t *c;pccard_io_map iomap; +unsigned char status =0 ; +unsigned char ext_status =0 ;if (!(s->state &SOCKET_PRESENT ))return -ENODEV ;
@@ -476,12 +478,21 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, s->socket.flags |=SS_ZVCARD |SS_IOCARD ;if (req->Attributes &CONF_ENABLE_DMA ) s->socket.flags |=SS_DMA_MODE ; -if (req->Attributes &CONF_ENABLE_SPKR ) +if (req->Attributes &CONF_ENABLE_SPKR ) { s->socket.flags |=SS_SPKR_ENA ; + status =CCSR_AUDIO_ENA ; +if (!(req->Present &PRESENT_STATUS )) +dev_warn (&p_dev->dev,"speaker requested, but " +"PRESENT_STATUS not set!\n" ); + }if (req->Attributes &CONF_ENABLE_IRQ ) s->socket.io_irq = s->pcmcia_irq;else s->socket.io_irq =0 ; +if (req->Attributes &CONF_ENABLE_ESR ) { + req->Present |=PRESENT_EXT_STATUS ; + ext_status =ESR_REQ_ATTN_ENA ; + } s->ops->set_socket (s, &s->socket); s->lock_count++;
@@ -513,14 +524,13 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,pcmcia_write_cis_mem (s,1 , (base +CISREG_COR )>>1 ,1 , &c->Option);mdelay (40 ); } -if (req->Present &PRESENT_STATUS ) { - c->Status = req->Status; -pcmcia_write_cis_mem (s,1 , (base +CISREG_CCSR )>>1 ,1 , &c->Status); - } -if (req->Present &PRESENT_EXT_STATUS ) { - c->ExtStatus = req->ExtStatus; -pcmcia_write_cis_mem (s,1 , (base +CISREG_ESR )>>1 ,1 , &c->ExtStatus); - } +if (req->Present &PRESENT_STATUS ) +pcmcia_write_cis_mem (s,1 , (base +CISREG_CCSR )>>1 ,1 , &status); + +if (req->Present &PRESENT_EXT_STATUS ) +pcmcia_write_cis_mem (s,1 , (base +CISREG_ESR )>>1 ,1 , + &ext_status); +if (req->Present &PRESENT_IOBASE_0 ) {u8 b = c->io[0 ].start &0xff ;pcmcia_write_cis_mem (s,1 , (base +CISREG_IOBASE_0 )>>1 ,1 , &b);
drivers/scsi/pcmcia/nsp_cs.c +1 -3
@@ -1608,10 +1608,8 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
drivers/serial/serial_cs.c +4 -7
@@ -183,10 +183,8 @@ static void quirk_config_socket(struct pcmcia_device *link) {struct serial_info *info = link->priv; -if (info->multi) { - link->conf.Present |=PRESENT_EXT_STATUS ; - link->conf.ExtStatus =ESR_REQ_ATTN_ENA ; - } +if (info->multi) + link->conf.Attributes |=CONF_ENABLE_ESR ; }static const struct serial_quirk quirks[] = {
@@ -336,10 +334,9 @@ static int serial_probe(struct pcmcia_device *link) link->priv = info; link->conf.Attributes =CONF_ENABLE_IRQ ; -if (do_sound) { +if (do_sound) link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.Status =CCSR_AUDIO_ENA ; - } + link->conf.IntType =INT_MEMORY_AND_IO ;return serial_config (link);
drivers/staging/comedi/drivers/ni_daq_700.c +1 -3
@@ -550,10 +550,8 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Do we need to allocate an interrupt? */ p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
drivers/staging/comedi/drivers/ni_daq_dio24.c +1 -3
@@ -302,10 +302,8 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Do we need to allocate an interrupt? */ p_dev->conf.Attributes |=CONF_ENABLE_IRQ ;
drivers/staging/comedi/drivers/ni_labpc_cs.c +1 -3
@@ -281,10 +281,8 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,return -ENODEV ;/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) { +if (cfg->flags &CISTPL_CFTABLE_AUDIO ) p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; - p_dev->conf.Status =CCSR_AUDIO_ENA ; - }/* Do we need to allocate an interrupt? */ p_dev->conf.Attributes |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ;
include/pcmcia/cs.h +1 -1
@@ -24,7 +24,6 @@ typedef struct config_req_t {u_int Attributes;u_int IntType;u_int ConfigBase; -u_char Status, ExtStatus;u_char ConfigIndex;u_int Present; } config_req_t;
@@ -34,6 +33,7 @@ typedef struct config_req_t {#define CONF_ENABLE_DMA 0x02#define CONF_ENABLE_SPKR 0x04#define CONF_ENABLE_PULSE_IRQ 0x08 +#define CONF_ENABLE_ESR 0x10#define CONF_VALID_CLIENT 0x100/* IntType field */
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 6/22 pcmcia: simplify IntType
In reply to Dominik BrodowskiIntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO (all other drivers). As this flags seems to relate to ioport access, make it conditional to the driver having requested IO port access. There are two drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:ray_cs and b43. For those, we consistently only set INT_MEMORY in future.
--- drivers/ata/pata_pcmcia.c | 1 - drivers/bluetooth/bluecard_cs.c | 1 - drivers/bluetooth/bt3c_cs.c | 1 - drivers/bluetooth/btuart_cs.c | 1 - drivers/bluetooth/dtl1_cs.c | 1 - drivers/char/pcmcia/cm4000_cs.c | 3 --- drivers/char/pcmcia/cm4040_cs.c | 3 --- drivers/char/pcmcia/ipwireless/main.c | 1 - drivers/char/pcmcia/synclink_cs.c | 2 -- drivers/ide/ide-cs.c | 1 - drivers/isdn/hardware/avm/avm_cs.c | 1 - drivers/isdn/hisax/avma1_cs.c | 1 - drivers/isdn/hisax/elsa_cs.c | 1 - drivers/isdn/hisax/sedlbauer_cs.c | 1 - drivers/isdn/hisax/teles_cs.c | 1 - drivers/mtd/maps/pcmciamtd.c | 2 -- drivers/net/pcmcia/3c574_cs.c | 1 - drivers/net/pcmcia/3c589_cs.c | 1 - drivers/net/pcmcia/axnet_cs.c | 1 - drivers/net/pcmcia/com20020_cs.c | 1 - drivers/net/pcmcia/fmvj18x_cs.c | 1 - drivers/net/pcmcia/ibmtr_cs.c | 1 - drivers/net/pcmcia/nmclan_cs.c | 1 - drivers/net/pcmcia/pcnet_cs.c | 1 - drivers/net/pcmcia/smc91c92_cs.c | 1 - drivers/net/pcmcia/xirc2ps_cs.c | 1 - drivers/net/wireless/airo_cs.c | 1 - drivers/net/wireless/atmel_cs.c | 1 - drivers/net/wireless/b43/pcmcia.c | 1 - drivers/net/wireless/hostap/hostap_cs.c | 1 - drivers/net/wireless/libertas/if_cs.c | 1 - drivers/net/wireless/orinoco/orinoco_cs.c | 1 - drivers/net/wireless/orinoco/spectrum_cs.c | 1 - drivers/net/wireless/ray_cs.c | 1 - drivers/net/wireless/wl3501_cs.c | 1 - drivers/parport/parport_cs.c | 1 - drivers/pcmcia/cs_internal.h | 1 - drivers/pcmcia/pcmcia_resource.c | 10 +--------- drivers/scsi/pcmcia/aha152x_stub.c | 1 - drivers/scsi/pcmcia/fdomain_stub.c | 1 - drivers/scsi/pcmcia/nsp_cs.c | 1 - drivers/scsi/pcmcia/qlogic_stub.c | 1 - drivers/scsi/pcmcia/sym53c500_cs.c | 1 - drivers/serial/serial_cs.c | 2 -- drivers/staging/comedi/drivers/cb_das16_cs.c | 1 - drivers/staging/comedi/drivers/das08_cs.c | 1 - drivers/staging/comedi/drivers/ni_daq_700.c | 1 - drivers/staging/comedi/drivers/ni_daq_dio24.c | 1 - drivers/staging/comedi/drivers/ni_labpc_cs.c | 1 - drivers/staging/comedi/drivers/ni_mio_cs.c | 1 - drivers/staging/comedi/drivers/quatech_daqp_cs.c | 1 - drivers/staging/wlags49_h2/wl_cs.c | 1 - drivers/telephony/ixj_pcmcia.c | 1 - drivers/usb/host/sl811_cs.c | 1 - include/pcmcia/cs.h | 7 ------- sound/pcmcia/pdaudiocf/pdaudiocf.c | 1 - sound/pcmcia/vx/vxpocket.c | 1 - 57 files changed, 1 insertions(+), 78 deletions(-)
drivers/ata/pata_pcmcia.c +0 -1
@@ -250,7 +250,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) pdev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; pdev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; pdev->conf.Attributes =CONF_ENABLE_IRQ ; - pdev->conf.IntType =INT_MEMORY_AND_IO ;/* See if we have a manufacturer identifier. Use it to set is_kme for vendor quirks */
drivers/bluetooth/bluecard_cs.c +0 -1
@@ -866,7 +866,6 @@ static int bluecard_probe(struct pcmcia_device *link) link->priv = info; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return bluecard_config (link); }
drivers/bluetooth/bt3c_cs.c +0 -1
@@ -661,7 +661,6 @@ static int bt3c_probe(struct pcmcia_device *link) link->resource[0 ]->end =8 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return bt3c_config (link); }
drivers/bluetooth/btuart_cs.c +0 -1
@@ -590,7 +590,6 @@ static int btuart_probe(struct pcmcia_device *link) link->resource[0 ]->end =8 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return btuart_config (link); }
drivers/bluetooth/dtl1_cs.c +0 -1
@@ -576,7 +576,6 @@ static int dtl1_probe(struct pcmcia_device *link) link->resource[0 ]->end =8 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return dtl1_config (link); }
drivers/char/pcmcia/cm4000_cs.c +0 -3
@@ -1767,8 +1767,6 @@ static int cm4000_config(struct pcmcia_device * link, int devno)if (pcmcia_loop_config (link, cm4000_config_check,NULL )) goto cs_release; - link->conf.IntType =00000002 ; -if (pcmcia_request_configuration (link, &link->conf)) goto cs_release;
@@ -1829,7 +1827,6 @@ static int cm4000_probe(struct pcmcia_device *link) dev->p_dev = link; link->priv = dev; - link->conf.IntType =INT_MEMORY_AND_IO ; dev_table[i] = link;init_waitqueue_head (&dev->devq);
drivers/char/pcmcia/cm4040_cs.c +0 -3
@@ -547,8 +547,6 @@ static int reader_config(struct pcmcia_device *link, int devno)if (pcmcia_loop_config (link, cm4040_config_check,NULL )) goto cs_release; - link->conf.IntType =00000002 ; - fail_rc =pcmcia_request_configuration (link, &link->conf);if (fail_rc !=0 ) { dev_printk(KERN_INFO, &link->dev,
@@ -599,7 +597,6 @@ static int reader_probe(struct pcmcia_device *link) link->priv = dev; dev->p_dev = link; - link->conf.IntType =INT_MEMORY_AND_IO ; dev_table[i] = link;init_waitqueue_head (&dev->devq);
drivers/char/pcmcia/ipwireless/main.c +0 -1
@@ -173,7 +173,6 @@ static int config_ipwireless(struct ipw_dev *ipw)return ret; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;INIT_WORK (&ipw->work_reboot, signalled_reboot_work);
drivers/char/pcmcia/synclink_cs.c +0 -2
@@ -551,7 +551,6 @@ static int mgslpc_probe(struct pcmcia_device *link)/* Initialize the struct pcmcia_device structure */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; ret =mgslpc_config (link);if (ret)
@@ -595,7 +594,6 @@ static int mgslpc_config(struct pcmcia_device *link) goto failed; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =8 ; link->conf.Present =PRESENT_OPTION ;
drivers/ide/ide-cs.c +0 -1
@@ -100,7 +100,6 @@ static int ide_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return ide_config (link); }/* ide_attach */
drivers/isdn/hardware/avm/avm_cs.c +0 -1
@@ -80,7 +80,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; p_dev->conf.ConfigIndex =1 ; p_dev->conf.Present =PRESENT_OPTION ;
drivers/isdn/hisax/avma1_cs.c +0 -1
@@ -85,7 +85,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; p_dev->conf.ConfigIndex =1 ; p_dev->conf.Present =PRESENT_OPTION ;
drivers/isdn/hisax/elsa_cs.c +0 -1
@@ -130,7 +130,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return elsa_cs_config (link); }/* elsa_cs_attach */
drivers/isdn/hisax/sedlbauer_cs.c +0 -1
@@ -133,7 +133,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ;return sedlbauer_config (link); }/* sedlbauer_attach */
drivers/isdn/hisax/teles_cs.c +0 -1
@@ -110,7 +110,6 @@ static int __devinit teles_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return teles_cs_config (link); }/* teles_attach */
drivers/mtd/maps/pcmciamtd.c +0 -2
@@ -575,7 +575,6 @@ static int pcmciamtd_config(struct pcmcia_device *link) link->vpp =0 ; } - link->conf.IntType =INT_MEMORY ; link->conf.ConfigIndex =0 ;DEBUG (2 ,"Setting Configuration" ); ret =pcmcia_request_configuration (link, &link->conf);
@@ -720,7 +719,6 @@ static int pcmciamtd_probe(struct pcmcia_device *link) link->priv = dev; link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY ;return pcmciamtd_config (link); }
drivers/net/pcmcia/3c574_cs.c +0 -1
@@ -281,7 +281,6 @@ static int tc574_probe(struct pcmcia_device *link) link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ; dev->netdev_ops = &el3_netdev_ops;
drivers/net/pcmcia/3c589_cs.c +0 -1
@@ -217,7 +217,6 @@ static int tc589_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ; dev->netdev_ops = &el3_netdev_ops;
drivers/net/pcmcia/axnet_cs.c +0 -1
@@ -167,7 +167,6 @@ static int axnet_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = dev; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; dev->netdev_ops = &axnet_netdev_ops;
drivers/net/pcmcia/com20020_cs.c +0 -1
@@ -161,7 +161,6 @@ static int com20020_probe(struct pcmcia_device *p_dev) p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; p_dev->resource[0 ]->end =16 ; p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; info->dev = dev; p_dev->priv = info;
drivers/net/pcmcia/fmvj18x_cs.c +0 -1
@@ -253,7 +253,6 @@ static int fmvj18x_probe(struct pcmcia_device *link)/* General socket configuration */ link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; dev->netdev_ops = &fjn_netdev_ops; dev->watchdog_timeo =TX_TIMEOUT ;
drivers/net/pcmcia/ibmtr_cs.c +0 -1
@@ -153,7 +153,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =4 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.Present =PRESENT_OPTION ; info->dev = dev;
drivers/net/pcmcia/nmclan_cs.c +0 -1
@@ -461,7 +461,6 @@ static int nmclan_probe(struct pcmcia_device *link) link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ; link->conf.Present =PRESENT_OPTION ;
drivers/net/pcmcia/pcnet_cs.c +0 -1
@@ -261,7 +261,6 @@ static int pcnet_probe(struct pcmcia_device *link) link->priv = dev; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; dev->netdev_ops = &pcnet_netdev_ops;
drivers/net/pcmcia/smc91c92_cs.c +0 -1
@@ -327,7 +327,6 @@ static int smc91c92_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;/* The SMC91c92-specific entries in the device structure. */ dev->netdev_ops = &smc_netdev_ops;
drivers/net/pcmcia/xirc2ps_cs.c +0 -1
@@ -530,7 +530,6 @@ xirc2ps_probe(struct pcmcia_device *link)/* General socket configuration */ link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ;/* Fill in card specific entries */
drivers/net/wireless/airo_cs.c +0 -1
@@ -104,7 +104,6 @@ static int airo_probe(struct pcmcia_device *p_dev)device, and can be hard-wired here. */ p_dev->conf.Attributes =0 ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ;/* Allocate space for private device-specific data */ local =kzalloc (sizeof (local_info_t),GFP_KERNEL );
drivers/net/wireless/atmel_cs.c +0 -1
@@ -114,7 +114,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)device, and can be hard-wired here. */ p_dev->conf.Attributes =0 ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ;/* Allocate space for private device-specific data */ local =kzalloc (sizeof (local_info_t),GFP_KERNEL );
drivers/net/wireless/b43/pcmcia.c +0 -1
@@ -73,7 +73,6 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) err = -ENODEV ; dev->conf.Attributes =CONF_ENABLE_IRQ ; - dev->conf.IntType =INT_MEMORY_AND_IO ; dev->resource[2 ]->flags |=WIN_ENABLE |WIN_DATA_WIDTH_16 |WIN_USE_WAIT ;
drivers/net/wireless/hostap/hostap_cs.c +0 -1
@@ -437,7 +437,6 @@ static int hostap_cs_probe(struct pcmcia_device *p_dev)int ret;PDEBUG (DEBUG_HW ,"%s: setting Vcc=33 (constant)\n" , dev_info); - p_dev->conf.IntType =INT_MEMORY_AND_IO ; ret =prism2_config (p_dev);if (ret) {
drivers/net/wireless/libertas/if_cs.c +0 -1
@@ -836,7 +836,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev) p_dev->priv = card; p_dev->conf.Attributes =0 ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ;if (pcmcia_loop_config (p_dev, if_cs_ioprobe,NULL )) {lbs_pr_err ("error in pcmcia_loop_config\n" );
drivers/net/wireless/orinoco/orinoco_cs.c +0 -1
@@ -123,7 +123,6 @@ orinoco_cs_probe(struct pcmcia_device *link)* number, sizes, and attributes of IO windows) are fixed by * the nature of the device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ;return orinoco_cs_config (link); }/* orinoco_cs_attach */
drivers/net/wireless/orinoco/spectrum_cs.c +0 -1
@@ -185,7 +185,6 @@ spectrum_cs_probe(struct pcmcia_device *link)* number, sizes, and attributes of IO windows) are fixed by * the nature of the device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ;return spectrum_cs_config (link); }/* spectrum_cs_attach */
drivers/net/wireless/ray_cs.c +0 -1
@@ -319,7 +319,6 @@ static int ray_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; p_dev->conf.ConfigIndex =1 ; p_dev->priv = dev;
drivers/net/wireless/wl3501_cs.c +0 -1
@@ -1889,7 +1889,6 @@ static int wl3501_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; p_dev->conf.ConfigIndex =1 ; dev =alloc_etherdev (sizeof (struct wl3501_card ));
drivers/parport/parport_cs.c +0 -1
@@ -104,7 +104,6 @@ static int parport_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return parport_config (link); }/* parport_attach */
drivers/pcmcia/cs_internal.h +0 -1
@@ -34,7 +34,6 @@ typedef struct config_t {struct kref ref;unsigned int state;unsigned int Attributes; -unsigned int IntType;unsigned int ConfigBase;unsigned char Option;unsigned int CardValues;
drivers/pcmcia/pcmcia_resource.c +1 -9
@@ -447,11 +447,6 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,if (!(s->state &SOCKET_PRESENT ))return -ENODEV ; -if (req->IntType &INT_CARDBUS ) { -dev_dbg (&p_dev->dev,"IntType may not be INT_CARDBUS\n" ); -return -EINVAL ; - } -mutex_lock (&s->ops_mutex); c = p_dev->function_config;if (c->state &CONFIG_LOCKED ) {
@@ -470,12 +465,9 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, }/* Pick memory or I/O card, DMA mode, interrupt */ - c->IntType = req->IntType; c->Attributes = req->Attributes; -if (req->IntType &INT_MEMORY_AND_IO ) +if (p_dev->_io) s->socket.flags |=SS_IOCARD ; -if (req->IntType &INT_ZOOMED_VIDEO ) - s->socket.flags |=SS_ZVCARD |SS_IOCARD ;if (req->Attributes &CONF_ENABLE_DMA ) s->socket.flags |=SS_DMA_MODE ;if (req->Attributes &CONF_ENABLE_SPKR ) {
drivers/scsi/pcmcia/aha152x_stub.c +0 -1
@@ -103,7 +103,6 @@ static int aha152x_probe(struct pcmcia_device *link) link->resource[0 ]->end =0x20 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.Present =PRESENT_OPTION ;return aha152x_config_cs (link);
drivers/scsi/pcmcia/fdomain_stub.c +0 -1
@@ -86,7 +86,6 @@ static int fdomain_probe(struct pcmcia_device *link) link->resource[0 ]->end =0x10 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.Present =PRESENT_OPTION ;return fdomain_config (link);
drivers/scsi/pcmcia/nsp_cs.c +0 -1
@@ -1563,7 +1563,6 @@ static int nsp_cs_probe(struct pcmcia_device *link)/* General socket configuration */ link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; ret =nsp_cs_config (link);
drivers/scsi/pcmcia/qlogic_stub.c +0 -1
@@ -159,7 +159,6 @@ static int qlogic_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.Present =PRESENT_OPTION ;return qlogic_config (link);
drivers/scsi/pcmcia/sym53c500_cs.c +0 -1
@@ -862,7 +862,6 @@ SYM53C500_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ;return SYM53C500_config (link); }/* SYM53C500_attach */
drivers/serial/serial_cs.c +0 -2
@@ -337,8 +337,6 @@ static int serial_probe(struct pcmcia_device *link)if (do_sound) link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->conf.IntType =INT_MEMORY_AND_IO ; -return serial_config (link); }
drivers/staging/comedi/drivers/cb_das16_cs.c +0 -1
@@ -694,7 +694,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link)/* Initialize the pcmcia_device structure */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; cur_dev = link;
drivers/staging/comedi/drivers/das08_cs.c +0 -1
@@ -170,7 +170,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; cur_dev = link;
drivers/staging/comedi/drivers/ni_daq_700.c +0 -1
@@ -499,7 +499,6 @@ static int dio700_cs_attach(struct pcmcia_device *link)device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; pcmcia_cur_dev = link;
drivers/staging/comedi/drivers/ni_daq_dio24.c +0 -1
@@ -251,7 +251,6 @@ static int dio24_cs_attach(struct pcmcia_device *link)device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; pcmcia_cur_dev = link;
drivers/staging/comedi/drivers/ni_labpc_cs.c +0 -1
@@ -227,7 +227,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ; pcmcia_cur_dev = link;
drivers/staging/comedi/drivers/ni_mio_cs.c +0 -1
@@ -266,7 +266,6 @@ static int cs_attach(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->resource[0 ]->end =16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; cur_dev = link;
drivers/staging/comedi/drivers/quatech_daqp_cs.c +0 -1
@@ -1039,7 +1039,6 @@ static int daqp_cs_attach(struct pcmcia_device *link)device, and can be hard-wired here. */ link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ;daqp_cs_config (link);
drivers/staging/wlags49_h2/wl_cs.c +0 -1
@@ -148,7 +148,6 @@ static int wl_adapter_attach(struct pcmcia_device *link) link->resource[0 ]->end =HCF_NUM_IO_PORTS ; link->resource[0 ]->flags=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =5 ; link->conf.Present =PRESENT_OPTION ;
drivers/telephony/ixj_pcmcia.c +0 -1
@@ -34,7 +34,6 @@ static int ixj_probe(struct pcmcia_device *p_dev)/* Create new ixj device */ p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - p_dev->conf.IntType =INT_MEMORY_AND_IO ; p_dev->priv =kzalloc (sizeof (struct ixj_info_t ),GFP_KERNEL );if (!p_dev->priv) {return -ENOMEM ;
drivers/usb/host/sl811_cs.c +0 -1
@@ -228,7 +228,6 @@ static int sl811_cs_probe(struct pcmcia_device *link) link->priv = local; link->conf.Attributes =0 ; - link->conf.IntType =INT_MEMORY_AND_IO ;return sl811_cs_config (link); }
include/pcmcia/cs.h +0 -7
@@ -22,7 +22,6 @@/* For RequestConfiguration */ typedef struct config_req_t { u_int Attributes; - u_int IntType; u_int ConfigBase; u_char ConfigIndex; u_int Present;
@@ -36,12 +35,6 @@ typedef struct config_req_t {#define CONF_ENABLE_ESR 0x10#define CONF_VALID_CLIENT 0x100 -/* IntType field */ -#define INT_MEMORY 0x01 -#define INT_MEMORY_AND_IO 0x02 -#define INT_CARDBUS 0x04 -#define INT_ZOOMED_VIDEO 0x08 -/* Configuration registers present */ #define PRESENT_OPTION 0x001#define PRESENT_STATUS 0x002
sound/pcmcia/pdaudiocf/pdaudiocf.c +0 -1
@@ -143,7 +143,6 @@ static int snd_pdacf_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->conf.Attributes =CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ; link->conf.Present =PRESENT_OPTION ;
sound/pcmcia/vx/vxpocket.c +0 -1
@@ -163,7 +163,6 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, link->resource[0 ]->end =16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.IntType =INT_MEMORY_AND_IO ; link->conf.ConfigIndex =1 ; link->conf.Present =PRESENT_OPTION ;
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 7/22 pcmcia: move config_{base,index,regs} to struct pcmcia_device
In reply to Dominik BrodowskiSeveral drivers prefer to explicitly set config_{base,index,regs}, formerly known as ConfigBase, ConfigIndex and Present. Instead of passing these values inside config_req_t, store it in struct pcmcia_device.
--- drivers/bluetooth/bluecard_cs.c | 2 +- drivers/char/pcmcia/ipwireless/main.c | 2 +- drivers/char/pcmcia/synclink_cs.c | 6 ++-- drivers/ide/ide-cs.c | 3 +- drivers/isdn/hardware/avm/avm_cs.c | 4 +- drivers/isdn/hisax/avma1_cs.c | 4 +- drivers/isdn/hisax/elsa_cs.c | 2 +- drivers/isdn/hisax/sedlbauer_cs.c | 2 +- drivers/isdn/hisax/teles_cs.c | 2 +- drivers/mtd/maps/pcmciamtd.c | 2 +- drivers/net/pcmcia/3c574_cs.c | 2 +- drivers/net/pcmcia/3c589_cs.c | 2 +- drivers/net/pcmcia/axnet_cs.c | 6 ++-- drivers/net/pcmcia/fmvj18x_cs.c | 22 ++++++------ drivers/net/pcmcia/ibmtr_cs.c | 4 +- drivers/net/pcmcia/nmclan_cs.c | 4 +- drivers/net/pcmcia/pcnet_cs.c | 6 ++-- drivers/net/pcmcia/smc91c92_cs.c | 10 +++--- drivers/net/pcmcia/xirc2ps_cs.c | 2 +- drivers/net/wireless/airo_cs.c | 2 +- drivers/net/wireless/hostap/hostap_cs.c | 2 +- drivers/net/wireless/ray_cs.c | 2 +- drivers/net/wireless/wl3501_cs.c | 2 +- drivers/parport/parport_cs.c | 2 +- drivers/pcmcia/cs_internal.h | 3 -- drivers/pcmcia/ds.c | 8 ++-- drivers/pcmcia/pcmcia_cis.c | 2 +- drivers/pcmcia/pcmcia_resource.c | 38 +++++++++++----------- drivers/scsi/pcmcia/aha152x_stub.c | 2 +- drivers/scsi/pcmcia/fdomain_stub.c | 2 +- drivers/scsi/pcmcia/nsp_cs.c | 2 +- drivers/scsi/pcmcia/qlogic_stub.c | 2 +- drivers/serial/serial_cs.c | 6 ++-- drivers/staging/comedi/drivers/cb_das16_cs.c | 2 +- drivers/staging/comedi/drivers/das08_cs.c | 2 +- drivers/staging/comedi/drivers/ni_daq_700.c | 2 +- drivers/staging/comedi/drivers/ni_daq_dio24.c | 2 +- drivers/staging/comedi/drivers/ni_labpc_cs.c | 2 +- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +- drivers/staging/wlags49_h2/wl_cs.c | 4 +- drivers/usb/host/sl811_cs.c | 2 +- include/pcmcia/cs.h | 15 -------- include/pcmcia/ds.h | 14 ++++++++ sound/pcmcia/pdaudiocf/pdaudiocf.c | 6 ++-- sound/pcmcia/vx/vxpocket.c | 4 +- 45 files changed, 107 insertions(+), 112 deletions(-)
drivers/bluetooth/bluecard_cs.c +1 -1
@@ -885,7 +885,7 @@ static int bluecard_config(struct pcmcia_device *link)bluecard_info_t *info = link->priv;int i, n; - link->conf.ConfigIndex =0x20 ; + link->config_index =0x20 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =64 ;
drivers/char/pcmcia/ipwireless/main.c +1 -1
@@ -92,7 +92,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,/* 0x40 causes it to generate level mode interrupts. */ /* 0x04 enables IREQ pin. */ - p_dev->conf.ConfigIndex = cfg->index |0x44 ; + p_dev->config_index = cfg->index |0x44 ; p_dev->io_lines =16 ; ret =pcmcia_request_io (p_dev);if (ret)
drivers/char/pcmcia/synclink_cs.c +3 -3
@@ -594,8 +594,8 @@ static int mgslpc_config(struct pcmcia_device *link) goto failed; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =8 ; - link->conf.Present =PRESENT_OPTION ; + link->config_index =8 ; + link->config_regs =PRESENT_OPTION ; ret =pcmcia_request_irq (link, mgslpc_isr);if (ret)
@@ -608,7 +608,7 @@ static int mgslpc_config(struct pcmcia_device *link) info->irq_level = link->irq;dev_info (&link->dev,"index 0x%02x:" , - link->conf.ConfigIndex); + link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/ide/ide-cs.c +1 -2
@@ -227,8 +227,7 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev,if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; pdev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - - pdev->conf.ConfigIndex = cfg->index; + pdev->config_index = cfg->index; pdev->resource[0 ]->start = io->win[0 ].base;if (!(io->flags &CISTPL_IO_16BIT )) { pdev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ;
drivers/isdn/hardware/avm/avm_cs.c +2 -2
@@ -80,8 +80,8 @@ static int avmcs_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.ConfigIndex =1 ; - p_dev->conf.Present =PRESENT_OPTION ; + p_dev->config_index =1 ; + p_dev->config_regs =PRESENT_OPTION ;return avmcs_config (p_dev); }/* avmcs_attach */
drivers/isdn/hisax/avma1_cs.c +2 -2
@@ -85,8 +85,8 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.ConfigIndex =1 ; - p_dev->conf.Present =PRESENT_OPTION ; + p_dev->config_index =1 ; + p_dev->config_regs =PRESENT_OPTION ;return avma1cs_config (p_dev); }/* avma1cs_attach */
drivers/isdn/hisax/elsa_cs.c +1 -1
@@ -211,7 +211,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x: " , - link->conf.ConfigIndex); + link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/isdn/hisax/sedlbauer_cs.c +1 -1
@@ -253,7 +253,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x:" , - link->conf.ConfigIndex); + link->config_index);if (link->vpp)printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );if (link->conf.Attributes &CONF_ENABLE_IRQ )
drivers/isdn/hisax/teles_cs.c +1 -1
@@ -191,7 +191,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x:" , - link->conf.ConfigIndex); + link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/mtd/maps/pcmciamtd.c +1 -1
@@ -575,7 +575,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) link->vpp =0 ; } - link->conf.ConfigIndex =0 ; + link->config_index =0 ;DEBUG (2 ,"Setting Configuration" ); ret =pcmcia_request_configuration (link, &link->conf);if (ret !=0 ) {
drivers/net/pcmcia/3c574_cs.c +1 -1
@@ -281,7 +281,7 @@ static int tc574_probe(struct pcmcia_device *link) link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =1 ; + link->config_index =1 ; dev->netdev_ops = &el3_netdev_ops;SET_ETHTOOL_OPS (dev, &netdev_ethtool_ops);
drivers/net/pcmcia/3c589_cs.c +1 -1
@@ -217,7 +217,7 @@ static int tc589_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =1 ; + link->config_index =1 ; dev->netdev_ops = &el3_netdev_ops; dev->watchdog_timeo =TX_TIMEOUT ;
drivers/net/pcmcia/axnet_cs.c +3 -3
@@ -230,7 +230,7 @@ static int get_prom(struct pcmcia_device *link) };/* Not much of a test, but the alternatives are messy */ -if (link->conf.ConfigBase !=0x03c0 ) +if (link->config_base !=0x03c0 )return 0 ;axnet_reset_8390 (dev);
@@ -297,7 +297,7 @@ static int axnet_configcheck(struct pcmcia_device *p_dev,if (cfg->index ==0 || cfg->io.nwin ==0 )return -ENODEV ; - p_dev->conf.ConfigIndex =0x05 ; + p_dev->config_index =0x05 ;/* For multifunction cards, by convention, we configure the network function with window 0, and serial with window 1 */ if (io->nwin >1 ) {
@@ -325,7 +325,7 @@ static int axnet_config(struct pcmcia_device *link)dev_dbg (&link->dev,"axnet_config(0x%p)\n" , link);/* don't trust the CIS on this; Linksys got it wrong */ - link->conf.Present =0x63 ; + link->config_regs =0x63 ; ret =pcmcia_loop_config (link, axnet_configcheck,NULL );if (ret !=0 ) goto failed;
drivers/net/pcmcia/fmvj18x_cs.c +11 -11
@@ -312,7 +312,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link) ret =pcmcia_request_io (link);if (ret ==0 ) {/* calculate ConfigIndex value */ - link->conf.ConfigIndex = + link->config_index = ((link->resource[0 ]->start &0x0f0 ) >>3 ) |0x22 ;return ret; }
@@ -361,28 +361,28 @@ static int fmvj18x_config(struct pcmcia_device *link) link->card_id == PRODID_TDK_NP9610 || link->card_id == PRODID_TDK_MN3200) {/* MultiFunction Card */ - link->conf.ConfigBase =0x800 ; - link->conf.ConfigIndex =0x47 ; + link->config_base =0x800 ; + link->config_index =0x47 ; link->resource[1 ]->end =8 ; }break ;case MANFID_NEC : cardtype =NEC ;/* MultiFunction Card */ - link->conf.ConfigBase =0x800 ; - link->conf.ConfigIndex =0x47 ; + link->config_base =0x800 ; + link->config_index =0x47 ; link->resource[1 ]->end =8 ;break ;case MANFID_KME : cardtype =KME ;/* MultiFunction Card */ - link->conf.ConfigBase =0x800 ; - link->conf.ConfigIndex =0x47 ; + link->config_base =0x800 ; + link->config_index =0x47 ; link->resource[1 ]->end =8 ;break ;case MANFID_CONTEC : cardtype =CONTEC ;break ;case MANFID_FUJITSU : -if (link->conf.ConfigBase ==0x0fe0 ) +if (link->config_base ==0x0fe0 ) cardtype =MBH10302 ;else if (link->card_id ==PRODID_FUJITSU_MBH10302 )/* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302),
@@ -402,10 +402,10 @@ static int fmvj18x_config(struct pcmcia_device *link)case MANFID_FUJITSU :if (link->card_id ==PRODID_FUJITSU_MBH10304 ) { cardtype =XXX10304 ;/* MBH10304 with buggy CIS */ - link->conf.ConfigIndex =0x20 ; + link->config_index =0x20 ; }else { cardtype =MBH10302 ;/* NextCom NC5310, etc. */ - link->conf.ConfigIndex =1 ; + link->config_index =1 ; }break ;case MANFID_UNGERMANN :
@@ -413,7 +413,7 @@ static int fmvj18x_config(struct pcmcia_device *link)break ;default : cardtype =MBH10302 ; - link->conf.ConfigIndex =1 ; + link->config_index =1 ; } }
drivers/net/pcmcia/ibmtr_cs.c +2 -2
@@ -153,7 +153,7 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =4 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.Present =PRESENT_OPTION ; + link->config_regs =PRESENT_OPTION ; info->dev = dev;
@@ -212,8 +212,8 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)dev_dbg (&link->dev,"ibmtr_config\n" ); - link->conf.ConfigIndex =0x61 ; link->io_lines =16 ; + link->config_index =0x61 ;/* Determine if this is PRIMARY or ALTERNATE. */
drivers/net/pcmcia/nmclan_cs.c +2 -2
@@ -461,8 +461,8 @@ static int nmclan_probe(struct pcmcia_device *link) link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =1 ; - link->conf.Present =PRESENT_OPTION ; + link->config_index =1 ; + link->config_regs =PRESENT_OPTION ; lp->tx_free_frames=AM2150_MAX_TX_FRAMES ;
drivers/net/pcmcia/pcnet_cs.c +3 -3
@@ -420,7 +420,7 @@ static hw_info_t *get_ax88190(struct pcmcia_device *link)int i, j;/* Not much of a test, but the alternatives are messy */ -if (link->conf.ConfigBase !=0x03c0 ) +if (link->config_base !=0x03c0 )return NULL ;outb_p (0x01 , ioaddr +EN0_DCFG );/* Set word-wide access. */
@@ -564,7 +564,7 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,if ((link->manf_id ==MANFID_IBM ) && (link->card_id ==PRODID_IBM_HOME_AND_AWAY )) - link->conf.ConfigIndex |=0x10 ; + link->config_index |=0x10 ; ret =pcmcia_request_configuration (link, &link->conf);if (ret)
@@ -581,7 +581,7 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link, }else dev->if_port =0 ; -if ((link->conf.ConfigBase ==0x03c0 ) && +if ((link->config_base ==0x03c0 ) && (link->manf_id ==0x149 ) && (link->card_id ==0xc1ab )) {dev_info (&link->dev,"this is an AX88190 card - use axnet_cs instead.\n" );
drivers/net/pcmcia/smc91c92_cs.c +5 -5
@@ -411,9 +411,9 @@ static int mhz_3288_power(struct pcmcia_device *link)mdelay (200 );/* Now read and write the COR... */ - tmp =readb (smc->base + link->conf.ConfigBase +CISREG_COR ); + tmp =readb (smc->base + link->config_base +CISREG_COR );udelay (5 ); -writeb (tmp, smc->base + link->conf.ConfigBase +CISREG_COR ); +writeb (tmp, smc->base + link->config_base +CISREG_COR );return 0 ; }
@@ -464,7 +464,7 @@ static int mhz_mfc_config(struct pcmcia_device *link) smc->base =ioremap (link->resource[2 ]->start,resource_size (link->resource[2 ])); - offset = (smc->manfid ==MANFID_MOTOROLA ) ? link->conf.ConfigBase :0 ; + offset = (smc->manfid ==MANFID_MOTOROLA ) ? link->config_base :0 ; i =pcmcia_map_mem_page (link, link->resource[2 ], offset); if ((i == 0) && (smc->manfid == MANFID_MEGAHERTZ) &&
@@ -643,8 +643,8 @@ static int osi_config(struct pcmcia_device *link) link->resource[1 ]->end =8 ;/* Enable Hard Decode, LAN, Modem */ - link->conf.ConfigIndex =0x23 ; link->io_lines =16 ; + link->config_index =0x23 ;for (i = j =0 ; j <4 ; j++) { link->resource[1 ]->start = com[j];
@@ -654,7 +654,7 @@ static int osi_config(struct pcmcia_device *link) }if (i !=0 ) {/* Fallback: turn off hard decode */ - link->conf.ConfigIndex =0x03 ; + link->config_index =0x03 ; link->resource[1 ]->end =0 ; i =pcmcia_request_io (link); }
drivers/net/pcmcia/xirc2ps_cs.c +1 -1
@@ -530,7 +530,7 @@ xirc2ps_probe(struct pcmcia_device *link)/* General socket configuration */ link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =1 ; + link->config_index =1 ;/* Fill in card specific entries */ dev->netdev_ops = &netdev_ops;
drivers/net/wireless/airo_cs.c +1 -1
@@ -240,7 +240,7 @@ static int airo_config(struct pcmcia_device *link)/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x: " , - link->conf.ConfigIndex); + link->config_index);if (link->vpp)printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );printk (", irq %d" , link->irq);
drivers/net/wireless/hostap/hostap_cs.c +1 -1
@@ -601,7 +601,7 @@ static int prism2_config(struct pcmcia_device *link)/* Finally, report what we've done */ printk (KERN_INFO "%s: index 0x%02x: " , - dev_info, link->conf.ConfigIndex); + dev_info, link->config_index);if (link->vpp)printk (", Vpp %d.%d" , link->vpp /10 , link->vpp %10 );
drivers/net/wireless/ray_cs.c +1 -1
@@ -319,7 +319,7 @@ static int ray_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.ConfigIndex =1 ; + p_dev->config_index =1 ; p_dev->priv = dev;
drivers/net/wireless/wl3501_cs.c +1 -1
@@ -1889,7 +1889,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)/* General socket configuration */ p_dev->conf.Attributes =CONF_ENABLE_IRQ ; - p_dev->conf.ConfigIndex =1 ; + p_dev->config_index =1 ; dev =alloc_etherdev (sizeof (struct wl3501_card ));if (!dev)
drivers/parport/parport_cs.c +1 -1
@@ -144,7 +144,7 @@ static int parport_config_check(struct pcmcia_device *p_dev,cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ;if (epp_mode) - p_dev->conf.ConfigIndex |=FORCE_EPP_MODE ; + p_dev->config_index |=FORCE_EPP_MODE ; p_dev->resource[0 ]->start = io->win[0 ].base; p_dev->resource[0 ]->end = io->win[0 ].len;if (io->nwin ==2 ) {
drivers/pcmcia/cs_internal.h +0 -3
@@ -34,9 +34,6 @@ typedef struct config_t {struct kref ref;unsigned int state;unsigned int Attributes; -unsigned int ConfigBase; -unsigned char Option; -unsigned int CardValues;struct resource io[MAX_IO_WIN ];/* io ports */ struct resource mem[MAX_WIN ];/* mem areas */
drivers/pcmcia/ds.c +4 -4
@@ -276,13 +276,13 @@ static int pcmcia_device_probe(struct device *dev) ret =pccard_read_tuple (p_dev->socket, p_dev->func,CISTPL_CONFIG , &cis_config);if (!ret) { - p_dev->conf.ConfigBase = cis_config.base; - p_dev->conf.Present = cis_config.rmask[0 ]; + p_dev->config_base = cis_config.base; + p_dev->config_regs = cis_config.rmask[0 ]; }else {dev_printk (KERN_INFO , dev,"pcmcia: could not parse base and rmask0 of CIS\n" ); - p_dev->conf.ConfigBase =0 ; - p_dev->conf.Present =0 ; + p_dev->config_base =0 ; + p_dev->config_regs =0 ; } ret = p_drv->probe (p_dev);
drivers/pcmcia/pcmcia_cis.c +1 -1
@@ -151,7 +151,7 @@ static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv)struct pcmcia_cfg_mem *cfg_mem = priv;/* default values */ - cfg_mem->p_dev->conf.ConfigIndex = cfg->index; + cfg_mem->p_dev->config_index = cfg->index;if (cfg->flags &CISTPL_CFTABLE_DEFAULT ) cfg_mem->dflt = *cfg;
drivers/pcmcia/pcmcia_resource.c +19 -19
@@ -168,7 +168,7 @@ static int pcmcia_access_config(struct pcmcia_device *p_dev,return -EACCES ; } - addr = (c->ConfigBase + where) >>1 ; + addr = (p_dev->config_base + where) >>1 ; ret =accessf (s,1 , addr,1 , val);
@@ -443,6 +443,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,pccard_io_map iomap;unsigned char status =0 ;unsigned char ext_status =0 ; +unsigned char option =0 ;if (!(s->state &SOCKET_PRESENT ))return -ENODEV ;
@@ -473,7 +474,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,if (req->Attributes &CONF_ENABLE_SPKR ) { s->socket.flags |=SS_SPKR_ENA ; status =CCSR_AUDIO_ENA ; -if (!(req->Present &PRESENT_STATUS )) +if (!(p_dev->config_regs &PRESENT_STATUS ))dev_warn (&p_dev->dev,"speaker requested, but " "PRESENT_STATUS not set!\n" ); }
@@ -482,54 +483,53 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,else s->socket.io_irq =0 ;if (req->Attributes &CONF_ENABLE_ESR ) { - req->Present |=PRESENT_EXT_STATUS ; + p_dev->config_regs |=PRESENT_EXT_STATUS ; ext_status =ESR_REQ_ATTN_ENA ; } s->ops->set_socket (s, &s->socket); s->lock_count++;/* Set up CIS configuration registers */ - base = c->ConfigBase = req->ConfigBase; - c->CardValues = req->Present; -if (req->Present &PRESENT_COPY ) { + base = p_dev->config_base; +if (p_dev->config_regs &PRESENT_COPY ) {u16 tmp =0 ;dev_dbg (&p_dev->dev,"clearing CISREG_SCR\n" );pcmcia_write_cis_mem (s,1 , (base +CISREG_SCR )>>1 ,1 , &tmp); } -if (req->Present &PRESENT_PIN_REPLACE ) { +if (p_dev->config_regs &PRESENT_PIN_REPLACE ) {u16 tmp =0 ;dev_dbg (&p_dev->dev,"clearing CISREG_PRR\n" );pcmcia_write_cis_mem (s,1 , (base +CISREG_PRR )>>1 ,1 , &tmp); } -if (req->Present &PRESENT_OPTION ) { +if (p_dev->config_regs &PRESENT_OPTION ) {if (s->functions ==1 ) { - c->Option = req->ConfigIndex &COR_CONFIG_MASK ; + option = p_dev->config_index &COR_CONFIG_MASK ; }else { - c->Option = req->ConfigIndex &COR_MFC_CONFIG_MASK ; - c->Option |=COR_FUNC_ENA |COR_IREQ_ENA ; -if (req->Present &PRESENT_IOBASE_0 ) - c->Option |=COR_ADDR_DECODE ; + option = p_dev->config_index &COR_MFC_CONFIG_MASK ; + option |=COR_FUNC_ENA |COR_IREQ_ENA ; +if (p_dev->config_regs &PRESENT_IOBASE_0 ) + option |=COR_ADDR_DECODE ; }if ((req->Attributes &CONF_ENABLE_IRQ ) && !(req->Attributes &CONF_ENABLE_PULSE_IRQ )) - c->Option |=COR_LEVEL_REQ ; -pcmcia_write_cis_mem (s,1 , (base +CISREG_COR )>>1 ,1 , &c->Option); + option |=COR_LEVEL_REQ ; +pcmcia_write_cis_mem (s,1 , (base +CISREG_COR )>>1 ,1 , &option);mdelay (40 ); } -if (req->Present &PRESENT_STATUS ) +if (p_dev->config_regs &PRESENT_STATUS )pcmcia_write_cis_mem (s,1 , (base +CISREG_CCSR )>>1 ,1 , &status); -if (req->Present &PRESENT_EXT_STATUS ) +if (p_dev->config_regs &PRESENT_EXT_STATUS )pcmcia_write_cis_mem (s,1 , (base +CISREG_ESR )>>1 ,1 , &ext_status); -if (req->Present &PRESENT_IOBASE_0 ) { +if (p_dev->config_regs &PRESENT_IOBASE_0 ) {u8 b = c->io[0 ].start &0xff ;pcmcia_write_cis_mem (s,1 , (base +CISREG_IOBASE_0 )>>1 ,1 , &b); b = (c->io[0 ].start >>8 ) &0xff ;pcmcia_write_cis_mem (s,1 , (base +CISREG_IOBASE_1 )>>1 ,1 , &b); } -if (req->Present &PRESENT_IOSIZE ) { +if (p_dev->config_regs &PRESENT_IOSIZE ) {u8 b =resource_size (&c->io[0 ]) +resource_size (&c->io[1 ]) -1 ;pcmcia_write_cis_mem (s,1 , (base +CISREG_IOSIZE )>>1 ,1 , &b); }
drivers/scsi/pcmcia/aha152x_stub.c +1 -1
@@ -103,7 +103,7 @@ static int aha152x_probe(struct pcmcia_device *link) link->resource[0 ]->end =0x20 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.Present =PRESENT_OPTION ; + link->config_regs =PRESENT_OPTION ;return aha152x_config_cs (link); }/* aha152x_attach */
drivers/scsi/pcmcia/fdomain_stub.c +1 -1
@@ -86,7 +86,7 @@ static int fdomain_probe(struct pcmcia_device *link) link->resource[0 ]->end =0x10 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.Present =PRESENT_OPTION ; + link->config_regs =PRESENT_OPTION ;return fdomain_config (link); }/* fdomain_attach */
drivers/scsi/pcmcia/nsp_cs.c +1 -1
@@ -1745,7 +1745,7 @@ static int nsp_cs_config(struct pcmcia_device *link)/* Finally, report what we've done */ printk (KERN_INFO "nsp_cs: index 0x%02x: " , - link->conf.ConfigIndex); + link->config_index);if (link->vpp) {printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); }
drivers/scsi/pcmcia/qlogic_stub.c +1 -1
@@ -159,7 +159,7 @@ static int qlogic_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.Present =PRESENT_OPTION ; + link->config_regs =PRESENT_OPTION ;return qlogic_config (link); }/* qlogic_attach */
drivers/serial/serial_cs.c +3 -3
@@ -495,7 +495,7 @@ static int simple_config(struct pcmcia_device *link) found_port:if (info->multi && (info->manfid ==MANFID_3COM )) - link->conf.ConfigIndex &= ~(0x08 ); + link->config_index &= ~(0x08 );/* * Apply any configuration quirks.
@@ -591,8 +591,8 @@ static int multi_config(struct pcmcia_device *link) info->prodid == PRODID_POSSIO_GCC)) {int err; -if (link->conf.ConfigIndex ==1 || - link->conf.ConfigIndex ==3 ) { +if (link->config_index ==1 || + link->config_index ==3 ) { err =setup_serial (link, info, base2, link->irq); base2 = link->resource[0 ]->start;;
drivers/staging/comedi/drivers/cb_das16_cs.c +1 -1
@@ -772,7 +772,7 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %u" , link->irq);if (link->resource[0 ])
drivers/staging/comedi/drivers/das08_cs.c +1 -1
@@ -268,7 +268,7 @@ static void das08_pcmcia_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %u" , link->irq);if (link->resource[0 ])
drivers/staging/comedi/drivers/ni_daq_700.c +1 -1
@@ -607,7 +607,7 @@ static void dio700_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/staging/comedi/drivers/ni_daq_dio24.c +1 -1
@@ -358,7 +358,7 @@ static void dio24_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/staging/comedi/drivers/ni_labpc_cs.c +1 -1
@@ -336,7 +336,7 @@ static void labpc_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %d" , link->irq);if (link->resource[0 ])
drivers/staging/comedi/drivers/quatech_daqp_cs.c +1 -1
@@ -1137,7 +1137,7 @@ static void daqp_cs_config(struct pcmcia_device *link) goto failed;/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->conf.ConfigIndex); +dev_info (&link->dev,"index 0x%02x" , link->config_index);if (link->conf.Attributes &CONF_ENABLE_IRQ )printk (", irq %u" , link->irq);if (link->resource[0 ])
drivers/staging/wlags49_h2/wl_cs.c +2 -2
@@ -148,8 +148,8 @@ static int wl_adapter_attach(struct pcmcia_device *link) link->resource[0 ]->end =HCF_NUM_IO_PORTS ; link->resource[0 ]->flags=IO_DATA_PATH_WIDTH_16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =5 ; - link->conf.Present =PRESENT_OPTION ; + link->config_index =5 ; + link->config_regs =PRESENT_OPTION ; link->priv = dev; lp =wl_priv (dev);
drivers/usb/host/sl811_cs.c +1 -1
@@ -200,7 +200,7 @@ static int sl811_cs_config(struct pcmcia_device *link) goto failed;dev_info (&link->dev,"index 0x%02x: " , - link->conf.ConfigIndex); + link->config_index);if (link->vpp)printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 );printk (", irq %d" , link->irq);
include/pcmcia/cs.h +0 -15
@@ -22,9 +22,6 @@/* For RequestConfiguration */ typedef struct config_req_t {u_int Attributes; -u_int ConfigBase; -u_char ConfigIndex; -u_int Present; }config_req_t ;/* Attributes for RequestConfiguration */
@@ -35,16 +32,4 @@ typedef struct config_req_t {#define CONF_ENABLE_ESR 0x10#define CONF_VALID_CLIENT 0x100 -/* Configuration registers present */ -#define PRESENT_OPTION 0x001 -#define PRESENT_STATUS 0x002 -#define PRESENT_PIN_REPLACE 0x004 -#define PRESENT_COPY 0x008 -#define PRESENT_EXT_STATUS 0x010 -#define PRESENT_IOBASE_0 0x020 -#define PRESENT_IOBASE_1 0x040 -#define PRESENT_IOBASE_2 0x080 -#define PRESENT_IOBASE_3 0x100 -#define PRESENT_IOSIZE 0x200 -#endif /* _LINUX_CS_H */
include/pcmcia/ds.h +14 -0
@@ -97,6 +97,9 @@ struct pcmcia_device {unsigned int vpp;unsigned int io_lines;/* number of I/O lines */ +unsigned int config_base; +unsigned int config_index; +unsigned int config_regs;/* PRESENT_ flags below */ /* Is the device suspended? */ u16 suspended:1;
@@ -250,6 +253,17 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)0x0c -> 2 0x10 -> 3 */ +/* config_reg{ister}s present for this PCMCIA device */ +#define PRESENT_OPTION 0x001 +#define PRESENT_STATUS 0x002 +#define PRESENT_PIN_REPLACE 0x004 +#define PRESENT_COPY 0x008 +#define PRESENT_EXT_STATUS 0x010 +#define PRESENT_IOBASE_0 0x020 +#define PRESENT_IOBASE_1 0x040 +#define PRESENT_IOBASE_2 0x080 +#define PRESENT_IOBASE_3 0x100 +#define PRESENT_IOSIZE 0x200#endif /* __KERNEL__ */
sound/pcmcia/pdaudiocf/pdaudiocf.c +3 -3
@@ -143,8 +143,8 @@ static int snd_pdacf_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->conf.Attributes =CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; - link->conf.ConfigIndex =1 ; - link->conf.Present =PRESENT_OPTION ; + link->config_index =1 ; + link->config_regs =PRESENT_OPTION ;return pdacf_config (link); }
@@ -216,7 +216,7 @@ static int pdacf_config(struct pcmcia_device *link)int ret;snd_printdd (KERN_DEBUG "pdacf_config called\n" ); - link->conf.ConfigIndex =0x5 ; + link->config_index =0x5 ; ret =pcmcia_request_io (link);if (ret)
sound/pcmcia/vx/vxpocket.c +2 -2
@@ -163,8 +163,8 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, link->resource[0 ]->end =16 ; link->conf.Attributes =CONF_ENABLE_IRQ ; - link->conf.ConfigIndex =1 ; - link->conf.Present =PRESENT_OPTION ; + link->config_index =1 ; + link->config_regs =PRESENT_OPTION ; *chip_ret = vxp;return 0 ;
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 8/22 pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
In reply to Dominik Brodowskipcmcia_enable_device() now replaces pcmcia_request_configuration(). Instead of config_req_t, all necessary flags are either passed as a parameter to pcmcia_enable_device(), or (in rare circumstances) set in struct pcmcia_device -> flags.
With the last remaining user of include/pcmcia/cs.h gone, remove all references.
--- Documentation/pcmcia/driver-changes.txt | 6 ++++ drivers/ata/pata_pcmcia.c | 5 +-- drivers/bluetooth/bluecard_cs.c | 5 +-- drivers/bluetooth/bt3c_cs.c | 5 +-- drivers/bluetooth/btuart_cs.c | 5 +-- drivers/bluetooth/dtl1_cs.c | 5 +-- drivers/char/pcmcia/cm4000_cs.c | 3 +- drivers/char/pcmcia/cm4040_cs.c | 5 +-- drivers/char/pcmcia/ipwireless/main.c | 6 +-- drivers/char/pcmcia/ipwireless/main.h | 1 - drivers/char/pcmcia/ipwireless/tty.h | 1 - drivers/char/pcmcia/synclink_cs.c | 10 ++---- drivers/ide/ide-cs.c | 6 ++-- drivers/isdn/hardware/avm/avm_cs.c | 5 +-- drivers/isdn/hisax/avma1_cs.c | 5 +-- drivers/isdn/hisax/elsa_cs.c | 8 +---- drivers/isdn/hisax/sedlbauer_cs.c | 12 ++----- drivers/isdn/hisax/teles_cs.c | 8 ++--- drivers/mmc/host/sdricoh_cs.c | 1 - drivers/mtd/maps/pcmciamtd.c | 6 +--- drivers/net/pcmcia/3c574_cs.c | 5 +-- drivers/net/pcmcia/3c589_cs.c | 5 +-- drivers/net/pcmcia/axnet_cs.c | 10 +++--- drivers/net/pcmcia/com20020_cs.c | 5 +-- drivers/net/pcmcia/fmvj18x_cs.c | 5 +-- drivers/net/pcmcia/ibmtr_cs.c | 5 +-- drivers/net/pcmcia/nmclan_cs.c | 5 +-- drivers/net/pcmcia/pcnet_cs.c | 7 ++-- drivers/net/pcmcia/smc91c92_cs.c | 9 ++--- drivers/net/pcmcia/xirc2ps_cs.c | 12 ++++---- drivers/net/wireless/airo_cs.c | 16 ++-------- drivers/net/wireless/atmel_cs.c | 16 ++-------- drivers/net/wireless/b43/pcmcia.c | 5 +-- drivers/net/wireless/hostap/hostap_cs.c | 10 ++---- drivers/net/wireless/libertas/if_cs.c | 10 ++---- drivers/net/wireless/orinoco/orinoco_cs.c | 12 +------ drivers/net/wireless/orinoco/spectrum_cs.c | 12 +------ drivers/net/wireless/ray_cs.c | 5 +-- drivers/net/wireless/wl3501_cs.c | 5 +-- drivers/parport/parport_cs.c | 5 +-- drivers/pcmcia/au1000_generic.h | 1 - drivers/pcmcia/au1000_pb1x00.c | 1 - drivers/pcmcia/cistpl.c | 1 - drivers/pcmcia/cs.c | 1 - drivers/pcmcia/cs_internal.h | 5 --- drivers/pcmcia/ds.c | 3 +- drivers/pcmcia/i82092.c | 1 - drivers/pcmcia/i82365.c | 1 - drivers/pcmcia/m32r_cfc.c | 1 - drivers/pcmcia/m32r_pcc.c | 1 - drivers/pcmcia/m8xx_pcmcia.c | 1 - drivers/pcmcia/pcmcia_cis.c | 1 - drivers/pcmcia/pcmcia_resource.c | 33 ++++++++++---------- drivers/pcmcia/pd6729.c | 1 - drivers/pcmcia/rsrc_iodyn.c | 1 - drivers/pcmcia/rsrc_mgr.c | 1 - drivers/pcmcia/rsrc_nonstatic.c | 1 - drivers/pcmcia/sa1100_generic.c | 1 - drivers/pcmcia/soc_common.h | 1 - drivers/pcmcia/socket_sysfs.c | 1 - drivers/pcmcia/tcic.c | 1 - drivers/pcmcia/xxs1500_ss.c | 1 - drivers/pcmcia/yenta_socket.c | 1 - drivers/scsi/pcmcia/aha152x_stub.c | 5 +-- drivers/scsi/pcmcia/fdomain_stub.c | 5 +-- drivers/scsi/pcmcia/nsp_cs.c | 13 +++----- drivers/scsi/pcmcia/qlogic_stub.c | 7 ++-- drivers/scsi/pcmcia/sym53c500_cs.c | 5 +-- drivers/serial/serial_cs.c | 11 +++---- drivers/ssb/main.c | 1 - drivers/ssb/pcmcia.c | 1 - drivers/ssb/scan.c | 1 - drivers/staging/comedi/drivers/cb_das16_cs.c | 11 ++----- drivers/staging/comedi/drivers/das08_cs.c | 17 ++--------- drivers/staging/comedi/drivers/ni_daq_700.c | 19 ++--------- drivers/staging/comedi/drivers/ni_daq_dio24.c | 19 ++--------- drivers/staging/comedi/drivers/ni_labpc_cs.c | 20 +++--------- drivers/staging/comedi/drivers/ni_mio_cs.c | 5 +-- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 17 ++--------- drivers/staging/wlags49_h2/wl_cs.c | 7 ++-- drivers/staging/wlags49_h2/wl_internal.h | 1 - drivers/telephony/ixj_pcmcia.c | 3 +- drivers/usb/host/sl811_cs.c | 7 +--- include/pcmcia/cs.h | 35 ---------------------- include/pcmcia/ds.h | 17 +++++++---- include/pcmcia/ss.h | 1 - sound/pcmcia/pdaudiocf/pdaudiocf.c | 5 ++- sound/pcmcia/pdaudiocf/pdaudiocf.h | 1 - sound/pcmcia/vx/vxpocket.c | 6 ++-- sound/pcmcia/vx/vxpocket.h | 1 - 90 files changed, 179 insertions(+), 395 deletions(-) delete mode 100644 include/pcmcia/cs.h
Documentation/pcmcia/driver-changes.txt +6 -0
@@ -1,4 +1,10 @@ This file details changes in 2.6 which affect PCMCIA card driver authors: +* pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36) + pcmcia_request_configuration() got renamed to pcmcia_enable_device(), + as it mirrors pcmcia_disable_device(). Configuration settings are now + stored in struct pcmcia_device, e.g. in the fields config_flags, + config_index, config_base, vpp. + * pcmcia_request_window changes (as of 2.6.36) 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 ioport
drivers/ata/pata_pcmcia.c +2 -3
@@ -34,7 +34,6 @@#include <linux/ata.h> #include <linux/libata.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/cisreg.h>
@@ -249,7 +248,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)/* Set up attributes in order to probe card and get resources */ pdev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; pdev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - pdev->conf.Attributes =CONF_ENABLE_IRQ ; + pdev->config_flags |=CONF_ENABLE_IRQ ;/* See if we have a manufacturer identifier. Use it to set is_kme for vendor quirks */
@@ -275,7 +274,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)if (!pdev->irq) goto failed; - ret =pcmcia_request_configuration (pdev, &pdev->conf); + ret =pcmcia_enable_device (pdev);if (ret) goto failed;
drivers/bluetooth/bluecard_cs.c +2 -3
@@ -39,7 +39,6 @@#include <linux/skbuff.h> #include <linux/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -865,7 +864,7 @@ static int bluecard_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return bluecard_config (link); }
@@ -905,7 +904,7 @@ static int bluecard_config(struct pcmcia_device *link)if (i !=0 ) goto failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto failed;
drivers/bluetooth/bt3c_cs.c +2 -3
@@ -45,7 +45,6 @@#include <linux/device.h> #include <linux/firmware.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -660,7 +659,7 @@ static int bt3c_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =8 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return bt3c_config (link); }
@@ -741,7 +740,7 @@ found_port:if (i !=0 ) goto failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto failed;
drivers/bluetooth/btuart_cs.c +2 -3
@@ -41,7 +41,6 @@#include <asm/system.h> #include <asm/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -589,7 +588,7 @@ static int btuart_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =8 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return btuart_config (link); }
@@ -670,7 +669,7 @@ found_port:if (i !=0 ) goto failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto failed;
drivers/bluetooth/dtl1_cs.c +2 -3
@@ -41,7 +41,6 @@#include <asm/system.h> #include <asm/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -575,7 +574,7 @@ static int dtl1_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =8 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return dtl1_config (link); }
@@ -619,7 +618,7 @@ static int dtl1_config(struct pcmcia_device *link)if (i !=0 ) goto failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto failed;
drivers/char/pcmcia/cm4000_cs.c +1 -2
@@ -34,7 +34,6 @@#include <linux/uaccess.h> #include <linux/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -1767,7 +1766,7 @@ static int cm4000_config(struct pcmcia_device * link, int devno)if (pcmcia_loop_config (link, cm4000_config_check,NULL )) goto cs_release; -if (pcmcia_request_configuration (link, &link->conf)) +if (pcmcia_enable_device (link)) goto cs_release; dev = link->priv;
drivers/char/pcmcia/cm4040_cs.c +2 -3
@@ -29,7 +29,6 @@#include <asm/uaccess.h> #include <asm/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -547,10 +546,10 @@ static int reader_config(struct pcmcia_device *link, int devno)if (pcmcia_loop_config (link, cm4040_config_check,NULL )) goto cs_release; - fail_rc =pcmcia_request_configuration (link, &link->conf); + fail_rc =pcmcia_enable_device (link);if (fail_rc !=0 ) {dev_printk (KERN_INFO , &link->dev, -"pcmcia_request_configuration failed 0x%x\n" , +"pcmcia_enable_device failed 0x%x\n" , fail_rc); goto cs_release; }
drivers/char/pcmcia/ipwireless/main.c +2 -4
@@ -32,7 +32,6 @@#include <pcmcia/device_id.h> #include <pcmcia/ss.h> #include <pcmcia/ds.h> -#include <pcmcia/cs.h> static struct pcmcia_device_id ipw_ids[] = {PCMCIA_DEVICE_MANF_CARD (0x02f2 ,0x0100 ),
@@ -172,7 +171,7 @@ static int config_ipwireless(struct ipw_dev *ipw)if (ret !=0 )return ret; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;INIT_WORK (&ipw->work_reboot, signalled_reboot_work);
@@ -210,8 +209,7 @@ static int config_ipwireless(struct ipw_dev *ipw)* Do the RequestConfiguration last, because it enables interrupts. * Then we don't get any interrupts before we're ready for them. */ - ret =pcmcia_request_configuration (link, &link->conf); - + ret =pcmcia_enable_device (link);if (ret !=0 ) goto exit;
drivers/char/pcmcia/ipwireless/main.h +0 -1
@@ -21,7 +21,6 @@#include <linux/sched.h> #include <linux/types.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
drivers/char/pcmcia/ipwireless/tty.h +0 -1
@@ -21,7 +21,6 @@#include <linux/types.h> #include <linux/sched.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
drivers/char/pcmcia/synclink_cs.c +3 -7
@@ -70,7 +70,6 @@#include <linux/workqueue.h> #include <linux/hdlc.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -550,8 +549,6 @@ static int mgslpc_probe(struct pcmcia_device *link)/* Initialize the struct pcmcia_device structure */ - link->conf.Attributes =0 ; - ret =mgslpc_config (link);if (ret)return ret;
@@ -593,14 +590,14 @@ static int mgslpc_config(struct pcmcia_device *link)if (ret !=0 ) goto failed; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =8 ; link->config_regs =PRESENT_OPTION ; ret =pcmcia_request_irq (link, mgslpc_isr);if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
@@ -609,8 +606,7 @@ static int mgslpc_config(struct pcmcia_device *link)dev_info (&link->dev,"index 0x%02x:" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (", io %pR" , link->resource[0 ]);printk ("\n" );
drivers/ide/ide-cs.c +3 -3
@@ -43,7 +43,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/cisreg.h>
@@ -99,7 +98,7 @@ static int ide_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return ide_config (link); }/* ide_attach */
@@ -284,7 +283,8 @@ static int ide_config(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/isdn/hardware/avm/avm_cs.c +2 -3
@@ -20,7 +20,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -79,7 +78,7 @@ static int avmcs_probe(struct pcmcia_device *p_dev) p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ;/* General socket configuration */ - p_dev->conf.Attributes =CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ; p_dev->config_index =1 ; p_dev->config_regs =PRESENT_OPTION ;
@@ -149,7 +148,7 @@ static int avmcs_config(struct pcmcia_device *link)/* * configure the PCMCIA socket */ - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) {pcmcia_disable_device (link);break ;
drivers/isdn/hisax/avma1_cs.c +2 -3
@@ -20,7 +20,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include "hisax_cfg.h"
@@ -84,7 +83,7 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_16 ;/* General socket configuration */ - p_dev->conf.Attributes =CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ; p_dev->config_index =1 ; p_dev->config_regs =PRESENT_OPTION ;
@@ -160,7 +159,7 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)/* * configure the PCMCIA socket */ - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) {pcmcia_disable_device (link);break ;
drivers/isdn/hisax/elsa_cs.c +2 -6
@@ -46,7 +46,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -129,8 +128,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) link->resource[0 ]->end =8 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; -return elsa_cs_config (link); }/* elsa_cs_attach */
@@ -205,15 +202,14 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)if (!link->irq) goto failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x: " , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/isdn/hisax/sedlbauer_cs.c +4 -8
@@ -46,7 +46,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -132,8 +131,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) link->resource[0 ]->end =8 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->conf.Attributes =0 ; -return sedlbauer_config (link); }/* sedlbauer_attach */
@@ -175,7 +172,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
@@ -192,7 +189,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -247,7 +244,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
@@ -256,8 +253,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) link->config_index);if (link->vpp)printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/isdn/hisax/teles_cs.c +3 -5
@@ -27,7 +27,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -109,7 +108,7 @@ static int __devinit teles_probe(struct pcmcia_device *link) link->resource[0 ]->end =96 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return teles_cs_config (link); }/* teles_attach */
@@ -185,15 +184,14 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)if (!link->irq) goto cs_failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 ) goto cs_failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x:" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/mmc/host/sdricoh_cs.c +0 -1
@@ -30,7 +30,6 @@#include <linux/ioport.h> #include <linux/scatterlist.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <linux/io.h>
drivers/mtd/maps/pcmciamtd.c +1 -5
@@ -16,7 +16,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -568,7 +567,6 @@ static int pcmciamtd_config(struct pcmcia_device *link) dev->pcmcia_map.map_priv_2 = (unsigned long )link->resource[2 ]; dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp; - link->conf.Attributes =0 ;if (setvpp ==2 ) { link->vpp = dev->vpp; }else {
@@ -577,7 +575,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) link->config_index =0 ;DEBUG (2 ,"Setting Configuration" ); - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret !=0 ) {if (dev->win_base) {iounmap (dev->win_base);
@@ -718,8 +716,6 @@ static int pcmciamtd_probe(struct pcmcia_device *link) dev->p_dev = link; link->priv = dev; - link->conf.Attributes =0 ; -return pcmciamtd_config (link); }
drivers/net/pcmcia/3c574_cs.c +2 -3
@@ -87,7 +87,6 @@ earlier 3Com products.#include <linux/bitops.h> #include <linux/mii.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -280,7 +279,7 @@ static int tc574_probe(struct pcmcia_device *link)spin_lock_init (&lp->window_lock); link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =1 ; dev->netdev_ops = &el3_netdev_ops;
@@ -351,7 +350,7 @@ static int tc574_config(struct pcmcia_device *link)if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/3c589_cs.c +2 -3
@@ -41,7 +41,6 @@#include <linux/bitops.h> #include <linux/jiffies.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -216,7 +215,7 @@ static int tc589_probe(struct pcmcia_device *link) link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =1 ; dev->netdev_ops = &el3_netdev_ops;
@@ -293,7 +292,7 @@ static int tc589_config(struct pcmcia_device *link)if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/axnet_cs.c +5 -5
@@ -39,7 +39,6 @@#include <linux/mii.h> #include "../8390.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -166,7 +165,7 @@ static int axnet_probe(struct pcmcia_device *link) info =PRIV (dev); info->p_dev = link; link->priv = dev; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; dev->netdev_ops = &axnet_netdev_ops;
@@ -332,11 +331,12 @@ static int axnet_config(struct pcmcia_device *link)if (!link->irq) goto failed; - + + link->config_flags |=CONF_ENABLE_IRQ ;if (resource_size (link->resource[1 ]) ==8 ) - link->conf.Attributes |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR ; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/com20020_cs.c +2 -3
@@ -43,7 +43,6 @@#include <linux/arcdevice.h> #include <linux/com20020.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -160,7 +159,7 @@ static int com20020_probe(struct pcmcia_device *p_dev) p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; p_dev->resource[0 ]->end =16 ; - p_dev->conf.Attributes =CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ; info->dev = dev; p_dev->priv = info;
@@ -281,7 +280,7 @@ static int com20020_config(struct pcmcia_device *link) dev->irq = link->irq; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/fmvj18x_cs.c +2 -3
@@ -49,7 +49,6 @@#include <linux/ioport.h> #include <linux/crc32.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -252,7 +251,7 @@ static int fmvj18x_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;/* General socket configuration */ - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; dev->netdev_ops = &fjn_netdev_ops; dev->watchdog_timeo =TX_TIMEOUT ;
@@ -431,7 +430,7 @@ static int fmvj18x_config(struct pcmcia_device *link) ret =pcmcia_request_irq (link, fjn_interrupt);if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/ibmtr_cs.c +2 -3
@@ -57,7 +57,6 @@#include <linux/trdevice.h> #include <linux/ibmtr.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -152,7 +151,7 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =4 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_regs =PRESENT_OPTION ; info->dev = dev;
@@ -269,7 +268,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) resource_size(link->resource[3])); ti->sram_phys = link->resource[3 ]->start; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/nmclan_cs.c +2 -3
@@ -146,7 +146,6 @@ Include Files#include <linux/ioport.h> #include <linux/bitops.h> -#include <pcmcia/cs.h> #include <pcmcia/cisreg.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -460,7 +459,7 @@ static int nmclan_probe(struct pcmcia_device *link)spin_lock_init (&lp->bank_lock); link->resource[0 ]->end =32 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =1 ; link->config_regs =PRESENT_OPTION ;
@@ -649,7 +648,7 @@ static int nmclan_config(struct pcmcia_device *link) ret =pcmcia_request_exclusive_irq (link, mace_interrupt);if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/pcmcia/pcnet_cs.c +3 -4
@@ -42,7 +42,6 @@#include <linux/mii.h> #include "../8390.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -260,7 +259,7 @@ static int pcnet_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = dev; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; dev->netdev_ops = &pcnet_netdev_ops;
@@ -560,13 +559,13 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,return NULL ;if (resource_size (link->resource[1 ]) ==8 ) - link->conf.Attributes |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR ;if ((link->manf_id ==MANFID_IBM ) && (link->card_id ==PRODID_IBM_HOME_AND_AWAY )) link->config_index |=0x10 ; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret)return NULL ;
drivers/net/pcmcia/smc91c92_cs.c +4 -5
@@ -44,7 +44,6 @@#include <linux/jiffies.h> #include <linux/firmware.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -326,7 +325,7 @@ static int smc91c92_probe(struct pcmcia_device *link)spin_lock_init (&smc->lock); link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;/* The SMC91c92-specific entries in the device structure. */ dev->netdev_ops = &smc_netdev_ops;
@@ -444,7 +443,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)unsigned int offset;int i; - link->conf.Attributes |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->end =8 ;
@@ -637,7 +636,7 @@ static int osi_config(struct pcmcia_device *link)static const unsigned int com[4 ] = {0x3f8 ,0x2f8 ,0x3e8 ,0x2e8 };int i, j; - link->conf.Attributes |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR ; link->resource[0 ]->end =64 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->end =8 ;
@@ -862,7 +861,7 @@ static int smc91c92_config(struct pcmcia_device *link) i =pcmcia_request_irq (link, smc_interrupt);if (i) goto config_failed; - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i) goto config_failed;
drivers/net/pcmcia/xirc2ps_cs.c +6 -6
@@ -82,7 +82,6 @@#include <linux/bitops.h> #include <linux/mii.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -529,7 +528,7 @@ xirc2ps_probe(struct pcmcia_device *link) link->priv = dev;/* General socket configuration */ - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =1 ;/* Fill in card specific entries */
@@ -811,9 +810,6 @@ xirc2ps_config(struct pcmcia_device * link)if (local->modem) {int pass; -if (do_sound) - link->conf.Attributes |=CONF_ENABLE_SPKR ; - link->resource[1 ]->end =8 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ;if (local->dingo) {
@@ -863,7 +859,11 @@ xirc2ps_config(struct pcmcia_device * link)* This actually configures the PCMCIA socket -- setting up * the I/O windows and the interrupt mapping. */ -if ((err=pcmcia_request_configuration (link, &link->conf))) + link->config_flags |=CONF_ENABLE_IRQ ; +if (do_sound) + link->config_flags |=CONF_ENABLE_SPKR ; + +if ((err =pcmcia_enable_device (link))) goto config_error;if (local->dingo) {
drivers/net/wireless/airo_cs.c +3 -13
@@ -32,7 +32,6 @@#include <linux/timer.h> #include <linux/netdevice.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -96,15 +95,6 @@ static int airo_probe(struct pcmcia_device *p_dev)dev_dbg (&p_dev->dev,"airo_attach()\n" ); -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - p_dev->conf.Attributes =0 ; -/* Allocate space for private device-specific data */ local =kzalloc (sizeof (local_info_t),GFP_KERNEL );if (!local) {
@@ -158,7 +148,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
@@ -167,7 +157,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -229,7 +219,7 @@ static int airo_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed; ((local_info_t *)link->priv)->eth_dev =
drivers/net/wireless/atmel_cs.c +3 -13
@@ -42,7 +42,6 @@#include <linux/moduleparam.h> #include <linux/device.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -106,15 +105,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)dev_dbg (&p_dev->dev,"atmel_attach()\n" ); -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - p_dev->conf.Attributes =0 ; -/* Allocate space for private device-specific data */ local =kzalloc (sizeof (local_info_t),GFP_KERNEL );if (!local) {
@@ -175,7 +165,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
@@ -184,7 +174,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev,else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -242,7 +232,7 @@ static int atmel_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/wireless/b43/pcmcia.c +2 -3
@@ -26,7 +26,6 @@#include <linux/ssb/ssb.h> #include <linux/slab.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -72,7 +71,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) err = -ENODEV ; - dev->conf.Attributes =CONF_ENABLE_IRQ ; + dev->config_flags |=CONF_ENABLE_IRQ ; dev->resource[2 ]->flags |=WIN_ENABLE |WIN_DATA_WIDTH_16 |WIN_USE_WAIT ;
@@ -89,7 +88,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)if (!dev->irq) goto err_disable; - res =pcmcia_request_configuration (dev, &dev->conf); + res =pcmcia_enable_device (dev);if (res !=0 ) goto err_disable;
drivers/net/wireless/hostap/hostap_cs.c +4 -6
@@ -12,7 +12,6 @@#include <linux/wireless.h> #include <net/iw_handler.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -484,7 +483,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
@@ -510,7 +509,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev, p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d "
@@ -590,7 +589,7 @@ static int prism2_config(struct pcmcia_device *link)* the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed_unlock;
@@ -605,8 +604,7 @@ static int prism2_config(struct pcmcia_device *link)if (link->vpp)printk (", Vpp %d.%d" , link->vpp /10 , link->vpp %10 ); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/net/wireless/libertas/if_cs.c +3 -7
@@ -28,7 +28,6 @@#include <linux/firmware.h> #include <linux/netdevice.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -806,7 +805,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev, p_dev->resource[0 ]->end = cfg->io.win[0 ].len;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ if (cfg->io.nwin !=1 ) {
@@ -835,14 +834,11 @@ static int if_cs_probe(struct pcmcia_device *p_dev) card->p_dev = p_dev; p_dev->priv = card; - p_dev->conf.Attributes =0 ; -if (pcmcia_loop_config (p_dev, if_cs_ioprobe,NULL )) {lbs_pr_err ("error in pcmcia_loop_config\n" ); goto out1; } -/* * Allocate an interrupt line. Note that this does not assign * a handler to the interrupt, unless the 'Handler' member of
@@ -865,9 +861,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)* the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (p_dev, &p_dev->conf); + ret =pcmcia_enable_device (p_dev);if (ret) { -lbs_pr_err ("error in pcmcia_request_configuration\n" ); +lbs_pr_err ("error in pcmcia_enable_device\n" ); goto out2; }
drivers/net/wireless/orinoco/orinoco_cs.c +2 -10
@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/delay.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -117,13 +116,6 @@ orinoco_cs_probe(struct pcmcia_device *link) card->p_dev = link; link->priv = priv; -/* General socket configuration defaults can go here. In this -* client, we assume very little, and rely on the CIS for -* almost everything. In most clients, many details (i.e., -* number, sizes, and attributes of IO windows) are fixed by -* the nature of the device, and can be hard-wired here. */ - link->conf.Attributes =0 ; -return orinoco_cs_config (link); }/* orinoco_cs_attach */
@@ -187,7 +179,7 @@ static int orinoco_cs_config_check(struct pcmcia_device *p_dev, dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -266,7 +258,7 @@ orinoco_cs_config(struct pcmcia_device *link)* the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/wireless/orinoco/spectrum_cs.c +2 -10
@@ -25,7 +25,6 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/delay.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -179,13 +178,6 @@ spectrum_cs_probe(struct pcmcia_device *link) card->p_dev = link; link->priv = priv; -/* General socket configuration defaults can go here. In this -* client, we assume very little, and rely on the CIS for -* almost everything. In most clients, many details (i.e., -* number, sizes, and attributes of IO windows) are fixed by -* the nature of the device, and can be hard-wired here. */ - link->conf.Attributes =0 ; -return spectrum_cs_config (link); }/* spectrum_cs_attach */
@@ -249,7 +241,7 @@ static int spectrum_cs_config_check(struct pcmcia_device *p_dev, dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -329,7 +321,7 @@ spectrum_cs_config(struct pcmcia_device *link)* the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/wireless/ray_cs.c +2 -3
@@ -46,7 +46,6 @@#include <linux/ethtool.h> #include <linux/ieee80211.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -318,7 +317,7 @@ static int ray_probe(struct pcmcia_device *p_dev) p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ;/* General socket configuration */ - p_dev->conf.Attributes =CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ; p_dev->config_index =1 ; p_dev->priv = dev;
@@ -413,7 +412,7 @@ static int ray_config(struct pcmcia_device *link)/* This actually configures the PCMCIA socket -- setting up the I/O windows and the interrupt mapping. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/net/wireless/wl3501_cs.c +2 -3
@@ -48,7 +48,6 @@#include <net/iw_handler.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -1888,7 +1887,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev) p_dev->resource[0 ]->flags =IO_DATA_PATH_WIDTH_8 ;/* General socket configuration */ - p_dev->conf.Attributes =CONF_ENABLE_IRQ ; + p_dev->config_flags =CONF_ENABLE_IRQ ; p_dev->config_index =1 ; dev =alloc_etherdev (sizeof (struct wl3501_card ));
@@ -1954,7 +1953,7 @@ static int wl3501_config(struct pcmcia_device *link)/* This actually configures the PCMCIA socket -- setting up the I/O * windows and the interrupt mapping. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/parport/parport_cs.c +2 -3
@@ -48,7 +48,6 @@#include <linux/parport.h> #include <linux/parport_pc.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/cisreg.h>
@@ -103,7 +102,7 @@ static int parport_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return parport_config (link); }/* parport_attach */
@@ -172,7 +171,7 @@ static int parport_config(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/pcmcia/au1000_generic.h +0 -1
@@ -23,7 +23,6 @@/* include the world */ -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include <pcmcia/cistpl.h> #include "cs_internal.h"
drivers/pcmcia/au1000_pb1x00.c +0 -1
@@ -31,7 +31,6 @@#include <linux/proc_fs.h> #include <linux/types.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include <pcmcia/cistpl.h>
drivers/pcmcia/cistpl.c +0 -1
@@ -28,7 +28,6 @@#include <asm/unaligned.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cisreg.h> #include <pcmcia/cistpl.h> #include "cs_internal.h"
drivers/pcmcia/cs.c +0 -1
@@ -33,7 +33,6 @@#include <asm/irq.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
drivers/pcmcia/cs_internal.h +0 -5
@@ -33,14 +33,9 @@typedef struct config_t {struct kref ref;unsigned int state; -unsigned int Attributes;struct resource io[MAX_IO_WIN ];/* io ports */ struct resource mem[MAX_WIN ];/* mem areas */ - -struct { -u_int Attributes; - } irq; }config_t ;
drivers/pcmcia/ds.c +1 -2
@@ -26,7 +26,6 @@#include <linux/dma-mapping.h> #include <linux/slab.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/ss.h>
@@ -1178,7 +1177,7 @@ static int pcmcia_dev_resume(struct device *dev)if (p_dev->device_no == p_dev->func) {dev_dbg (dev,"requesting configuration\n" ); - ret =pcmcia_request_configuration (p_dev, &p_dev->conf); + ret =pcmcia_enable_device (p_dev);if (ret) goto out; }
drivers/pcmcia/i82092.c +0 -1
@@ -16,7 +16,6 @@#include <linux/device.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <asm/system.h> #include <asm/io.h>
drivers/pcmcia/i82365.c +0 -1
@@ -51,7 +51,6 @@#include <asm/system.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <linux/isapnp.h>
drivers/pcmcia/m32r_cfc.c +0 -1
@@ -27,7 +27,6 @@#include <asm/system.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #undef MAX_IO_WIN/* FIXME */ #define MAX_IO_WIN 1
drivers/pcmcia/m32r_pcc.c +0 -1
@@ -28,7 +28,6 @@#include <asm/addrspace.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> /* XXX: should be moved into asm/irq.h */ #define PCC0_IRQ 24
drivers/pcmcia/m8xx_pcmcia.c +0 -1
@@ -59,7 +59,6 @@#include <asm/irq.h> #include <asm/fs_pd.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #define pcmcia_info(args...) printk(KERN_INFO "m8xx_pcmcia: "args)
drivers/pcmcia/pcmcia_cis.c +0 -1
@@ -22,7 +22,6 @@#include <pcmcia/cisreg.h> #include <pcmcia/cistpl.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/ds.h> #include "cs_internal.h"
drivers/pcmcia/pcmcia_resource.c +16 -17
@@ -26,7 +26,6 @@#include <asm/irq.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -230,7 +229,7 @@ EXPORT_SYMBOL(pcmcia_map_mem_page);* pcmcia_fixup_iowidth() - reduce io width to 8bit * * pcmcia_fixup_iowidth() allows a PCMCIA device driver to reduce the -* IO width to 8bit after having called pcmcia_request_configuration() +* IO width to 8bit after having called pcmcia_enable_device() * previously. */ int pcmcia_fixup_iowidth (struct pcmcia_device *p_dev)
@@ -278,7 +277,7 @@ EXPORT_SYMBOL(pcmcia_fixup_iowidth);* pcmcia_fixup_vpp() - set Vpp to a new voltage level * * pcmcia_fixup_vpp() allows a PCMCIA device driver to set Vpp to -* a new voltage level between calls to pcmcia_request_configuration() +* a new voltage level between calls to pcmcia_enable_device() * and pcmcia_disable_device(). */ int pcmcia_fixup_vpp (struct pcmcia_device *p_dev,unsigned char new_vpp)
@@ -432,18 +431,21 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res) }/* pcmcia_release_window */ EXPORT_SYMBOL (pcmcia_release_window); - -int pcmcia_request_configuration (struct pcmcia_device *p_dev, -config_req_t *req) +/** +* pcmcia_enable_device() - set up and activate a PCMCIA device +* +*/ +int pcmcia_enable_device (struct pcmcia_device *p_dev) {int i; -u_int base; +unsigned int base;struct pcmcia_socket *s = p_dev->socket;config_t *c;pccard_io_map iomap;unsigned char status =0 ;unsigned char ext_status =0 ;unsigned char option =0 ; +unsigned int flags = p_dev->config_flags;if (!(s->state &SOCKET_PRESENT ))return -ENODEV ;
@@ -466,23 +468,20 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, }/* Pick memory or I/O card, DMA mode, interrupt */ - c->Attributes = req->Attributes;if (p_dev->_io) s->socket.flags |=SS_IOCARD ; -if (req->Attributes &CONF_ENABLE_DMA ) - s->socket.flags |=SS_DMA_MODE ; -if (req->Attributes &CONF_ENABLE_SPKR ) { +if (flags &CONF_ENABLE_SPKR ) { s->socket.flags |=SS_SPKR_ENA ; status =CCSR_AUDIO_ENA ;if (!(p_dev->config_regs &PRESENT_STATUS ))dev_warn (&p_dev->dev,"speaker requested, but " "PRESENT_STATUS not set!\n" ); } -if (req->Attributes &CONF_ENABLE_IRQ ) +if (flags &CONF_ENABLE_IRQ ) s->socket.io_irq = s->pcmcia_irq;else s->socket.io_irq =0 ; -if (req->Attributes &CONF_ENABLE_ESR ) { +if (flags &CONF_ENABLE_ESR ) { p_dev->config_regs |=PRESENT_EXT_STATUS ; ext_status =ESR_REQ_ATTN_ENA ; }
@@ -510,8 +509,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,if (p_dev->config_regs &PRESENT_IOBASE_0 ) option |=COR_ADDR_DECODE ; } -if ((req->Attributes &CONF_ENABLE_IRQ ) && - !(req->Attributes &CONF_ENABLE_PULSE_IRQ )) +if ((flags &CONF_ENABLE_IRQ ) && + !(flags &CONF_ENABLE_PULSE_IRQ )) option |=COR_LEVEL_REQ ;pcmcia_write_cis_mem (s,1 , (base +CISREG_COR )>>1 ,1 , &option);mdelay (40 );
@@ -560,8 +559,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, p_dev->_locked =1 ;mutex_unlock (&s->ops_mutex);return 0 ; -}/* pcmcia_request_configuration */ -EXPORT_SYMBOL (pcmcia_request_configuration); +}/* pcmcia_enable_device */ +EXPORT_SYMBOL (pcmcia_enable_device);/**
drivers/pcmcia/pd6729.c +0 -1
@@ -18,7 +18,6 @@#include <linux/io.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <asm/system.h>
drivers/pcmcia/rsrc_iodyn.c +0 -1
@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include "cs_internal.h"
drivers/pcmcia/rsrc_mgr.c +0 -1
@@ -17,7 +17,6 @@#include <linux/kernel.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include "cs_internal.h"
drivers/pcmcia/rsrc_nonstatic.c +0 -1
@@ -29,7 +29,6 @@#include <asm/irq.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include "cs_internal.h"
drivers/pcmcia/sa1100_generic.c +0 -1
@@ -35,7 +35,6 @@#include <linux/slab.h> #include <linux/platform_device.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include <asm/hardware/scoop.h>
drivers/pcmcia/soc_common.h +0 -1
@@ -11,7 +11,6 @@/* include the world */ #include <linux/cpufreq.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include <pcmcia/cistpl.h>
drivers/pcmcia/socket_sysfs.c +0 -1
@@ -27,7 +27,6 @@#include <asm/irq.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
drivers/pcmcia/tcic.c +0 -1
@@ -49,7 +49,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include "tcic.h"
drivers/pcmcia/xxs1500_ss.c +0 -1
@@ -17,7 +17,6 @@#include <linux/slab.h> #include <linux/spinlock.h> -#include <pcmcia/cs.h> #include <pcmcia/ss.h> #include <pcmcia/cistpl.h>
drivers/pcmcia/yenta_socket.c +0 -1
@@ -20,7 +20,6 @@#include <linux/slab.h> #include <pcmcia/ss.h> -#include <pcmcia/cs.h> #include "yenta_socket.h" #include "i82365.h"
drivers/scsi/pcmcia/aha152x_stub.c +2 -3
@@ -49,7 +49,6 @@#include <scsi/scsi_host.h> #include "aha152x.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -102,7 +101,7 @@ static int aha152x_probe(struct pcmcia_device *link) link->resource[0 ]->end =0x20 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_regs =PRESENT_OPTION ;return aha152x_config_cs (link);
@@ -159,7 +158,7 @@ static int aha152x_config_cs(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/scsi/pcmcia/fdomain_stub.c +2 -3
@@ -46,7 +46,6 @@#include <scsi/scsi_host.h> #include "fdomain.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -85,7 +84,7 @@ static int fdomain_probe(struct pcmcia_device *link) link->priv = info; link->resource[0 ]->end =0x10 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_regs =PRESENT_OPTION ;return fdomain_config (link);
@@ -131,7 +130,7 @@ static int fdomain_config(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/scsi/pcmcia/nsp_cs.c +5 -8
@@ -47,7 +47,6 @@#include <scsi/scsi.h> #include <scsi/scsi_ioctl.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -1562,7 +1561,7 @@ static int nsp_cs_probe(struct pcmcia_device *link) link->resource[0 ]->flags =IO_DATA_PATH_WIDTH_AUTO ;/* General socket configuration */ - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; ret =nsp_cs_config (link);
@@ -1608,7 +1607,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */
@@ -1629,7 +1628,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, }/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -1700,7 +1699,7 @@ static int nsp_cs_config(struct pcmcia_device *link)if (pcmcia_request_irq (link, nspintr)) goto cs_failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto cs_failed;
@@ -1749,9 +1748,7 @@ static int nsp_cs_config(struct pcmcia_device *link)if (link->vpp) {printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); } -if (link->conf.Attributes &CONF_ENABLE_IRQ ) { -printk (", irq %d" , link->irq); - } +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (", io %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/scsi/pcmcia/qlogic_stub.c +3 -4
@@ -48,7 +48,6 @@#include <scsi/scsi_host.h> #include "../qlogicfas408.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/ciscode.h>
@@ -158,7 +157,7 @@ static int qlogic_probe(struct pcmcia_device *link) link->priv = info; link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_regs =PRESENT_OPTION ;return qlogic_config (link);
@@ -208,7 +207,7 @@ static int qlogic_config(struct pcmcia_device * link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
@@ -263,7 +262,7 @@ static int qlogic_resume(struct pcmcia_device *link) {scsi_info_t *info = link->priv; -pcmcia_request_configuration (link, &link->conf); +pcmcia_enable_device (link);if ((info->manf_id ==MANFID_MACNICA ) || (info->manf_id ==MANFID_PIONEER ) || (info->manf_id ==0x0098 )) {
drivers/scsi/pcmcia/sym53c500_cs.c +2 -3
@@ -71,7 +71,6 @@#include <scsi/scsi.h> #include <scsi/scsi_host.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> #include <pcmcia/ciscode.h>
@@ -721,7 +720,7 @@ SYM53C500_config(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
@@ -861,7 +860,7 @@ SYM53C500_probe(struct pcmcia_device *link) link->priv = info; link->resource[0 ]->end =16 ; link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;return SYM53C500_config (link); }/* SYM53C500_attach */
drivers/serial/serial_cs.c +5 -6
@@ -45,7 +45,6 @@#include <asm/io.h> #include <asm/system.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
@@ -184,7 +183,7 @@ static void quirk_config_socket(struct pcmcia_device *link)struct serial_info *info = link->priv;if (info->multi) - link->conf.Attributes |=CONF_ENABLE_ESR ; + link->config_flags |=CONF_ENABLE_ESR ; }static const struct serial_quirk quirks[] = {
@@ -333,9 +332,9 @@ static int serial_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ;if (do_sound) - link->conf.Attributes |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR ;return serial_config (link); }
@@ -503,7 +502,7 @@ found_port:if (info->quirk && info->quirk->config) info->quirk->config (link); - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 )return -1 ;return setup_serial (link, info, link->resource[0 ]->start, link->irq);
@@ -579,7 +578,7 @@ static int multi_config(struct pcmcia_device *link)if (info->quirk && info->quirk->config) info->quirk->config (link); - i =pcmcia_request_configuration (link, &link->conf); + i =pcmcia_enable_device (link);if (i !=0 )return -ENODEV ;
drivers/ssb/main.c +0 -1
@@ -20,7 +20,6 @@#include <linux/mmc/sdio_func.h> #include <linux/slab.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
drivers/ssb/pcmcia.c +0 -1
@@ -13,7 +13,6 @@#include <linux/io.h> #include <linux/etherdevice.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ciscode.h> #include <pcmcia/ds.h>
drivers/ssb/scan.c +0 -1
@@ -17,7 +17,6 @@#include <linux/pci.h> #include <linux/io.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
drivers/staging/comedi/drivers/cb_das16_cs.c +3 -8
@@ -37,7 +37,6 @@ Status: experimental#include <linux/delay.h> #include <linux/pci.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -692,9 +691,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* Initialize the pcmcia_device structure */ - link->conf.Attributes =0 ; - cur_dev = link;das16cs_pcmcia_config (link);
@@ -723,7 +719,7 @@ static int das16cs_pcmcia_config_loop(struct pcmcia_device *p_dev,return -EINVAL ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -767,14 +763,13 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %u" , link->irq); +printk (", irq %u" , link->irq);if (link->resource[0 ])printk (", io %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/comedi/drivers/das08_cs.c +3 -14
@@ -48,7 +48,6 @@ Command support does not exist, but could be added for this board.#include "das08.h" /* pcmcia includes */ -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -162,15 +161,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->conf.Attributes =0 ; - cur_dev = link;das08_pcmcia_config (link);
@@ -211,7 +201,7 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev,return -ENODEV ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -263,14 +253,13 @@ static void das08_pcmcia_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %u" , link->irq); +printk (", irq %u" , link->irq);if (link->resource[0 ])printk (", io %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/comedi/drivers/ni_daq_700.c +4 -15
@@ -47,7 +47,6 @@ IRQ is assigned but not used.#include <linux/ioport.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -491,15 +490,6 @@ static int dio700_cs_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->conf.Attributes =0 ; - pcmcia_cur_dev = link;dio700_config (link);
@@ -550,10 +540,10 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -602,14 +592,13 @@ static void dio700_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret !=0 ) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (", io %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/comedi/drivers/ni_daq_dio24.c +4 -15
@@ -48,7 +48,6 @@ the PCMCIA interface.#include "8255.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -243,15 +242,6 @@ static int dio24_cs_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->conf.Attributes =0 ; - pcmcia_cur_dev = link;dio24_config (link);
@@ -302,10 +292,10 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -353,14 +343,13 @@ static void dio24_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/comedi/drivers/ni_labpc_cs.c +5 -15
@@ -71,7 +71,6 @@ NI manuals:#include "comedi_fc.h" #include "ni_labpc.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -219,15 +218,6 @@ static int labpc_cs_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->conf.Attributes =0 ; - pcmcia_cur_dev = link;labpc_config (link);
@@ -281,10 +271,10 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,/* Does this card need audio output? */ if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->conf.Attributes |=CONF_ENABLE_SPKR ; + p_dev->config_flags |=CONF_ENABLE_SPKR ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -331,14 +321,14 @@ static void labpc_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; + ret =pcmcia_enable_device (link);if (ret) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %d" , link->irq); +printk (", irq %d" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/comedi/drivers/ni_mio_cs.c +2 -3
@@ -48,7 +48,6 @@ See the notes in the ni_atmio.o driver.#include "ni_stc.h" #include "8255.h" -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -265,7 +264,7 @@ static int cs_attach(struct pcmcia_device *link) { link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; link->resource[0 ]->end =16 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; cur_dev = link;
@@ -336,7 +335,7 @@ static void mio_cs_config(struct pcmcia_device *link)if (!link->irq)dev_info (&link->dev,"no IRQ available\n" ); - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link); }static int mio_cs_attach (struct comedi_device *dev,struct comedi_devconfig *it)
drivers/staging/comedi/drivers/quatech_daqp_cs.c +3 -14
@@ -50,7 +50,6 @@ Devices: [Quatech] DAQP-208 (daqp), DAQP-308#include "../comedidev.h" #include <linux/semaphore.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -1031,15 +1030,6 @@ static int daqp_cs_attach(struct pcmcia_device *link) local->link = link; link->priv = local; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->conf.Attributes =0 ; -daqp_cs_config (link);return 0 ;
@@ -1088,7 +1078,7 @@ static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev,return -ENODEV ;/* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -1132,14 +1122,13 @@ static void daqp_cs_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;/* Finally, report what we've done */ dev_info (&link->dev,"index 0x%02x" , link->config_index); -if (link->conf.Attributes &CONF_ENABLE_IRQ ) -printk (", irq %u" , link->irq); +printk (", irq %u" , link->irq);if (link->resource[0 ])printk (" & %pR" , link->resource[0 ]);if (link->resource[1 ])
drivers/staging/wlags49_h2/wl_cs.c +3 -4
@@ -83,7 +83,6 @@#include <linux/if_arp.h> #include <linux/ioport.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
@@ -147,7 +146,7 @@ static int wl_adapter_attach(struct pcmcia_device *link) link->resource[0 ]->end =HCF_NUM_IO_PORTS ; link->resource[0 ]->flags=IO_DATA_PATH_WIDTH_16 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =5 ; link->config_regs =PRESENT_OPTION ;
@@ -301,7 +300,7 @@ void wl_adapter_insert(struct pcmcia_device *link) dev = link->priv;/* Do we need to allocate an interrupt? */ - link->conf.Attributes |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->io_lines =6 ; ret =pcmcia_request_io (link);
@@ -312,7 +311,7 @@ void wl_adapter_insert(struct pcmcia_device *link)if (ret !=0 ) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret !=0 ) goto failed;
drivers/staging/wlags49_h2/wl_internal.h +0 -1
@@ -69,7 +69,6 @@******************************************************************************/ #include <linux/version.h> #ifdef BUS_PCMCIA -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h>
drivers/telephony/ixj_pcmcia.c +1 -2
@@ -8,7 +8,6 @@#include <linux/errno.h> /* error codes */ #include <linux/slab.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
@@ -143,7 +142,7 @@ static int ixj_config(struct pcmcia_device * link)if (pcmcia_loop_config (link, ixj_config_check, &dflt)) goto failed; -if (pcmcia_request_configuration (link, &link->conf)) +if (pcmcia_enable_device (link)) goto failed;/*
drivers/usb/host/sl811_cs.c +2 -5
@@ -20,7 +20,6 @@#include <linux/ioport.h> #include <linux/platform_device.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/cisreg.h> #include <pcmcia/ds.h>
@@ -159,7 +158,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev, dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ;/* we need an interrupt */ - p_dev->conf.Attributes |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ ;/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;
@@ -195,7 +194,7 @@ static int sl811_cs_config(struct pcmcia_device *link)if (!link->irq) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
@@ -227,8 +226,6 @@ static int sl811_cs_probe(struct pcmcia_device *link) local->p_dev = link; link->priv = local; - link->conf.Attributes =0 ; -return sl811_cs_config (link); }
include/pcmcia/cs.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* cs.h -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* The initial developer of the original code is David A. Hinds -* <[email protected]>. Portions created by David A. Hinds -* are Copyright (C) 1999 David A. Hinds. All Rights Reserved. -* -* (C) 1999 David A. Hinds -*/ - -#ifndef _LINUX_CS_H -#define _LINUX_CS_H - -#ifdef __KERNEL__ -#include <linux/interrupt.h> -#endif - -/* For RequestConfiguration */ -typedef struct config_req_t { -u_int Attributes; -}config_req_t ; - -/* Attributes for RequestConfiguration */ -#define CONF_ENABLE_IRQ 0x01 -#define CONF_ENABLE_DMA 0x02 -#define CONF_ENABLE_SPKR 0x04 -#define CONF_ENABLE_PULSE_IRQ 0x08 -#define CONF_ENABLE_ESR 0x10 -#define CONF_VALID_CLIENT 0x100 - -#endif /* _LINUX_CS_H */
include/pcmcia/ds.h +11 -6
@@ -24,9 +24,11 @@#ifdef __KERNEL__#include <linux/device.h> +#include <linux/interrupt.h> #include <pcmcia/ss.h> #include <asm/atomic.h> +/* * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus * a.k.a. PCI drivers
@@ -88,18 +90,16 @@ struct pcmcia_device {struct list_head socket_device_list; -/* deprecated, will be cleaned up soon */ -config_req_t conf; -/* device setup */ unsigned int irq;struct resource *resource[PCMCIA_NUM_RESOURCES ];unsigned int vpp; -unsigned int io_lines;/* number of I/O lines */ +unsigned int config_flags;/* CONF_ENABLE_ flags below */ unsigned int config_base;unsigned int config_index;unsigned int config_regs;/* PRESENT_ flags below */ +unsigned int io_lines;/* number of I/O lines */ /* Is the device suspended? */ u16 suspended:1;
@@ -207,8 +207,7 @@ pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev,int __must_check pcmcia_request_irq (struct pcmcia_device *p_dev,irq_handler_t handler); -int pcmcia_request_configuration (struct pcmcia_device *p_dev, -config_req_t *req); +int pcmcia_enable_device (struct pcmcia_device *p_dev);int pcmcia_request_window (struct pcmcia_device *p_dev,struct resource *res,unsigned int speed);
@@ -265,6 +264,12 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)#define PRESENT_IOBASE_3 0x100#define PRESENT_IOSIZE 0x200 +/* flags to be passed to pcmcia_enable_device() */ +#define CONF_ENABLE_IRQ 0x01 +#define CONF_ENABLE_SPKR 0x02 +#define CONF_ENABLE_PULSE_IRQ 0x04 +#define CONF_ENABLE_ESR 0x08 +#endif /* __KERNEL__ */ #endif /* _LINUX_DS_H */
include/pcmcia/ss.h +0 -1
@@ -19,7 +19,6 @@#include <linux/sched.h> /* task_struct, completion */ #include <linux/mutex.h> -#include <pcmcia/cs.h> #ifdef CONFIG_CARDBUS #include <linux/pci.h> #endif
sound/pcmcia/pdaudiocf/pdaudiocf.c +3 -2
@@ -142,7 +142,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->resource[0 ]->end =16 ; - link->conf.Attributes =CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; + link->config_flags =CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; link->config_index =1 ; link->config_regs =PRESENT_OPTION ;
@@ -217,6 +217,7 @@ static int pdacf_config(struct pcmcia_device *link)snd_printdd (KERN_DEBUG "pdacf_config called\n" ); link->config_index =0x5 ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; ret =pcmcia_request_io (link);if (ret)
@@ -226,7 +227,7 @@ static int pdacf_config(struct pcmcia_device *link)if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
sound/pcmcia/pdaudiocf/pdaudiocf.h +0 -1
@@ -24,7 +24,6 @@#include <sound/pcm.h> #include <asm/io.h> #include <linux/interrupt.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
sound/pcmcia/vx/vxpocket.c +3 -3
@@ -2,7 +2,7 @@* Driver for Digigram VXpocket V2/440 soundcards * * Copyright (c) 2002 by Takashi Iwai <[email protected]> -* +* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or
@@ -162,7 +162,7 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->resource[0 ]->end =16 ; - link->conf.Attributes =CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =1 ; link->config_regs =PRESENT_OPTION ;
@@ -233,7 +233,7 @@ static int vxpocket_config(struct pcmcia_device *link)if (ret) goto failed; - ret =pcmcia_request_configuration (link, &link->conf); + ret =pcmcia_enable_device (link);if (ret) goto failed;
sound/pcmcia/vx/vxpocket.h +0 -1
@@ -23,7 +23,6 @@#include <sound/vx_core.h> -#include <pcmcia/cs.h> #include <pcmcia/cistpl.h> #include <pcmcia/ds.h>
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 10/22 pcmcia: introduce autoconfiguration feature
In reply to Dominik BrodowskiIntroduce an autoconfiguration feature to set certain values in pcmcia_loop_config(), instead of copying the same code over and over in each PCMCIA driver. At first, introduce the following options:
CONF_AUTO_CHECK_VCC check or matching Vcc entryCONF_AUTO_SET_VPP set VppCONF_AUTO_AUDIO enable the speaker line
--- drivers/ata/pata_pcmcia.c | 23 +---- drivers/bluetooth/bt3c_cs.c | 7 +- drivers/bluetooth/btuart_cs.c | 7 +- drivers/bluetooth/dtl1_cs.c | 1 - drivers/char/pcmcia/cm4000_cs.c | 1 - drivers/char/pcmcia/cm4040_cs.c | 1 - drivers/char/pcmcia/ipwireless/main.c | 1 - drivers/char/pcmcia/synclink_cs.c | 1 - drivers/ide/ide-cs.c | 23 +---- drivers/isdn/hardware/avm/avm_cs.c | 1 - drivers/isdn/hisax/avma1_cs.c | 1 - drivers/isdn/hisax/elsa_cs.c | 1 - drivers/isdn/hisax/sedlbauer_cs.c | 25 +----- drivers/isdn/hisax/teles_cs.c | 1 - drivers/net/pcmcia/axnet_cs.c | 1 - drivers/net/pcmcia/fmvj18x_cs.c | 1 - drivers/net/pcmcia/pcnet_cs.c | 1 - drivers/net/pcmcia/smc91c92_cs.c | 2 - drivers/net/pcmcia/xirc2ps_cs.c | 5 +- drivers/net/wireless/airo_cs.c | 17 +--- drivers/net/wireless/atmel_cs.c | 17 +--- drivers/net/wireless/hostap/hostap_cs.c | 27 +----- drivers/net/wireless/libertas/if_cs.c | 1 - drivers/net/wireless/orinoco/orinoco_cs.c | 31 +------ drivers/net/wireless/orinoco/spectrum_cs.c | 24 +---- drivers/parport/parport_cs.c | 1 - drivers/pcmcia/pcmcia_cis.c | 36 ++++++- drivers/scsi/pcmcia/aha152x_stub.c | 1 - drivers/scsi/pcmcia/fdomain_stub.c | 1 - drivers/scsi/pcmcia/nsp_cs.c | 110 ++++++++------------- drivers/scsi/pcmcia/qlogic_stub.c | 1 - drivers/scsi/pcmcia/sym53c500_cs.c | 1 - drivers/serial/serial_cs.c | 10 +-- drivers/staging/comedi/drivers/cb_das16_cs.c | 1 - drivers/staging/comedi/drivers/das08_cs.c | 1 - drivers/staging/comedi/drivers/ni_daq_700.c | 10 +-- drivers/staging/comedi/drivers/ni_daq_dio24.c | 10 +-- drivers/staging/comedi/drivers/ni_labpc_cs.c | 11 +-- drivers/staging/comedi/drivers/ni_mio_cs.c | 1 - drivers/staging/comedi/drivers/quatech_daqp_cs.c | 1 - drivers/telephony/ixj_pcmcia.c | 1 - drivers/usb/host/sl811_cs.c | 24 +---- include/pcmcia/ds.h | 7 +- 43 files changed, 120 insertions(+), 329 deletions(-)
drivers/ata/pata_pcmcia.c +3 -20
@@ -169,34 +169,16 @@ static struct ata_port_operations pcmcia_8bit_port_ops = {struct pcmcia_config_check {unsigned long ctl_base; -int skip_vcc;int is_kme; };static int pcmcia_check_one_config (struct pcmcia_device *pdev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {struct pcmcia_config_check *stk = priv_data; -/* Check for matching Vcc, unless we're desperate */ -if (!stk->skip_vcc) { -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ) -return -ENODEV ; - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ) -return -ENODEV ; - } - } - -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; pdev->io_lines = io->flags &CISTPL_IO_LINES_MASK ;
@@ -249,6 +231,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) pdev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; pdev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; pdev->config_flags |=CONF_ENABLE_IRQ ; + pdev->config_flags |=CONF_AUTO_SET_VPP |CONF_AUTO_CHECK_VCC ;/* See if we have a manufacturer identifier. Use it to set is_kme for vendor quirks */
@@ -262,10 +245,10 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)if (!stk) goto out1; stk->is_kme = is_kme; - stk->skip_vcc = io_base = ctl_base =0 ; + io_base = ctl_base =0 ;if (pcmcia_loop_config (pdev, pcmcia_check_one_config, stk)) { - stk->skip_vcc =1 ; + pdev->config_flags &= ~CONF_AUTO_CHECK_VCC ;if (pcmcia_loop_config (pdev, pcmcia_check_one_config, stk)) goto failed;/* No suitable config found */ }
drivers/bluetooth/bt3c_cs.c +1 -6
@@ -659,7 +659,7 @@ static int bt3c_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =8 ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP ;return bt3c_config (link); }
@@ -676,15 +676,11 @@ static void bt3c_detach(struct pcmcia_device *link)static int bt3c_check_config (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {unsigned long try = (unsigned long ) priv_data; - p_dev->io_lines = (try ==0 ) ?16 : cf->io.flags &CISTPL_IO_LINES_MASK ; -if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cf->io.nwin >0 ) && (cf->io.win[0 ].len ==8 ) && (cf->io.win[0 ].base !=0 )) { p_dev->resource[0 ]->start = cf->io.win[0 ].base;
@@ -697,7 +693,6 @@ static int bt3c_check_config(struct pcmcia_device *p_dev,static int bt3c_check_config_notpicky (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {static unsigned int base[5 ] = {0x3f8 ,0x2f8 ,0x3e8 ,0x2e8 ,0x0 };
drivers/bluetooth/btuart_cs.c +1 -6
@@ -588,7 +588,7 @@ static int btuart_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[0 ]->end =8 ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP ;return btuart_config (link); }
@@ -605,15 +605,11 @@ static void btuart_detach(struct pcmcia_device *link)static int btuart_check_config (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int *try = priv_data; - p_dev->io_lines = (try ==0 ) ?16 : cf->io.flags &CISTPL_IO_LINES_MASK ; -if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;if ((cf->io.nwin >0 ) && (cf->io.win[0 ].len ==8 ) && (cf->io.win[0 ].base !=0 )) { p_dev->resource[0 ]->start = cf->io.win[0 ].base;
@@ -626,7 +622,6 @@ static int btuart_check_config(struct pcmcia_device *p_dev,static int btuart_check_config_notpicky (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {static unsigned int base[5 ] = {0x3f8 ,0x2f8 ,0x3e8 ,0x2e8 ,0x0 };
drivers/bluetooth/dtl1_cs.c +0 -1
@@ -592,7 +592,6 @@ static void dtl1_detach(struct pcmcia_device *link)static int dtl1_confcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if ((cf->io.nwin !=1 ) || (cf->io.win[0 ].len <=8 ))
drivers/char/pcmcia/cm4000_cs.c +0 -1
@@ -1744,7 +1744,6 @@ static void cmm_cm4000_release(struct pcmcia_device * link)static int cm4000_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (!cfg->io.nwin)
drivers/char/pcmcia/cm4040_cs.c +0 -1
@@ -518,7 +518,6 @@ static void cm4040_reader_release(struct pcmcia_device *link)static int cm4040_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int rc;
drivers/char/pcmcia/ipwireless/main.c +0 -1
@@ -78,7 +78,6 @@ static void signalled_reboot_callback(void *callback_data)static int ipwireless_probe (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {struct ipw_dev *ipw = priv_data;
drivers/char/pcmcia/synclink_cs.c +0 -1
@@ -564,7 +564,6 @@ static int mgslpc_probe(struct pcmcia_device *link)static int mgslpc_ioprobe (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (!cfg->io.nwin)
drivers/ide/ide-cs.c +3 -20
@@ -99,6 +99,7 @@ static int ide_probe(struct pcmcia_device *link) link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_AUTO_SET_VPP |CONF_AUTO_CHECK_VCC ;return ide_config (link); }/* ide_attach */
@@ -195,34 +196,16 @@ out_release:struct pcmcia_config_check {unsigned long ctl_base; -int skip_vcc;int is_kme; };static int pcmcia_check_one_config (struct pcmcia_device *pdev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {struct pcmcia_config_check *stk = priv_data; -/* Check for matching Vcc, unless we're desperate */ -if (!stk->skip_vcc) { -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ) -return -ENODEV ; - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ) -return -ENODEV ; - } - } - -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - pdev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; pdev->io_lines = io->flags &CISTPL_IO_LINES_MASK ;
@@ -271,10 +254,10 @@ static int ide_config(struct pcmcia_device *link)if (!stk) goto err_mem; stk->is_kme = is_kme; - stk->skip_vcc = io_base = ctl_base =0 ; + io_base = ctl_base =0 ;if (pcmcia_loop_config (link, pcmcia_check_one_config, stk)) { - stk->skip_vcc =1 ; + link->config_flags &= ~CONF_AUTO_CHECK_VCC ;if (pcmcia_loop_config (link, pcmcia_check_one_config, stk)) goto failed;/* No suitable config found */ }
drivers/isdn/hardware/avm/avm_cs.c +0 -1
@@ -110,7 +110,6 @@ static void avmcs_detach(struct pcmcia_device *link)static int avmcs_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cf->io.nwin <=0 )
drivers/isdn/hisax/avma1_cs.c +0 -1
@@ -117,7 +117,6 @@ static void __devexit avma1cs_detach(struct pcmcia_device *link)static int avma1cs_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cf->io.nwin <=0 )
drivers/isdn/hisax/elsa_cs.c +0 -1
@@ -163,7 +163,6 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link)static int elsa_cs_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int j;
drivers/isdn/hisax/sedlbauer_cs.c +3 -22
@@ -164,33 +164,11 @@ static void __devexit sedlbauer_detach(struct pcmcia_device *link)static int sedlbauer_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ]/10000 ) -return -ENODEV ; - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ]/10000 ) -return -ENODEV ; - } - -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -223,6 +201,9 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)dev_dbg (&link->dev,"sedlbauer_config(0x%p)\n" , link); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_CHECK_VCC | +CONF_AUTO_SET_VPP |CONF_AUTO_AUDIO ; +/* In this loop, we scan the CIS for configuration table entries, each of which describes a valid card configuration, including
drivers/isdn/hisax/teles_cs.c +0 -1
@@ -145,7 +145,6 @@ static void __devexit teles_detach(struct pcmcia_device *link)static int teles_cs_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int j;
drivers/net/pcmcia/axnet_cs.c +0 -1
@@ -287,7 +287,6 @@ static int try_io_port(struct pcmcia_device *link)static int axnet_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int i;
drivers/net/pcmcia/fmvj18x_cs.c +0 -1
@@ -322,7 +322,6 @@ static int ungermann_try_io_port(struct pcmcia_device *link)static int fmvj18x_ioprobe (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {return 0 ;/* strange, but that's what the code did already before... */
drivers/net/pcmcia/pcnet_cs.c +0 -1
@@ -503,7 +503,6 @@ static int try_io_port(struct pcmcia_device *link)static int pcnet_confcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int *priv = priv_data;
drivers/net/pcmcia/smc91c92_cs.c +0 -2
@@ -420,7 +420,6 @@ static int mhz_3288_power(struct pcmcia_device *link)static int mhz_mfc_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int k;
@@ -590,7 +589,6 @@ static int mot_setup(struct pcmcia_device *link)static int smc_configcheck (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->resource[0 ]->start = cf->io.win[0 ].base;
drivers/net/pcmcia/xirc2ps_cs.c +2 -3
@@ -668,7 +668,6 @@ static int xirc2ps_config_modem(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cf, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { unsigned int ioaddr;
@@ -688,7 +687,6 @@ static int xirc2ps_config_check(struct pcmcia_device *p_dev, cistpl_cftable_entry_t *cf, cistpl_cftable_entry_t *dflt, - unsigned int vcc, void *priv_data) { int *pass = priv_data;
@@ -826,7 +824,8 @@ xirc2ps_config(struct pcmcia_device * link)* the Mako if (on the first pass) the COR bit 5 is set. */ for (pass=0 ; pass <2 ; pass++) -if (!pcmcia_loop_config (link, xirc2ps_config_check, &pass)) +if (!pcmcia_loop_config (link, xirc2ps_config_check, + &pass)) goto port_found;/* if special option: * try to configure as Ethernet only.
drivers/net/wireless/airo_cs.c +3 -14
@@ -140,25 +140,11 @@ static void airo_detach(struct pcmcia_device *link)static int airo_cs_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -193,6 +179,9 @@ static int airo_config(struct pcmcia_device *link)dev_dbg (&link->dev,"airo_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | +CONF_AUTO_AUDIO ; +/* * In this loop, we scan the CIS for configuration table * entries, each of which describes a valid card
drivers/net/wireless/atmel_cs.c +3 -14
@@ -157,25 +157,11 @@ static int card_present(void *arg)static int atmel_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -207,6 +193,9 @@ static int atmel_config(struct pcmcia_device *link)dev_dbg (&link->dev,"atmel_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | +CONF_AUTO_AUDIO ; +/* In this loop, we scan the CIS for configuration table entries, each of which describes a valid card configuration, including
drivers/net/wireless/hostap/hostap_cs.c +4 -23
@@ -472,7 +472,6 @@ static void prism2_detach(struct pcmcia_device *link)static int prism2_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )
@@ -481,28 +480,6 @@ static int prism2_config_check(struct pcmcia_device *p_dev,PDEBUG (DEBUG_EXTRA ,"Checking CFTABLE_ENTRY 0x%02X " "(default 0x%02X)\n" , cfg->index, dflt->index); -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] / -10000 && !ignore_cis_vcc) { -PDEBUG (DEBUG_EXTRA ," Vcc mismatch - skipping" -" this entry\n" ); -return -ENODEV ; - } - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] / -10000 && !ignore_cis_vcc) { -PDEBUG (DEBUG_EXTRA ," Vcc (default) mismatch " -"- skipping this entry\n" ); -return -ENODEV ; - } - } -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM ))
@@ -553,6 +530,10 @@ static int prism2_config(struct pcmcia_device *link) }/* Look for an appropriate configuration table entry in the CIS */ + link->config_flags |=CONF_AUTO_SET_VPP |CONF_AUTO_AUDIO | +CONF_AUTO_CHECK_VCC ; +if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC ; ret =pcmcia_loop_config (link, prism2_config_check,NULL );if (ret) {if (!ignore_cis_vcc)
drivers/net/wireless/libertas/if_cs.c +0 -1
@@ -797,7 +797,6 @@ static void if_cs_release(struct pcmcia_device *p_dev)static int if_cs_ioprobe (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;
drivers/net/wireless/orinoco/orinoco_cs.c +3 -28
@@ -145,39 +145,11 @@ static void orinoco_cs_detach(struct pcmcia_device *link)static int orinoco_cs_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 ) goto next_entry; -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ) { -DEBUG (2 ,"%s: Vcc mismatch (vcc = %d, CIS = %d)\n" , - __func__, vcc, - cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ); -if (!ignore_cis_vcc) - goto next_entry; - } - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ) { -DEBUG (2 ,"%s: Vcc mismatch (vcc = %d, CIS = %d)\n" , - __func__, vcc, - dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ); -if (!ignore_cis_vcc) - goto next_entry; - } - } - -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = - cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = - dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; -/* Do we need to allocate an interrupt? */ p_dev->config_flags |=CONF_ENABLE_IRQ ;
@@ -230,6 +202,9 @@ orinoco_cs_config(struct pcmcia_device *link)* and most client drivers will only use the CIS to fill in * implementation-defined details. */ + link->config_flags |=CONF_AUTO_SET_VPP |CONF_AUTO_CHECK_VCC ; +if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC ; ret =pcmcia_loop_config (link, orinoco_cs_config_check,NULL );if (ret) {if (!ignore_cis_vcc)
drivers/net/wireless/orinoco/spectrum_cs.c +3 -21
@@ -207,32 +207,11 @@ static void spectrum_cs_detach(struct pcmcia_device *link)static int spectrum_cs_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 ) goto next_entry; -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ) { -DEBUG (2 ,"%s: Vcc mismatch (vcc = %d, CIS = %d)\n" , - __func__, vcc, - cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ); -if (!ignore_cis_vcc) - goto next_entry; - } - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ) { -DEBUG (2 ,"%s: Vcc mismatch (vcc = %d, CIS = %d)\n" , - __func__, vcc, - dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ); -if (!ignore_cis_vcc) - goto next_entry; - } - } -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ;
@@ -292,6 +271,9 @@ spectrum_cs_config(struct pcmcia_device *link)* and most client drivers will only use the CIS to fill in * implementation-defined details. */ + link->config_flags |=CONF_AUTO_SET_VPP |CONF_AUTO_CHECK_VCC ; +if (ignore_cis_vcc) + link->config_flags &= ~CONF_AUTO_CHECK_VCC ; ret =pcmcia_loop_config (link, spectrum_cs_config_check,NULL );if (ret) {if (!ignore_cis_vcc)
drivers/parport/parport_cs.c +0 -1
@@ -136,7 +136,6 @@ static void parport_detach(struct pcmcia_device *link)static int parport_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
drivers/pcmcia/pcmcia_cis.c +32 -4
@@ -131,7 +131,6 @@ struct pcmcia_cfg_mem {int (*conf_check) (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data);cisparse_t parse;cistpl_cftable_entry_t dflt;
@@ -146,16 +145,46 @@ struct pcmcia_cfg_mem {*/ static int pcmcia_do_loop_config (tuple_t *tuple,cisparse_t *parse,void *priv) { -cistpl_cftable_entry_t *cfg = &parse->cftable_entry;struct pcmcia_cfg_mem *cfg_mem = priv; +struct pcmcia_device *p_dev = cfg_mem->p_dev; +cistpl_cftable_entry_t *cfg = &parse->cftable_entry; +cistpl_cftable_entry_t *dflt = &cfg_mem->dflt; +unsigned int flags = p_dev->config_flags; +unsigned int vcc = p_dev->socket->socket.Vcc; + +dev_dbg (&p_dev->dev,"testing configuration %x, autoconf %x\n" , + cfg->index, flags);/* default values */ cfg_mem->p_dev->config_index = cfg->index;if (cfg->flags &CISTPL_CFTABLE_DEFAULT ) cfg_mem->dflt = *cfg; +/* check for matching Vcc? */ +if (flags &CONF_AUTO_CHECK_VCC ) { +if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { +if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM ] /10000 ) +return -ENODEV ; + }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { +if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM ] /10000 ) +return -ENODEV ; + } + } + +/* set Vpp? */ +if (flags &CONF_AUTO_SET_VPP ) { +if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) + p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; +else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) + p_dev->vpp = + dflt->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; + } + +/* enable audio? */ +if ((flags &CONF_AUTO_AUDIO ) && (cfg->flags &CISTPL_CFTABLE_AUDIO )) + p_dev->config_flags |=CONF_ENABLE_SPKR ; +return cfg_mem->conf_check (cfg_mem->p_dev, cfg, &cfg_mem->dflt, - cfg_mem->p_dev->socket->socket.Vcc, cfg_mem->priv_data); }
@@ -176,7 +205,6 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,int (*conf_check) (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data), void *priv_data) {
drivers/scsi/pcmcia/aha152x_stub.c +0 -1
@@ -124,7 +124,6 @@ static void aha152x_detach(struct pcmcia_device *link)static int aha152x_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->io_lines =10 ;
drivers/scsi/pcmcia/fdomain_stub.c +0 -1
@@ -106,7 +106,6 @@ static void fdomain_detach(struct pcmcia_device *link)static int fdomain_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->io_lines =10 ;
drivers/scsi/pcmcia/nsp_cs.c +42 -68
132 lines not on this page · raw message
drivers/scsi/pcmcia/qlogic_stub.c +0 -1
@@ -179,7 +179,6 @@ static void qlogic_detach(struct pcmcia_device *link)static int qlogic_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->io_lines =10 ;
drivers/scsi/pcmcia/sym53c500_cs.c +0 -1
@@ -686,7 +686,6 @@ static struct scsi_host_template sym53c500_driver_template = {static int SYM53C500_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) { p_dev->io_lines =10 ;
drivers/serial/serial_cs.c +1 -9
@@ -427,16 +427,11 @@ static int pfc_config(struct pcmcia_device *p_dev)static int simple_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {static const int size_table[2 ] = {8 ,16 };int *try = priv_data; -if (cf->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = - cf->vpp1.param[CISTPL_POWER_VNOM ] /10000 ; - p_dev->io_lines = ((*try &0x1 ) ==0 ) ?16 : cf->io.flags &CISTPL_IO_LINES_MASK ;
@@ -452,7 +447,6 @@ static int simple_config_check(struct pcmcia_device *p_dev,static int simple_config_check_notpicky (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {static const unsigned int base[5 ] = {0x3f8 ,0x2f8 ,0x3e8 ,0x2e8 ,0x0 };
@@ -479,6 +473,7 @@ static int simple_config(struct pcmcia_device *link)/* First pass: look for a config entry that looks normal. * Two tries: without IO aliases, then with aliases */ + link->config_flags |=CONF_AUTO_SET_VPP ;for (try =0 ; try <4 ; try++)if (!pcmcia_loop_config (link, simple_config_check, &try)) goto found_port;
@@ -511,7 +506,6 @@ found_port:static int multi_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int *base2 = priv_data;
@@ -532,7 +526,6 @@ static int multi_config_check(struct pcmcia_device *p_dev,static int multi_config_check_notpicky (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int *base2 = priv_data;
@@ -621,7 +614,6 @@ static int multi_config(struct pcmcia_device *link)static int serial_check_for_multi (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {struct serial_info *info = p_dev->priv;
drivers/staging/comedi/drivers/cb_das16_cs.c +0 -1
@@ -712,7 +712,6 @@ static void das16cs_pcmcia_detach(struct pcmcia_device *link)static int das16cs_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )
drivers/staging/comedi/drivers/das08_cs.c +0 -1
@@ -194,7 +194,6 @@ static void das08_pcmcia_detach(struct pcmcia_device *link)static int das08_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )
drivers/staging/comedi/drivers/ni_daq_700.c +2 -8
@@ -532,19 +532,11 @@ static void dio700_cs_detach(struct pcmcia_device *link)static int dio700_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -578,6 +570,8 @@ static void dio700_config(struct pcmcia_device *link)dev_dbg (&link->dev,"dio700_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO ; + ret =pcmcia_loop_config (link, dio700_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/staging/comedi/drivers/ni_daq_dio24.c +2 -8
@@ -284,19 +284,11 @@ static void dio24_cs_detach(struct pcmcia_device *link)static int dio24_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -329,6 +321,8 @@ static void dio24_config(struct pcmcia_device *link)dev_dbg (&link->dev,"dio24_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO ; + ret =pcmcia_loop_config (link, dio24_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/staging/comedi/drivers/ni_labpc_cs.c +3 -8
@@ -263,19 +263,11 @@ static void labpc_cs_detach(struct pcmcia_device *link)static int labpc_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Does this card need audio output? */ -if (cfg->flags &CISTPL_CFTABLE_AUDIO ) - p_dev->config_flags |=CONF_ENABLE_SPKR ; - -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -307,6 +299,9 @@ static void labpc_config(struct pcmcia_device *link)dev_dbg (&link->dev,"labpc_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ | +CONF_AUTO_AUDIO ; + ret =pcmcia_loop_config (link, labpc_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/staging/comedi/drivers/ni_mio_cs.c +0 -1
@@ -302,7 +302,6 @@ static int mio_cs_resume(struct pcmcia_device *link)static int mio_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {int base, ret;
drivers/staging/comedi/drivers/quatech_daqp_cs.c +0 -1
@@ -1071,7 +1071,6 @@ static void daqp_cs_detach(struct pcmcia_device *link)static int daqp_pcmcia_config_loop (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )
drivers/telephony/ixj_pcmcia.c +0 -1
@@ -112,7 +112,6 @@ failed:static int ixj_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
drivers/usb/host/sl811_cs.c +3 -21
@@ -134,32 +134,11 @@ static void sl811_cs_release(struct pcmcia_device * link)static int sl811_cs_config_check (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cfg,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data) {if (cfg->index ==0 )return -ENODEV ; -/* Use power settings for Vcc and Vpp if present */ -/* Note that the CIS values need to be rescaled */ -if (cfg->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (cfg->vcc.param[CISTPL_POWER_VNOM ]/10000 != vcc) -return -ENODEV ; - }else if (dflt->vcc.present & (1 <<CISTPL_POWER_VNOM )) { -if (dflt->vcc.param[CISTPL_POWER_VNOM ]/10000 != vcc) -return -ENODEV ; - } - -if (cfg->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = - cfg->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; -else if (dflt->vpp1.present & (1 <<CISTPL_POWER_VNOM )) - p_dev->vpp = - dflt->vpp1.param[CISTPL_POWER_VNOM ]/10000 ; - -/* we need an interrupt */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; -/* IO window settings */ p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ;if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) {
@@ -184,6 +163,9 @@ static int sl811_cs_config(struct pcmcia_device *link)dev_dbg (&link->dev,"sl811_cs_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | +CONF_AUTO_CHECK_VCC ; +if (pcmcia_loop_config (link, sl811_cs_config_check,NULL )) goto failed;
include/pcmcia/ds.h +6 -1
@@ -177,7 +177,6 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev,int (*conf_check) (struct pcmcia_device *p_dev,cistpl_cftable_entry_t *cf,cistpl_cftable_entry_t *dflt, -unsigned int vcc,void *priv_data), void *priv_data);
@@ -270,6 +269,12 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)#define CONF_ENABLE_PULSE_IRQ 0x04#define CONF_ENABLE_ESR 0x08 +/* flags used by pcmcia_loop_config() autoconfiguration */ +#define CONF_AUTO_CHECK_VCC 0x10/* check for matching Vcc? */ +#define CONF_AUTO_SET_VPP 0x20/* set Vpp? */ +#define CONF_AUTO_AUDIO 0x40/* enable audio line? */ + +#endif /* __KERNEL__ */ #endif /* _LINUX_DS_H */
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 11/22 pcmcia: use autoconfiguration feature for ioports and iomem
In reply to Dominik BrodowskiWhen CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding fields in struct pcmcia_device *p_dev->resource[0,1,2] are set accordinly. Drivers wishing to override certain settings may do so in the callback function, but they no longer need to parse the CIS entries stored in cistpl_cftable_entry_t themselves.
--- Documentation/pcmcia/driver-changes.txt | 12 ++ drivers/ata/pata_pcmcia.c | 81 +++++--------- drivers/bluetooth/bt3c_cs.c | 53 +++++----- drivers/bluetooth/btuart_cs.c | 51 +++++---- drivers/bluetooth/dtl1_cs.c | 18 +-- drivers/char/pcmcia/cm4000_cs.c | 15 +-- drivers/char/pcmcia/cm4040_cs.c | 22 +--- drivers/char/pcmcia/ipwireless/main.c | 26 +--- drivers/char/pcmcia/synclink_cs.c | 16 +-- drivers/ide/ide-cs.c | 82 ++++--------- drivers/isdn/hardware/avm/avm_cs.c | 19 +--- drivers/isdn/hisax/avma1_cs.c | 22 +--- drivers/isdn/hisax/elsa_cs.c | 23 +--- drivers/isdn/hisax/sedlbauer_cs.c | 38 +----- drivers/isdn/hisax/teles_cs.c | 16 +-- drivers/net/pcmcia/axnet_cs.c | 32 +---- drivers/net/pcmcia/fmvj18x_cs.c | 5 +- drivers/net/pcmcia/pcnet_cs.c | 38 ++----- drivers/net/pcmcia/smc91c92_cs.c | 39 +++---- drivers/net/pcmcia/xirc2ps_cs.c | 69 ++++++----- drivers/net/wireless/airo_cs.c | 34 +----- drivers/net/wireless/atmel_cs.c | 28 +---- drivers/net/wireless/hostap/hostap_cs.c | 43 +------- drivers/net/wireless/libertas/if_cs.c | 16 +-- drivers/net/wireless/orinoco/orinoco_cs.c | 41 +------ drivers/net/wireless/orinoco/spectrum_cs.c | 45 +------- drivers/parport/parport_cs.c | 34 ++---- drivers/pcmcia/pcmcia_cis.c | 78 +++++++++++-- drivers/scsi/pcmcia/aha152x_stub.c | 34 +++--- drivers/scsi/pcmcia/fdomain_stub.c | 13 +-- drivers/scsi/pcmcia/nsp_cs.c | 47 ++------ drivers/scsi/pcmcia/qlogic_stub.c | 13 +-- drivers/scsi/pcmcia/sym53c500_cs.c | 13 +-- drivers/serial/serial_cs.c | 132 +++++++++++----------- drivers/staging/comedi/drivers/cb_das16_cs.c | 31 +----- drivers/staging/comedi/drivers/das08_cs.c | 33 +----- drivers/staging/comedi/drivers/ni_daq_700.c | 32 +----- drivers/staging/comedi/drivers/ni_daq_dio24.c | 32 +----- drivers/staging/comedi/drivers/ni_labpc_cs.c | 32 +----- drivers/staging/comedi/drivers/ni_mio_cs.c | 14 +-- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 32 +----- drivers/telephony/ixj_pcmcia.c | 32 ++---- drivers/usb/host/sl811_cs.c | 28 +---- include/pcmcia/ds.h | 30 ++---- 44 files changed, 517 insertions(+), 1027 deletions(-)
Documentation/pcmcia/driver-changes.txt +12 -0
@@ -1,4 +1,16 @@ This file details changes in 2.6 which affect PCMCIA card driver authors: +* pcmcia_loop_config() and autoconfiguration (as of 2.6.36) + If struct pcmcia_device *p_dev->config_flags is set accordingly, + pcmcia_loop_config() now sets up certain configuration values + automatically, though the driver may still override the settings + in the callback function. The following autoconfiguration options + are provided at the moment: + CONF_AUTO_CHECK_VCC : check for matching Vcc + CONF_AUTO_SET_VPP : set Vpp + CONF_AUTO_AUDIO : auto-enable audio line, if required + CONF_AUTO_SET_IO : set ioport resources (->resource[0,1]) + CONF_AUTO_SET_IOMEM : set first iomem resource (->resource[2]) + * pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36) pcmcia_request_configuration() got renamed to pcmcia_enable_device(), as it mirrors pcmcia_disable_device(). Configuration settings are now
drivers/ata/pata_pcmcia.c +26 -55
122 lines not on this page · raw message
drivers/bluetooth/bt3c_cs.c +27 -26
75 lines not on this page · raw message
drivers/bluetooth/btuart_cs.c +26 -25
74 lines not on this page · raw message
drivers/bluetooth/dtl1_cs.c +6 -12
@@ -571,10 +571,7 @@ static int dtl1_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->resource[0 ]->end =8 ; - - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ;return dtl1_config (link); }
@@ -589,17 +586,14 @@ static void dtl1_detach(struct pcmcia_device *link)kfree (info); } -static int dtl1_confcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int dtl1_confcheck (struct pcmcia_device *p_dev,void *priv_data) { -if ((cf->io.nwin !=1 ) || (cf->io.win[0 ].len <=8 )) +if ((p_dev->resource[1 ]->end) || (p_dev->resource[1 ]->end <8 ))return -ENODEV ; - p_dev->resource[0 ]->start = cf->io.win[0 ].base; - p_dev->resource[0 ]->end = cf->io.win[0 ].len;/*yo */ - p_dev->io_lines = cf->io.flags &CISTPL_IO_LINES_MASK ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; +return pcmcia_request_io (p_dev); }
drivers/char/pcmcia/cm4000_cs.c +3 -12
@@ -1741,19 +1741,8 @@ static void cmm_cm4000_release(struct pcmcia_device * link)/*==== Interface to PCMCIA Layer =======================================*/ -static int cm4000_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int cm4000_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if (!cfg->io.nwin) -return -ENODEV ; - - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; - p_dev->resource[0 ]->flags |=pcmcia_io_cfg_data_width (cfg->io.flags); - p_dev->io_lines = cfg->io.flags &CISTPL_IO_LINES_MASK ; -return pcmcia_request_io (p_dev); }
@@ -1761,6 +1750,8 @@ static int cm4000_config(struct pcmcia_device * link, int devno) {struct cm4000_dev *dev; + link->config_flags |=CONF_AUTO_SET_IO ; +/* read the config-tuples */ if (pcmcia_loop_config (link, cm4000_config_check,NULL )) goto cs_release;
drivers/char/pcmcia/cm4040_cs.c +4 -18
@@ -515,25 +515,9 @@ static void cm4040_reader_release(struct pcmcia_device *link)return ; } -static int cm4040_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int cm4040_config_check (struct pcmcia_device *p_dev,void *priv_data) { -int rc; -if (!cfg->io.nwin) -return -ENODEV ; - -/* Get the IOaddr */ - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; - p_dev->resource[0 ]->flags |=pcmcia_io_cfg_data_width (cfg->io.flags); - p_dev->io_lines = cfg->io.flags &CISTPL_IO_LINES_MASK ; - rc =pcmcia_request_io (p_dev); - -dev_printk (KERN_INFO , &p_dev->dev, -"pcmcia_request_io returned 0x%x\n" , rc); -return rc; +return pcmcia_request_io (p_dev); }
@@ -542,6 +526,8 @@ static int reader_config(struct pcmcia_device *link, int devno)struct reader_dev *dev;int fail_rc; + link->config_flags |=CONF_AUTO_SET_IO ; +if (pcmcia_loop_config (link, cm4040_config_check,NULL )) goto cs_release;
drivers/char/pcmcia/ipwireless/main.c +7 -19
@@ -75,22 +75,18 @@ static void signalled_reboot_callback(void *callback_data)schedule_work (&ipw->work_reboot); } -static int ipwireless_probe (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int ipwireless_probe (struct pcmcia_device *p_dev,void *priv_data) {struct ipw_dev *ipw = priv_data;struct resource *io_resource;int ret; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len;/* 0x40 causes it to generate level mode interrupts. */ /* 0x04 enables IREQ pin. */ - p_dev->config_index = cfg->index |0x44 ; + p_dev->config_index |=0x44 ; p_dev->io_lines =16 ; ret =pcmcia_request_io (p_dev);if (ret)
@@ -100,26 +96,18 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,resource_size (p_dev->resource[0 ]), IPWIRELESS_PCCARD_NAME); -if (cfg->mem.nwin ==0 ) -return 0 ; - p_dev->resource[2 ]->flags |=WIN_DATA_WIDTH_16 |WIN_MEMORY_TYPE_CM |WIN_ENABLE ; - p_dev->resource[2 ]->start = cfg->mem.win[0 ].host_addr; - p_dev->resource[2 ]->end = cfg->mem.win[0 ].len; -if (p_dev->resource[2 ]->end <0x1000 ) - p_dev->resource[2 ]->end =0x1000 ; ret =pcmcia_request_window (p_dev, p_dev->resource[2 ],0 );if (ret !=0 ) goto exit1; - ret =pcmcia_map_mem_page (p_dev, p_dev->resource[2 ], - cfg->mem.win[0 ].card_addr); + ret =pcmcia_map_mem_page (p_dev, p_dev->resource[2 ], p_dev->card_addr);if (ret !=0 ) goto exit2; - ipw->is_v2_card = cfg->mem.win[0 ].len ==0x100 ; + ipw->is_v2_card =resource_size (p_dev->resource[2 ]) ==0x100 ; ipw->attr_memory =ioremap (p_dev->resource[2 ]->start,resource_size (p_dev->resource[2 ]));
@@ -165,13 +153,13 @@ static int config_ipwireless(struct ipw_dev *ipw)int ret =0 ; ipw->is_v2_card =0 ; + link->config_flags |=CONF_AUTO_SET_IO |CONF_AUTO_SET_IOMEM | +CONF_ENABLE_IRQ ; ret =pcmcia_loop_config (link, ipwireless_probe, ipw);if (ret !=0 )return ret; - link->config_flags |=CONF_ENABLE_IRQ ; -INIT_WORK (&ipw->work_reboot, signalled_reboot_work); ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start,
drivers/char/pcmcia/synclink_cs.c +3 -13
@@ -561,19 +561,8 @@ static int mgslpc_probe(struct pcmcia_device *link)/* Card has been inserted. */ -static int mgslpc_ioprobe (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int mgslpc_ioprobe (struct pcmcia_device *p_dev,void *priv_data) { -if (!cfg->io.nwin) -return -ENODEV ; - - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; - p_dev->resource[0 ]->flags |=pcmcia_io_cfg_data_width (cfg->io.flags); - p_dev->io_lines = cfg->io.flags &CISTPL_IO_LINES_MASK ; -return pcmcia_request_io (p_dev); }
@@ -585,11 +574,12 @@ static int mgslpc_config(struct pcmcia_device *link)if (debug_level >=DEBUG_LEVEL_INFO )printk ("mgslpc_config(0x%p)\n" , link); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + ret =pcmcia_loop_config (link, mgslpc_ioprobe,NULL );if (ret !=0 ) goto failed; - link->config_flags |=CONF_ENABLE_IRQ ; link->config_index =8 ; link->config_regs =PRESENT_OPTION ;
drivers/ide/ide-cs.c +25 -57
121 lines not on this page · raw message
drivers/isdn/hardware/avm/avm_cs.c +5 -14
@@ -72,13 +72,8 @@ static void avmcs_detach(struct pcmcia_device *p_dev);static int avmcs_probe (struct pcmcia_device *p_dev) { - -/* The io structure describes IO port mapping */ - p_dev->resource[0 ]->end =16 ; - p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; -/* General socket configuration */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; p_dev->config_index =1 ; p_dev->config_regs =PRESENT_OPTION ;
@@ -107,16 +102,12 @@ static void avmcs_detach(struct pcmcia_device *link)======================================================================*/ -static int avmcs_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int avmcs_configcheck (struct pcmcia_device *p_dev,void *priv_data) { -if (cf->io.nwin <=0 ) -return -ENODEV ; + p_dev->resource[0 ]->end =16 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - p_dev->resource[0 ]->start = cf->io.win[0 ].base; - p_dev->resource[0 ]->end = cf->io.win[0 ].len;return pcmcia_request_io (p_dev); }
drivers/isdn/hisax/avma1_cs.c +6 -16
@@ -76,14 +76,8 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) {dev_dbg (&p_dev->dev,"avma1cs_attach()\n" ); -/* The io structure describes IO port mapping */ - p_dev->resource[0 ]->end =16 ; - p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - p_dev->resource[1 ]->end =16 ; - p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_16 ; -/* General socket configuration */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; + p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; p_dev->config_index =1 ; p_dev->config_regs =PRESENT_OPTION ;
@@ -114,17 +108,13 @@ static void __devexit avma1cs_detach(struct pcmcia_device *link)======================================================================*/ -static int avma1cs_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int avma1cs_configcheck (struct pcmcia_device *p_dev,void *priv_data) { -if (cf->io.nwin <=0 ) -return -ENODEV ; - - p_dev->resource[0 ]->start = cf->io.win[0 ].base; - p_dev->resource[0 ]->end = cf->io.win[0 ].len; + p_dev->resource[0 ]->end =16 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; p_dev->io_lines =5 ; +return pcmcia_request_io (p_dev); }
drivers/isdn/hisax/elsa_cs.c +7 -16
@@ -118,16 +118,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) local->cardnr =-1 ; -/* -General socket configuration defaults can go here. In this -client, we assume very little, and rely on the CIS for almost -everything. In most clients, many details (i.e., number, sizes, -and attributes of IO windows) are fixed by the nature of the -device, and can be hard-wired here. -*/ - link->resource[0 ]->end =8 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; -return elsa_cs_config (link); }/* elsa_cs_attach */
@@ -160,18 +150,17 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link)======================================================================*/ -static int elsa_cs_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int elsa_cs_configcheck (struct pcmcia_device *p_dev,void *priv_data) {int j; p_dev->io_lines =3 ; + p_dev->resource[0 ]->end =8 ; + p_dev->resource[0 ]->flags &=IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; -if ((cf->io.nwin >0 ) && cf->io.win[0 ].base) { +if ((p_dev->resource[0 ]->end) && p_dev->resource[0 ]->start) {printk (KERN_INFO "(elsa_cs: looks like the 96 model)\n" ); - p_dev->resource[0 ]->start = cf->io.win[0 ].base;if (!pcmcia_request_io (p_dev))return 0 ; }else {
@@ -194,6 +183,8 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)dev_dbg (&link->dev,"elsa_config(0x%p)\n" , link); dev = link->priv; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + i =pcmcia_loop_config (link, elsa_cs_configcheck,NULL );if (i !=0 ) goto failed;
drivers/isdn/hisax/sedlbauer_cs.c +6 -30
@@ -128,8 +128,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)/* from old sedl_cs */ /* The io structure describes IO port mapping */ - link->resource[0 ]->end =8 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ;return sedlbauer_config (link); }/* sedlbauer_attach */
@@ -161,35 +159,13 @@ static void __devexit sedlbauer_detach(struct pcmcia_device *link)device available to the system. ======================================================================*/ -static int sedlbauer_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int sedlbauer_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ - p_dev->io_lines =3 ; -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; - } +if (p_dev->config_index ==0 ) +return -EINVAL ; -return 0 ; + p_dev->io_lines =3 ; +return pcmcia_request_io (p_dev); }
@@ -202,7 +178,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)dev_dbg (&link->dev,"sedlbauer_config(0x%p)\n" , link); link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_CHECK_VCC | -CONF_AUTO_SET_VPP |CONF_AUTO_AUDIO ; +CONF_AUTO_SET_VPP |CONF_AUTO_AUDIO |CONF_AUTO_SET_IO ;/* In this loop, we scan the CIS for configuration table entries,
drivers/isdn/hisax/teles_cs.c +6 -10
@@ -105,10 +105,7 @@ static int __devinit teles_probe(struct pcmcia_device *link)and attributes of IO windows) are fixed by the nature of the device, and can be hard-wired here. */ - link->resource[0 ]->end =96 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ;return teles_cs_config (link); }/* teles_attach */
@@ -142,18 +139,17 @@ static void __devexit teles_detach(struct pcmcia_device *link)======================================================================*/ -static int teles_cs_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int teles_cs_configcheck (struct pcmcia_device *p_dev,void *priv_data) {int j; p_dev->io_lines =5 ; + p_dev->resource[0 ]->end =96 ; + p_dev->resource[0 ]->flags &=IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; -if ((cf->io.nwin >0 ) && cf->io.win[0 ].base) { +if ((p_dev->resource[0 ]->end) && p_dev->resource[0 ]->start) {printk (KERN_INFO "(teles_cs: looks like the 96 model)\n" ); - p_dev->resource[0 ]->start = cf->io.win[0 ].base;if (!pcmcia_request_io (p_dev))return 0 ; }else {
drivers/net/pcmcia/axnet_cs.c +7 -25
@@ -284,34 +284,16 @@ static int try_io_port(struct pcmcia_device *link) } } -static int axnet_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int axnet_configcheck (struct pcmcia_device *p_dev,void *priv_data) { -int i; -cistpl_io_t *io = &cfg->io; - -if (cfg->index ==0 || cfg->io.nwin ==0 ) -return -ENODEV ; +if (p_dev->config_index ==0 ) +return -EINVAL ; p_dev->config_index =0x05 ; -/* For multifunction cards, by convention, we configure the -network function with window 0, and serial with window 1 */ -if (io->nwin >1 ) { - i = (io->win[1 ].len > io->win[0 ].len); - p_dev->resource[1 ]->start = io->win[1 -i].base; - p_dev->resource[1 ]->end = io->win[1 -i].len; - }else { - i = p_dev->resource[1 ]->end =0 ; - } - p_dev->resource[0 ]->start = io->win[i].base; - p_dev->resource[0 ]->end = io->win[i].len; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; -if (p_dev->resource[0 ]->end + p_dev->resource[1 ]->end >=32 ) -return try_io_port (p_dev); +if (p_dev->resource[0 ]->end + p_dev->resource[1 ]->end <32 ) +return -ENODEV ; -return -ENODEV ; +return try_io_port (p_dev); }static int axnet_config (struct pcmcia_device *link)
@@ -324,6 +306,7 @@ static int axnet_config(struct pcmcia_device *link)/* don't trust the CIS on this; Linksys got it wrong */ link->config_regs =0x63 ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; ret =pcmcia_loop_config (link, axnet_configcheck,NULL );if (ret !=0 ) goto failed;
@@ -331,7 +314,6 @@ static int axnet_config(struct pcmcia_device *link)if (!link->irq) goto failed; - link->config_flags |=CONF_ENABLE_IRQ ;if (resource_size (link->resource[1 ]) ==8 ) link->config_flags |=CONF_ENABLE_SPKR ;
drivers/net/pcmcia/fmvj18x_cs.c +1 -4
@@ -319,10 +319,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link)return ret;/* RequestIO failed */ } -static int fmvj18x_ioprobe (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int fmvj18x_ioprobe (struct pcmcia_device *p_dev,void *priv_data) {return 0 ;/* strange, but that's what the code did already before... */ }
drivers/net/pcmcia/pcnet_cs.c +9 -29
@@ -259,7 +259,7 @@ static int pcnet_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = dev; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; dev->netdev_ops = &pcnet_netdev_ops;
@@ -500,42 +500,22 @@ static int try_io_port(struct pcmcia_device *link) } } -static int pcnet_confcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int pcnet_confcheck (struct pcmcia_device *p_dev,void *priv_data) {int *priv = priv_data;int try = (*priv &0x1 ); -int i; -cistpl_io_t *io = &cfg->io; -if (cfg->index ==0 || cfg->io.nwin ==0 ) -return -EINVAL ; + *priv &= (p_dev->resource[2 ]->end >=0x4000 ) ?0x10 : ~0x10 ; -/* For multifunction cards, by convention, we configure the -network function with window 0, and serial with window 1 */ -if (io->nwin >1 ) { - i = (io->win[1 ].len > io->win[0 ].len); - p_dev->resource[1 ]->start = io->win[1 -i].base; - p_dev->resource[1 ]->end = io->win[1 -i].len; - }else { - i = p_dev->resource[1 ]->end =0 ; - } +if (p_dev->config_index ==0 ) +return -EINVAL ; - *priv &= ((cfg->mem.nwin ==1 ) && - (cfg->mem.win[0 ].len >=0x4000 )) ?0x10 : ~0x10 ; +if (p_dev->resource[0 ]->end + p_dev->resource[1 ]->end <32 ) +return -EINVAL ; - p_dev->resource[0 ]->start = io->win[i].base; - p_dev->resource[0 ]->end = io->win[i].len; -if (!try) - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; -else +if (try) p_dev->io_lines =16 ; -if (p_dev->resource[0 ]->end + p_dev->resource[1 ]->end >=32 ) -return try_io_port (p_dev); - -return -EINVAL ; +return try_io_port (p_dev); } static hw_info_t *pcnet_try_config(struct pcmcia_device *link,
drivers/net/pcmcia/smc91c92_cs.c +19 -20
@@ -323,9 +323,6 @@ static int smc91c92_probe(struct pcmcia_device *link) link->priv = dev;spin_lock_init (&smc->lock); - link->resource[0 ]->end =16 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->config_flags |=CONF_ENABLE_IRQ ;/* The SMC91c92-specific entries in the device structure. */ dev->netdev_ops = &smc_netdev_ops;
@@ -417,18 +414,21 @@ static int mhz_3288_power(struct pcmcia_device *link)return 0 ; } -static int mhz_mfc_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int mhz_mfc_config_check (struct pcmcia_device *p_dev,void *priv_data) {int k; - p_dev->resource[1 ]->start = cf->io.win[0 ].base; + p_dev->io_lines =16 ; + p_dev->resource[1 ]->start = p_dev->resource[0 ]->start; + p_dev->resource[1 ]->end =8 ; + p_dev->resource[1 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; + p_dev->resource[0 ]->end =16 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;for (k =0 ; k <0x400 ; k +=0x10 ) {if (k &0x80 )continue ; p_dev->resource[0 ]->start = k ^0x300 ; - p_dev->io_lines =16 ;if (!pcmcia_request_io (p_dev))return 0 ; }
@@ -442,9 +442,8 @@ static int mhz_mfc_config(struct pcmcia_device *link)unsigned int offset;int i; - link->config_flags |=CONF_ENABLE_SPKR ; - link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->resource[1 ]->end =8 ; + link->config_flags |=CONF_ENABLE_SPKR |CONF_ENABLE_IRQ | +CONF_AUTO_SET_IO ;/* The Megahertz combo cards have modem-like CIS entries, so we have to explicitly try a bunch of port combinations. */
@@ -586,13 +585,12 @@ static int mot_setup(struct pcmcia_device *link)/*====================================================================*/ -static int smc_configcheck (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int smc_configcheck (struct pcmcia_device *p_dev,void *priv_data) { - p_dev->resource[0 ]->start = cf->io.win[0 ].base; - p_dev->io_lines = cf->io.flags &CISTPL_IO_LINES_MASK ; + p_dev->resource[0 ]->end =16 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; +return pcmcia_request_io (p_dev); }
@@ -601,7 +599,8 @@ static int smc_config(struct pcmcia_device *link)struct net_device *dev = link->priv;int i; - link->resource[0 ]->end =16 ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + i =pcmcia_loop_config (link, smc_configcheck,NULL );if (!i) dev->base_addr = link->resource[0 ]->start;
@@ -634,7 +633,7 @@ static int osi_config(struct pcmcia_device *link)static const unsigned int com[4 ] = {0x3f8 ,0x2f8 ,0x3e8 ,0x2e8 };int i, j; - link->config_flags |=CONF_ENABLE_SPKR ; + link->config_flags |=CONF_ENABLE_SPKR |CONF_ENABLE_IRQ ; link->resource[0 ]->end =64 ; link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; link->resource[1 ]->end =8 ;
drivers/net/pcmcia/xirc2ps_cs.c +38 -31
115 lines not on this page · raw message
drivers/net/wireless/airo_cs.c +5 -29
@@ -137,36 +137,12 @@ static void airo_detach(struct pcmcia_device *link)======================================================================*/ -static int airo_cs_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int airo_cs_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } - } - -/* This reserves IO space but doesn't actually enable it */ -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* If we got this far, we're cool! */ -return 0 ; +return pcmcia_request_io (p_dev); }
@@ -180,7 +156,7 @@ static int airo_config(struct pcmcia_device *link)dev_dbg (&link->dev,"airo_config\n" ); link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | -CONF_AUTO_AUDIO ; +CONF_AUTO_AUDIO |CONF_AUTO_SET_IO ;/* * In this loop, we scan the CIS for configuration table
drivers/net/wireless/atmel_cs.c +4 -24
@@ -154,31 +154,11 @@ static int card_present(void *arg)return 0 ; } -static int atmel_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int atmel_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } - } +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* This reserves IO space but doesn't actually enable it */ return pcmcia_request_io (p_dev); }
@@ -194,7 +174,7 @@ static int atmel_config(struct pcmcia_device *link)dev_dbg (&link->dev,"atmel_config\n" ); link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | -CONF_AUTO_AUDIO ; +CONF_AUTO_AUDIO |CONF_AUTO_SET_IO ;/* In this loop, we scan the CIS for configuration table entries,
drivers/net/wireless/hostap/hostap_cs.c +4 -39
57 lines not on this page · raw message
drivers/net/wireless/libertas/if_cs.c +5 -11
@@ -794,20 +794,12 @@ static void if_cs_release(struct pcmcia_device *p_dev)* insertion event. */ -static int if_cs_ioprobe (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int if_cs_ioprobe (struct pcmcia_device *p_dev,void *priv_data) { + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; - -/* IO window settings */ -if (cfg->io.nwin !=1 ) { +if (p_dev->resource[1 ]->end) {lbs_pr_err ("wrong CIS (check number of IO windows)\n" );return -ENODEV ; }
@@ -833,6 +825,8 @@ static int if_cs_probe(struct pcmcia_device *p_dev) card->p_dev = p_dev; p_dev->priv = card; + p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; +if (pcmcia_loop_config (p_dev, if_cs_ioprobe,NULL )) {lbs_pr_err ("error in pcmcia_loop_config\n" ); goto out1;
drivers/net/wireless/orinoco/orinoco_cs.c +6 -35
55 lines not on this page · raw message
drivers/net/wireless/orinoco/spectrum_cs.c +5 -40
60 lines not on this page · raw message
drivers/parport/parport_cs.c +11 -23
@@ -100,9 +100,7 @@ static int parport_probe(struct pcmcia_device *link) link->priv = info; info->p_dev = link; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ;return parport_config (link); }/* parport_attach */
@@ -133,27 +131,14 @@ static void parport_detach(struct pcmcia_device *link)======================================================================*/ -static int parport_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int parport_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; -if (epp_mode) - p_dev->config_index |=FORCE_EPP_MODE ; - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin ==2 ) { - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; -return 0 ; - } -return -ENODEV ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; + p_dev->resource[1 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; + +return pcmcia_request_io (p_dev); }static int parport_config (struct pcmcia_device *link)
@@ -164,6 +149,9 @@ static int parport_config(struct pcmcia_device *link)dev_dbg (&link->dev,"parport_config\n" ); +if (epp_mode) + link->config_index |=FORCE_EPP_MODE ; + ret =pcmcia_loop_config (link, parport_config_check,NULL );if (ret) goto failed;
drivers/pcmcia/pcmcia_cis.c +67 -11
111 lines not on this page · raw message
drivers/scsi/pcmcia/aha152x_stub.c +16 -18
@@ -99,9 +99,7 @@ static int aha152x_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - link->resource[0 ]->end =0x20 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; link->config_regs =PRESENT_OPTION ;return aha152x_config_cs (link);
@@ -121,24 +119,24 @@ static void aha152x_detach(struct pcmcia_device *link)/*====================================================================*/ -static int aha152x_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int aha152x_config_check (struct pcmcia_device *p_dev,void *priv_data) { p_dev->io_lines =10 ; +/* For New Media T&J, look for a SCSI window */ -if (cfg->io.win[0 ].len >=0x20 ) - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; -else if ((cfg->io.nwin >1 ) && - (cfg->io.win[1 ].len >=0x20 )) - p_dev->resource[0 ]->start = cfg->io.win[1 ].base; -if ((cfg->io.nwin >0 ) && - (p_dev->resource[0 ]->start <0xffff )) { -if (!pcmcia_request_io (p_dev)) -return 0 ; - } -return -EINVAL ; +if ((p_dev->resource[0 ]->end <0x20 ) && + (p_dev->resource[1 ]->end >=0x20 )) + p_dev->resource[0 ]->start = p_dev->resource[1 ]->start; + +if (p_dev->resource[0 ]->start >=0xffff ) +return -EINVAL ; + + p_dev->resource[1 ]->start = p_dev->resource[1 ]->end =0 ; + p_dev->resource[0 ]->end =0x20 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; + +return pcmcia_request_io (p_dev); }static int aha152x_config_cs (struct pcmcia_device *link)
drivers/scsi/pcmcia/fdomain_stub.c +5 -8
@@ -82,9 +82,7 @@ static int fdomain_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - link->resource[0 ]->end =0x10 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; link->config_regs =PRESENT_OPTION ;return fdomain_config (link);
@@ -103,13 +101,12 @@ static void fdomain_detach(struct pcmcia_device *link)/*====================================================================*/ -static int fdomain_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int fdomain_config_check (struct pcmcia_device *p_dev,void *priv_data) { p_dev->io_lines =10 ; - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; + p_dev->resource[0 ]->end =0x10 ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;return pcmcia_request_io (p_dev); }
drivers/scsi/pcmcia/nsp_cs.c +9 -38
79 lines not on this page · raw message
drivers/scsi/pcmcia/qlogic_stub.c +4 -9
@@ -155,9 +155,7 @@ static int qlogic_probe(struct pcmcia_device *link)return -ENOMEM ; info->p_dev = link; link->priv = info; - link->resource[0 ]->end =16 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; link->config_regs =PRESENT_OPTION ;return qlogic_config (link);
@@ -176,14 +174,11 @@ static void qlogic_detach(struct pcmcia_device *link)/*====================================================================*/ -static int qlogic_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int qlogic_config_check (struct pcmcia_device *p_dev,void *priv_data) { p_dev->io_lines =10 ; - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;if (p_dev->resource[0 ]->start ==0 )return -ENODEV ;
drivers/scsi/pcmcia/sym53c500_cs.c +4 -9
@@ -683,14 +683,11 @@ static struct scsi_host_template sym53c500_driver_template = { .shost_attrs = SYM53C500_shost_attrs }; -static int SYM53C500_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int SYM53C500_config_check (struct pcmcia_device *p_dev,void *priv_data) { p_dev->io_lines =10 ; - p_dev->resource[0 ]->start = cfg->io.win[0 ].base; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ;if (p_dev->resource[0 ]->start ==0 )return -ENODEV ;
@@ -857,9 +854,7 @@ SYM53C500_probe(struct pcmcia_device *link)return -ENOMEM ; info->p_dev = link; link->priv = info; - link->resource[0 ]->end =16 ; - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_AUTO ; - link->config_flags |=CONF_ENABLE_IRQ ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ;return SYM53C500_config (link); }/* SYM53C500_attach */
drivers/serial/serial_cs.c +67 -65
200 lines not on this page · raw message
drivers/staging/comedi/drivers/cb_das16_cs.c +5 -26
@@ -710,36 +710,12 @@ static void das16cs_pcmcia_detach(struct pcmcia_device *link)static int das16cs_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt,void *priv_data) { -if (cfg->index ==0 ) +if (p_dev->config_index ==0 )return -EINVAL ; -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ -return pcmcia_request_io (p_dev); - } - -return 0 ; +return pcmcia_request_io (p_dev); }static void das16cs_pcmcia_config (struct pcmcia_device *link)
@@ -748,6 +724,9 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link)dev_dbg (&link->dev,"das16cs_pcmcia_config\n" ); +/* Do we need to allocate an interrupt? */ + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + ret =pcmcia_loop_config (link, das16cs_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/staging/comedi/drivers/das08_cs.c +6 -27
@@ -192,35 +192,12 @@ static void das08_pcmcia_detach(struct pcmcia_device *link)static int das08_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ -return pcmcia_request_io (p_dev); - } -return 0 ; +if (p_dev->config_index ==0 ) +return -EINVAL ; + +return pcmcia_request_io (p_dev); }
@@ -238,6 +215,8 @@ static void das08_pcmcia_config(struct pcmcia_device *link)dev_dbg (&link->dev,"das08_pcmcia_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + ret =pcmcia_loop_config (link, das08_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/staging/comedi/drivers/ni_daq_700.c +5 -27
@@ -530,35 +530,12 @@ static void dio700_cs_detach(struct pcmcia_device *link)======================================================================*/ static int dio700_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; - } +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* If we got this far, we're cool! */ -return 0 ; +return pcmcia_request_io (p_dev); }static void dio700_config (struct pcmcia_device *link)
@@ -570,7 +547,8 @@ static void dio700_config(struct pcmcia_device *link)dev_dbg (&link->dev,"dio700_config\n" ); - link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO | +CONF_AUTO_SET_IO ; ret =pcmcia_loop_config (link, dio700_pcmcia_config_loop,NULL );if (ret) {
drivers/staging/comedi/drivers/ni_daq_dio24.c +5 -27
@@ -282,35 +282,12 @@ static void dio24_cs_detach(struct pcmcia_device *link)======================================================================*/ static int dio24_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; - } +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* If we got this far, we're cool! */ -return 0 ; +return pcmcia_request_io (p_dev); }static void dio24_config (struct pcmcia_device *link)
@@ -321,7 +298,8 @@ static void dio24_config(struct pcmcia_device *link)dev_dbg (&link->dev,"dio24_config\n" ); - link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO ; + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_AUDIO | +CONF_AUTO_SET_IO ; ret =pcmcia_loop_config (link, dio24_pcmcia_config_loop,NULL );if (ret) {
drivers/staging/comedi/drivers/ni_labpc_cs.c +4 -28
@@ -261,35 +261,12 @@ static void labpc_cs_detach(struct pcmcia_device *link)======================================================================*/ static int labpc_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -/* This reserves IO space but doesn't actually enable it */ -if (pcmcia_request_io (p_dev) !=0 ) -return -ENODEV ; - } +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* If we got this far, we're cool! */ -return 0 ; +return pcmcia_request_io (p_dev); }
@@ -300,7 +277,7 @@ static void labpc_config(struct pcmcia_device *link)dev_dbg (&link->dev,"labpc_config\n" ); link->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ | -CONF_AUTO_AUDIO ; +CONF_AUTO_AUDIO |CONF_AUTO_SET_IO ; ret =pcmcia_loop_config (link, labpc_pcmcia_config_loop,NULL );if (ret) {
@@ -316,7 +293,6 @@ static void labpc_config(struct pcmcia_device *link)the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - p_dev->config_flags |=CONF_ENABLE_IRQ |CONF_ENABLE_PULSE_IRQ ; ret =pcmcia_enable_device (link);if (ret) goto failed;
drivers/staging/comedi/drivers/ni_mio_cs.c +4 -10
@@ -262,10 +262,6 @@ static struct pcmcia_device *cur_dev = NULL;static int cs_attach (struct pcmcia_device *link) { - link->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ; - link->resource[0 ]->end =16 ; - link->config_flags |=CONF_ENABLE_IRQ ; - cur_dev = link;mio_cs_config (link);
@@ -299,15 +295,12 @@ static int mio_cs_resume(struct pcmcia_device *link) } -static int mio_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int mio_pcmcia_config_loop (struct pcmcia_device *p_dev,void *priv_data) {int base, ret; - p_dev->resource[0 ]->end = cfg->io.win[0 ].len; - p_dev->io_lines = cfg->io.flags &CISTPL_IO_LINES_MASK ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_16 ;for (base =0x000 ; base <0x400 ; base +=0x20 ) { p_dev->resource[0 ]->start = base;
@@ -324,6 +317,7 @@ static void mio_cs_config(struct pcmcia_device *link)int ret;DPRINTK ("mio_cs_config(link=%p)\n" , link); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; ret =pcmcia_loop_config (link, mio_pcmcia_config_loop,NULL );if (ret) {
drivers/staging/comedi/drivers/quatech_daqp_cs.c +5 -27
@@ -1068,35 +1068,11 @@ static void daqp_cs_detach(struct pcmcia_device *link)======================================================================*/ -static int daqp_pcmcia_config_loop (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int daqp_pcmcia_config_loop (struct pcmcia_device *p_dev,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* Do we need to allocate an interrupt? */ - p_dev->config_flags |=CONF_ENABLE_IRQ ; - -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; - p_dev->resource[0 ]->flags |= -pcmcia_io_cfg_data_width (io->flags); - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; -if (io->nwin >1 ) { - p_dev->resource[1 ]->flags = p_dev->resource[0 ]->flags; - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } - } - -/* This reserves IO space but doesn't actually enable it */ return pcmcia_request_io (p_dev); }
@@ -1106,6 +1082,8 @@ static void daqp_cs_config(struct pcmcia_device *link)dev_dbg (&link->dev,"daqp_cs_config\n" ); + link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_IO ; + ret =pcmcia_loop_config (link, daqp_pcmcia_config_loop,NULL );if (ret) {dev_warn (&link->dev,"no configuration found\n" );
drivers/telephony/ixj_pcmcia.c +11 -21
@@ -31,8 +31,6 @@ static int ixj_probe(struct pcmcia_device *p_dev) {dev_dbg (&p_dev->dev,"ixj_attach()\n" );/* Create new ixj device */ - p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; p_dev->priv =kzalloc (sizeof (struct ixj_info_t ),GFP_KERNEL );if (!p_dev->priv) {return -ENOMEM ;
@@ -109,36 +107,28 @@ failed:return ; } -static int ixj_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int ixj_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; - p_dev->io_lines =3 ; -if (io->nwin ==2 ) { - p_dev->resource[1 ]->start = io->win[1 ].base; - p_dev->resource[1 ]->end = io->win[1 ].len; - } -if (!pcmcia_request_io (p_dev)) -return 0 ; - } -return -ENODEV ; + p_dev->resource[0 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; + p_dev->resource[1 ]->flags &= ~IO_DATA_PATH_WIDTH ; + p_dev->resource[1 ]->flags |=IO_DATA_PATH_WIDTH_8 ; + p_dev->io_lines =3 ; + +return pcmcia_request_io (p_dev); }static int ixj_config (struct pcmcia_device * link) {IXJ *j;ixj_info_t *info; -cistpl_cftable_entry_t dflt = {0 }; info = link->priv;dev_dbg (&link->dev,"ixj_config\n" ); -if (pcmcia_loop_config (link, ixj_config_check, &dflt)) + link->config_flags =CONF_AUTO_SET_IO ; + +if (pcmcia_loop_config (link, ixj_config_check,NULL )) goto failed;if (pcmcia_enable_device (link))
drivers/usb/host/sl811_cs.c +5 -21
@@ -131,28 +131,12 @@ static void sl811_cs_release(struct pcmcia_device * link)platform_device_unregister (&platform_dev); } -static int sl811_cs_config_check (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cfg, -cistpl_cftable_entry_t *dflt, -void *priv_data) +static int sl811_cs_config_check (struct pcmcia_device *p_dev,void *priv_data) { -if (cfg->index ==0 ) -return -ENODEV ; +if (p_dev->config_index ==0 ) +return -EINVAL ; -/* IO window settings */ - p_dev->resource[0 ]->end = p_dev->resource[1 ]->end =0 ; -if ((cfg->io.nwin >0 ) || (dflt->io.nwin >0 )) { -cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; - p_dev->io_lines = io->flags &CISTPL_IO_LINES_MASK ; - - p_dev->resource[0 ]->flags |=IO_DATA_PATH_WIDTH_8 ; - p_dev->resource[0 ]->start = io->win[0 ].base; - p_dev->resource[0 ]->end = io->win[0 ].len; - -return pcmcia_request_io (p_dev); - } -pcmcia_disable_device (p_dev); -return -ENODEV ; +return pcmcia_request_io (p_dev); }
@@ -164,7 +148,7 @@ static int sl811_cs_config(struct pcmcia_device *link)dev_dbg (&link->dev,"sl811_cs_config\n" ); link->config_flags |=CONF_ENABLE_IRQ |CONF_AUTO_SET_VPP | -CONF_AUTO_CHECK_VCC ; +CONF_AUTO_CHECK_VCC |CONF_AUTO_SET_IO ;if (pcmcia_loop_config (link, sl811_cs_config_check,NULL )) goto failed;
include/pcmcia/ds.h +10 -20
@@ -93,6 +93,7 @@ struct pcmcia_device {/* device setup */ unsigned int irq;struct resource *resource[PCMCIA_NUM_RESOURCES ]; +resource_size_t card_addr;/* for the 1st IOMEM resource */ unsigned int vpp;unsigned int config_flags;/* CONF_ENABLE_ flags below */
@@ -175,8 +176,6 @@ int pcmcia_parse_tuple(tuple_t *tuple, cisparse_t *parse);/* loop CIS entries for valid configuration */ int pcmcia_loop_config (struct pcmcia_device *p_dev,int (*conf_check) (struct pcmcia_device *p_dev, -cistpl_cftable_entry_t *cf, -cistpl_cftable_entry_t *dflt,void *priv_data),void *priv_data);
@@ -225,16 +224,6 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev);#define IO_DATA_PATH_WIDTH_16 0x08#define IO_DATA_PATH_WIDTH_AUTO 0x10 -/* convert flag found in cfgtable to data path width parameter */ -static inline int pcmcia_io_cfg_data_width (unsigned int flags) -{ -if (!(flags &CISTPL_IO_8BIT )) -return IO_DATA_PATH_WIDTH_16 ; -if (!(flags &CISTPL_IO_16BIT )) -return IO_DATA_PATH_WIDTH_8 ; -return IO_DATA_PATH_WIDTH_AUTO ; -} -/* IO memory */ #define WIN_MEMORY_TYPE_CM 0x00/* default */ #define WIN_MEMORY_TYPE_AM 0x20/* MAP_ATTRIB */
@@ -264,16 +253,17 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)#define PRESENT_IOSIZE 0x200/* flags to be passed to pcmcia_enable_device() */ -#define CONF_ENABLE_IRQ 0x01 -#define CONF_ENABLE_SPKR 0x02 -#define CONF_ENABLE_PULSE_IRQ 0x04 -#define CONF_ENABLE_ESR 0x08 +#define CONF_ENABLE_IRQ 0x0001 +#define CONF_ENABLE_SPKR 0x0002 +#define CONF_ENABLE_PULSE_IRQ 0x0004 +#define CONF_ENABLE_ESR 0x0008/* flags used by pcmcia_loop_config() autoconfiguration */ -#define CONF_AUTO_CHECK_VCC 0x10/* check for matching Vcc? */ -#define CONF_AUTO_SET_VPP 0x20/* set Vpp? */ -#define CONF_AUTO_AUDIO 0x40/* enable audio line? */ - +#define CONF_AUTO_CHECK_VCC 0x0100/* check for matching Vcc? */ +#define CONF_AUTO_SET_VPP 0x0200/* set Vpp? */ +#define CONF_AUTO_AUDIO 0x0400/* enable audio line? */ +#define CONF_AUTO_SET_IO 0x0800/* set ->resource[0,1] */ +#define CONF_AUTO_SET_IOMEM 0x1000/* set ->resource[2] */ #endif /* __KERNEL__ */
Signature · 1 line
1.7.0.4
Dominik Brodowski
maintainerPATCH 12/22 pcmcia: remove the "Finally, report what we've done" message
In reply to Dominik BrodowskiRemove this unnecessary message -- this info is either available in sysfs or by enabling dynamic debug from the PCMCIA core.
--- drivers/char/pcmcia/synclink_cs.c | 7 ------- drivers/isdn/hisax/avma1_cs.c | 3 --- drivers/isdn/hisax/elsa_cs.c | 10 ---------- drivers/isdn/hisax/sedlbauer_cs.c | 12 ------------ drivers/isdn/hisax/teles_cs.c | 10 ---------- drivers/net/wireless/airo_cs.c | 11 ----------- drivers/net/wireless/hostap/hostap_cs.c | 15 +-------------- drivers/pcmcia/ds.c | 7 +++++++ drivers/scsi/pcmcia/nsp_cs.c | 15 --------------- drivers/staging/comedi/drivers/cb_das16_cs.c | 9 --------- drivers/staging/comedi/drivers/das08_cs.c | 9 --------- drivers/staging/comedi/drivers/ni_daq_700.c | 9 --------- drivers/staging/comedi/drivers/ni_daq_dio24.c | 9 --------- drivers/staging/comedi/drivers/ni_labpc_cs.c | 9 --------- drivers/staging/comedi/drivers/quatech_daqp_cs.c | 9 --------- drivers/usb/host/sl811_cs.c | 8 -------- 16 files changed, 8 insertions(+), 144 deletions(-)
drivers/char/pcmcia/synclink_cs.c +0 -7
@@ -592,13 +592,6 @@ static int mgslpc_config(struct pcmcia_device *link) info->io_base = link->resource[0 ]->start; info->irq_level = link->irq; - -dev_info (&link->dev,"index 0x%02x:" , - link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (", io %pR" , link->resource[0 ]); -printk ("\n" );return 0 ; failed:
drivers/isdn/hisax/avma1_cs.c +0 -3
@@ -162,9 +162,6 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)return -ENODEV ; } -printk (KERN_NOTICE "avma1_cs: checking at i/o %#x, irq %d\n" , - (unsigned int ) link->resource[0 ]->start, link->irq); - icard.para[0 ] = link->irq; icard.para[1 ] = link->resource[0 ]->start; icard.protocol = isdnprot;
drivers/isdn/hisax/elsa_cs.c +0 -10
@@ -196,16 +196,6 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)if (i !=0 ) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x: " , - link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); - icard.para[0 ] = link->irq; icard.para[1 ] = link->resource[0 ]->start; icard.protocol = protocol;
drivers/isdn/hisax/sedlbauer_cs.c +0 -12
@@ -205,18 +205,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x:" , - link->config_index); -if (link->vpp) -printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); - icard.para[0 ] = link->irq; icard.para[1 ] = link->resource[0 ]->start; icard.protocol = protocol;
drivers/isdn/hisax/teles_cs.c +0 -10
@@ -183,16 +183,6 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)if (i !=0 ) goto cs_failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x:" , - link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); - icard.para[0 ] = link->irq; icard.para[1 ] = link->resource[0 ]->start; icard.protocol = protocol;
drivers/net/wireless/airo_cs.c +0 -11
@@ -193,17 +193,6 @@ static int airo_config(struct pcmcia_device *link)if (!((local_info_t *)link->priv)->eth_dev) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x: " , - link->config_index); -if (link->vpp) -printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" );return 0 ; failed:
drivers/net/wireless/hostap/hostap_cs.c +1 -14
@@ -544,19 +544,6 @@ static int prism2_config(struct pcmcia_device *link)spin_unlock_irqrestore (&local->irq_init_lock, flags); -/* Finally, report what we've done */ -printk (KERN_INFO "%s: index 0x%02x: " , - dev_info, link->config_index); -if (link->vpp) -printk (", Vpp %d.%d" , link->vpp /10 , - link->vpp %10 ); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); - local->shutdown =0 ;sandisk_enable_wireless (dev);
@@ -568,7 +555,7 @@ static int prism2_config(struct pcmcia_device *link)return ret; failed_unlock: -spin_unlock_irqrestore (&local->irq_init_lock, flags); +spin_unlock_irqrestore (&local->irq_init_lock, flags); failed:kfree (hw_priv);prism2_release ((u_long )link);
drivers/pcmcia/ds.c +7 -0
@@ -277,6 +277,8 @@ static int pcmcia_device_probe(struct device *dev)if (!ret) { p_dev->config_base = cis_config.base; p_dev->config_regs = cis_config.rmask[0 ]; +dev_dbg (dev,"base %x, regs %x" , p_dev->config_base, + p_dev->config_regs); }else {dev_printk (KERN_INFO , dev,"pcmcia: could not parse base and rmask0 of CIS\n" );
@@ -290,6 +292,11 @@ static int pcmcia_device_probe(struct device *dev) p_drv->drv.name, ret); goto put_module; } +dev_dbg (dev,"%s bound: Vpp %d.%d, idx %x, IRQ %d" , p_drv->drv.name, + p_dev->vpp/10 , p_dev->vpp%10 , p_dev->config_index, p_dev->irq); +dev_dbg (dev,"resources: ioport %pR %pR iomem %pR %pR %pR" , + p_dev->resource[0 ], p_dev->resource[1 ], p_dev->resource[2 ], + p_dev->resource[3 ], p_dev->resource[4 ]);mutex_lock (&s->ops_mutex); if ((s->pcmcia_pfc) &&
drivers/scsi/pcmcia/nsp_cs.c +0 -15
@@ -1687,21 +1687,6 @@ static int nsp_cs_config(struct pcmcia_device *link) info->host = host; -/* Finally, report what we've done */ -printk (KERN_INFO "nsp_cs: index 0x%02x: " , - link->config_index); -if (link->vpp) { -printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); - } -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (", io %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -if (link->resource[2 ]) -printk (", mem %pR" , link->resource[2 ]); -printk ("\n" ); -return 0 ; cs_failed:
drivers/staging/comedi/drivers/cb_das16_cs.c +0 -9
@@ -745,15 +745,6 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %u" , link->irq); -if (link->resource[0 ]) -printk (", io %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (", io %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/staging/comedi/drivers/das08_cs.c +0 -9
@@ -235,15 +235,6 @@ static void das08_pcmcia_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %u" , link->irq); -if (link->resource[0 ]) -printk (", io %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/staging/comedi/drivers/ni_daq_700.c +0 -9
@@ -568,15 +568,6 @@ static void dio700_config(struct pcmcia_device *link)if (ret !=0 ) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (", io %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/staging/comedi/drivers/ni_daq_dio24.c +0 -9
@@ -319,15 +319,6 @@ static void dio24_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/staging/comedi/drivers/ni_labpc_cs.c +0 -9
@@ -297,15 +297,6 @@ static void labpc_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %d" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/staging/comedi/drivers/quatech_daqp_cs.c +0 -9
@@ -1103,15 +1103,6 @@ static void daqp_cs_config(struct pcmcia_device *link)if (ret) goto failed; -/* Finally, report what we've done */ -dev_info (&link->dev,"index 0x%02x" , link->config_index); -printk (", irq %u" , link->irq); -if (link->resource[0 ]) -printk (" & %pR" , link->resource[0 ]); -if (link->resource[1 ]) -printk (" & %pR" , link->resource[1 ]); -printk ("\n" ); -return ; failed:
drivers/usb/host/sl811_cs.c +0 -8
@@ -164,14 +164,6 @@ static int sl811_cs_config(struct pcmcia_device *link)if (ret) goto failed; -dev_info (&link->dev,"index 0x%02x: " , - link->config_index); -if (link->vpp) -printk (", Vpp %d.%d" , link->vpp/10 , link->vpp%10 ); -printk (", irq %d" , link->irq); -printk (", io %pR" , link->resource[0 ]); -printk ("\n" ); -if (sl811_hc_init (parent, link->resource[0 ]->start, link->irq) <0 ) { failed:
Signature · 1 line
1.7.0.4