aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-01-08[PATCH] Add block_device_operations.getgeo block device methodChristoph Hellwig1-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>
2006-01-07Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-10/+3
2006-01-07Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds5-75/+158
2006-01-07[ARM] Move asm/hardware/clock.h to linux/clk.hRussell King1-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>
2006-01-07Merge with Linus' kernel.Russell King2-4/+4
2006-01-07[ARM] Move AMBA include files to include/linux/amba/Russell King1-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>
2006-01-06[BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()Tejun Heo1-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>
2006-01-05[MMC] mmci: kunmap_atomic() unmaps virtual address, not pageEvgeniy Polyakov2-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>
2006-01-04[PATCH] driver core: replace "hotplug" by "uevent"Kay Sievers1-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>
2006-01-04[MMC] mmci: add data cache coherencyRussell King1-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>
2006-01-03[MMC] wbsd: convert to the new platfrom device interfaceDmitry Torokhov1-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>
2006-01-03[MMC] wbsd: make use of ARRAY_SIZE() macroDmitry Torokhov1-6/+3
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
2006-01-03[MMC] Improve MMC card block size selectionRussell King2-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>
2006-01-03[ARM] Remove clk_use()/clk_unuse()Russell King1-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>
2005-12-22[MMC] Set correct capacity for 1024-byte block cardsRussell King1-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>
2005-12-14[MMC] Explain the internals of mmc_power_up()Russell King1-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>
2005-12-05[MMC] Proper check of SCR error codePierre Ossman1-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>
2005-11-28[MMC] Fix protocol errorsPierre Ossman1-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>
2005-11-12[MMC] mmci doesn't need asm/irq.hRussell King1-1/+0
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-11Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds2-34/+35
2005-11-09[MMC] wbsd version 1.5Pierre Ossman1-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>
2005-11-09[MMC] Add MODULE_AUTHOR to wbsdPierre Ossman1-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>
2005-11-09[MMC] Use __devexit_p in wbsdPierre Ossman1-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>
2005-11-09[DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King2-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>
2005-11-07Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds1-1/+1
2005-11-07[ARM] 3120/1: Fix MMC/SD card driver resume deadlockUli Luckas1-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>
2005-11-07[PATCH] kfree cleanup: misc remaining driversJesper Juhl1-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>
2005-11-05[MMC] Use controller id instead of driver name for printksPierre Ossman1-5/+6
The printks that aren't for debugging should use the name of the controller, not the driver name. Multiple MMC controllers aren't that common today, but this is the right way to do things. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-05[MMC] Fix chip config in wbsdPierre Ossman1-2/+2
There is a broken if clause in the wbsd driver that can cause the driver to try and configure the chip even though none is found. This results in i/o on invalid ports. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-04[MMC] Response to write commands is R1 nor R1bRussell King1-1/+0
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-31Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds2-2/+2
Manual #include fixups for clashes - there may be some unnecessary
2005-10-30[MMC] Use command class to determine read-only statusPierre Ossman1-2/+8
If a card doesn't support the "write block" command class then any attempts to open the device should reflect this by denying write access. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-30[MMC] pxamci doesn't need to include asm/irq.hRussell King1-1/+0
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29Au1[12]00 mmc driver. Only tested on the Au1200 at this point thoughPete Popov4-0/+1132
it should work on the Au1100 as well. Updated defconfig to include driver. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29Create platform_device.h to contain all the platform device details.Russell King2-2/+2
Convert everyone who uses platform_bus_type to include linux/platform_device.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[MMC] wbsd suspend supportPierre Ossman1-28/+91
Proper handling of suspend/resume in the wbsd driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28Merge ../bleed-2.6Greg KH1-0/+1
2005-10-28[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacksRussell King2-6/+6
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[ARM] 3/4: Remove asm/hardware.h from Versatile and Integrator io.hRussell King1-0/+1
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-12[MMC] Clean up wbsd detection handlingPierre Ossman1-17/+12
The wbsd driver's card detection routing is a bit of a mess. This patch cleans up the routine and makes it a bit more comprihensible. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-12[MMC] Remove unused timer.Pierre Ossman1-1/+0
Remove timer that was left from earlier cleanup. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-12[MMC] Remove trailing whitespace in wbsdPierre Ossman2-219/+219
Clean out trailing whitespace caused by not-so-great editor since it generates a lot of problems with editors configured to automatically strip whitespace. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-10[MMC] Add mmc_detect_change() delay support for wbsd driverRussell King1-22/+5
Convert wbsd to use the new delay functionality in mmc_detect_change() rather than implementing its own timer. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-08[MMC] Add mmc_detect_change() delay support for PXAMCI driverRichard Purdie1-1/+3
Allow PXA platforms to pass an appropriate delay value to the PXA MCI driver for delaying detection changes. Signed-Off-By: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-08[MMC] Allow detection/removal to be delayedRichard Purdie4-8/+12
Change mmc_detect_change() to take a delay argument such that the detection of card insertions and removals can be delayed according to the requirements of the host driver or platform. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-07[PATCH] mmc: conditional scr sysfs entryPierre Ossman1-3/+18
Only show the scr file in sysfs for SD cards. Previously this was present for all cards but had a contents of 0 for MMC cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] mmc: wbsd Secure Digital supportPierre Ossman2-6/+57
Add support for Secure Digital specific features in the wbsd driver. Adds support for read-only switch and wide bus transfers. 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>
2005-09-07[PATCH] Add write protection switch handling to the PXA MMC driverRichard Purdie1-0/+11
Add a write protection switch handling code to the PXA MMC driver so that platform specific code can provide it if available. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] sd: SD copyright noticePierre Ossman1-0/+2
Credit where credit is due. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] sd: SD 4-bit busPierre Ossman1-0/+36
Infrastructure for 4-bit bus transfers with SD cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>