summaryrefslogtreecommitdiffstats
path: root/include/pcmcia
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds2009-12-054-76/+42
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits) pcmcia: rework the irq_req_t typedef pcmcia: remove deprecated handle_to_dev() macro pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer pcmcia: remove unused "window_t" typedef pcmcia: move some window-related code to pcmcia_ioctl.c pcmcia: Change window_handle_t logic to unsigned long pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page() pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page() pcmcia: Pass struct pcmcia_device to pcmcia_release_window() drivers/pcmcia: remove unnecessary kzalloc pcmcia: correct handling for Zoomed Video registers in topic.h pcmcia: fix printk formats pcmcia: autoload module pcmcia pcmcia/staging: update comedi drivers PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket PCMCIA: ss: allow PCI IRQs > 255 PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket PCMCIA: soc_common: constify soc_pcmcia_socket ops member PCMCIA: sa1111: remove duplicated initializers PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data ...
| * pcmcia: rework the irq_req_t typedefDominik Brodowski2009-11-281-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the irq_req_t typedef'd struct can be re-worked quite easily: (1) IRQInfo2 was unused in any case, so drop it. (2) IRQInfo1 was used write-only, so drop it. (3) Instance (private data to be passed to the IRQ handler): Most PCMCIA drivers using pcmcia_request_irq() to actually register an IRQ handler set the "dev_id" to the same pointer as the "priv" pointer in struct pcmcia_device. Modify the two exceptions (ipwireless, ibmtr_cs) to also work this waym and set the IRQ handler's "dev_id" to p_dev->priv unconditionally. (4) Handler is to be of type irq_handler_t. (5) Handler != NULL already tells whether an IRQ handler is present. Therefore, we do not need the IRQ_HANDLER_PRESENT flag in irq_req_t.Attributes. CC: netdev@vger.kernel.org CC: linux-bluetooth@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: alsa-devel@alsa-project.org CC: Jaroslav Kysela <perex@perex.cz> CC: Jiri Kosina <jkosina@suse.cz> CC: Karsten Keil <isdn@linux-pingi.de> for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: remove deprecated handle_to_dev() macroDominik Brodowski2009-11-281-3/+0
| | | | | | | | | | | | | | | | | | | | Update remaining users and remove deprecated handle_to_dev() macro CC: Harald Welte <laforge@gnumonks.org> CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: pcmcia_request_window() doesn't need a pointer to a pointerDominik Brodowski2009-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | pcmcia_request_window() only needs a pointer to struct pcmcia_device, not a pointer to a pointer. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: remove unused "window_t" typedefDominik Brodowski2009-11-281-5/+1
| | | | | | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: Change window_handle_t logic to unsigned longMagnus Damm2009-11-282-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logic changes based on top of the other patches: This set of patches changed window_handle_t from being a pointer to an unsigned long. The unsigned long is now a simple index into socket->win[]. Going from a pointer to unsigned long should leave the user space interface unchanged unless I'm mistaken. This change results in code that is less error prone and a user space interface which is much cleaner and safer. A nice side effect is that we are also are able to remove all members except one from window_t. [ linux@dominikbrodowski.net: Update to 2.6.31. Also, a plain "index" to socket->win[] does not work, as several codepaths rely on "window_handle_t" being non-zero if used. Therefore, set the window_handle_t to the socket->win[] index + 1. ] CC: netdev@vger.kernel.org Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()Magnus Damm2009-11-281-2/+0
| | | | | | | | | | | | | | | | No logic changes, just pass struct pcmcia_socket to pcmcia_get_mem_page() [linux@dominikbrodowski.net: update to 2.6.31] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()Magnus Damm2009-11-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page() [linux@dominikbrodowski.net: update to 2.6.31] CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN) Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: Pass struct pcmcia_device to pcmcia_release_window()Magnus Damm2009-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | No logic changes, just pass struct pcmcia_device to pcmcia_release_window(). [linux@dominikbrodowski.net: update to 2.6.31] CC: netdev@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * PCMCIA: ss: allow PCI IRQs > 255Russell King - ARM Linux2009-11-091-1/+1
| | | | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}Dominik Brodowski2009-11-091-36/+0
| | | | | | | | | | | | | | As all in-tree drivers have been converted to not use cs_error() any more, drop these functions and definitions, and update the Documentation. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: remove pcmcia_get_{first,next}_tuple()Dominik Brodowski2009-11-081-15/+0
| | | | | | | | | | | | | | Remove the pcmcia_get_{first,next}_tuple() calls no longer needed by (current) pcmcia device drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * pcmcia: add new CIS access helpersDominik Brodowski2009-11-081-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a replacement to pcmcia_get_{first,next}_tuple() and pcmcia_get_tuple_data(), three new -- and easier to use -- functions are added: - pcmcia_get_tuple() to get the very first CIS entry of one type. - pcmcia_loop_tuple() to loop over all CIS entries of one type. - pcmcia_get_mac_from_cis() to read out the hardware MAC address from CISTPL_FUNCE. Only a handful of drivers need these functions anyway, as most CIS access is already handled by pcmcia_loop_config(), which now shares the same backed (pccard_loop_tuple()) with pcmcia_loop_tuple(). A pcmcia_get_mac_from_cis() bug noted by Komuro <komurojun-mbn@nifty.com> has been fixed in this revision. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* | PM / yenta: Split resume into early and late parts (rev. 4)Rafael J. Wysocki2009-11-031-0/+4
|/ | | | | | | | | | | | | | | | | | | | Commit 0c570cdeb8fdfcb354a3e9cd81bfc6a09c19de0c (PM / yenta: Fix cardbus suspend/resume regression) caused resume to fail on systems with two CardBus bridges. While the exact nature of the failure is not known at the moment, it can be worked around by splitting the yenta resume into an early part, executed during the early phase of resume, that will only resume the socket and power it up if there was a card in it during suspend, and a late part, executed during "regular" resume, that will carry out all of the remaining yenta resume operations. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14334, which is a listed regression from 2.6.31. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Reported-by: Stephen J. Gowdy <gowdy@cern.ch> Tested-by: Jose Marino <braket@hotmail.com>
* PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend()Rafael J. Wysocki2009-09-291-1/+1
| | | | | | | | | | pcmcia_socket_dev_suspend() doesn't use its second argument, so it may be dropped safely. This change is necessary for the subsequent yenta suspend/resume fix. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: stable@kernel.org
* pcmcia: Use phys_addr_t for physical addressesSteven A. Falco2009-09-151-2/+2
| | | | | | | | | | | | Physical addresses are currently represented as int or long types. However, this does not work for processors like the PPC440EPx, which is a 32-bit processor with a 36-bit address space. This patch uses the phys_addr_t type, which correctly holds a 36-bit address on this processor. Signed-off-by: Steven A. Falco <sfalco@harris.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pcmcia: ioctl-internal definitionsDominik Brodowski2008-08-313-11/+11
| | | | | | | cisinfo_t and cs_status_t are only used by the (deprecated) PCMCIA ioctl. Therefore, move them out of the way. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: cistpl header cleanupDominik Brodowski2008-08-312-30/+28
| | | | | | 16-bit PCMCIA device handling function definitions are moved to ds.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove unused argument to pcmcia_parse_tuple()Dominik Brodowski2008-08-311-9/+2
| | | | | | | | | | Since we're just parsing the tuple being passed to this function, we don't need any device-specific information. Also, remove the call to pcmcia_validate_cis() from pcmciamtd.c, since it is already called by the PCMCIA core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: card services header cleanupDominik Brodowski2008-08-313-70/+59
| | | | | | | 16-bit PCMCIA device handling function definitions are moved to ds.h, internal definitions to cs_internal.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: device_id header cleanupDominik Brodowski2008-08-291-3/+15
| | | | | | | | Wrap in #ifdef to include header just once, and wrap in another #ifdef to avoid it being used in userspace. Also, format the header similar to the other PCMCIA header files. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: encapsulate ioaddr_tDominik Brodowski2008-08-292-8/+8
| | | | | | | By now, ioaddr_t should only be used by the deprecated ioctl, as it does not correctly reflect the maximum ioport range at least on some architectures. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: cleanup device driver header fileDominik Brodowski2008-08-293-164/+202
| | | | | | | | | The header file primarily used for (in-kernel) PCMCIA device drivers also deserved a major cleanup. This header file also serves as the dumping ground for all typedefs and definitions only used by the deprecated PCMCIA ioctl and the deprecated PCMCIA userspace tools using this ioctl. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: cleanup socket services header fileDominik Brodowski2008-08-261-107/+91
| | | | | | | | The header file for use by (in-kernel) PCMCIA sockets deserved a major cleanup. Some stuff only used by the pcmcia core modules was moved to cs_internal.h Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use dev_printk for cs_error()Dominik Brodowski2008-08-231-1/+12
| | | | | | | | Use dev_printk() in cs_error()-based error reporting. While this function-turned-macro will hopefully go away soon, using dev_printk simplifies the code much. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove CS_ error codes alltogetherDominik Brodowski2008-08-232-33/+3
| | | | | | | | | | | Remoe the CS_ error codes. Drivers are expected to use default error definitions (errno.h etc.). Only one CS_ error code -- CS_IN_USE -- is used internally by the (deprecated) pcmcia-cs userspace package. Therefore, keep this one around so that it still compiles. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_TUPLEDominik Brodowski2008-08-231-1/+1
| | | | | | | CS_BAD_TUPLE was used to denote a bad tuple being passed to the parse function. Therefore, replace it with -EINVAL and a verbose message. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_ARGSDominik Brodowski2008-08-231-2/+2
| | | | | | | CS_BAD_ARGS mean a badly written driver or invalid userspace ioctl access, so translate that to -EINVAL. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZEDominik Brodowski2008-08-231-4/+4
| | | | | | | These four error values mostly mean a badly written driver, so ds_dbg() output and -EINVAL seems to be enough. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGEDominik Brodowski2008-08-231-3/+3
| | | | | | | | | | | CS_BAD_TYPE was only used in cs.c and already properly annotated by error messages. CS_BAD_ATTRIBUTE and CS_BAD_PAGE mean a badly written driver, so ds_dbg() output and -EINVAL seems to be enough. (includes bugfix from and Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> ) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_NO_MORE_ITEMSDominik Brodowski2008-08-231-1/+1
| | | | | | | | | | | | CS_NO_MORE_ITEMS is returned by the CIS tuple reading and parsing code if the end of a tuple chain is reached. As at least one PCMCIA driver relies on matching this return value, replace it with -ENOSPC which is now uniquely used for this purpose within the in-kernel pcmcia subsystem. CC: Russell King <rmk+kernel@arm.linux.org.uk> CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_IN_USEDominik Brodowski2008-08-231-1/+1
| | | | | | | | If a resource is already in use, mark it with -EBUSY. Same for cards already asleep. (includes a fix for a bug found by Larry Finger -- thanks!) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_CONFIGURATION_LOCKEDDominik Brodowski2008-08-231-1/+1
| | | | | | | This error code meant that trying to change the configuration after the initialization phase is forbidden. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_HANDLEDominik Brodowski2008-08-231-1/+1
| | | | | | | | CS_BAD_HANDLE means that something went badly wrong: no parameter was passed, or the paramater passed wasn't the correct one. Therefore, replace it with -EINVAL. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_GENERAL_FAILUREDominik Brodowski2008-08-231-1/+1
| | | | | | It's only used by pcmcia_core when socket-related queries time out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_NO_CARDDominik Brodowski2008-08-231-1/+1
| | | | | | It means that no card can be detected in the socket, so return -ENODEV Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_VCC and CS_BAD_VPPDominik Brodowski2008-08-231-2/+2
| | | | | | | They were either used to report that changing voltage is not allowed, or that changing voltage failed. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_UNSUPPORTED_*Dominik Brodowski2008-08-231-2/+2
| | | | | | | CS_UNSUPPORTED_MODE and CS_UNSUPPORTED_FUNCTION were mostly used to denote trying to use PCMCIA functions on CardBus cards. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_OUT_OF_RESOURCEDominik Brodowski2008-08-231-1/+1
| | | | | | | | CS_OUT_OF_RESOURCE was almost only used to note -ENOMEM situations. Therefore, use -ENOMEM explicitely, and also print out warnings. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate unused CS_ error codesDominik Brodowski2008-08-231-10/+10
| | | | | | | Deprecate unused CS_ error codes by replacing their definitions with generic error messages, and removing them from the error_t lookup table. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move config_info_t definition to ioctl-related parts in header filesDominik Brodowski2008-08-232-21/+21
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move pccard_get_configuration_info to ioctlDominik Brodowski2008-08-231-1/+0
| | | | | | | With the PCMCIA ioctl being the only remaining user of _get_configuration_info, move the function to pcmcia_ioctl.c Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
*-. Merge branches 'pcmcia-config-loop' and 'pcmcia-printk' into pcmciaDominik Brodowski2008-08-231-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pcmcia-config-loop: pcmcia: pcmcia_config_loop() improvement by passing vcc pcmcia: pcmcia_config_loop() default CIS entry handling pcmcia: pcmcia_config_loop() ConfigIndex unification pcmcia: use pcmcia_loop_config in misc pcmcia drivers pcmcia: use pcmcia_loop_config in net pcmcia drivers pcmcia: use pcmcia_loop_config in ISDN pcmcia drivers pcmcia: use pcmcia_loop_config in scsi pcmcia drivers pcmcia: use pcmcia_loop_config in bluetooth drivers pcmcia: use pcmcia_loop_config in pata and ide drivers pcmcia: add pcmcia_loop_config() helper * pcmcia-printk: pcmcia: don't add extra DEBUG cflag pcmcia: remove unused cs_socket_name() definition pcmcia: use dev_printk in module rsrc_nonstatic pcmcia: use dev_printk in module pcmcia pcmcia: use dev_printk in module pcmcia_core pcmcia: use dev_printk and dev_dbg in yenta_socket
| * | pcmcia: pcmcia_config_loop() improvement by passing vccDominik Brodowski2008-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | By passing the current Vcc setting to the pcmcia_config_loop callback function, we can remove pcmcia_get_configuration_info() calls from many drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * | pcmcia: pcmcia_config_loop() default CIS entry handlingDominik Brodowski2008-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | Many drivers use the default CIS entry within their pcmcia_config_loop() callback function. Therefore, factor the default CIS entry handling out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
| * | pcmcia: add pcmcia_loop_config() helperDominik Brodowski2008-08-231-0/+6
| |/ | | | | | | | | | | | | | | | | By calling pcmcia_loop_config(), a pcmcia driver can iterate over all available configuration options. During a driver's probe() phase, one doesn't need to use pcmcia_get_{first,next}_tuple, pcmcia_get_tuple_data and pcmcia_parse_tuple directly in most if not all cases. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* | pcmcia: only copy CIS override data onceDominik Brodowski2008-08-023-10/+10
|/ | | | | | | | Instead of copying CIS override data in socket_sysfs.c or ds.c, and then again in cistpl.c, only do so once. Also, cisdump_t is now only used by the deprecated ioctl. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: (re)move {pcmcia,pccard}_get_statusDominik Brodowski2008-06-241-1/+0
| | | | | | | Except for one debug message in a driver marked BROKEN, pcmcia_get_status is only used by the ioctl. Therefore, move it to pcmcia_ioctl.c and unexport it. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: Remove unused header file codeMagnus Damm2008-06-242-5/+0
| | | | | | | pcmcia: Remove unused header file code Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove unused bulkmem.hMagnus Damm2008-06-243-43/+18
| | | | | | | | | | The code in include/pcmcia/bulkmem.h was only kept for compatibility reasons. Therefore, move the remaining region_info_t definition to ds.h [linux@dominikbrodowski.net: do not modify the IOCTL, move definition to ds.h, and update changelog] Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
OpenPOWER on IntegriCloud