summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | block: implement and enforce request peek/start/fetchTejun Heo2009-05-111-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Till now block layer allowed two separate modes of request execution. A request is always acquired from the request queue via elv_next_request(). After that, drivers are free to either dequeue it or process it without dequeueing. Dequeue allows elv_next_request() to return the next request so that multiple requests can be in flight. Executing requests without dequeueing has its merits mostly in allowing drivers for simpler devices which can't do sg to deal with segments only without considering request boundary. However, the benefit this brings is dubious and declining while the cost of the API ambiguity is increasing. Segment based drivers are usually for very old or limited devices and as converting to dequeueing model isn't difficult, it doesn't justify the API overhead it puts on block layer and its more modern users. Previous patches converted all block low level drivers to dequeueing model. This patch completes the API transition by... * renaming elv_next_request() to blk_peek_request() * renaming blkdev_dequeue_request() to blk_start_request() * adding blk_fetch_request() which is combination of peek and start * disallowing completion of queued (not started) requests * applying new API to all LLDs Renamings are for consistency and to break out of tree code so that it's apparent that out of tree drivers need updating. [ Impact: block request issue API cleanup, no functional change ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Mike Miller <mike.miller@hp.com> Cc: unsik Kim <donari75@gmail.com> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: David S. Miller <davem@davemloft.net> Cc: Laurent Vivier <Laurent@lvivier.info> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Stefan Weinhuber <wein@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | | | | | block: convert to dequeueing model (easy ones)Tejun Heo2009-05-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and mmc/card/queue are already pretty close to dequeueing model and can be converted with simple changes. Convert them. While at it, * xen-blkfront: !fs check moved downwards to share dequeue call with normal path. * mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to __blk_end_request_cur() * mmc/card/queue: loop of __blk_end_request() converted to __blk_end_request_all() [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alex Dubov <oakad@yahoo.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | | | | | block: convert to pos and nr_sectors accessorsTejun Heo2009-05-111-5/+5
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With recent cleanups, there is no place where low level driver directly manipulates request fields. This means that the 'hard' request fields always equal the !hard fields. Convert all rq->sectors, nr_sectors and current_nr_sectors references to accessors. While at it, drop superflous blk_rq_pos() < 0 test in swim.c. [ Impact: use pos and nr_sectors accessors ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Tested-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Acked-by: Mike Miller <mike.miller@hp.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Clements <paul.clements@steeleye.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Dario Ballabio <ballabio_dario@emc.com> Cc: David S. Miller <davem@davemloft.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: unsik Kim <donari75@gmail.com> Cc: Laurent Vivier <Laurent@lvivier.info> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | | | | | sdhci-of: Fix the wrong accessor to HOSTVER registerDave Liu2009-06-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freescale eSDHC controller has the special order for the HOST version register. that is not same as the other's registers. The address of HOSTVER in spec is 0xFE, and we need use the in_be16(0xFE) to access it, not in_be16(0xFC). Signed-off-by: Dave Liu <daveliu@freescale.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mvsdio: fix config failure with some high speed SDHC cardsNicolas Pitre2009-06-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially with Sandisk SDHC cards, the second SWITCH command was failing with a timeout and the card was not recognized at all. However if the system was busy, or debugging was enabled, or a udelay(100) was inserted before the second SWITCH command in the core code, then the timing was so that the card started to work. With some unusual block sizes, the data FIFO status doesn't indicate a "empty" state right away when the data transfer is done. Queuing another data transfer in that condition results in a transfer timeout. The empty FIFO bit eventually get set by itself in less than 50 usecs when it is not set right away. So let's just poll for that bit before configuring the controller with a new data transfer. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mvsdio: ignore high speed timing requests from the coreNicolas Pitre2009-06-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Empirical evidences show that this is causing far more problems than it solves when this mode is enabled in the host hardware. Amongst those cards that are known to be non functional when this bit is set are: A-Data "Speedy" 2GB SD card Kodak 512MB SD card Ativa 1GB MicroSD card Marvell 8688 (WIFI/Bluetooth) SDIO card Since those cards do work on other host controllers which do honnor the hs timing, the issue must be with this particular host hardware. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mmc/omap: Use disable_irq_nosync() from within irq handlers.Ben Nizette2009-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disable_irq() should wait for all running handlers to complete before returning. As such, if it's used to disable an interrupt from that interrupt's handler it will deadlock. This replaces the dangerous instances with the _nosync() variant which doesn't have this problem. Signed-off-by: Ben Nizette <bn@niasdigital.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | sdhci-of: Add fsl,esdhc as a valid compatible to bind againstKumar Gala2009-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We plan to use fsl,esdhc going forward as the base compatible so update the driver to bind against it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mvsdio: allow automatic loading when modularNicolas Pitre2009-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nicolas Pitre <nico@marvell.com> Tested-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mxcmmc: Fix missing return value checking in DMA setup code.Martin Fuzzey2009-06-031-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
* | | | | | mxcmmc : Reset the SDHC hardware if software timeout occurs.Martin Fuzzey2009-06-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a software timeout occurs in polling mode hardware was left in an indeterminate state causing subsequent operations to block. Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
* | | | | | omap_hsmmc: Trivial fix for a typo in commentAnand Gadiyar2009-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | | mxcmmc: decrease minimum frequency to make MMC cards workSascha Hauer2009-06-031-1/+3
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a temporary workaround until the MMC stack can be fixed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | | | [ARM] 5519/1: amba probe: pass "struct amba_id *" instead of void *Alessandro Rubini2009-05-201-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second argument of the probe method points to the amba_id structure, so it's better passed with the correct type. None of the current in-tree drivers uses the pointer, so they have only been checked for a clean compile. Change suggested by Russell King. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | Merge branch 'for-linus' of ↵Linus Torvalds2009-05-056-13/+22
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mvsdio: fix CONFIG_PM=y build mmci: fix crash with debug enabled sdhci: catch ADMA errors mmc: increase power up delay sdhci-pci: bad error handling in probe function mmc_block: be prepared for oversized requests
| * | | mvsdio: fix CONFIG_PM=y buildRabin Vincent2009-05-031-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix usage of obsolete parameters and functions in the driver's PM callbacks. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
| * | | mmci: fix crash with debug enabledRabin Vincent2009-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If MMC debugging is enabled, the mmci driver oopses because the DBG macro uses host->mmc before it is set. Set it earlier. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
| * | | sdhci: catch ADMA errorsPierre Ossman2009-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We forgot to add the ADMA error bit to the list of data interrupts. Signed-off-by: Pierre Ossman <pierre@ossman.eu>
| * | | mmc: increase power up delayJosé M. Fernández2009-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TI controller on Toshiba Tecra M5 needs more time to power up or the cards will init incorrectly or not at all. Signed-off-by: José M. Fernández <josemariafg@gmail.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
| * | | sdhci-pci: bad error handling in probe functionDan Carpenter2009-05-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goto unmap is too early, we haven't allocated host or done the request_region(). Found by smatch (http://repo.or.cz/w/smatch.git). [ Second error path fix by Pierre Ossman ] Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
| * | | mmc_block: be prepared for oversized requestsPierre Ossman2009-05-031-0/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | The block layer does not support very low sector count restrictions so we need to be prepared to handle bigger requests than we can send directly to the controller. Problem found by Manuel Lauss. Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | | ARM: OMAP: MMC: Remove unused power_pinLadislav Michl2009-04-231-2/+0
|/ / | | | | | | | | | | | | Remove unused power_pin Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | mmc_spi: support for non-byte-aligned cardsWolfgang Muees2009-04-081-38/+112
| | | | | | | | | | | | | | | | | | A very large subset of SD cards in the market send their responses and data non-byte-aligned. So add logic to the mmc spi driver to handle this mess. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | omap_hsmmc: Do not expect cmd/data to be non-null when CC/TC occursJarkko Lavinen2009-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | With spurious interrupt cmd can be null even when we have CC set in irq status. Fixes: NB#106295 - prevent potential kernel crash in the MMC driver Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | mmc: Fix compile for omap_hsmmc.cTony Lindgren2009-04-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the issue noted by Russell King: drivers/mmc/host/omap_hsmmc.c: In function 'mmc_omap_xfer_done': drivers/mmc/host/omap_hsmmc.c:301: error: implicit declaration of function 'mmc_omap_fclk_lazy_disable' This got broken by 4a694dc915c9a223044ce21fc0d99e63facd1d64. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | mmc_spi: convert timeout handling to jiffies and avoid busy waitingWolfgang Muees2009-04-081-17/+21
| | | | | | | | | | | | | | | | | | | | SD/MMC card timeouts can be very high. So avoid busy-waiting, using the scheduler. Calculate all timeouts in jiffies units, because this will give us the correct sign when to involve the scheduler. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | mmc_spi: do not check CID and CSD blocks with CRC16Wolfgang Muees2009-04-081-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | Some cards are not able to calculate a valid CRC16 value for CID and CSD reads (CRC for 512 byte data blocks is OK). By moving the CRC enable after the read of CID and CSD, these cards can be used. This patch was tested with a faulty 8 GByte takeMS Class 6 SDHC card. This patch was suggested by Pierre Ossman. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | omap_hsmmc: Flush posted write to IRQKevin Hilman2009-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spurious IRQs seen on MMC after 2.6.29. Flush posted write in IRQ handler. The interrupt line is released by clearing the error status bits in the MMCHS_STAT register, which must occur before the interrupt handler returns to avoid unwanted irqs. Hence the need to flush the posted write. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Tony Lindgen <tony@atomide.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | New mail address for Pierre OssmanPierre Ossman2009-04-083-3/+3
| | | | | | | | Signed-off-by: Pierre Ossman <pierre@ossman.eu>
* | imxmmc: move RSSR BLRPaulius Zaleckas2009-04-081-7/+3
| | | | | | | | | | | | | | | | | | | | | | DMA request source (RSSR) needs to be set only once (in probe). DMA burst length (BLR) need to be set only in set_ios() This cleans up imxmci_setup_data() and should make it a little bit faster :) Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | imxmmc: init-exit reworkPaulius Zaleckas2009-04-081-5/+4
| | | | | | | | | | | | | | | | | | Add __init __exit for appropriate probe and remove functions. Conver to platform_driver_probe() Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | mmc: Accept EXT_CSD rev 1.3 since it is backwards compatible with 1.2Jarkko Lavinen2009-04-081-1/+1
|/ | | | | Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-1/+1
| | | | | | | | Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-04-0518-271/+2090
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (42 commits) atmel-mci: fix sdc_reg typo tmio_mmc: add maintainer mmc: Add OpenFirmware bindings for SDHCI driver sdhci: Add quirk for forcing maximum block size to 2048 bytes sdhci: Add quirk for controllers that need IRQ re-init after reset sdhci: Add quirk for controllers that need small delays for PIO sdhci: Add set_clock callback and a quirk for nonstandard clocks sdhci: Add get_{max,timeout}_clock callbacks sdhci: Add support for hosts reporting inverted write-protect state sdhci: Add support for card-detection polling sdhci: Enable only relevant (DMA/PIO) interrupts during transfers sdhci: Split card-detection IRQs management from sdhci_init() sdhci: Add support for bus-specific IO memory accessors mmc_spi: adjust for delayed data token response omap_hsmmc: Wait for SDBP omap_hsmmc: Fix MMC3 dma omap_hsmmc: Disable SDBP at suspend omap_hsmmc: Do not prefix slot name omap_hsmmc: Allow cover switch to cause rescan omap_hsmmc: Add 8-bit bus width mode support ...
| * atmel-mci: fix sdc_reg typoHans-Christian Egtvedt2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | This fixes a bug when setting the sdc_reg for 4-bit bus width transactions. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: Add OpenFirmware bindings for SDHCI driverAnton Vorontsov2009-03-243-0/+321
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new driver: sdhci-of. The driver is similar to the sdhci-pci, it contains common probe code, and controller-specific ops and quirks. So far there are only Freescale eSDHC ops and quirks. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add quirk for forcing maximum block size to 2048 bytesAnton Vorontsov2009-03-242-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | FSL eSDHC controllers can support maximum block size up to 4096 bytes, the MBL (Maximum Block Length) field in the capabilities register extended by one bit, and is set to 0x3. But the SDHCI core doesn't support blocks of 4096 bytes, and thus forces blksz to the lowest value -- 512 bytes. With this patch we can pin up the blksz to the maximum supported block size, i.e. 2048 bytes. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add quirk for controllers that need IRQ re-init after resetAnton Vorontsov2009-03-242-0/+9
| | | | | | | | | | | | | | | | FSL eSDHC controllers losing signal/interrupt enable states after reset, so we should re-enable them. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add quirk for controllers that need small delays for PIOAnton Vorontsov2009-03-242-0/+5
| | | | | | | | | | | | | | | | | | | | | | Small udelay is needed to make eSDHC work in PIO mode. Without the delay reading causes endless interrupt storm, and writing corrupts data. The first guess would be that we must wait for some bit in some register, but I didn't find any reliable bits that change before and after the delay. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add set_clock callback and a quirk for nonstandard clocksAnton Vorontsov2009-03-242-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FSL eSDHC hosts have incompatible register map to manage the SDCLK. This patch adds set_clock callback so that drivers could overwrite set_clock behaviour. Similar patch[1] was posted by Ben Dooks, though in Ben's version the callback is named change_clock, plus the patch has some unrelated bits that makes the patch difficult to reuse. [1] http://lkml.org/lkml/2008/12/2/160 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add get_{max,timeout}_clock callbacksBen Dooks2009-03-242-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers do not provide clock information in their capabilities (in the Samsung case, it is because there are multiple clock sources available to the controller). Add hooks to allow the system to supply clock information. p.s. In the original Ben's patch there was a bug that makes sdhci_add_host() return -ENODEV even if callbacks were specified. This is fixed now. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add support for hosts reporting inverted write-protect stateAnton Vorontsov2009-03-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | This patch adds SDHCI_QUIRK_INVERTED_WRITE_PROTECT quirk. When specified, the sdhci driver will invert WP state. p.s. Actually, the quirk is more board-specific than controller-specific. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add support for card-detection pollingAnton Vorontsov2009-03-242-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk. When specified, sdhci driver will set MMC_CAP_NEEDS_POLL MMC host capability, and won't enable card insert/remove interrupts. This is needed for hosts with unreliable card detection, such as FSL eSDHC. The original eSDHC driver was tring to "debounce" card-detection IRQs by reading present state and disabling particular interrupts. But with this debouncing scheme I noticed that sometimes we miss card insertion/removal events. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Enable only relevant (DMA/PIO) interrupts during transfersAnton Vorontsov2009-03-241-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | Some hosts (that is, FSL eSDHC) throw PIO interrupts during DMA transfers, this causes tons of unneeded interrupts, and thus highly degraded speed. This patch modifies the driver so that now we only enable relevant (DMA or PIO) interrupts during transfers. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Split card-detection IRQs management from sdhci_init()Anton Vorontsov2009-03-242-17/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Card detection interrupts should be handled separately as they should not be enabled before mmc_add_host() returns and should be disabled before calling mmc_remove_host(). The same is for suspend and resume routines. sdhci_init() no longer enables card-detection irqs. Instead, two new functions implemented: sdhci_enable_card_detection() and sdhci_disable_card_detection(). New sdhci_reinit() call implemented to behave the same way as the old sdhci_init(). Also, this patch implements and uses few new helpers to manage IRQs in a more conveinient way, that is: - sdhci_clear_set_irqs() - sdhci_unmask_irqs() - sdhci_mask_irqs() - SDHCI_INT_ALL_MASK constant sdhci_enable_sdio_irq() converted to these new helpers, plus the helpers will be used by the subsequent patches. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * sdhci: Add support for bus-specific IO memory accessorsAnton Vorontsov2009-03-243-81/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the SDHCI driver works with PCI accessors (write{l,b,w} and read{l,b,w}). With this patch drivers may change memory accessors, so that we can support hosts with "weird" IO memory access requirments. For example, in "FSL eSDHC" SDHCI hardware all registers are 32 bit width, with big-endian addressing. That is, readb(0x2f) should turn into readb(0x2c), and readw(0x2c) should be translated to le16_to_cpu(readw(0x2e)). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc_spi: adjust for delayed data token responseWolfgang Muees2009-03-241-3/+24
| | | | | | | | | | | | | | | | | | | | Some cards are not able to send the data token in time, but miss the time frame for some bits(!). So synchronize to the start of the token. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * omap_hsmmc: Wait for SDBPAdrian Hunter2009-03-241-5/+15
| | | | | | | | | | | | | | | | It is necessary to wait for bus power before sending any commands. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * omap_hsmmc: Fix MMC3 dmaGrazvydas Ignotas2009-03-241-11/+25
| | | | | | | | | | | | | | | | | | | | | | Data transfers on third OMAP3 MMC controller don't work because DMA line numbers are only defined for MMC1 and MMC2. Fix that and store line numbers in mmc_omap_host structure to reduce code size. Tested on OMAP3 pandora board. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * omap_hsmmc: Disable SDBP at suspendJarkko Lavinen2009-03-241-14/+2
| | | | | | | | | | | | | | | | Turn off the bus power at suspend. Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
OpenPOWER on IntegriCloud