summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
Commit message (Collapse)AuthorAgeFilesLines
* [MMC] pxamci: fix data timeout calculationRussell King2006-04-241-6/+4
| | | | | | | | | | | The MMC layer gives us two parts for the timeout calculation - a fixed timeout in nanoseconds, and a card clock-speed dependent part. The PXA MMC hardware allows for a timeout based on the fixed host clock speed only. This resulted in some cards being given a short timeout, and therefore failing to work. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3457/1: i.MX: SD/MMC support for i.MX/MX1Pavel Pisa2006-04-024-0/+1174
| | | | | | | | | | | | | | | | | | | | | | | | Patch from Pavel Pisa This patch adds support of i.MX/MX1 SD/MMC controller. It has been significantly redesigned from the original Sascha Hauer's version to support scatter-gather DMA, to conform to latest Pierre Ossman's and Russell King's MMC-SD Linux 2.6.x infrastructure. The handling of all events has been moved to the softirq context and is designed with no busy-looping in mind. Unfortunately some controller bugs has to be overcome by limited looping about 2-20 usec but these are observed only for initial card recognition phase. There are still some missing/missed IRQs problems under heavy load. Help of somebody with access to the full SDHC design information is probably necessary. Regenerated against 2.6.16-git-060402 to solve clash with other patches. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3456/1: AT91RM9200 support for 2.6 (MMC/SD driver)Andrew Victor2006-04-023-0/+997
| | | | | | | | | | | | | Patch from Andrew Victor This patch adds support for the MMC/SD card interface on the Atmel AT91RM9200 processor. Original driver was by Nick Randell, but a number of people have subsequently worked on it. It's currently maintained by Malcolm Noyes. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Pass -DDEBUG on compiler command line if MMC_DEBUG selectedRussell King2006-03-298-58/+32
| | | | | | | | | | Rather than each driver test MMC_DEBUG itself, and define DEBUG, pass it in via the makefile instead. Fix drivers to use pr_debug() where appropriate, and avoid defining a DEBUG() macro. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Add OMAP MMC host driverCarlos Aguiar2006-03-294-0/+1298
| | | | | | | | | Adds OMAP MMC driver. Signed-off-by: Juha Yrjölä <juha.yrjola@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Carlos Aguiar <carlos.aguiar@indt.org.br> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] Remove MODULE_PARMRusty Russell2006-03-251-1/+1
| | | | | | | | | | MODULE_PARM was actually breaking: recent gcc version optimize them out as unused. It's time to replace the last users, which are generally in the most unloved drivers anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mmc: Secure Digital Host Controller Interface driverPierre Ossman2006-03-244-0/+1462
| | | | | | | | | Driver for the Secure Digital Host Controller Interface specification. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] handle errors returned by platform_get_irq*()David Vrabel2006-03-201-1/+1
| | | | | | | | | platform_get_irq*() now returns on -ENXIO when the resource cannot be found. Ensure all users of platform_get_irq*() handle this error appropriately. Signed-off-by: David Vrabel <dvrabel@arcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [MMC] au1xmmc: Fix a compilation warning ('status' is not used)Martin Michlmayr2006-03-041-1/+0
| | | | | | | | | | | | Fix a trivial compilation warning: CC drivers/mmc/au1xmmc.o drivers/mmc/au1xmmc.c: In function ‘au1xmmc_dma_callback’: drivers/mmc/au1xmmc.c:743: warning: unused variable ‘status’ Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] au1xmmc: Fix linking error because mmc_rsp_type doesn't existMartin Michlmayr2006-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/mmc/au1xmmc.c doesn't compile because commit e92251762d02a46177d4105d1744041e3f8bc465 introduced a typo and passes the wrong argument to the mmc_resp_type macro. Error because of the typo: CC drivers/mmc/au1xmmc.o drivers/mmc/au1xmmc.c: In function ‘au1xmmc_send_command’: drivers/mmc/au1xmmc.c:197: warning: implicit declaration of function ‘mmc_rsp_type’ ... LD .tmp_vmlinux1 drivers/built-in.o: In function `au1xmmc_request':au1xmmc.c:(.text+0x89504): undefined reference to `mmc_rsp_type' :au1xmmc.c:(.text+0x8968c): undefined reference to `mmc_rsp_type' make: *** [.tmp_vmlinux1] Error 1 Error because of the wrong argument: CC drivers/mmc/au1xmmc.o drivers/mmc/au1xmmc.c: In function ‘au1xmmc_send_command’: drivers/mmc/au1xmmc.c:197: error: invalid type argument of ‘->’ Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] au1xmmc: Fix compilation error by using platform_driverMartin Michlmayr2006-03-041-10/+11
| | | | | | | | | | | | | | | drivers/mmc/au1xmmc.c currently doesn't compile; it needs to be converted to use platform_driver. I cannot test this change because of lack of hardware but I followed the drivers this one is based on, and the code is certainly not worse than before. drivers/mmc/au1xmmc.c: At top level: drivers/mmc/au1xmmc.c:1002: error: ‘platform_bus_type’ undeclared here (not in a function) make[2]: *** [drivers/mmc/au1xmmc.o] Error 1 Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] mmci: allow small data transfersRussell King2006-02-161-0/+7
| | | | | | | | | | | If a data transfer is small (less than a FIFO size) we would hang waiting for the data to be read due to the PIO interrupt not occuring. We allowed for this in our PIO interrupt handler, but not when setting up a data transfer. Apply the "fix" when setting up a data transfer as well. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Remove extra character in AU1XXX MMC Kconfig entryJordan Crouse2006-02-081-1/+1
| | | | | | | An obvious vi fat finger on my part. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Add MMC command type flagsRussell King2006-02-026-63/+60
| | | | | | | Some hosts need to know the command type, so pass it via a set of flags in cmd->flags. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2006-01-141-2/+3
|\
| * [MMC] mmc_blk_probe() warning fixAndrew Morton2006-01-131-2/+3
| | | | | | | | | | | | | | | | | | | | drivers/mmc/mmc_block.c: In function `mmc_blk_probe': drivers/mmc/mmc_block.c:467: warning: long unsigned int format, different type arg (arg 5) We don't know what size sector_t is - cast it. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] Add mmc_bus_type probe and remove methodsRussell King2006-01-131-14/+12
|/ | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [MMC+MFD] Convert mmc to mutexesArjan van de Ven2006-01-121-5/+6
| | | | | | | convert mfd and mmc to mutexes Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2006-01-093-264/+278
|\
| * [MMC] Add DATA_MULTI flagRussell King2006-01-091-1/+7
| | | | | | | | | | | | | | Some hosts need to know that a transfer will be multi-block. Add a data flag to indicate multiple data block transfers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [MMC] Lindent wbsd driverPierre Ossman2006-01-081-252/+185
| | | | | | | | | | | | | | Fix the coding style in the wbsd driver once and for all. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [MMC] Support MMC version 4 cardsPierre Ossman2006-01-081-0/+1
| | | | | | | | | | | | | | | | | | Version 4 of the MMC specification increased the version number of the CID structure. None of the fields changed though so the only required change is adding '4' to the approved list. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * [MMC] wbsd pnp suspendPierre Ossman2006-01-081-16/+90
| | | | | | | | | | | | | | | | Allow the wbsd driver to use the new suspend/resume functions added to the PnP layer. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] Add block_device_operations.getgeo block device methodChristoph Hellwig2006-01-081-19/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | HDIO_GETGEO is implemented in most block drivers, and all of them have to duplicate the code to copy the structure to userspace, as well as getting the start sector. This patch moves that to common code [1] and adds a ->getgeo method to fill out the raw kernel hd_geometry structure. For many drivers this means ->ioctl can go away now. [1] the s390 block drivers are odd in this respect. xpram sets ->start to 4 always which seems more than odd, and the dasd driver shifts the start offset around, probably because of it's non-standard sector size. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Jens Axboe <axboe@suse.de> Cc: <mike.miller@hp.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2006-01-071-10/+3
|\
| * [ARM] Move asm/hardware/clock.h to linux/clk.hRussell King2006-01-071-1/+1
| | | | | | | | | | | | | | This is needs to be visible to other architectures using the AMBA bus and peripherals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * Merge with Linus' kernel.Russell King2006-01-072-4/+4
| |\
| * | [ARM] Move AMBA include files to include/linux/amba/Russell King2006-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the ARM AMBA bus is used on MIPS as well as ARM, we need to make the bus available for other architectures to use. Move the AMBA include files from include/asm-arm/hardware/ to include/linux/amba/ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | [ARM] Remove clk_use()/clk_unuse()Russell King2006-01-031-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that clk_use() and clk_unuse() are additional complexity which isn't required anymore. Remove them from the clock framework to avoid the additional confusion which they cause, and update all ARM machine types except for OMAP. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2006-01-075-75/+158
|\ \ \ | |_|/ |/| |
| * | [MMC] mmci: kunmap_atomic() unmaps virtual address, not pageEvgeniy Polyakov2006-01-052-3/+3
| | | | | | | | | | | | | | | | | | Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | [MMC] mmci: add data cache coherencyRussell King2006-01-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Since MMCI currently uses PIO to read data, we have to take steps to ensure data cache coherency on aliasing CPU caches. Add the necessary flush_dcache_page() calls. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | [MMC] wbsd: convert to the new platfrom device interfaceDmitry Torokhov2006-01-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_device_register_simple() is going away, switch to using platfrom_device_alloc() + platform_device_add(). Also make sure that wbsd_driver gets unregistered when wbsd_init fails. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
| * | [MMC] wbsd: make use of ARRAY_SIZE() macroDmitry Torokhov2006-01-031-6/+3
| | | | | | | | | | | | | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
| * | [MMC] Improve MMC card block size selectionRussell King2006-01-032-62/+123
| |/ | | | | | | | | | | | | | | | | | | | | Select a block size for IO based on the read and write block size combinations, and whether the card supports partial block reads and/or partial block writes. If we are able to satisfy block reads but not block writes, mark the device read only. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()Tejun Heo2006-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add @uptodate argument to end_that_request_last() and @error to rq_end_io_fn(). there's no generic way to pass error code to request completion function, making generic error handling of non-fs request difficult (rq->errors is driver-specific and each driver uses it differently). this patch adds @uptodate to end_that_request_last() and @error to rq_end_io_fn(). for fs requests, this doesn't really matter, so just using the same uptodate argument used in the last call to end_that_request_first() should suffice. imho, this can also help the generic command-carrying request jens is working on. Signed-off-by: tejun heo <htejun@gmail.com> Signed-Off-By: Jens Axboe <axboe@suse.de>
* | [PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers2006-01-041-2/+2
|/ | | | | | | | | Leave the overloaded "hotplug" word to susbsystems which are handling real devices. The driver core does not "plug" anything, it just exports the state to userspace and generates events. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [MMC] Set correct capacity for 1024-byte block cardsRussell King2005-12-221-5/+9
| | | | | | | | | | | | | | | | | | | We were passing set_capacity() the capacity we calculated in terms of the number of blocks on the card, which happened to be the right units for 512-byte block cards. However, with 1024-byte block cards, we end up setting the capacity to half the number of blocks. Fix this by shifting by the appropriate amount. Thanks to Todd Blumer for pointing this out. Use get_capacity() to report the card capacity, rather than recalculating it from the CSD information. Finally, use our chosen IO block size for the SET_BLOCKLEN command rather than the CSD read block size. Currently these are equivalent, but will not be in the future. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Explain the internals of mmc_power_up()Russell King2005-12-141-1/+9
| | | | | | | | It seems that people get confused about what is happening in mmc_power_up(). Add a comment to make it clear why we have a two stage process. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Proper check of SCR error codePierre Ossman2005-12-051-2/+3
| | | | | | | | The routine reading the SCR wasn't paying proper attention to the error codes returned from the driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] Fix protocol errorsPierre Ossman2005-11-281-1/+1
| | | | | | | | A review against MMC/SD specifications found some errors in the current implementation. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [MMC] mmci doesn't need asm/irq.hRussell King2005-11-121-1/+0
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds2005-11-112-34/+35
|\
| * [DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King2005-11-092-34/+35
| | | | | | | | | | | | | | | | | | This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
* | [MMC] wbsd version 1.5Pierre Ossman2005-11-091-1/+1
| | | | | | | | | | | | | | New kernel, new patches, new version. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [MMC] Add MODULE_AUTHOR to wbsdPierre Ossman2005-11-091-0/+1
| | | | | | | | | | | | | | 'cause I'm in it for the chicks. ;) Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [MMC] Use __devexit_p in wbsdPierre Ossman2005-11-091-2/+2
|/ | | | | | | | wbsd_*_remove() is declared as __devexit but __devexit_p isn't used when taking their addresses. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2005-11-071-1/+1
|\
| * [ARM] 3120/1: Fix MMC/SD card driver resume deadlockUli Luckas2005-11-071-1/+1
| | | | | | | | | | | | | | | | | | Patch from Uli Luckas This is a simplification of patch 3116/1 as sugested by Russell King. Signed-off-by: Uli Luckas <u.luckas@road-gmbh.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | [PATCH] kfree cleanup: misc remaining driversJesper Juhl2005-11-071-2/+1
|/ | | | | | | | | | | | | | | | | | This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>