Commit Graph

1392 Commits

Author SHA1 Message Date
Linus Torvalds 3c0cb7c31c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits)
  ARM: DMA: add support for DMA debugging
  ARM: PL011: add DMA burst threshold support for ST variants
  ARM: PL011: Add support for transmit DMA
  ARM: PL011: Ensure IRQs are disabled in UART interrupt handler
  ARM: PL011: Separate hardware FIFO size from TTY FIFO size
  ARM: PL011: Allow better handling of vendor data
  ARM: PL011: Ensure error flags are clear at startup
  ARM: PL011: include revision number in boot-time port printk
  ARM: vexpress: add sched_clock() for Versatile Express
  ARM i.MX53: Make MX53 EVK bootable
  ARM i.MX53: Some bug fix about MX53 MSL code
  ARM: 6607/1: sa1100: Update platform device registration
  ARM: 6606/1: sa1100: Fix platform device registration
  ARM i.MX51: rename IPU irqs
  ARM i.MX51: Add ipu clock support
  ARM: imx/mx27_3ds: Add PMIC support
  ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn()
  mx51: fix usb clock support
  MX51: Add support for usb host 2
  arch/arm/plat-mxc/ehci.c: fix errors/typos
  ...
2011-01-06 16:50:35 -08:00
Linus Torvalds b69fc2efc9 Merge branch 'for-linus' of git://codeaurora.org/quic/kernel/davidb/linux-msm
* 'for-linus' of git://codeaurora.org/quic/kernel/davidb/linux-msm: (35 commits)
  mmc: msm_sdcc: Check for only DATA_END interrupt to end a request
  mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned
  mmc: msm_sdcc: Reset SDCC in case of data transfer errors
  mmc: msm_sdcc: Add prog done interrupt support
  mmc: msm_sdcc: Fix possible circular locking dependency warning
  MSM: Add USB support for MSM7x30
  MSM: Add USB suport for QSD8x50
  msm: initial framebuffer support
  msm: add handling for clocks tagged as CLK_MINMAX
  msm: trout: change name of pmdh_clk to mddi_clk
  msm: add CLK_MINMAX to pmdh_clk
  msm: trout: add gpio_to_irq
  msm: iommu: Use the correct memory allocation flag
  msm_serial: Remove redundant unlikely()
  msm: iommu: Miscellaneous code cleanup
  msm: iommu: Support cache-coherent memory access
  msm: iommu: Definitions for extended memory attributes
  msm: iommu: Kconfig dependency for the IOMMU API
  msm: iommu: Check if device is already attached
  msm: iommu: Kconfig item for cacheable page tables
  ...
2011-01-06 13:36:30 -08:00
Russell King aa312be198 Merge branches 'mmci' and 'pl011-dma' into devel 2011-01-05 18:08:31 +00:00
Russell King 8c11a94d86 ARM: mmci: Clean up MMCI announcement printk
Make the MMCI announcement printk say which primecell part number
has been found.  Display the revision as an unsigned decimal, and
display only the first 8 hex digits of the base address unless it's
larger.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-30 14:07:10 +00:00
Takashi Iwai 274476f8fe mmc: Fix re-probing with PM_POST_RESTORE notification
In the error-path where PM notifies PM_POST_RESTORE, the rescan-blockage
should be cleared as well.  Otherwise it'll be never re-probed.

Also, as a bonus, this fixes a bug in S4 with user-mode suspend in the
current code, as it sends PM_POST_RESTORE instead of
PM_POST_HIBERNATION wrongly.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-12-21 11:46:49 -08:00
Nicolas Ferre 2f1d791882 mmc: atmel-mci: fix multiblock SDIO transfers
Based on report made by Yauhen in:
"MMC: Fix multiblock SDIO transfers in AT91 MCI" patch,
I report those changes to the brother driver: atmel-mci.

So, this patch sets SDIO transfer types: SDIO block and SDIO byte
transfers instead of using ordinary MMC block transfers.
It is checking opcode for SDIO CMD53 and setting transfer
type in MCI_CMDR register properly.

Reported-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
Cc: <stable@kernel.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-12-21 11:46:48 -08:00
Yauhen Kharuzhy a2255ff451 mmc: at91_mci: fix multiblock SDIO transfers
The AT91 MCI has special SDIO transfer types: SDIO block and SDIO byte
transfers, but at91_mci driver doesn't use them and handles all SDIO
transfers as ordinary MMC block transfers. This causes problems for
multiple-block SDIO transfers (in particular for 256-bytes blocks).

