23 Nov, 2010
1 commit
-
We now:
* check for a v3 controller before setting 8-bit bus width
* offer a callback for platform code to switch to 8-bit mode, which
allows non-v3 controllers to support it
* rely on mmc->caps |= MMC_CAP_8_BIT_DATA; in platform code to specify
that the board designers have indeed brought out all the pins for
8-bit to the slot.We were previously relying only on whether the *controller* supported
8-bit, which doesn't tell us anything about the pin configuration in
the board design.This fixes the MMC card regression reported by Maxim Levitsky here:
http://thread.gmane.org/gmane.linux.kernel.mmc/4336
by no longer assuming that 8-bit works by default.Signed-off-by: Philip Rakity
Tested-by: Giuseppe Cavallaro
Signed-off-by: Chris Ball
20 Nov, 2010
2 commits
-
Some board/card/host configurations are not capable of powering off the
card after boot.To support such configurations, and to allow smoother transition to
runtime PM behavior, MMC_CAP_POWER_OFF_CARD is added, so hosts need to
explicitly indicate whether it's OK to power off their cards after boot.SDIO core will enable runtime PM for a card only if that cap is set.
As a result, the card will be powered down after boot, and will only
be powered up again when a driver is loaded (and then it's up to the
driver to decide whether power will be kept or not).This will prevent sdio_bus_probe() failures with setups that do not
support powering off the card.Reported-and-tested-by: Daniel Drake
Reported-and-tested-by: Arnd Hannemann
Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Chris Ball -
Power off the card in mmc_sdio_detect __before__ a potential error
handler, which completely removes the card, executes, and only if the
card was successfully powered on beforehand.While we're at it, use the _sync variant of the runtime PM put API, in
order to ensure that the card is left powered off in case an error
occurred, and the card is going to be removed.Reproduced and tested on the OLPC XO-1.5.
Reported-by: Daniel Drake
Signed-off-by: Ohad Ben-Cohen
Signed-off-by: Chris Ball
18 Nov, 2010
1 commit
-
While booting OMAP4 ES2.0 boards, cards on MMC1 and MMC2 controllers
are not getting detected sometimes.During reset of command/data line, wrong pointer to base address
was passed while read operation to SYSCTL register, thus impacting
the updated reset logic.Passing the correct base address fixes the issue.
Signed-off-by: Kishore Kadiyala
Acked-by: Felipe Balbi
Acked-by: Madhusudhan Chikkature
Acked-by: Tony Lindgren
Signed-off-by: Chris Ball
12 Nov, 2010
1 commit
-
MMC hosts that poll for card detection by defining the MMC_CAP_NEEDS_POLL
flag have a race on rmmod, where the delayed work is cancelled without
waiting for completed polling. To prevent this a _sync version of the work
cancellation has to be used.Signed-off-by: Guennadi Liakhovetski
Cc:
Signed-off-by: Chris Ball
09 Nov, 2010
1 commit
-
SDHC2 is newly added in C0 stepping of Langwell. Without the Moorestown
specific quirk, the default pci_probe will be called and crash the kernel.This patch unblocks the crash problem on C0 by using the same probing
function as HC1, which limits the number of slots to one.Signed-off-by: Jacob Pan
Signed-off-by: Alan Cox
Signed-off-by: Chris Ball
08 Nov, 2010
5 commits
-
Only these CPUs list the bug in their errata.
Signed-off-by: Eric Bénard
Acked-by: Wolfram Sang
Signed-off-by: Chris Ball -
This patch fixes timeout problems on i.MX's sdhci as suggested by
Richard Zhu.Tested on:
- i.MX257: not needed
- i.MX357: needed
- i.MX515: neededMore details can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.htmlSigned-off-by: Eric Bénard
Tested-by: Shawn Guo
Acked-by: Wolfram Sang
Signed-off-by: Chris Ball -
A little more work was needed for SDIO IRQ wakeups to be functional.
Wake-on-WLAN on the SD WiFi adapter in the XO-1.5 laptop is now working.
Signed-off-by: Daniel Drake
Signed-off-by: Chris Ball -
Improves error handling in the ushc driver.
Signed-off-by: Axel Lin
Acked-by: David Vrabel
Signed-off-by: Chris Ball -
We should not call mmc_card_set_ddr_mode() if we are in single data
mode. This sets DDR and causes the kernel log to say the card is DDR
when it is not.Explicitly set ddr to 0 rather then rely on MMC_SDR_MODE being 0 when
doing the checks.Signed-off-by: Philip Rakity
Acked-by: Linus Walleij
Acked-by: Kyungmin Park
Signed-off-by: Chris Ball
29 Oct, 2010
5 commits
-
Adding card detect callback function and card detect configuration
function for MMC1 Controller on OMAP4.Card detect configuration function does initial configuration of the
MMC Control & PullUp-PullDown registers of Phoenix.For MMC1 Controller, card detect interrupt source is
twl6030 which is non-gpio. The card detect call back function provides
card present/absent status by reading MMC Control register present
on twl6030.Since OMAP4 doesn't use any GPIO line as used in OMAP3 for card detect,
the suspend/resume initialization which was done in omap_hsmmc_gpio_init
previously is moved to the probe thus making it generic for both OMAP3 &
OMAP4.Cc: Tony Lindgren
Cc: Andrew Morton
Cc: Madhusudhan Chikkature
Cc: Adrian Hunter
Signed-off-by: Kishore Kadiyala
Signed-off-by: Samuel Ortiz -
Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit
mode if the hardware supports it.Tested with the SDHI hardware block included in sh7724.
Signed-off-by: Yusuke Goda
Signed-off-by: Matt Fleming
Acked-by: Magnus Damm
Tested-by: Arnd Hannemann
Signed-off-by: Samuel Ortiz -
In some platforms (e.g. AP4EVB) the card detect pin of a slot is not
directly connected to the sh_mmcif controller, so that polling needs
to be used. To overcome the overhead induced by querying the controller
on each poll cycle, card detection can be handled in the platform code
more efficiently.
This patch exposes a get_cd hook for that purpose.Signed-off-by: Arnd Hannemann
Tested-by: Yusuke Goda
Signed-off-by: Samuel Ortiz -
Some controllers, supported by the tmio_mmc driver do not have the card
detect pin of a slot connected, so that polling needs to be used and
card detection is handled by other means.
This patch exposes a get_cd hook for that purpose.Signed-off-by: Arnd Hannemann
Signed-off-by: Samuel Ortiz -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits)
mmc: add new sdhci-pxa driver for Marvell SoCs
mmc: make number of mmcblk minors configurable
mmc_spi: Recover from CRC errors for r/w operation over SPI.
mmc: sdhci-pltfm: add -pltfm driver for imx35/51
mmc: sdhci-of-esdhc: factor out common stuff
mmc: sdhci_pltfm: pass more data on custom init call
mmc: sdhci: introduce get_ro private write-protect hook
mmc: sdhci-pltfm: move .h file into appropriate subdir
mmc: sdhci-pltfm: Add structure for host-specific data
mmc: fix cb710 kconfig dependency warning
mmc: cb710: remove debugging printk (info duplicated from mmc-core)
mmc: cb710: clear irq handler on init() error path
mmc: cb710: remove unnecessary msleep()
mmc: cb710: implement get_cd() callback
mmc: cb710: partially demystify clock selection
mmc: add a file to debugfs for changing host clock at runtime
mmc: sdhci: allow for eMMC 74 clock generation by controller
mmc: sdhci: highspeed: check for mmc as well as sd cards
mmc: sdhci: Add Moorestown device support
mmc: sdhci: Intel Medfield support
...
26 Oct, 2010
2 commits
-
This adds the support of atmel-mci sd/mmc driver in at91sam9g45 devices and
board files. This also configures the DMA controller slave interface for
at_hdmac dmaengine driver.Signed-off-by: Nicolas Ferre
-
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits)
omap: complete removal of machine_desc.io_pg_offst and .phys_io
omap: UART: fix wakeup registers for OMAP24xx UART2
omap: Fix spotty MMC voltages
ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h
serial: omap-serial: fix signess error
OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish
omap: dma: Fix buffering disable bit setting for omap24xx
omap: serial: Fix the boot-up crash/reboot without CONFIG_PM
OMAP3: PM: fix scratchpad memory accesses for off-mode
omap4: pandaboard: enable the ehci port on pandaboard
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
omap4: pandaboard: remove unused hsmmc definition
OMAP: McBSP: Remove null omap44xx ops comment
OMAP: McBSP: Swap CLKS source definition
OMAP: McBSP: Fix CLKR and FSR signal muxing
OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks
OMAP: control: move plat-omap/control.h to mach-omap2/control.h
OMAP: split plat-omap/common.c
OMAP: McBSP: implement functional clock switching via clock framework
OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c
...Fixed up trivial conflicts in arch/arm/mach-omap2/
{board-zoom-peripherals.c,devices.c} as per Tony
25 Oct, 2010
2 commits
-
Support Marvell PXA168/PXA910/MMP2 SD Host Controller.
Signed-off-by: Zhangfei Gao
Acked-by: Haojian Zhuang
Signed-off-by: Chris Ball -
The old limit of number of minor numbers per mmcblk device was hardcoded
at 8. This isn't enough for some of the more elaborate partitioning
schemes, for example those used by Chrome OS.Since there might be a bunch of systems out there with static /dev
contents that relies on the old numbering scheme, let's make it a
build-time option with the default set to the previous 8.Also provide a boot/modprobe-time parameter to override the config
default: mmcblk.perdev_minors.Signed-off-by: Olof Johansson
Cc: Mandeep Baines
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Chris Ball
23 Oct, 2010
20 commits
-
The SPI bus is not reliable for large data transfers on all platforms.
The current mmc_spi driver fails SD read/write commands immediately if
occasional CRC errors are reported by the SD device. This patch makes
the operation recover from CRC errors by repeating the last SD command.
The retry count is set to 5 to ensure the driver passes stress tests.Signed-off-by: Sonic Zhang
Signed-off-by: Mike Frysinger
Signed-off-by: Chris Ball -
This driver adds basic support for the esdhc-core found on e.g.
imx35/51, as a platform driver.Signed-off-by: Wolfram Sang
Acked-by: Anton Vorontsov
Tested-by: Eric Bénard
Signed-off-by: Chris Ball -
Put everything which can be shared between the OF and platform version
of this driver into a local .h file.Signed-off-by: Wolfram Sang
Tested-by: Eric Bénard
[cjb: fix compile error: sdhci-esdhc.c->sdhci-esdhc.h]
Signed-off-by: Chris Ball -
The custom init call may need more data to perform its job, so we pass
it a pointer to pdata, too. Also, always use the platform_id specific
data even if platform_data is present. Doing that, platform_data can
additionally be parsed by init() for board-specific information (via
sdhci->mmc->parent).(Note: the old behaviour was that you could override the platform_id
specific data with your own. However, one can still do this by using the
"sdhci" id instead of "sdhci-".)Signed-off-by: Wolfram Sang
Tested-by: Eric Bénard
Signed-off-by: Chris Ball -
Some controllers handle their write-protection differently. Introduce a
callback to be able to handle it, ensuring the same locking takes place
for it. Rename the status variable to make it more obvious why the read
from the registers needs to be inverted.Signed-off-by: Wolfram Sang
Tested-by: Eric Bénard
Signed-off-by: Chris Ball -
Make use of the include/linux/mmc directory.
Signed-off-by: Wolfram Sang
Acked-by: Anton Vorontsov
Tested-by: Eric Bénard
Signed-off-by: Chris Ball -
We need to carry some information per host, e.g. the clock. Add a
structure for it and initialize it in the generic part. Also improve
the check for a parent.Signed-off-by: Wolfram Sang
Cc: Richard Röjfors
Signed-off-by: Chris Ball -
Fix kconfig dependency warning to satisfy dependencies:
warning: (MMC_CB710 && MMC && PCI) selects CB710_CORE which has
unmet direct dependencies (MISC_DEVICES && PCI)Signed-off-by: Randy Dunlap
Acked-by: Michał Mirosław
Signed-off-by: Chris Ball -
Signed-off-by: Michał Mirosław
Signed-off-by: Chris Ball -
Signed-off-by: Michał Mirosław
Signed-off-by: Chris Ball -
Signed-off-by: Michał Mirosław
Signed-off-by: Chris Ball -
Signed-off-by: Michał Mirosław
Signed-off-by: Chris Ball -
Clock divider selection in partially verified, so document known facts
in code.Signed-off-by: Michał Mirosław
Signed-off-by: Chris Ball -
For debugging power management features it is convenient to have the
possibility of changing the MMC host controller clock at runtime. This
patch adds a 'clock' file for this under the MMC host root of debugfs.Usage is as follows:
# cat /sys/kernel/debug/mmc0/clock
52000000# echo "1000000000" > /sys/kernel/debug/mmc0/clock
# cat /sys/kernel/debug/mmc0/clock
52000000# echo "48000000" > /sys/kernel/debug/mmc0/clock
# cat /sys/kernel/debug/mmc0/clock
48000000The middle example shows limits being applied by the host driver.
Signed-off-by: Andy Shevchenko
Cc: Adrian Hunter
[cjb: modify changelog language]
Signed-off-by: Chris Ball -
Snippet of code for how adaptation layer should handle the call:
/*
* eMMC spec calls for the host to send 74 clocks to the card
* during initialization, right after voltage stabilization.
* create the clocks manually right here.
*/
void generate_init_clocks_A0(struct sdhci_host *host, u8 power_mode)
{
struct sdhci_mmc_slot *slot = sdhci_priv(host);if (slot->power_mode == MMC_POWER_UP &&
power_mode == MMC_POWER_ON) {
/* controller specific code here */
/* slot->power_mode holds previous power setting */
}
slot->power_mode = power_mode;
}Signed-off-by: Philip Rakity
Signed-off-by: Chris Ball -
The SD and MMC code set highspeed using different constants.
Change the sd driver to recognize this and switch to high speed.
Validated code when testing eMMC dual data rate.Signed-off-by: Philip Rakity
[cjb: changelog + indentation fixes]
Signed-off-by: Chris Ball -
This adds the basic identifiers. Due to the various chip quirks it's not
enough to make MRST support very useful for earlier steppings but that can
follow.(I'm currently trying to verify which steps actually matter outside Intel
so I can avoid unneeded stuff going upstream)[Extracted from original development]
Signed-off-by: JiebingLi
[Folds in fixes]
Signed-off-by: Chuanxiao Dong
Signed-off-by: Alan Cox
Signed-off-by: Chris Ball -
Basic support for the Intel Medfield devices
Give them their own quirks as we will need to update this later.
Signed-off-by: Xiaochen Shen
Signed-off-by: Alan Cox
Signed-off-by: Chris Ball -
Currently we write it to the chip data, but if the probe handler overrides
it we ignore the new value and keep using our cached one. Fix this so that
a probe handler can adjust the slot count.Signed-off-by: Alan Cox
Signed-off-by: Chris Ball -
Bring SDIO devices back to full power before their suspend
handler is invoked.Doing so ensures that SDIO suspend/resume semantics are
maintained (drivers still get to decide whether their
card should be removed or kept during system suspend,
and at what power state), and that SDIO suspend/resume
execution paths are unchanged.This is achieved by resuming a runtime-suspended SDIO device
in its ->prepare() PM callback (similary to the PCI subsystem).Since the PM core always increments the run-time usage
counter before calling the ->prepare() callback and decrements
it after calling the ->complete() callback, it is guaranteed
that when the system will come out of suspend, our device's
power state will reflect its runtime PM usage counter.Signed-off-by: Ohad Ben-Cohen
Tested-by: Luciano Coelho
Signed-off-by: Chris Ball