aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-03-12Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-5/+20
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (370 commits) ARM: S3C2443: Add set_rate and round_rate calls for armdiv clock ARM: S3C2443: Remove #if 0 for clk_mpll ARM: S3C2443: Update notes on MPLLREF clock ARM: S3C2443: Further clksrc-clk conversions ARM: S3C2443: Change to using plat-samsung clksrc-clk implementation USB: Fix s3c-hsotg build following Samsung platform header moves ARM: S3C64XX: Reintroduce unconditional build of audio device ARM: 5961/1: ux500: fix CLKRST addresses ARM: 5977/1: arm: Enable backtrace printing on oops when PC is corrupted ASoC: Fix S3C64xx IIS driver for Samsung header reorg ARM: S3C2440: Fix plat-s3c24xx move of s3c2440/s3c2442 support [ARM] pxa: fix typo in mxm8x10.h [ARM] pxa/raumfeld: set GPIO drive bits for LED pins [ARM] pxa/zeus: Add support for mcp2515 CAN bus [ARM] pxa/zeus: Add support for onboard max6369 watchdog [ARM] pxa/zeus: Add Eurotech as the manufacturer [ARM] pxa/zeus: Correct the USB host initialisation flags [ARM] pxa/zeus: Allow usage of 8250-compatible UART in uncompress [ARM] pxa: refactor uncompress.h for non-PXA uarts [ARM] mmp2: fix incorrect calling of chip->mask_ack() for 2nd level cascaded IRQs ...
2010-03-08Merge branch 'origin' into devel-stableRussell King29-2824/+3007
Conflicts: arch/arm/mach-mx2/devices.c arch/arm/mach-mx2/devices.h sound/soc/pxa/pxa-ssp.c
2010-03-07Driver core: create lock/unlock functions for struct deviceGreg Kroah-Hartman1-4/+4
In the future, we are going to be changing the lock type for struct device (once we get the lockdep infrastructure properly worked out) To make that changeover easier, and to possibly burry the lock in a different part of struct device, let's create some functions to lock and unlock a device so that no out-of-core code needs to be changed in the future. This patch creates the device_lock/unlock/trylock() functions, and converts all in-tree users to them. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jean Delvare <khali@linux-fr.org> Cc: Dave Young <hidave.darkstar@gmail.com> Cc: Ming Lei <tom.leiming@gmail.com> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Phil Carmody <ext-phil.2.carmody@nokia.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <len.brown@intel.com> Cc: Magnus Damm <damm@igel.co.jp> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Vegard Nossum <vegard.nossum@gmail.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Alex Chiang <achiang@hp.com> Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andrew Patterson <andrew.patterson@hp.com> Cc: Yu Zhao <yu.zhao@intel.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Wolfram Sang <w.sang@pengutronix.de> Cc: CHENG Renquan <rqcheng@smu.edu.sg> Cc: Oliver Neukum <oliver@neukum.org> Cc: Frans Pop <elendil@planet.nl> Cc: David Vrabel <david.vrabel@csr.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03pcmcia: disable pcmcia ioctl for !ARM, prepare for removalDominik Brodowski1-4/+10
The PCMCIA ioctl -- deprecated for years -- suffers from insufficient locking. As it already has been deprecated for years, with its removal long overdue, limit it to !SMP and !PREEMPT. Furthermore, the last legitimate use of the ioctl to be reported relates to the ARM architecture in 2008.[1] Attempts to resolve this issue turned out unsuccessful so far.[2] Other usages have only been reported as hear-say. If there are any legitiate and necessary use-cases remaining, please speak out before the end of the grace period until 2.6.3{5,6}(-rc1). [1] http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005440.html see also: http://lkml.org/lkml/2008/2/27/291 [2] http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005450.html http://lists.infradead.org/pipermail/linux-pcmcia/2010-January/006740.html see also: http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005453.html CC: Russell King <rmk+kernel@arm.linux.org.uk> CC: Alan Cox <alan@lxorguk.ukuu.org.uk> CC: Robert P. J. Day <rpjday@crashcourse.ca> CC: Jaswinder Singh Rajput <jaswinder@kernel.org> CC: linux-kernel@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-03pcmcia: CodingStyle fixesDominik Brodowski3-971/+942
Fix most of the remaining CodingStyle issues in drivers/pcmcia , which related to wrong indent -- PCMCIA historically used 4 spaces. Also, remove a custom min() implementation with the generic one. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-02pcmcia: alchemy: fixup wrong commentsManuel Lauss2-28/+7
Commit 11b897cf84c37e6522db914793677e933ef311fb changed expected pcmcia area addresses from the 32bit pseudo to the real 36bit addresses, but did not update the comments. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-02pcmcia: remove irq_list parameter from pd6729Komuro1-17/+1
Remoe the irq_list parameter from pd6729, as it can and should be set via sysfs (and -- if available -- pcmciautils, which reads the information from /etc/pcmcia/config.opts ) [linux@dominikbrodowski.net: updated commit message] Signed-off-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-02yenta_socket: ENE CB712 CardBus bridge needs special treatment with Echo Audio Indigo soundcardsMichal Pecio1-4/+4
Indigos are well known for distortions when running on some buggy ENE controllers. There is a workaround in the yenta driver, but for some reason it isn't activated on CB712. However, I own a laptop with such chip and it seems that it also is affected - I can clearly hear occasional cracks, especially under heavy network load, and in Windows XP the card is completely unusable. This simple change fixed things for me. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15191 [linux@dominikbrodowski.net: extend it to the other ENE bridges] Signed-off-by: Michal Pecio <michal.pecio@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-03-02[ARM] sa1111: avoid using hardcoded IRQ numbers for PCMCIA driverEric Miao1-5/+20
The IRQs for card detect and status change are currently hardcoded in SA1111 PCMCIA driver, which can be actually obtained from the .irq[] from 'struct sa1111_dev' to keep it generic. Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-02-27Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds9-643/+1003
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (141 commits) MIPS: Alchemy: defconfig updates MIPS: Alchemy: Fix Au1100 ethernet build failure MIPS: Alchemy: Repair db1500/bosporus builds MIPS: ARC: Cleanup unused definitions from sgialib.h MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses MIPS: Alchemy: use 36bit addresses for PCMCIA resources. MIPS: Cobalt: Fix theoretical port aliasing issue MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1) MIPS: Crazy spinlock speed test. MIPS: Optimize spinlocks. MIPS: Alchemy: devboard PM needs to save CPLD registers. MIPS: PowerTV: Eliminate duplicate opcode definition macros MIPS: Lemote 2F: Move printks out of port_access_lock. MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks. MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c. MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks. MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock. MIPS: Loongson: Remove pointless sample_lock from oprofile code. MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock. MIPS: i8259: Convert IRQ controller lock to raw spinlock. ...
2010-02-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds21-1228/+1108
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits) pcmcia: validate late-added resources pcmcia: allow for extension of resource interval pcmcia: remove useless msleep in ds.c pcmcia: use read_cis_mem return value pcmcia: handle error in serial_cs config calls pcmcia: add locking to pcmcia_{read,write}_cis_mem pcmcia: avoid prod_id memleak pcmcia: avoid sysfs-related lockup for cardbus pcmcia: use state machine for extended requery pcmcia: delay re-scanning and re-querying of PCMCIA bus pcmcia: use pccardd to handle eject, insert, suspend and resume requests pcmcia: use ops_mutex for rsrc_{mgr,nonstatic} locking pcmcia: use mutex for dynid lock pcmcia: assert locking to struct pcmcia_device pcmcia: add locking documentation pcmcia: simplify locking pcmcia: add locking to struct pcmcia_socket->pcmcia_state() pcmcia: protect s->device_count pcmcia: properly lock skt->irq, skt->irq_mask pcmcia: lock ops->set_socket ...
2010-02-27MIPS: Alchemy: use 36bit addresses for PCMCIA resources.Manuel Lauss4-45/+23
On Alchemy the PCMCIA area lies at the end of the chips 36bit system bus area. Currently, addresses at the far end of the 32bit area are assumed to belong to the PCMCIA area and fixed up to the real 36bit address before being passed to ioremap(). A previous commit enabled 64 bit physical size for the resource datatype on Alchemy and this allows to use the correct 36bit addresses when registering the PCMCIA sockets. This patch removes the 32-to-36bit address fixup and registers the Alchemy demo board pcmcia socket with the correct 36bit physical addresses. Tested on DB1200, with a CF card (ide-cs driver) and a 3c589 PCMCIA ethernet card. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> To: Linux-MIPS <linux-mips@linux-mips.org> Cc: Manuel Lauss <manuel.lauss@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/994/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27MIPS: Alchemy: XXS1500 PCMCIA driver rewriteManuel Lauss4-189/+369
Rewritten XXS1500 PCMCIA socket driver, standalone (doesn't depend on au1000_generic.c) and added carddetect IRQ support. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Cc: Florian Fainelli <florian@openwrt.org> Cc: Linux-PCMCIA <linux-pcmcia@lists.infradead.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27MIPS: PCMCIA: new socket driver for Au1000 demoboards.Manuel Lauss6-444/+644
New PCMCIA socket driver for all Db/Pb1xxx boards (except Pb1000), which replaces au1000_db1x00.c and (most of) au1000_pb1x00.c. Notable improvements: - supports Db1000, DB/PB1100/1500/1550/1200. - support for carddetect and statuschange IRQs. - pcmcia socket mem/io/attr areas and irqs passed through platform resource information. - doesn't freeze system during card insertion/ejection like the one it replaces. - boardtype is automatically detected using BCSR ID register. Run-tested on the DB1200. Cc: Linux-PCMCIA <linux-pcmcia@lists.infradead.org> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27MIPS: Alchemy: devboard register abstractionManuel Lauss1-37/+39
All Alchemy development boards have external CPLDs with a few registers in them. They all share an identical register layout with only a few minor differences (except the PB1000) in bit functions and base addresses. This patch - adds a primitive facility to initialize and use these external registers, - replaces all occurrences of bcsr->xxx accesses with calls to the new functions (the pb1200 cascade irq handling code is special). - collects BCSR register information scattered throughout the board headers in a central place. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-25pcmcia: validate late-added resourcesDominik Brodowski1-19/+48
Currently, only those mem resources are validated which are already registered at the time the first PCMCIA card is inserted. As we can only validate resources immediately after card insert, store "registered" mem resources in mem_db, and only upon validation move them to mem_db_valid. When allocationg mem resources, mem_db_valid is then preferred to mem_db. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-23PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refsBjorn Helgaas2-4/+4
No functional change; this converts loops that iterate from 0 to PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the pci_bus_for_each_resource() iterator instead. This doesn't change the way resources are stored; it merely removes dependencies on the fact that they're in a table. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-22resource/PCI: mark struct resource as constDominik Brodowski2-4/+5
Now that we return the new resource start position, there is no need to update "struct resource" inside the align function. Therefore, mark the struct resource as const. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-22resource/PCI: align functions now return start of resourceDominik Brodowski2-13/+15
As suggested by Linus, align functions should return the start of a resource, not void. An update of "res->start" is no longer necessary. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-02-17pcmcia: allow for extension of resource intervalDominik Brodowski1-2/+4
If a new interval overlaps or extends an existing interval in add_interval(), do not fail, but extend the existing interval. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: remove useless msleep in ds.cDominik Brodowski2-6/+3
As this is the socket thread (pccardd) starting up, we do not have anything to wait for in ds.c. Instead, wait the same amount of time in pccardd to allow userspace to catch up and - possibly - execute pcmcia-socket-startup. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: use read_cis_mem return valueDominik Brodowski1-19/+44
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: add locking to pcmcia_{read,write}_cis_memDominik Brodowski2-6/+26
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: avoid prod_id memleakDominik Brodowski1-5/+14
Reported-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: avoid sysfs-related lockup for cardbusDominik Brodowski1-2/+10
In cb_free(), we remove some sysfs files -- other sysfs files might grab ops_mutex, so we cannot hold it while removing sysfs files. This fixes http://lkml.org/lkml/2010/1/17/88 . Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: use state machine for extended requeryDominik Brodowski1-70/+22
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>
2010-02-17pcmcia: delay re-scanning and re-querying of PCMCIA busDominik Brodowski5-53/+59
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>
2010-02-17pcmcia: use pccardd to handle eject, insert, suspend and resume requestsDominik Brodowski4-140/+81
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>
2010-02-17pcmcia: use ops_mutex for rsrc_{mgr,nonstatic} lockingDominik Brodowski5-34/+20
Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: use mutex for dynid lockDominik Brodowski1-8/+8
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>
2010-02-17pcmcia: assert locking to struct pcmcia_deviceDominik Brodowski2-56/+104
Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: simplify lockingDominik Brodowski6-74/+47
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>
2010-02-17pcmcia: add locking to struct pcmcia_socket->pcmcia_state()Dominik Brodowski1-3/+30
Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: protect s->device_countDominik Brodowski1-7/+18
Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: properly lock skt->irq, skt->irq_maskDominik Brodowski2-0/+5
Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: lock ops->set_socketDominik Brodowski2-4/+29
As a side effect, socket_state_t socket; u_int state; u_int suspended_state; are properly protected now. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: lock ops->set_io_map()Dominik Brodowski1-0/+10
As a side effect, io_window_t io[MAX_IO_WIN]; is explicitely protected now. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: also lock fake and cache CIS by ops_mutexDominik Brodowski2-1/+23
Specifically, struct list_head cis_cache; size_t fake_cis_len; u8 *fake_cis; are protected. Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: add locking to set_mem_map()Dominik Brodowski4-5/+30
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>
2010-02-17pcmcia/i82365: fix typos in commentsWolfram Sang1-2/+2
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia/omap_cf: don't redefine SZ_2KUwe Kleine-König1-2/+0
This fixes: drivers/pcmcia/omap_cf.c:74:1: warning: "SZ_2K" redefined Since c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM) SZ_2K is defined in arch/arm/include/asm/sizes.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia/at91_cf: don't redefine SZ_2KUwe Kleine-König1-2/+0
This fixes: drivers/pcmcia/at91_cf.c:55:1: warning: "SZ_2K" redefined Since c1191b0 ([ARM] Kirkwood: create a mapping for the Security Accelerator SRAM) SZ_2K is defined in arch/arm/include/asm/sizes.h. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia/bfin_cf: don't check platform_get_irq's return value against zeroUwe Kleine-König1-1/+1
platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Better use irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: David Vrabel <dvrabel@arcom.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia/yenta: add module parameter for O2 speedupsWolfram Sang2-16/+34
O2-bridges can do read prefetch and write burst. However, for some combinations of older bridges and cards, this causes problems, so it is disabled for those bridges. Now, as some users know their setup works with the speedups enabled, a new parameter is introduced to the driver. Now, a user can specifically enable or disable these features, while the default is what we have today: detect the bridge and decide accordingly. Fixes Bugzilla entry 15014. Simplify and unify the printouts, fix a whitespace issue while we are here. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: frodone@gmail.com [linux@dominikbrodowski.net: whitespace fixes] Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: make Open Firmware device id constantMárton Németh2-2/+2
The match_table field of the struct of_device_id is constant in <linux/of_platform.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: fix yenta dependency on PCCARD_NONSTATICMichal Marek1-3/+3
With CONFIG_PCMCIA=m and CONFIG_YENTA=y, we get drivers/built-in.o: In function `yenta_probe': yenta_socket.c:(.devinit.text+0x1e582): undefined reference to `pccard_nonstatic_ops' This is because select PCCARD_NONSTATIC if PCMCIA sets PCCARD_NONSTATIC = min(YENTA, PCMCIA). Change it to 'if PCMCIA!=n' to remove the upper limit. [linux@dominikbrodowski.net: propagate change to PCMICA_M8XX] Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2010-02-17pcmcia: do not use resource manager on !PCMCIADominik Brodowski1-2/+2
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>
2010-02-17pcmcia: remove remaining rsrc_mgr indirectionsDominik Brodowski3-28/+23
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>
2010-02-17pcmcia: move cistpl.c into pcmcia moduleDominik Brodowski6-187/+183
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>
2010-02-17pcmcia: m8xx_pcmcia.c should use iodyn resource managerDominik Brodowski2-2/+1
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>