aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmci.c
AgeCommit message (Collapse)Author
2008-05-04[ARM] 5024/1: Fix some minor clk issues in the MMCI PL18x driverLinus Walleij
This fixes some two minor clk issues. The first is a comparison where a byte will probably wrap around to 0 instead of being saturated to 255, shouldn't be triggered very often but need fixing. The second is an attempt by the driver to adjust MCLK down to the maximum frequency according to the spec, so we don't accidentally overclock the PL18x block. None of the mach-{versatile|integrator|lh7a40x} that use it in-tree seem to have a problem with this (all are well below 100MHz, typically 33MHz), but some day there will be a problem. This is not applied on top of the earlier mmci patch for race condition but rather a clean 2.6.25, but I guess it applies without major protests anyway. Signed-off-by: Linus Walleij <triad@df.lth.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-28[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2Linus Walleij
Updated version of 4446/1. This also drops the suggested comparison of host_remain for == 0, since that doesn't make sense (still works for us, too). We have verified that this patch solve race problems on atleast 2 archs at high frequencies. (Verbatim copy of old patch text below.) The patch below fixes a race condition in the ARM MMCI PL18x driver. If new data arrives in the FIFO while existing data is being read then we get a second iteration of the loop in mmci_pio_read. However host->size is not updated until after mmci_pio_read returns, so we get count = number of new bytes PLUS number of bytes already copied in the first iteration. This results in a FIFO underrun as we try and read mode data than is available. The fix is to compensating for data read on previous iterations when calculating the amount of data in the FIFO. Signed-off-by: Linus Walleij <triad@df.lth.se> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-24mmc: sg falloutJens Axboe
Do a full scan of the directory to try and be a bit more proactive, instead of waiting for things to break. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-11mmc: don't use weight32()Nicolas Pitre
Using weight32() to determine if a value is a power of 2 is a rather heavi weight solution. The classic idiom is (x & (x - 1)) == 0, but the kernel already provide a is_power_of_2 function for it. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove BYTEBLOCK capabilityPierre Ossman
Remove the BYTEBLOCK capability and let the broken hosts fail the requests with -EINVAL instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23mmc: remove custom error codesPierre Ossman
Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-07-26mmc: update header file pathsPierre Ossman
Make sure all headers in the files reflect their true position in the tree. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01mmc: Move host and card drivers to subdirsPierre Ossman
Clean up the drivers/mmc directory by moving card and host drivers into subdirectories. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>