summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs_internal.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* [PATCH] pcmcia: access config_t using pointer instead of arrayDominik Brodowski2006-03-311-6/+0
| | | | | | | | | Access the PCMCIA config_t struct (one per device function) using a pointer in struct pcmcia_device, instead of looking them up in an array. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: remove unused field Present from config_tDominik Brodowski2006-03-311-1/+0
| | | | | | | | config_t.Present is set to the same value as CardValues, which isn't modified anywhere. Therefore, we can use only one of these two objects. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: merge suspend into device modelDominik Brodowski2006-01-061-0/+2
| | | | | | | | | | Merge the suspend and resume methods for 16-bit PCMCIA cards into the device model -- for both runtime power management and suspend to ram/disk. Bugfix in ds.c by Richard Purdie Signed-Off-By: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: validate_mem shouldn't be voidDominik Brodowski2006-01-051-1/+1
| | | | | | | | | Add a return value to pcmcia_validate_mem. Only if we have enough memory available to map the CIS, we should proceed in trying to determine information about the device. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* [PATCH] pcmcia: remove unused Vpp1, Vpp2 and VccDominik Brodowski2005-09-091-1/+0
| | | | | | | | config_t->Vpp1, Vpp2 and Vcc are never read, so remove them. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
OpenPOWER on IntegriCloud