Fix this situation by checking the opcode for SDIO CMD53 and setting
the transfer type in the AT91_MCI_CMDR register properly.

This patch was tested with libertas SDIO driver: problem with TX
timeouts on big packets was eliminated.

Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
Cc: <stable@kernel.org>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-12-21 11:46:32 -08:00
David Brown ba119204ff Merge branches 'msm-core' and 'msm-mmc' into for-next
* msm-core: (28 commits)
  msm: initial framebuffer support
  msm: add handling for clocks tagged as CLK_MINMAX
  msm: trout: change name of pmdh_clk to mddi_clk
  msm: add CLK_MINMAX to pmdh_clk
  msm: trout: add gpio_to_irq
  msm: iommu: Use the correct memory allocation flag
  msm_serial: Remove redundant unlikely()
  msm: iommu: Miscellaneous code cleanup
  msm: iommu: Support cache-coherent memory access
  msm: iommu: Definitions for extended memory attributes
  msm: iommu: Kconfig dependency for the IOMMU API
  msm: iommu: Check if device is already attached
  msm: iommu: Kconfig item for cacheable page tables
  msm: iommu: Don't flush page tables if no devices attached
  msm: iommu: Mark functions with the right section names
  msm: iommu: Support for the 2nd GFX core's IOMMU
  msm: iommu: Revise GFX2D0 IOMMU contexts and M2V mappings
  msm: iommu: Revise GFX3D IOMMU contexts and M2V mappings
  msm: iommu: Use more consistent naming in platform data
  msm: iomap: Addresses and IRQs for 2nd GFX core IOMMU
  ...

* msm-mmc: (33 commits)
  mmc: msm_sdcc: Check for only DATA_END interrupt to end a request
  mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned
  mmc: msm_sdcc: Reset SDCC in case of data transfer errors
  mmc: msm_sdcc: Add prog done interrupt support
  mmc: msm_sdcc: Fix possible circular locking dependency warning
  msm: initial framebuffer support
  msm: add handling for clocks tagged as CLK_MINMAX
  msm: trout: change name of pmdh_clk to mddi_clk
  msm: add CLK_MINMAX to pmdh_clk
  msm: trout: add gpio_to_irq
  msm: iommu: Use the correct memory allocation flag
  msm_serial: Remove redundant unlikely()
  msm: iommu: Miscellaneous code cleanup
  msm: iommu: Support cache-coherent memory access
  msm: iommu: Definitions for extended memory attributes
  msm: iommu: Kconfig dependency for the IOMMU API
  msm: iommu: Check if device is already attached
  msm: iommu: Kconfig item for cacheable page tables
  msm: iommu: Don't flush page tables if no devices attached
  msm: iommu: Mark functions with the right section names
  ...
2010-12-20 13:11:10 -08:00
Sahitya Tummala 0c521ccbd0 mmc: msm_sdcc: Check for only DATA_END interrupt to end a request
The current code checks for both DATA_END and DATA_BLK_END bits in
MCI_STATUS register and ends a request only if both are set at a time.
The hardware doesn't always set DATA_BLK_END when DATA_END is set.
But DATA_END status itself is sufficient condition from hardware that
data transfer is done and hence, check for only DATA_END interrupt in
software to end a request.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2010-12-20 12:28:32 -08:00
Sahitya Tummala 71dd9106af mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned
The current code for PIO doesn't transfer whole data when data size
is not in multiple of 4 bytes. The last few bytes are not written to
the card resulting in no DATAEND interrupt from SDCC. This patch
allows data transfer for non-aligned data size in PIO mode.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2010-12-20 12:28:31 -08:00
Sahitya Tummala b08bb35d1a mmc: msm_sdcc: Reset SDCC in case of data transfer errors
SDCC uses an asynchronous FIFOs for data synchronization (one for TX
and one for RX).  For any error when DPSM (Data path state machine) is
involved the transfer is terminated with the remaining data stuck inside
FIFOs. Reset the controller in case of data errors to ensure that
any left over data in FIFOs is flushed out and DPSM is in good state.

The following problems are observed without this reset functionality -

1. After the card is removed in an unsafe way (removed when there
is an on going data transfer), the card will not be detected upon
its next insertion.  This is because the controller wouldn't respond
to few initialization commands.

