- 15 Jul, 2008 6 commits
-
-
Tomas Winkler authored
This patch fixes sdio_io sparse errors. This fix changes signature of API functions, changing unsigned char -> u8 unsigned short -> u16 unsigned long -> u32 - this was probably a bug in 64 bit platforms Signed-off-by:
Tomas Winkler <tomas.winkler@intel.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Make sure that the maximum size for a byte mode transfer is identical in all places. Also tweak the transfer helper so that a single byte mode transfer is preferred over (possibly multiple) block mode request(s). Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
There are a lot of crappy controllers out there that cannot handle all the request sizes that the MMC/SD/SDIO specifications require. In case the card driver can pad the data to overcome the problems, this commit adds a helper that calculates how much that padding should be. A corresponding helper is also added for SDIO, but it can also deal with all the complexities of splitting up a large transfer efficiently. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Deepak Saxena authored
Make the variable name in the comments match the actual name of the variable. Signed-off-by:
Deepak Saxena <dsaxena@laptop.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Anton Vorontsov authored
Now get_ro() callback must return 0/1 values for its logical states, and negative errno values in case of error. If particular host instance doesn't support RO/WP switch, it should return -ENOSYS. This patch changes some hosts in two ways: 1. Now functions should be smart to not return negative values in "RO asserted" case (particularly gpio_ calls could return negative values for the outermost GPIOs). Also, board code usually passes get_ro() callbacks that directly return gpioreg & bit result, so at91_mci, imxmmc, pxamci and mmc_spi's get_ro() handlers need take special care when returning platform's values to the mmc core. 2. In case of host instance didn't implement get_ro() callback, it should really return -ENOSYS and let the mmc core decide what to do about it (mmc core thinks the same way as the hosts, so it isn't functional change). Signed-off-by:
Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Anton Vorontsov authored
Some hosts (and boards that use mmc_spi) do not use interrupts on the CD line, so they can't trigger mmc_detect_change. We want to poll the card and see if there was a change. 1 second poll interval seems resonable. This patch also implements .get_cd() host operation, that could be used by the hosts that are able to report card-detect status without need to talk MMC. Signed-off-by:
Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 18 Apr, 2008 5 commits
-
-
Adrian Bunk authored
Every file should include the headers containing the externs for its global functions. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Adrian Bunk authored
This patch adds proper prototypes for mmc_attach_*() in drivers/mmc/core/core.h Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Adrian Bunk authored
This patch makes the needlessly global __mmc_release_bus() static. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Robert P. J. Day authored
Signed-off-by:
Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Reorganise code so that mmc_hostname() works directly after allocation. That way host drivers can use that name for resource allocations and messages during probing. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 22 Mar, 2008 1 commit
-
-
Pierre Ossman authored
Suppressing uevents turned out to be a bad idea as it screws up the order of events, making user space very confused. Change the system to use sysfs groups instead. This is a regression that, for some odd reason, has gone unnoticed for some time. It confuses hal so that the block devices (which have the mmc device as a parent) are not registered. End result being that desktop magic when cards are inserted won't work. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 02 Nov, 2007 1 commit
-
-
Adrian Bunk authored
Not architecture specific code should not #include <asm/scatterlist.h>. This patch therefore either replaces them with #include <linux/scatterlist.h> or simply removes them if they were unused. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 27 Oct, 2007 2 commits
-
-
Pierre Ossman authored
Use the more generic byte swapping macros instead of the socket variants. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
MMC over SPI sends the CID and CSD registers as data, not responses, which means that the host driver won't do the necessary byte flipping for us. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 17 Oct, 2007 1 commit
-
-
Florin Malita authored
The exception path associated with an invalid ext_csd_struct returns without freeing ext_csd. Coverity CID 1909. Signed-off-by: Florin Malita Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 14 Oct, 2007 1 commit
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 12 Oct, 2007 2 commits
-
-
Kay Sievers authored
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by:
Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Pierre Ossman authored
We register a simple trigger so make sure we use the corresponding unregister function. (Also means we get a dummy function when triggers aren't compiled in) Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 06 Oct, 2007 2 commits
-
-
Nicolas Pitre authored
Currently we print a message about some bad states wrt function IRQ handlers but return 0 from process_sdio_pending_irqs() nevertheless. This can lead to an infinite loop as nothing might have cleared the condition for the pending card interrupt from the host controller by the time host->ops->enable_sdio_irq(host, 1) is called. Signed-off-by:
Nicolas Pitre <nico@marvell.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Nicolas Pitre authored
If func is actually null we won't get much from sdio_func_id(func). Signed-off-by:
Nicolas Pitre <nico@marvell.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 27 Sep, 2007 1 commit
-
-
Pierre Ossman authored
The interrupt polling frequency is a compromise between power usage and interrupt latency. Unfortunately, it affects throughput rather severely for devices which require an interrupt for every chunk of data. By making the polling frequency adaptive, we get better throughput with those devices without sacficing too much power. Polling will quickly increase when there is an actual interrupt, and slowly fall back to the idle frequency when the interrupts stop coming. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
- 23 Sep, 2007 18 commits
-
-
Pierre Ossman authored
Add a led trigger for each host controller that indicates if there is a request active on the controller. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
David Brownell authored
Teach the MMC/SD/SDIO core about using SPI mode. - Use mmc_host_is_spi() so enumeration works through SPI signaling and protocols, not just the native versions. - Provide the SPI response type flags with each request issued, including requests from the new lock/unlock code. - Understand that cmd->resp[0] and mmc_get_status() results for SPI return different values than for "native" MMC/SD protocol; this affects resetting, checking card lock status, and some others. - Understand that some commands act a bit differently ... notably: * OP_COND command doesn't return the OCR * APP_CMD status doesn't have an R1_APP_CMD analogue Those changes required some new and updated primitives: - Provide utilities to access two SPI-only requests, and one request that wasn't previously needed: * mmc_spi_read_ocr() ... SPI only * mmc_spi_set_crc() ... SPI only (override by module parm) * mmc_send_cid() ... for use without broadcast mode - Updated internal routines: * Previous mmc_send_csd() modified into mmc_send_cxd_native(); it uses native "R2" responses, which include 16 bytes of data. * Previous mmc_send_ext_csd() becomes new mmc_send_cxd_data() helper for command-and-data access * Bugfix to that mmc_send_cxd_data() code: dma-to-stack is unsafe/nonportable, so kmalloc a bounce buffer instead. - Modified mmc_send_ext_csd() now uses mmc_send_cxd_data() helper - Modified mmc_send_csd(), and new mmc_spi_send_cid(), routines use those helper routines based on whether they're native or SPI The newest categories of cards supported by the MMC stack aren't expected to work yet with SPI: MMC or SD cards with over 4GB data, and SDIO. All those cards support SPI mode, so eventually they should work too. Signed-off-by:
David Brownell <dbrownell@users.sourceforge.net> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Store vendor strings found in CISTPL_VERS_1 so that function drivers can access them. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Increase delay for power up in order to support some slower boards. Also add some comments about why the delays are there. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
David Vrabel authored
Add sdio_f0_readb() and sdio_f0_writeb() functions to reading and writing function 0 registers. Writes outside the vendor specific CCCR registers (0xF0 - 0xFF) are not permitted. Signed-off-by:
David Vrabel <david.vrabel@csr.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Replace all cases of BUG_ON with WARN_ON where there is a chance (with varying degrees of slim) that the kernel can continue without incidence. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Mariusz Kozlowski authored
Signed-off-by:
Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
David Vrabel authored
Extend sdio_readsb(), sdio_writesb(), sdio_memcpy_fromio(), and sdio_memcpy_toio() to handle any length of buffer by splitting the transfer into several IO_RW_EXTENDED commands. Typically, a transfer would be split into a single block mode transfer followed by a byte mode transfer for the remainder but we also handle lack of block mode support and the block size being greater than 512 (the maximum byte mode transfer size). host->max_seg_size <= host->max_req_size so there's no need to check both when determining the maximum data size for a single command. Signed-off-by:
David Vrabel <david.vrabel@csr.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
David Vrabel authored
Before a driver is probed, set the function's block size to the default so the driver is sure the block size is something sensible and it needn't explicitly set it. The default block size is the largest that's supported by both the card and the host, with a maximum of 512 to ensure aribitrarily sized transfer use the optimal (least) number of commands. See http://lkml.org/lkml/2007/8/7/150 for reasons for the block size choice. Signed-off-by:
David Vrabel <david.vrabel@csr.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
David Vrabel authored
Signed-off-by:
David Vrabel <david.vrabel@csr.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
SDIO doesn't have a CSD so it uses different timeout values than SD memory. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Enable 4-bit data bus mode, according to host and card capabilities. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Change clock speed to the highest supported by the card. Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Adrian Bunk authored
On Wed, Jul 25, 2007 at 04:03:04AM -0700, Andrew Morton wrote: >... > Changes since 2.6.22-rc6-mm1: >... > git-mmc.patch >... > git trees >... sdio_dev_attrs[] can become static. Signed-off-by:
Adrian Bunk <bunk@stusta.de> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Nicolas Pitre authored
Signed-off-by:
Nicolas Pitre <npitre@mvista.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Pierre Ossman authored
Support the multi-byte transfer operation, including handlers for common operations like writel()/readl(). Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-
Nicolas Pitre authored
Signed-off-by:
Nicolas Pitre <npitre@mvista.com> Signed-off-by:
Pierre Ossman <drzeus@drzeus.cx>
-