aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/tmio_mmc.c
AgeCommit message (Collapse)Author
2010-03-07tmio_mmc: Balance cell enable()/disable() callsMagnus Damm
This patch adds cell->disable() calls to the tmio-mmc probe() error handling and the remove() function. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07tmio_mmc: Use 100ms mmc_detect_change() delayMagnus Damm
This patch changes the tmio_mmc driver to wait 100ms before checking the card detect status. This type of delay is quite common among mmc drivers, it seems that most hardware platforms need to give the hardware some time to settle before checking card availabilty. Hotplug is half-broken without this patch on the sh7724 Ecovec board. Hot insertion seems ok but eject is never detected without this patch. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-03-07tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2Yusuke Goda
Enable MMC_CAP_XX support in the tmio_mmc driver if pdata->capabilities is set. Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-01-18mfd: tmio_mmc hardware abstraction for CNF areaIan Molton
This patch abstracts out the CNF area code from tmio_mmc which is not present in all hardware that can use this driver. This is required so that we can support non-toshiba based hardware. ASIC3 support by Philipp Zabel Signed-off-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-12-15mmc: let tmio-mmc use dev_name() with request_irq()Magnus Damm
Improve the /proc/interrupts output so the irq number can be mapped to platform device on boards with multiple tmio_mmc instances. Signed-off-by: Magnus Damm <damm@opensource.se> Cc: <linux-mmc@vger.kernel.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-13tmio_mmc: allow compilation for ASIC3Philipp Zabel
Now tmio_mmc is able to drive the MMC/SD cell in ASIC3. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Ian Molton <spyro@f2s.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13tmio_mmc: fix clock setupIan Molton
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 <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13tmio_mmc: map SD control registers after enabling the MFD cellPhilipp Zabel
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 <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13tmio_mmc: correct probe return value for num_resources != 3Philipp Zabel
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13tmio_mmc: don't use set_irq_typePhilipp Zabel
Use an IRQF_TRIGGER_ flag in request_irq instead. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13tmio_mmc: add bus_shift supportPhilipp Zabel
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 <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-06-13MFD,mmc: tmio_mmc: make HCLK configurablePhilipp Zabel
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 <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-03-24tmio_mmc: Fix use after free in remove()Magnus Damm
Update the tmio_mmc code to call mmc_free_host() when done using the private data. Without this fix the driver frees memory and then keeps on using it as private data. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2009-03-24tmio_mmc: Fix one off, use resource_size() in probe()Magnus Damm
Update the tmio_mmc code to use resource_size(). With this patch applied the correct resource size is passed to ioremap(). Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-12-31drivers/mmc: Move a dereference below a NULL testJulia Lawall
In each case, if the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-08-10mfd: TMIO MMC driverIan Molton
This patch adds support for the MMC subdevice 'cell' commonly found in TMIO based MFDs. Signed-off-by: Ian Molton <spyro@f2s.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>