08 Aug, 2009
1 commit
-
sdhci_alloc_host returns an ERR_PTR value in an error case instead of NULL.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@match exists@
expression x, E;
statement S1, S2;
@@x = sdhci_alloc_host(...)
... when != x = E
(
* if (x == NULL || ...) S1 else S2
|
* if (x == NULL && ...) S1 else S2
)
//Signed-off-by: Julia Lawall
Acked-by: Anton Vorontsov
Cc: Matt Fleming
Cc: Ian Molton
Cc: "Roberto A. Foglietta"
Cc: Philip Langdale
Cc: Pierre Ossman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Jul, 2009
3 commits
-
Signed-off-by: Joe Perches
Acked-by: Pavel Pisa
Signed-off-by: Pierre Ossman -
the code allready uses flush_kernel_dcache_page(). This patch updates the
driver to the recent sg API changes which require that either SG_MITER_TO_SG
or SG_MITER_FROM_SG is set. SG_MITER_TO_SG calls flush_kernel_dcache_page()
in sg_mitter_stop()Signed-off-by: Sebastian Andrzej Siewior
Acked-by: Michał Mirosław
Signed-off-by: Pierre Ossman -
so the page will be flushed on unmap on ARCH which need it.
Signed-off-by: Sebastian Andrzej Siewior
Signed-off-by: Pierre Ossman
30 Jul, 2009
1 commit
-
Since commit 8dfd0374be84793360db7fff2e635d2cd3bbcb21 ("MMC core: limit
minimum initialization frequency to 400kHz") MMC core checks for minimum
frequency, and that causes following messages flood when using eSDHC
controllers:...
mmc0: Minimum clock frequency too high for identification mode
mmc0: Minimum clock frequency too high for identification mode
...The warnings are legitimate, since if we'd use 133 MHz clocks for standard
SDHCI controllers, we'd not able to scale frequency down to 400 kHz.But eSDHC controllers have a non-standard SD clock management, so we can
divide clock by 256 * 16, not just 256.This patch introduces get_min_clock() callback for sdhci core and
implements it for sdhci-of driver, and thus fixes the issue.Signed-off-by: Anton Vorontsov
Cc: Matt Fleming
Cc: Ian Molton
Cc: "Roberto A. Foglietta"
Cc: Pierre Ossman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Jul, 2009
1 commit
-
Standard data flow for MMC/SD/SDIO cards requires that the mvsdio
controller be set for big endian operation. This is causing problems
with buffers which length is not a multiple of 4 bytes as the last
partial word doesn't get shifted all the way and stored properly in
memory. Let's compensate for this.Signed-off-by: Nicolas Pitre
CC: stable@kernel.org
Signed-off-by: Linus Torvalds
09 Jul, 2009
1 commit
03 Jul, 2009
1 commit
-
The DMA flow control in pxamci_setup_data() is backwards; fix it.
Signed-off-by: Matt Reimer
Acked-by: Robert Jarzmik
Signed-off-by: Eric Miao
01 Jul, 2009
1 commit
-
Add a new spi_master.flags word listing constraints relevant to that
controller. Define the first constraint bit: a half duplex restriction.
Include that constraint in the OMAP1 MicroWire controller driver.Have the mmc_spi host be the first customer of this flag. Its coding
relies heavily on full duplex transfers, so it must fail when the
underlying controller driver won't perform them.(The spi_write_then_read routine could use it too: use the
temporarily-withdrawn full-duplex speedup unless this flag is set, in
which case the existing code applies. Similarly, any spi_master
implementing only SPI_3WIRE should set the flag.)Signed-off-by: David Brownell
Cc: Marek Szyprowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Jun, 2009
8 commits
-
Signed-off-by: Pierre Ossman
-
The SDHCI controller found in the VX855ES requires 10ms
delay between applying power and applying clock.This issue has been discovered and documented by the OLPC XO1.5 team.
Signed-off-by: Harald Welte
Signed-off-by: Pierre Ossman -
This was missed in the DMA changes during the s3c24xx
updates in commit 8970ef47d56fd3db28ee798b9d400caf08abd924.Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman -
This adds the via-sdmmc driver for the SD/MMC-controller of VIA,
which is found in a number of recent integrated VIA chipset
products.Signed-off-by: Harald Welte
Signed-off-by: Pierre Ossman -
Some hosts (hardware configurations, or particular SD/MMC slots) may
not support 4-bit bus. For example, on MPC8569E-MDS boards we can
switch between serial (1-bit only) and nibble (4-bit) modes, thought
we have to disable more peripherals to work in 4-bit mode.Along with some small core changes, this patch modifies sdhci-of
driver, so that now it looks for "sdhci,1-bit-only" property in the
device-tree, and if specified we enable a proper quirk.Signed-off-by: Anton Vorontsov
Acked-by: Grant Likely
Signed-off-by: Pierre Ossman -
Add quirk to show the controller cannot do multi-block IO.
This is mainly for the Samsung SDHCI controller that currently
cannot manage to do multi-block PIO without timing out.Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman -
Update the ADMA error reporting to not only show the
overall controller state but also to print the ADMA
descriptor list.Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman -
Add support for the 'HSMMC' block(s) in the Samsung SoC
line. These are compatible with the SDHCI driver so add
the necessary setup and driver binding for the platform
devices.Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman
15 Jun, 2009
2 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (25 commits)
atmel-mci: add MCI2 register definitions
atmel-mci: Integrate AT91 specific definition in header file
tmio_mmc: allow compilation for ASIC3
mmc_block: do not DMA to stack
sdhci: Print ADMA status and pointer on debug
tmio_mmc: fix clock setup
tmio_mmc: map SD control registers after enabling the MFD cell
tmio_mmc: correct probe return value for num_resources != 3
tmio_mmc: don't use set_irq_type
tmio_mmc: add bus_shift support
MFD,mmc: tmio_mmc: make HCLK configurable
mmc_spi: don't use EINVAL for possible transmission errors
cb710: more cleanup for the DEBUG case.
sdhci: platform driver for SDHCI
mxcmmc: remove frequency workaround
cb710: handle DEBUG define in Makefile
cb710: add missing parenthesis
cb710: fix printk format string
mmc: Driver for CB710/720 memory card reader (MMC part)
pxamci: add regulator support.
... -
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
14 Jun, 2009
21 commits
-
New revision of Atmel MCI interface adds new features. This is a update of
register definition in header file. This new MCI IP is called MCI2.Signed-off-by: Nicolas Ferre
Acked-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
The MCI IP is shared among AVR32 and AT91 SOCs.
AT91 has specific bit definitions in the user interface of MCI SD/MMC IP.Signed-off-by: Nicolas Ferre
Acked-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
Now tmio_mmc is able to drive the MMC/SD cell in ASIC3.
Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman -
In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.[ Changed to GFP_KERNEL allocation - Pierre Ossman ]
Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman -
If using ADMA, then we should print the ADMA error
and current pointer in sdhci_dumpregs() when any
debug is requested.Signed-off-by: Ben Dooks
Signed-off-by: Pierre Ossman -
This patch fixes the clock setup in tmio_mmc.
* Incorrect divider setting
* Cruft written to the clock registers (seemingly harmless but Not
Good (tm))It also eliminates some unnecessary ifs and tidies the loop syntax.
Thanks to Philipp Zabel who discovered the divider issue, commenting
"Except for the SDCLK = HCLK (divider bypassed) case, the clock
setting resulted in double the requested frequency.
The smallest possible frequency (f_max/512) is configured with
a divider setting 0x80, not 0x40."Signed-off-by: Ian Molton
Signed-off-by: Pierre Ossman -
ASIC3 can disable the memory, so we need to wait for mfd_cell->enable
to enable the memory before we can map the SD control registers.Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman -
Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman -
Use an IRQF_TRIGGER_ flag in request_irq instead.
Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman -
Some ASIC3 devices in the wild are connected with the address bus shifted
by one line, so that its 16-bit registers appear 32-bit aligned in host
memory space.Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman -
The Toshiba parts all have a 24 MHz HCLK, but HTC ASIC3 has a 24.576 MHz HCLK
and AMD Imageon w228x's HCLK is 80 MHz. With this patch, the MFD driver
provides the HCLK frequency to tmio_mmc via mfd_cell->driver_data.Signed-off-by: Philipp Zabel
Acked-by: Ian Molton
Acked-by: Samuel Ortiz
Signed-off-by: Pierre Ossman -
This patch changes the reported error code for the responses
to a command from EINVAL to EFAULT/ENOSYS, as EINVAL is reserved
for non-recoverable host errors, and the responses from
the SD/MMC card may be because of recoverable transmission
errors in the command or in the response. Response codes
in SPI mode are NOT protected by a checksum, so don't trust them.Signed-off-by: Wolfgang Muees
Acked-by: Matt Fleming
Signed-off-by: Pierre Ossman -
Signed-off-by: Michał Mirosław
Signed-off-by: Pierre Ossman -
Added a platform driver which uses the SDHCI core.
Signed-off-by: Richard Röjfors
Signed-off-by: Pierre Ossman -
The MMC core has now been fixed to not send silly frequencies to the
drivers which means we can remove this workaround.Signed-off-by: Pierre Ossman
-
Signed-off-by: Pierre Ossman
-
The code is divided in two parts. There is a virtual 'bus' driver
that handles PCI device and registers three new devices one per card
reader type. The other driver handles SD/MMC part of the reader.Signed-off-by: Michał Mirosław
Signed-off-by: Pierre Ossman -
Changes pxamci.c to use the regulator subsystem. Uses the regulator case
CONFIG_REGULATOR is defined and a matching is regulator is provided, or
falls back to pdata->setpower otherwise. A warning is displayed case
both a valid regulator and pdata is set, and the regulator is used.Signed-off-by: Daniel Ribeiro
Acked-by: Eric Miao
Signed-off-by: Pierre Ossman -
Some controllers allow a much lower frequency than 400kHz.
Keep the minimum frequency within sensible limits.Signed-off-by: Sascha Hauer
-
Because of granularity issues, sometimes we told the hardware to change
to the voltage we were already at. Rework the logic so this doesn't
happen.Signed-off-by: Pierre Ossman
-
A pointer to mmc_omap_probe which lives in .init.text is passed to the
core via platform_driver_register and so the kernel might oops if probe
is called after the init code is discarded.As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text. This saves some memory, but
might have the downside that a device being registered after the call to
mmc_omap_init but before the init sections are discarded will not be
bound anymore to the driver.Signed-off-by: Uwe Kleine-König
Acked-by: David Brownell
Signed-off-by: Pierre Ossman