summaryrefslogtreecommitdiffstats
path: root/include/pcmcia
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner2019-06-196-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 2 normalized pattern(s): 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 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 # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* pcmcia: remove long deprecated pcmcia_request_exclusive_irq() functionLinus Torvalds2018-08-181-10/+0
| | | | | | | | | | | | | | This function was created as a deprecated fallback case back in 2010 by commit eb14120f743d ("pcmcia: re-work pcmcia_request_irq()") for legacy cases. Actual in-kernel users haven't been around for a long while. The last in-kernel user was apparently removed four years ago by commit 5f5316fcd08e ("am2150: Update nmclan_cs.c to use update PCMCIA API"). Just remove it entirely. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplateH Hartley Sweeten2013-03-151-0/+12
| | | | | | | | | | | Introduce the module_pcmcia_driver() macro which is a convenience macro for pcmcia driver modules. It is intended to be used by pcmcia drivers with init/exit sections that do nothing but register/unregister the pcmcia driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds2011-07-311-0/+9
|\ | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: smc91c92_cs.c: fix bogus compiler warning orinoco_cs: be more careful when matching cards with ID 0x0156:0x0002 hostap_cs: support cards with "Version 01.02" as third product ID pcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3 pxa2xx pcmcia - stargate 2 use gpio array. pcmcia: pxa2xx: remove empty socket_init / socket_resume functions. drivers:pcmcia:soc_common: make socket_init and socket_suspend optional
| * pcmcia: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3Pavel Roskin2011-07-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to match wireless cards with Intersil firmware that have ID 0x0156:0x0002 and the third ID "Version 01.02". Such cards are currently matched by orinoco_cs, which doesn't support WPA. They should be matched by hostap_cs. The first and the second product ID vary widely, so there are few users with some particular IDs. Of those, very few can submit a patch for hostap_cs or write a useful bugreport. It's still important to support their hardware properly. With PCMCIA_DEVICE_MANF_CARD_PROD_ID3, it should be possible to cover the remaining Intersil based designs that kept the numeric ID and the "version" of the reference design. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* | atomic: use <linux/atomic.h>Arun Sharma2011-07-261-1/+1
|/ | | | | | | | | | | | | | This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pcmcia: Make declaration and uses of struct pcmcia_device_id constJoe Perches2011-05-061-1/+1
| | | | | | | Const allows tables to be moved into text sections. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: re-enable Zoomed Video supportDominik Brodowski2011-02-201-0/+1
| | | | | | | | Allow drivers to enable Zoomed Video support. Currently, this is only used by out-of-tree drivers (L64020 DVB driver in particular). CC: <stable@kernel.org> [for 2.6.37] Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: IOCARD is also required for using IRQsDominik Brodowski2010-10-221-0/+2
| | | | | | | | | Dave Hinds pointed out to me that 37979e1546a7 will break b43 and ray_cs, as IOCARD is not -- as the name would suggest -- only needed for cards using IO ports. Instead, as it re-deines several pins, it is also required for using interrupts. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move driver name to struct pcmcia_driverDominik Brodowski2010-09-291-0/+2
| | | | | Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use autoconfiguration feature for ioports and iomemDominik Brodowski2010-09-291-20/+10
| | | | | | | | | | | | | | | | | | | | | | When 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. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: linux-bluetooth@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: introduce autoconfiguration featureDominik Brodowski2010-09-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Introduce 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 entry CONF_AUTO_SET_VPP set Vpp CONF_AUTO_AUDIO enable the speaker line CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: convert pcmcia_request_configuration to pcmcia_enable_deviceDominik Brodowski2010-09-293-42/+11
| | | | | | | | | | | | | | | | | | | | | | | | pcmcia_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. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move config_{base,index,regs} to struct pcmcia_deviceDominik Brodowski2010-09-292-15/+14
| | | | | | | | | | | | | | | | | | | | | Several 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. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: simplify IntTypeDominik Brodowski2010-09-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | IntType 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. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: simplify Status, ExtStatus register accessDominik Brodowski2010-09-291-1/+1
| | | | | | | | | | | | | | | The 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. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove Pin, Copy configuration register accessDominik Brodowski2010-09-291-1/+1
| | | | | | | | | | | The "Pin" and "Copy" configuration registers (CISREG_SCR, CISREG_PPR) do not seem to be utilized anywhere. If a device would request a write to these registers, "0" would be written. Continue to do so, but warn of unexpected behavior -- and remove the "Pin" and "Copy" entries from config_req_t. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move Vpp setup to struct pcmcia_deviceDominik Brodowski2010-09-292-1/+1
| | | | | | | | | | | | | | | | Some drivers prefer to explicitly set Vpp. Instead of passing the voltage inside config_req_t, store it in struct pcmcia_device. CC: linux-ide@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-mtd@lists.infradead.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: linux-usb@vger.kernel.org CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: split up modify_configuration() into two fixup functionsDominik Brodowski2010-09-292-14/+3
| | | | | | | | | | | | pcmcia_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. CC: netdev@vger.kernel.org CC: linux-mtd@lists.infradead.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not use win_req_t when calling pcmcia_request_window()Dominik Brodowski2010-09-292-31/+21
| | | | | | | | | | | | | | | Instead of win_req_t, drivers are now requested to fill out struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four iomem ranges. After a call to pcmcia_request_window(), the windows found there are reserved and may be used until pcmcia_release_window() is called. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-mtd@lists.infradead.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use struct resource for PCMCIA devices, part 2Dominik Brodowski2010-08-032-23/+27
| | | | | | | | | | Use struct resource * also for iomem resources. CC: linux-mtd@lists.infradead.org CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove memreq_tDominik Brodowski2010-08-032-7/+1
| | | | | | | | | | | | | | | | | Page already had to be set to 0; Offset can easily be passed as parameter to pcmcia_map_mem_page. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: linux-bluetooth@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move local definitions out of include/pcmcia/cs.hDominik Brodowski2010-08-031-19/+0
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not use io_req_t when calling pcmcia_request_io()Dominik Brodowski2010-08-032-19/+19
| | | | | | | | | | | | | | | | | | | | 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 ranges. After a call to pcmcia_request_io(), the ports found there are reserved, after calling pcmcia_request_configuration(), they may be used. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use struct resource for PCMCIA devicesDominik Brodowski2010-08-032-4/+2
| | | | | | | | | Introduce a new field into struct pcmcia_device named "resource" and of type struct resource *, which contains the IO port ranges allocated for this device. Memory window ranges and registration with the resource trees will follow at a later date. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: clean up cs.hDominik Brodowski2010-08-031-12/+0
| | | | | | Remove some obsolete definitions from cs.h Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use pcmica_{read,write}_config_byteDominik Brodowski2010-08-032-14/+2
| | | | | | | | | | | Use pcmcia_read_config_byte and pcmcia_write_config_byte instead of pcmcia_access_configuration_register. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove cs_types.hDominik Brodowski2010-07-305-51/+5
| | | | | | | | | | | | | | | | Remove cs_types.h which is no longer needed: Most definitions aren't used at all, a few can be made away with, and two remaining definitions (typedefs, unfortunatley) may be moved to more specific places. CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove unused flag, simplify headersDominik Brodowski2010-07-301-15/+3
| | | | | | | | | | As we only provide one way to set up resources now, we can remove the resource-setup-related bitfield (except resource_setup_done). In addition, pcmcia_state only consisted of one entry, so remove this bitfield as well. Suggested-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove obsolete CS_EVENT_ definitionsDominik Brodowski2010-07-301-45/+0
| | | | | | | Remove some definitions which became obsolete when the central event handler got removed. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove obsolete ioctlDominik Brodowski2010-07-302-216/+1
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove unused mem_op.hDominik Brodowski2010-05-101-116/+0
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: clarify alloc_io_space, move it to resource handlersDominik Brodowski2010-05-101-2/+9
| | | | | | | | | | | Clean up the alloc_io_space() function by moving most of it to the actual resource_ops. This allows for a bit less re-directions. Future cleanups will follow, and will make up for the code duplication currently present between rsrc_iodyn and rsrc_nonstatic (which are hardly ever built at the same time anyway, therefore no increase in built size). Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: dev_node removal (core)Dominik Brodowski2010-05-101-10/+0
| | | | | | | Remove the dev_node declaration. We now only pass the device name to the deprecated userspace tools. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: clean up cs.hDominik Brodowski2010-05-101-11/+0
| | | | | | With req_irq_t gone, we can get rid of some definitions. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: re-work pcmcia_request_irq()Dominik Brodowski2010-05-102-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | Instead of the old pcmcia_request_irq() interface, drivers may now choose between: - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq. - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will clean up automatically on calls to pcmcia_disable_device() or device ejection. - drivers still not capable of IRQF_SHARED (or not telling us so) may use the deprecated pcmcia_request_exclusive_irq() for the time being; they might receive a shared IRQ nonetheless. CC: linux-bluetooth@vger.kernel.org CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: alsa-devel@alsa-project.org CC: linux-usb@vger.kernel.org CC: linux-ide@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: pass FORCED_PULSE parameter in pcmcia_request_configuration()Dominik Brodowski2010-05-101-0/+1
| | | | | | | As it's only used there it makes no sense relying on pcmcia_request_irq(). CC: alsa-devel@alsa-project.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: replace struct irq with uint pcmcia_irq in struct pcmcia_socketDominik Brodowski2010-05-101-4/+3
| | | | | | | As we don't need the "Config" counter any more, we can simplify struct pcmcia_socket. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: setup IRQ to be used by PCMCIA drivers at card insertDominik Brodowski2010-05-101-0/+3
| | | | | | | | | Setup the IRQ to be used by PCMCIA drivers already during the device registration stage, making use of a new function pcmcia_setup_irq(). This will allow us to get rid of quite a lot of indirection in the future. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: pcmcia_dev_present bugfixDominik Brodowski2010-04-212-9/+6
| | | | | | | | | pcmcia_dev_present is in and by itself buggy. Add a note specifying why it is broken, and replace the broken locking -- taking a mutex is a bad idea in IRQ context, from which this function is rarely called -- by an atomic_t. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use dev_pm_ops for class pcmcia_socket_classDominik Brodowski2010-03-241-6/+0
| | | | | | | | | | | | Instead of requiring PCMCIA socket drivers to call various functions during their (bus) resume and suspend functions, register an own dev_pm_ops for this class. This fixes several suspend/resume bugs seen on db1xxx-ss, and probably on some other socket drivers, too. With regard to the asymmetry with only _noirq suspend, but split up resume, please see bug 14334 and commit 9905d1b411946fb3 . Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller2010-02-282-18/+24
|\ | | | | | | | | Conflicts: drivers/firmware/iscsi_ibft.c
| * pcmcia: use state machine for extended requeryDominik Brodowski2010-02-171-8/+3
| | | | | | | | | | | | | | | | | | The requery callback now also handles the addition of a second pseudo multifunction device. Avoids messing with dev_{g,s}et_drvdata(), and fixes any workqueue <-> skt_mutex deadlock. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: use pccardd to handle eject, insert, suspend and resume requestsDominik Brodowski2010-02-171-1/+2
| | | | | | | | | | | | | | | | | | This avoids any sysfs-related deadlock (or lockdep warning), such as reported at http://lkml.org/lkml/2010/1/17/88 . Reported-by: Ming Lei <tom.leiming@gmail.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: use mutex for dynid lockDominik Brodowski2010-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | Even though we weren't calling a blocking function within the dynid spinlock, we do not need a spinlock here but can and should be using a mutex. Reported-by: Jiri Slaby <jirislaby@gmail.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: simplify lockingDominik Brodowski2010-02-171-3/+4
| | | | | | | | | | | | | | | | | | replace pcmcia_socket->lock and pcmcia_dev_list_lock by using the per-socket "ops_mutex", as we do neither need different locks nor a spinlock here. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: add locking to set_mem_map()Dominik Brodowski2010-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Protect the pccard_operations callback "set_mem_map" by a new mutex ops_mutex. This mutex also protects the following values in struct pcmcia_socket: pccard_mem_map win[] pccard_mem_map cis_mem void __iomem *cis_virt Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: do not use resource manager on !PCMCIADominik Brodowski2010-02-171-0/+10
| | | | | | | | | | | | | | | | | | If only CardBus cards are used, but not PCMCIA cards, we do not need the extensive resource management functions provided for by rsrc_nonstatic.c (~240K). Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: m8xx_pcmcia.c should use iodyn resource managerDominik Brodowski2010-02-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The socket driver m8xx_pcmcia.c uses a static memory assignment, but io_offset is set to 0. Therefore, it seems proper to use the iodyn resource manager for this driver, as was previously the case (before commit 80128ff79d282cf71b1819dbca9b8dd47d8ed3e8). CC: Vitaly Bordug <vitb@kernel.crashing.org> CC: Arnd Bergmann <arnd@arndb.de> CC: Olof Johansson <olof@lixom.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: CardBus doesn't need CIS accessDominik Brodowski2010-01-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | At least no in-kernel CardBus-capable PCI driver makes use of the CIS access functions. Therefore, it seems sensible to remove this unused code, and cleanup cardbus.c a lot. CC: Jesse Barnes <jbarnes@virtuousgeek.org> CC: Linus Torvalds <torvalds@linux-foundation.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>