summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs_internal.h
Commit message (Collapse)AuthorAgeFilesLines
* pcmcia: convert pcmcia_request_configuration to pcmcia_enable_deviceDominik Brodowski2010-09-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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-291-3/+0
| | | | | | | | | | | | | | | | | | | | | 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-1/+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: insert PCMCIA device resources into resource treeDominik Brodowski2010-08-031-1/+2
| | | | | | | | Insert PCMCIA device resources into the resource tree. However, this is currently only implemented for sockets which do not statically map the resources. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use struct resource for PCMCIA devices, part 2Dominik Brodowski2010-08-031-0/+1
| | | | | | | | | | 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: move local definitions out of include/pcmcia/cs.hDominik Brodowski2010-08-031-0/+3
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use struct resource for PCMCIA devicesDominik Brodowski2010-08-031-1/+3
| | | | | | | | | 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: use pcmica_{read,write}_config_byteDominik Brodowski2010-08-031-2/+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: split up central event handlerDominik Brodowski2010-07-301-3/+4
| | | | | | | Split up the central event handler for 16bit cards into three individual functions. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove obsolete ioctlDominik Brodowski2010-07-301-38/+2
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: clarify alloc_io_space, move it to resource handlersDominik Brodowski2010-05-101-7/+5
| | | | | | | | | | | 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: move all pcmcia_resource_ops providers into one moduleDominik Brodowski2010-05-101-0/+8
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: setup IRQ to be used by PCMCIA drivers at card insertDominik Brodowski2010-05-101-0/+2
| | | | | | | | | 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: delay re-scanning and re-querying of PCMCIA busDominik Brodowski2010-02-171-1/+2
| | | | | | | | | After a CIS update -- or the finalization of the resource database --, proceed with the re-scanning or re-querying of PCMCIA cards only in a separate thread to avoid deadlocks. 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-5/+5
| | | | | | | | | 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: simplify lockingDominik Brodowski2010-02-171-2/+0
| | | | | | | | | 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: remove remaining rsrc_mgr indirectionsDominik Brodowski2010-02-171-8/+7
| | | | | | | | Move rsrc_mgr indirections only used by the pcmcia module to the pcmcia module. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move cistpl.c into pcmcia moduleDominik Brodowski2010-02-171-23/+21
| | | | | | | | | As PCMCIA is the only real user of CIS access functions, include cistpl.c in the PCMCIA module, not in the PCMCIA & CardBus core module. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove some rsrc_mgr indirectionsDominik Brodowski2010-01-241-8/+0
| | | | | | | Remove rsrc_mgr indirections only used by pcmcia_resource.c Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove useless indirectionDominik Brodowski2010-01-241-3/+0
| | | | | | | | As release_resoure_db() used to be called only from one place, and it's a two-line function, remove it. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: do not lock socket driver module on card insertDominik Brodowski2010-01-241-20/+0
| | | | | | | | Do not lock the socket driver module on card insert, as the PCMCIA core can handle a socket module removal, at least if we add a call to socket_remove() on pccardd()'s shutdown. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: move some window-related code to pcmcia_ioctl.cDominik Brodowski2009-11-281-6/+0
| | | | | | | | pcmcia_get_window() and pcmcia_get_mem_page() were only called from pcmcia_ioctl.c. Therefore, move these functions to that file, and remove the useless EXPORTs. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: Change window_handle_t logic to unsigned longMagnus Damm2009-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | 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: use dynamic debug instead of custom infrastructureDominik Brodowski2009-11-081-22/+0
| | | | | | | | | | | | | Use the generic "dynamic debug" infrastructure instead of CONIG_PCMCIA_DEBUG in the PCMCIA core (pcmcia.ko and pcmcia_core.ko). To enable debugging, enable CONFIG_DYNAMIC_DEBUG, mount debugfs and $ echo -n 'module pcmcia_core +p' > /sys/kernel/debug/dynamic_debug/control for the complete module "pcmcia_core", for example. For more detailled instructions, please see Documentation/dynamic-debug-howto.txt Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove pcmcia_get_{first,next}_tuple()Dominik Brodowski2009-11-081-0/+9
| | | | | | | 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-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* pcmcia: pccard_read_tuple and TUPLE_RETURN_COMMON cleanupDominik Brodowski2009-10-191-2/+1
| | | | | | | | | | | | | | | | | pccard_read_tuple(), which is only used by the PCMCIA core, should handle TUPLE_RETURN_COMMON more sensibly: If a specific function (which may be 0) is requested, set tuple.Attributes = 0 as was done in all PCMCIA drivers. If, however, BIND_FN_ALL is requested, return the "common" tuple. As to the callers of pccard_read_tuple(): - All calls to pcmcia_validate_cis() had set the "function" parameter to BIND_FN_ALL. Therefore, remove the "function" parameter and make the parameter to pccard_read_tuple explicit. - Calls to CISTPL_VERS_1 and CISTPL_MANFID now set BIND_FN_ALL. This was already the case for calls to CISTPL_LONGLINK_MFC. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: remove unused argument to pcmcia_parse_tuple()Dominik Brodowski2008-08-311-0/+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-311-1/+11
| | | | | | | 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: cleanup socket services header fileDominik Brodowski2008-08-261-0/+27
| | | | | | | | 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: merge ds_internal.h into cs_internal.hDominik Brodowski2008-08-251-0/+40
| | | | | | Merge ds_internal.c into cs_internal.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: cleanup cs_internal.hDominik Brodowski2008-08-251-64/+90
| | | | | | Small cleanup to cs_internal.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: deprecate CS_BAD_TUPLEDominik Brodowski2008-08-231-0/+6
| | | | | | | 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: 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>
* pcmcia: don't add extra DEBUG cflagDominik Brodowski2008-08-231-1/+1
| | | | | | | | | | | | Use CONFIG_PCMCIA_DEBUG instead of DEBUG so that dev_dbg() and other tricks work properly. (includes bugfixes from and Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> ) Signed-off-by: Dominik Broodwski <linux@dominikbrodowski.net>
* pcmcia: remove unused cs_socket_name() definitionDominik Brodowski2008-08-231-2/+0
| | | | Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* pcmcia: use dev_printk in module pcmcia_coreDominik Brodowski2008-08-231-3/+3
| | | | 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 bulkmem.hMagnus Damm2008-06-241-12/+0
| | | | | | | | | | 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>
* pcmcia: remove pccard_sysfs_interface warningsDavid Brownell2008-04-301-1/+2
| | | | | | | | | | | | | Make the PCMCIA core stop using class_interface to hide socket attribute registration. This removes the associated section mismatch warnings, and helps get to the point where that mechanism can finally be removed. Simplify that attribute registration by using an attribute_group. This is a net shrink in object size. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver core: convert pcmcia code to use struct deviceGreg Kroah-Hartman2007-02-071-2/+2
| | | | | | | | | | Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Cc: <linux-pcmcia@lists.infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] pcmcia: start over after CIS overrideDominik Brodowski2006-12-041-1/+1
| | | | | | | When overriding the CIS, re-start the configuration of the card from scratch. Reported and debugged by Fabrice Bellet <fabrice@bellet.info> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: use bitfield instead of p_state and stateDominik Brodowski2006-03-311-1/+1
| | | | | | | | | | Instead of the two status values struct pcmcia_device->p_state and state, use descriptive bitfields. Most value-checking in drivers was invalid, as the core now only calls the ->remove() (a.k.a. detach) function in case the attachement _and_ configuration was successful. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: remove dev_link_t and client_handle_t indirectionDominik Brodowski2006-03-311-1/+1
| | | | | | | dev_link_t * and client_handle_t both mean struct pcmcai_device * by now. Therefore, remove all such indirections. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: remove include of config.hDominik Brodowski2006-03-311-1/+0
| | | | | | | Remove the inclusion of include/config.h as it isn't needed any longer. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: make config_t independent, add reference countingDominik Brodowski2006-03-311-0/+2
| | | | | | | | Handle config_t structs independent of struct pcmcia_socket, and add reference counting for them. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: always use device pointer to config_tDominik Brodowski2006-03-311-3/+2
| | | | | | | | Update the remaining users using the static lookup table of the PCMCIA function configuration to use the struct pcmcia_device-contained pointer. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
OpenPOWER on IntegriCloud