summaryrefslogtreecommitdiff
path: root/include/pcmcia
AgeCommit message (Collapse)AuthorFilesLines
2008-08-31pcmcia: ioctl-internal definitionsDominik Brodowski3-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>
2008-08-31pcmcia: cistpl header cleanupDominik Brodowski2-30/+28
16-bit PCMCIA device handling function definitions are moved to ds.h. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-31pcmcia: remove unused argument to pcmcia_parse_tuple()Dominik Brodowski1-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>
2008-08-31pcmcia: card services header cleanupDominik Brodowski3-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>
2008-08-29pcmcia: device_id header cleanupDominik Brodowski1-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>
2008-08-29pcmcia: encapsulate ioaddr_tDominik Brodowski2-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>
2008-08-29pcmcia: cleanup device driver header fileDominik Brodowski3-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>
2008-08-26pcmcia: cleanup socket services header fileDominik Brodowski1-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>
2008-08-23pcmcia: use dev_printk for cs_error()Dominik Brodowski1-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>
2008-08-23pcmcia: remove CS_ error codes alltogetherDominik Brodowski2-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>
2008-08-23pcmcia: deprecate CS_BAD_TUPLEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_BAD_ARGSDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_NO_MORE_ITEMSDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_IN_USEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_CONFIGURATION_LOCKEDDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_BAD_HANDLEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_GENERAL_FAILUREDominik Brodowski1-1/+1
It's only used by pcmcia_core when socket-related queries time out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: deprecate CS_NO_CARDDominik Brodowski1-1/+1
It means that no card can be detected in the socket, so return -ENODEV Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: deprecate CS_BAD_VCC and CS_BAD_VPPDominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_UNSUPPORTED_*Dominik Brodowski1-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>
2008-08-23pcmcia: deprecate CS_OUT_OF_RESOURCEDominik Brodowski1-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>
2008-08-23pcmcia: deprecate unused CS_ error codesDominik Brodowski1-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>
2008-08-23pcmcia: move config_info_t definition to ioctl-related parts in header filesDominik Brodowski2-21/+21
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: move pccard_get_configuration_info to ioctlDominik Brodowski1-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>
2008-08-23Merge branches 'pcmcia-config-loop' and 'pcmcia-printk' into pcmciaDominik Brodowski1-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
2008-08-23pcmcia: pcmcia_config_loop() improvement by passing vccDominik Brodowski1-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>
2008-08-23pcmcia: pcmcia_config_loop() default CIS entry handlingDominik Brodowski1-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>
2008-08-23pcmcia: add pcmcia_loop_config() helperDominik Brodowski1-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>
2008-08-02pcmcia: only copy CIS override data onceDominik Brodowski3-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>
2008-06-24pcmcia: (re)move {pcmcia,pccard}_get_statusDominik Brodowski1-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>
2008-06-24pcmcia: Remove unused header file codeMagnus Damm2-5/+0
pcmcia: Remove unused header file code Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: remove unused bulkmem.hMagnus Damm3-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>
2008-06-24pcmcia: simplify pccard_validate_cisDominik Brodowski1-1/+1
As cisinfo_t only contains one unsigned_int, pccard_validate_cis can be simplified by passing that around directly. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: carve out ioctl adjust function to pcmcia_ioctlDominik Brodowski1-2/+8
Let pcmcia_ioctl interact with rsrc_nonstatic using functions which rsrc_nonstatic.c has to use anyway. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: add support CompactFlash PCMCIA support for Blackfin.Michael Hennerich1-1/+2
A new host driver to add CompactFlash PCMCIA support for Blackfin. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Cc: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: remove version.hDominik Brodowski1-3/+0
pcmcia/version.h is empty and its existence is not even needed by deprecated userspace tools. CC: David Sterba <dsterba@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-06-24pcmcia: cs: kill thread_waitChristoph Hellwig1-1/+0
There is not reason to have a waitqueue if it's always the same thread that is waiting for it. Just use wake_up_process instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Small modification: Also remove unused variable. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-02-05pcmcia: replace kio_addr_t with unsigned int everywhereOlof Johansson2-4/+3
Remove kio_addr_t, and replace it with unsigned int. No known architecture needs more than 32 bits for IO addresses and ports and having a separate type for it is just messy. Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05pcmcia: convert some internal-only ioaddr_t to unsigned intOlof Johansson1-4/+4
Convert the io_req_t members to unsigned int, to allow use on machines with more than 16 bits worth of IO ports (i.e. secondary busses on ppc64, etc). There was only a couple of places in drivers where a change was needed. I left printk formats alone (there are lots of %04x-style formats in there), mostly to not change the format on the platforms that only have 16-bit io addresses, but also because the padding doesn't really add all that much value most of the time. I found only one sprintf of an address, and upsized the string accordingly (I doubt anyone will have anywhere near INT_MAX as irq value, but at least there's room for it now). Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Christoph Hellwig <hch@lst.de> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-15[AVR32] pcmcia ioaddr_t should be 32 bits on AVR32Haavard Skinnemoen1-1/+1
Define ioaddr_t as u_int on AVR32 just like on ARM and MIPS. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-16pcmcia: use DMA_MASK_NONE for the default for all pcmcia devicesJames Bottomley1-0/+1
Most non cardbus devices can't do dma, so flag them as such in the device creation routine. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Tejun Heo <htejun@gmail.com> Cc: Natalie Protasevich <protasnb@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-08PCMCIA-NETDEV : add new ID of lan&modem multifunction cardKomuro1-0/+2
fmvj18x_cs: NEC PK-UG-J001 Panasonic CF-VML201 Panasonic TO-PDL9610 pcnet_cs: MICRO-RESEARCH MC336LAN Signed-off-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-07add new_id to PCMCIA driversBernhard Walle1-0/+6
PCI drivers have the new_id file in sysfs which allows new IDs to be added at runtime. The advantage is to avoid re-compilation of a driver that works for a new device, but it's ID table doesn't contain the new device. This mechanism is only meant for testing, after the driver has been tested successfully, the ID should be added in source code so that new revisions of the kernel automatically detect the device. The implementation follows the PCI implementation. The interface is documented in Documentation/pcmcia/driver.txt. Computations should be done in userspace, so the sysfs string contains the raw structure members for matching. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter.Sergei Organov1-0/+1
Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter. Signed-off-by: Sergei Organov <osv@javad.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07Driver core: convert pcmcia code to use struct deviceGreg Kroah-Hartman1-1/+1
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>
2006-12-04[PATCH] pcmcia: multifunction card handling fixesDominik Brodowski1-2/+3
s->functions needs to be initialized earlier, for the "let's see how high it increases" approach means that pcmcia_request_irq() (which makes use of this value) is confused, and might request an exclusive IRQ first even though it is not supposed to. Also, a CIS override autoloaded using the firmware loader may allow for the use of more or less functions in a multifunction card. Therefore, we may need to schedule a call to add this second function later on, or simply remove the other function (it's always the first -valid- function which reaches this codepath). Many thanks to Fabrice Bellet for debugging and testing patches. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-04-26Don't include linux/config.h from anywhere else in include/David Woodhouse1-1/+0
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-03-31[PATCH] pcmcia: declare pccard_iodyn_ops (fix m8xx_pcmcia.c compilation error)Marcelo Tosatti1-0/+3
Apparently the pccard_iodyn_ops declaration has been forgotten, which results in a compilation error for m8xx_pcmcia.c Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>