2. When an error occurs for a data transfer in non-DMA mode, sometimes
we get spurious PIO interrupt after the request is processed.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2010-12-20 12:28:31 -08:00
Sahitya Tummala d5137bdd91 mmc: msm_sdcc: Add prog done interrupt support
Enable prog done interrupt for stop command(CMD12) that is sent
after a multi-block write(CMD25). The PROG_DONE bit is set when
the card has finished its programming and is ready for next data.

After every write request the card will be polled for ready status
using CMD13. For a multi-block write(CMD25) before sending CMD13,
stop command (CMD12) will be sent.  If we enable prog done interrupt
for CMD12, then CMD13 polling can be avoided. The prog done interrupt
means that the card is done with its programming and is ready for
next request.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2010-12-20 12:28:30 -08:00
Sahitya Tummala 62612cf9d9 mmc: msm_sdcc: Fix possible circular locking dependency warning
In the context of request processing thread, data mover lock is
acquired after the host lock.  In another context, in the completion
handler of data mover the locks are acquired in the reverse order,
resulting in possible circular lock dependency warning. Hence,
schedule a tasklet to process the dma completion so as to avoid
nested locks.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2010-12-20 12:28:30 -08:00
Linus Walleij 991a86e182 ARM: 6530/1: mmci: partially revert clock divisor code
I misread the datasheet as if bypass mode was not available at all
on the ux500's, I was wrong. It is there, the datasheet just
states that you should not have to use it.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-19 16:01:25 +00:00
Linus Walleij b70a67f938 ARM: 6526/1: mmci: corrected calculation of clock div for ux500
The Ux500 variant of this block has a different divider.
The value used right now is too big and which means a loss
in performance. This fix corrects it. Also expand the math
comments a bit so it's clear what's happening. Further
the Ux500 variant does not like if we use the BYPASS bit,
instead we are supposed to set the clock divider to zero.

Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-19 16:01:24 +00:00
Philip Rakity 15ec446119 mmc: sdhci: 8-bit bus width changes
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 <prakity@marvell.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-22 15:12:04 -05:00
Ohad Ben-Cohen ed919b0125 mmc: sdio: fix runtime PM anomalies by introducing MMC_CAP_POWER_OFF_CARD
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 <dsd@laptop.org>
Reported-and-tested-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-19 17:07:01 -05:00
Ohad Ben-Cohen 4d0812c37f mmc: sdio: fix nasty oops in mmc_sdio_detect
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 <dsd@laptop.org>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-19 17:06:52 -05:00
kishore kadiyala b432b4b344 mmc: omap4: hsmmc: Fix improper card detection while booting
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 <kishore.kadiyala@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-17 22:37:44 -05:00
Guennadi Liakhovetski d9bcbf343e mmc: fix rmmod race for hosts using card-detection polling
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 <g.liakhovetski@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-11 18:42:38 -05:00
Linus Walleij 3417780200 ARM: 6438/2: mmci: add SDIO support for ST Variants
This adds some minor variant data and trickery to enable SDIO
on the ST Micro variants of MMCI/PL180.

Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-10 13:15:19 +00:00
Linus Walleij f20f8f21e0 ARM: 6399/3: mmci: handle broken MCI_DATABLOCKEND hardware
On the U300 the MCI_DATAEND and MCI_DATABLOCKEND IRQs can arrive
out-of-order. Replace an ugly #ifdef hack with a proper runtime
solution which models what is really happening.

In the U300 DMA mode and on all Ux500 models, the MCI_DATABLOCKEND
flag isn't properly cleared in hardware following and ACK leading
to all kind of weird behaviour when the flag is still up in
subsequent interrupts, so we add two flags indicating the
error and handle this runtime.

Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-10 13:12:59 +00:00
Linus Walleij 2686b4b408 ARM: 6311/2: mmci: work with only one irq
The DBx500 variants have only one IRQ line hooked up.  Allow these (and
any other implementations which choose to use only one irq) to work by
directing the PIO interrupts also to the first IRQ line.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-10 13:10:01 +00:00
Jacob Pan 35ac6f081f mmc: sdhci: Fix crash on boot with C0 stepping Moorestown platforms
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 <jacob.jun.pan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-09 09:33:24 -05:00
Eric Bénard 16a790bcce mmc: sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
Only these CPUs list the bug in their errata.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-07 17:52:27 -05:00
Eric Bénard 37865fe915 mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci
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: needed

