aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-07[MMC] Always use a sector size of 512 bytesPierre Ossman1-45/+4
Both MMC and SD specifications specify (although a bit unclearly in the MMC case) that a sector size of 512 bytes must always be supported by the card. Cards can report larger "native" size than this, and cards >= 2 GB even must do so. Most other readers use 512 bytes even for these cards. We should do the same to be compatible. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-07[MMC] Cleanup 385e3227d4d83ab13d7767c4bb3593b0256bf246Russell King2-48/+51
Rather than having two places which independently calculate the timeout for data transfers, make it a library function instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Pierre Ossman <drzeus@drzeus.cx>
2006-09-07[ARM] 3751/1: i.MX/MX1 SD/MMC use 512 bytes request for SCR readPavel Pisa1-34/+35
Patch from Pavel Pisa This is another approach to SDHC deficiency workaround. It seems, that previous solution based on 16 bytes (FIFO length size) read is still timing sensitive on genirq and fully preemptive kernels. The new solution is backuped by M9328 UM statement, that only 512 byte block are working properly and by 2.4.26 FreeScale's SDHC code. Jay Monkman reports significant improvement on code based on this driver after applying this change on MX21 as well. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-07[MMC] Fix SD timeout calculationPierre Ossman2-10/+49
Secure Digital cards use a different algorithm to calculate the timeout for data transfers. Using the MMC one works often, but not always. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-07[MMC] Another stray 'io' referencePierre Ossman1-1/+2
Another misuse of the global 'io' variable instead of the local 'base'. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06[MMC] Fix base address configuration in wbsdPierre Ossman1-3/+3
There were some confusion about base I/O variables in the wbsd driver. Seems like things have been working on shear luck so far. The global 'io' variable (used when manually configuring the resources) was used instead of the local 'base' variable. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-08-06[ARM] 3744/1: MMC: mmcqd gets stuck when block queue is pluggedJuha [êölä1-1/+2
Patch from Juha [êölä When the block queue is plugged, mq->req must be set to NULL. Otherwise mq->req might be left non-NULL, even though mmcqd is not processing a request, thus preventing the MMC queue thread from being woken up when new requests do arrive. Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-13[MMC] Change SDHCI version error to a warningPierre Ossman1-3/+1
O2 Micro's controllers have a larger specification version value and are therefore denied by the driver. When bypassing this check they seem to work fine. This patch makes the code a bit more forgiving by changing the error to a warning. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-13[MMC] Fix incorrect register accessPierre Ossman1-1/+1
There was a writel() being used on a 16-bit register. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-03[PATCH] lockdep: annotate on-stack completions, mmcIngo Molnar1-1/+1
lockdep needs to have the waitqueue lock initialized for on-stack waitqueues implicitly initialized by DECLARE_COMPLETION(). Annotate mmc_wait_for_req()'s on-stack completion accordingly. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds1-6/+49
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc: [MMC] sdhci: remove duplicate error message [MMC] sdhci: force DMA on some controllers [MMC] sdhci: quirk for broken reset [MMC] sdhci: Add SDHCI controller ids
2006-07-02Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-23/+20
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits) [ARM] 3541/2: workaround for PXA27x erratum E7 [ARM] nommu: provide a way for correct control register value selection [ARM] 3705/1: add supersection support to ioremap() [ARM] 3707/1: iwmmxt: use the generic thread notifier infrastructure [ARM] 3706/2: ep93xx: add cirrus logic edb9315a support [ARM] 3704/1: format IOP Kconfig with tabs, create more consistency [ARM] 3703/1: Add help description for ARCH_EP80219 [ARM] 3678/1: MMC: Make OMAP MMC work [ARM] 3677/1: OMAP: Update H2 defconfig [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1 [ARM] Add section support to ioremap [ARM] Fix sa11x0 SDRAM selection [ARM] Set bit 4 on section mappings correctly depending on CPU [ARM] 3666/1: TRIZEPS4 [1/5] core ARM: OMAP: Multiplexing for 24xx GPMC wait pin monitoring ARM: OMAP: Fix SRAM to use MT_MEMORY instead of MT_DEVICE ARM: OMAP: Update dmtimers ARM: OMAP: Make clock variables static ARM: OMAP: Fix GPMC compilation when DEBUG is defined ARM: OMAP: Mux updates for external DMA and GPIO ...
2006-07-02Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2-168/+407
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-mmc: [MMC] sdhci: version bump sdhci [MMC] sdhci: support controller specific quirks [MMC] sdhci: more DMA capabilities tests [MMC] sdhci: reset sdhci controller early [MMC] sdhci: check controller version [MMC] sdhci: check only relevant inhibit bits [MMC] sdhci: Test for invalid block size [MMC] sdhci: Avoid sdhci DMA boundaries [MMC] Fix sdhci PIO routines [MMC] sdhci: fix interrupt handling [MMC] sdhci: correct register order [MMC] sdhci: proper timeout handling [MMC] sdhci: fix sdhci reset timeout [MMC] sdhci: fix timeout loops in sdhci [MMC] sdhci: support for multiple voltages [MMC] sdhci: print device id [MMC] sdhci: check SDHCI base clock
2006-07-02[PATCH] irq-flags: misc drivers: Use the new IRQF_ constantsThomas Gleixner6-7/+7
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02[MMC] sdhci: remove duplicate error messagePierre Ossman1-3/+1
When there is remaining blocks untransferred, we get two error messages saying almost the same thing. Make sure at most one is shown. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: force DMA on some controllersPierre Ossman1-2/+22
Some controllers incorrectly report that the cannot do DMA. Forcefully enable it for those that we know it works fine on. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: quirk for broken resetPierre Ossman1-2/+27
Some controllers fail to complete a reset unless you touch the clock register first. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: version bump sdhciPierre Ossman1-1/+1
New version number for sdhci driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: support controller specific quirksPierre Ossman2-0/+9
As some specific controllers will have bugs, we need a way to map special behaviour to certain hardware. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: more DMA capabilities testsPierre Ossman2-1/+33
Properly test for controller interface to see if it's DMA capable. As many controllers are misconfigured in this regard, also add debug parameters to force DMA support either way. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: reset sdhci controller earlyPierre Ossman1-0/+2
The specification states that the capabilities register might need a reset to get correct values after boot up. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: check controller versionPierre Ossman2-0/+15
Check the interface version of the controller and bail out if it's an unknown version. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: check only relevant inhibit bitsPierre Ossman1-3/+13
Conform to the sdhci specification as to which inhibit bits should be checked at different times. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: Test for invalid block sizePierre Ossman2-0/+14
The controller has an upper limit on the block size. Make sure we do not cross it. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: Avoid sdhci DMA boundariesPierre Ossman2-4/+10
The sdhci controllers will issue an interrupt when a configurable number of bytes have been transfered using DMA. The purpose is to handle multiple, scattered memory pages. Unfortunately, it requires that all transfers are completely aligned to memory pages, which we cannot guarantee. So we just disable the function. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] Fix sdhci PIO routinesPierre Ossman2-63/+101
The sdhci controllers operate with blocks, not bytes. The PIO routines must therefore make sure that the minimum unit transfered is a complete block. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: fix interrupt handlingPierre Ossman1-56/+24
The specification says that interrupts should be cleared before the source is removed. We should also not set unknown bits. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: correct register orderPierre Ossman1-17/+27
The sdhci specification states that some registers must be written to in a specific order. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: proper timeout handlingPierre Ossman2-3/+48
Use the give timeout clock and calculate a proper timeout instead of using the maximum at all times. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: fix sdhci reset timeoutPierre Ossman1-4/+17
The reset register is automatically cleared when the reset has completed. Hence, we should busy wait and not have a fixed delay. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: fix timeout loops in sdhciPierre Ossman1-13/+16
The current timeout loop assume that jiffies are updated. This might not be the case depending on locks and if the kernel is compiled without preemption. Change the system to use a counter and fixed delays. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: support for multiple voltagesPierre Ossman2-4/+66
The sdhci controllers can support up to three voltage levels. Detect which and report back to the MMC layer. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: print device idPierre Ossman1-2/+7
As sdhci is a generic driver, it is helpful to see some more specific identification of the actual hardware in dmesg. PCI vendor, device and revision is sufficient in most cases. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-02[MMC] sdhci: check SDHCI base clockPierre Ossman1-4/+11
A base clock value of 0 means that the driver must get the base clock through some other means. As we have no other way of getting it, we must abort. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-01[ARM] 3678/1: MMC: Make OMAP MMC workTony Lindgren1-22/+19
Patch from Tony Lindgren This patch makes OMAP MMC work again: - Fix compile errors - Do not ioremap base as it is already statically mapped - Clean-up platform device handling - Fix compile warnings Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel8-8/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6Linus Torvalds1-4/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits) [PATCH] devfs: Remove it from the feature_removal.txt file [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree [PATCH] devfs: Remove devfs_remove() function from the kernel tree [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree [PATCH] devfs: Remove devfs support from the sound subsystem [PATCH] devfs: Remove devfs support from the ide subsystem. [PATCH] devfs: Remove devfs support from the serial subsystem [PATCH] devfs: Remove devfs from the init code [PATCH] devfs: Remove devfs from the partition code ...
2006-06-27[PATCH] 64bit resource: fix up printks for resources in misc driversGreg Kroah-Hartman1-2/+2
This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26ARM: OMAP: Fix DMA channel irq handling for omap24xxTony Lindgren1-1/+1
- DMA CSR register is cleared by reading on omap1, but on omap2 it is cleard by writing to it. - DMA TOUT interrupt does not exist on omap24xx, rename it - Add SECURE and MISALIGNED errors by default for omap24xx - Add defines for external DMA request lines Signed-off-by: Tony Lindgren <tony@atomide.com>
2006-06-26[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer neededGreg Kroah-Hartman1-1/+0
And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26[PATCH] devfs: Remove the devfs_fs_kernel.h file from the treeGreg Kroah-Hartman1-1/+0
Also fixes up all files that #include it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26[PATCH] devfs: Remove devfs_remove() function from the kernel treeGreg Kroah-Hartman1-1/+0
Removes the devfs_remove() function and all callers of it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26[PATCH] devfs: Remove devfs_mk_dir() function from the kernel treeGreg Kroah-Hartman1-1/+0
Removes the devfs_mk_dir() function and all callers of it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-19[ARM] 3565/1: AT91RM9200 MMC updateAndrew Victor1-74/+65
Patch from Andrew Victor This patch includes code cleanups and minor fixes to the AT91RM9200 MMC driver. 1. Replace calls to DBG() with pr_debug(). 2. 'host' can never be null, so don't bother checking for that case. 3. Remove SA_SAMPLE_RANDOM from request_irq(). [Patch from Matt Mackall] 4. clk_get() doesn't return NULL on error - need to test returned value with IS_ERR(). 5. Free resources if clk_get() or request_irq() fails. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-19[MMC] Convert all hosts except mmci to use data->blkszRussell King4-9/+9
The MMC specification allows non-power of two block sizes. As such, we should not pass the log2 block size to host drivers, but instead pass the byte size. However, ARM MMCI can only work with log2 block size, so continue to pass both the log2 block size and byte block size. This means that for the moment, the byte block size must remain a power of two, but this is the first stage of removing this restriction for other hosts. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-12[MMC] sdhci truncated pointer fixAndrew Morton1-1/+1
On 64-bit machines, we just lost the uppermost 32 bits. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-06-04[MMC] Prevent au1xmmc.c breakage on non-Au1200 AlchemyRalf Baechle1-1/+1
The driver is selectable on other than Au1200 Alchemy systems but won't build nor work - there is no MMC hw. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-24[MMC] Fix premature use of md->diskPierre Ossman1-1/+1
md->disk was being used in a debug message before it was allocated. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-19[ARM] 3531/1: i.MX/MX1 SD/MMC ensure, that clock are stopped before new command and cleanupsPavel Pisa6-19/+25
Patch from Pavel Pisa There has been problems that for some paths that clock are not stopped during new command programming and initiation. Result is issuing of incorrect command to the card. Some other problems are cleaned too. Noisy report of known ERRATUM #4 has been suppressed. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-04[MMC] Move set_ios debugging into mmc.cRussell King8-43/+34
Rather than having every driver duplicate the set_ios debugging, provide a single version in mmc.c which can be expanded as we add additional functionality. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>