More details can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html

Signed-off-by: Eric Bénard <eric@eukrea.com>
Tested-by: Shawn Guo <shawn.gsc@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-07 17:52:20 -05:00
Daniel Drake 5f619704d1 mmc: sdhci: Properly enable SDIO IRQ wakeups
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 <dsd@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-07 16:45:11 -05:00
Axel Lin 14d4031d21 mmc: ushc: Return proper error code for ushc_probe()
Improves error handling in the ushc driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-07 16:45:11 -05:00
Philip Rakity 25d5c699f9 mmc: Fix printing of card DDR type
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 <prakity@marvell.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-11-07 16:45:08 -05:00
kishore kadiyala 72f2e2c763 mfd: Adding twl6030 mmc card detect support for MMC1
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 <tony@atomide.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29 00:29:59 +02:00
Yusuke Goda f1334fb3c3 mmc: Allow 2 byte requests in 4-bit mode for tmio_mmc
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 <yusuke.goda.sx@renesas.com>
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Magnus Damm <damm@opensource.se>
Tested-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29 00:29:16 +02:00
Arnd Hannemann 777271d0f3 mmc: Allow the platform to specify the sh_mmcif get_cd handler
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 <arnd@arndnet.de>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29 00:29:13 +02:00
Arnd Hannemann 19ca7502c5 mmc: Allow the tmio_mmc mfd driver to specify get_cd handler
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 <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29 00:29:08 +02:00
Linus Torvalds 00ebb6382b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* '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
  ...
2010-10-28 09:33:42 -07:00
Nicolas Ferre 75305d768d at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board
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 <nicolas.ferre@atmel.com>
2010-10-26 11:32:49 +02:00
Linus Torvalds 7b6181e068 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* '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
2010-10-25 13:46:56 -07:00
Zhangfei Gao 536ac998f6 mmc: add new sdhci-pxa driver for Marvell SoCs
Support Marvell PXA168/PXA910/MMP2 SD Host Controller.

Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-25 09:29:07 +08:00
Olof Johansson 5e71b7a64c mmc: make number of mmcblk minors configurable
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 <olof@lixom.net>
Cc: Mandeep Baines <msb@chromium.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-25 09:28:46 +08:00
Sonic Zhang 061c6c847e mmc_spi: Recover from CRC errors for r/w operation over SPI.
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 <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:22 +08:00
Wolfram Sang 95f25efe0c mmc: sdhci-pltfm: add -pltfm driver for imx35/51
This driver adds basic support for the esdhc-core found on e.g.
imx35/51, as a platform driver.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Tested-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:22 +08:00
Wolfram Sang 80872e21b0 mmc: sdhci-of-esdhc: factor out common stuff
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 <w.sang@pengutronix.de>
Tested-by: Eric Bénard <eric@eukrea.com>
[cjb: fix compile error: sdhci-esdhc.c->sdhci-esdhc.h]
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:22 +08:00
Wolfram Sang 012994f4fa mmc: sdhci_pltfm: pass more data on custom init call
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-<something>".)

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:22 +08:00
Wolfram Sang 2dfb579c7d mmc: sdhci: introduce get_ro private write-protect hook
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 <w.sang@pengutronix.de>
Tested-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:21 +08:00
Wolfram Sang d3b993dcc1 mmc: sdhci-pltfm: move .h file into appropriate subdir
Make use of the include/linux/mmc directory.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Tested-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:21 +08:00
Wolfram Sang 4b711cb138 mmc: sdhci-pltfm: Add structure for host-specific data
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 <w.sang@pengutronix.de>
Cc: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:21 +08:00
Randy Dunlap 9ffca8300a mmc: fix cb710 kconfig dependency warning
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 <randy.dunlap@oracle.com>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:21 +08:00
Michał Mirosław d34289d804 mmc: cb710: remove debugging printk (info duplicated from mmc-core)
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:21 +08:00
Michał Mirosław e0780db9f8 mmc: cb710: clear irq handler on init() error path
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:20 +08:00
Michał Mirosław 2abd4f1a43 mmc: cb710: remove unnecessary msleep()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:20 +08:00
Michał Mirosław 7fcc4ce37f mmc: cb710: implement get_cd() callback
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23 21:11:20 +08:00