aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/omap.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-07mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4Douglas Anderson1-0/+1
This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.4 timeframe. Signed-off-by: Douglas Anderson <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Tested-by: Wolfram Sang <[email protected]> # SH_MMCIF Tested-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/20200903162412.1.Id501e96fa63224f77bb86b2135a5e8324ffb9c43@changeid Signed-off-by: Ulf Hansson <[email protected]>
2020-05-28mmc: host: Drop redundant MMC_CAP_ERASEUlf Hansson1-1/+1
The MMC_CAP_ERASE bit is no longer used by the mmc core as erase, discard and trim operations are now always supported. Therefore, drop the bit and move all mmc hosts away from using it. Signed-off-by: Ulf Hansson <[email protected]> Reviewed-by: Rui Miguel Silva <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Linus Walleij <[email protected]>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-02-25mmc: omap: fix the maximum timeout settingAaro Koskinen1-1/+1
When running OMAP1 kernel on QEMU, MMC access is annoyingly noisy: MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! [ad inf.] Emulator warnings appear to be valid. The TI document SPRU680 [1] ("OMAP5910 Dual-Core Processor MultiMedia Card/Secure Data Memory Card (MMC/SD) Reference Guide") page 36 states that the maximum timeout is 253 cycles and "0xff and 0xfe cannot be used". Fix by using 0xfd as the maximum timeout. Tested using QEMU 2.5 (Siemens SX1 machine, OMAP310), and also checked on real hardware using Palm TE (OMAP310), Nokia 770 (OMAP1710) and Nokia N810 (OMAP2420) that MMC works as before. [1] http://www.ti.com/lit/ug/spru680/spru680.pdf Fixes: 730c9b7e6630f ("[MMC] Add OMAP MMC host driver") Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2018-12-04MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310Aaro Koskinen1-2/+9
Since v2.6.22 or so there has been reports [1] about OMAP MMC being broken on OMAP15XX based hardware (OMAP5910 and OMAP310). The breakage seems to have been caused by commit 46a6730e3ff9 ("mmc-omap: Fix omap to use MMC_POWER_ON") that changed clock enabling to be done on MMC_POWER_ON. This can happen multiple times in a row, and on 15XX the hardware doesn't seem to like it and the MMC just stops responding. Fix by memorizing the power mode and do the init only when necessary. Before the patch (on Palm TE): mmc0: new SD card at address b368 mmcblk0: mmc0:b368 SDC 977 MiB mmci-omap mmci-omap.0: command timeout (CMD18) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD12) [x 6] mmci-omap mmci-omap.0: command timeout (CMD13) [x 6] mmcblk0: error -110 requesting status mmci-omap mmci-omap.0: command timeout (CMD8) mmci-omap mmci-omap.0: command timeout (CMD18) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD13) mmci-omap mmci-omap.0: command timeout (CMD12) [x 6] mmci-omap mmci-omap.0: command timeout (CMD13) [x 6] mmcblk0: error -110 requesting status mmcblk0: recovery failed! print_req_error: I/O error, dev mmcblk0, sector 0 Buffer I/O error on dev mmcblk0, logical block 0, async page read mmcblk0: unable to read partition table After the patch: mmc0: new SD card at address b368 mmcblk0: mmc0:b368 SDC 977 MiB mmcblk0: p1 The patch is based on a fix and analysis done by Ladislav Michl. Tested on OMAP15XX/OMAP310 (Palm TE), OMAP1710 (Nokia 770) and OMAP2420 (Nokia N810). [1] https://marc.info/?t=123175197000003&r=1&w=2 Fixes: 46a6730e3ff9 ("mmc-omap: Fix omap to use MMC_POWER_ON") Reported-by: Ladislav Michl <[email protected]> Reported-by: Andrzej Zaborowski <[email protected]> Tested-by: Ladislav Michl <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Aaro Koskinen <[email protected]> Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]>
2017-11-02mmc: Convert timers to use timer_setup()Kees Cook1-11/+9
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Ludovic Desroches <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Jaehoon Chung <[email protected]> Cc: Carlo Caione <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Jarkko Lavinen <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alex Dubov <[email protected]> Cc: Bruce Chang <[email protected]> Cc: Harald Welte <[email protected]> Cc: Tony Olech <[email protected]> Cc: Pierre Ossman <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Paul Cercueil <[email protected]> Cc: Heiner Kallweit <[email protected]> Cc: Shawn Lin <[email protected]> Cc: Arvind Yadav <[email protected]> Cc: Allen <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-02-13mmc: omap: Don't use mmc_card_present() when validating for inserted cardUlf Hansson1-1/+1
The mmc_card_present() function helps the mmc core to track an internal state of the card device. More importantly, it's not intended to be used by mmc host drivers to check for an inserted card. Therefore, let's stop using it and instead rely on checking for a valid pointer to a struct mmc_card, as it should be good enough. Cc: [email protected] Cc: Tony Lindgren <[email protected]> Cc: Jarkko Nikula <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Acked-by: Tony Lindgren <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
2016-09-14mmc: omap: Initialize dma_slave_config to avoid random data in it's fieldsPeter Ujfalusi1-8/+10
It is wrong to use uninitialized dma_slave_config and configure only certain fields as the DMAengine driver might look at non initialized (random data) fields and tries to interpret it. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2016-05-04mmc: omap: Use dma_request_chan() for requesting DMA channelPeter Ujfalusi1-23/+25
With the new dma_request_chan() the client driver does not need to look for the DMA resource and it does not need to pass filter_fn anymore. By switching to the new API the driver can now support deferred probing against DMA. Signed-off-by: Peter Ujfalusi <[email protected]> CC: Ulf Hansson <[email protected]> CC: Jarkko Nikula <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2015-10-26mmc: omap: Fix module autoload for OF platform driverLuis de Bethencourt1-0/+1
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2015-08-27mmc: omap: fix error return codeJulia Lawall1-1/+3
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2015-08-17mmc: omap: use for_each_sg() for scatterlist parsingFabian Frederick1-2/+3
See Documentation/DMA-API.txt - Part Id Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2014-09-09mmc: remove .owner field for drivers using module_platform_driverPeter Griffin1-1/+0
This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway. Signed-off-by: Peter Griffin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2014-05-22mmc: omap: Use DIV_ROUND_UP instead of open codedAxel Lin1-5/+5
Also uses NSEC_PER_SEC and USEC_PER_SEC instead of hard-coded value. This makes the intention more clear. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Add erase capabilityJarkko Nikula1-7/+11
This patch adds the erase capability to OMAP1/OMAP2420 MMC driver. Idea is the same than in commit 93caf8e ("omap_hsmmc: add erase capability") that we disable the data timeout interrupt for erases. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Remove always set use_dma flag from struct mmc_omap_hostJarkko Nikula1-10/+5
Because use_dma is set only in mmc_omap_probe and unset nowhere there is no need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data function. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Convert to devm_ioremap_resourceJarkko Nikula1-29/+12
Simplify probe and cleanup code by using devm_ioremap_resource. This also makes probe code to follow more common allocate private struct followed by other initialization style. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Remove mem_res field from struct mmc_omap_hostJarkko Nikula1-3/+1
Field mem_res in struct mmc_omap_host is used only once in mmc_omap_probe when setting the phys_base field so we may just se the phys_base straight and remove needless mem_res. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Remove duplicate host->irq assignmentJarkko Nikula1-1/+0
host-irq is set twice so remove needless one. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Convert to devm_kzallocJarkko Nikula1-4/+2
Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-02-22mmc: omap: Fix NULL pointer dereference due uninitialized cover_taskletJarkko Nikula1-5/+7
Omap MMC driver initialization can cause a NULL pointer dereference in tasklet_hi_action on Nokia N810 if its miniSD cover is open during driver initialization. [ 1.070000] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 1.080000] pgd = c0004000 [ 1.080000] [00000000] *pgd=00000000 [ 1.080000] Internal error: Oops: 80000005 [#1] PREEMPT ARM [ 1.080000] Modules linked in: [ 1.080000] CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 3.13.0-rc2+ #95 [ 1.080000] Workqueue: events menelaus_work [ 1.080000] task: c7863340 ti: c7878000 task.ti: c7878000 [ 1.080000] PC is at 0x0 [ 1.080000] LR is at tasklet_hi_action+0x68/0xa4 ... [ 1.080000] [<c003543c>] (tasklet_hi_action+0x68/0xa4) from [<c0034dd0>] (__do_softirq+0xbc/0x208) [ 1.080000] [<c0034dd0>] (__do_softirq+0xbc/0x208) from [<c003521c>] (irq_exit+0x84/0xac) [ 1.080000] [<c003521c>] (irq_exit+0x84/0xac) from [<c00135cc>] (handle_IRQ+0x64/0x84) [ 1.080000] [<c00135cc>] (handle_IRQ+0x64/0x84) from [<c000859c>] (omap2_intc_handle_irq+0x54/0x68) [ 1.080000] [<c000859c>] (omap2_intc_handle_irq+0x54/0x68) from [<c0015be0>] (__irq_svc+0x40/0x74) [ 1.080000] Exception stack(0xc7879d70 to 0xc7879db8) [ 1.080000] 9d60: 000003f1 0000000a 00000009 0000001c [ 1.080000] 9d80: c7879e70 c780bc10 c780bc10 00000000 00000001 00008603 c780bc78 c7879e4e [ 1.080000] 9da0: 00000002 c7879db8 c00343b0 c0160c9c 20000113 ffffffff [ 1.080000] [<c0015be0>] (__irq_svc+0x40/0x74) from [<c0160c9c>] (__aeabi_uidiv+0x20/0x9c) [ 1.080000] [<c0160c9c>] (__aeabi_uidiv+0x20/0x9c) from [<c00343b0>] (msecs_to_jiffies+0x18/0x24) [ 1.080000] [<c00343b0>] (msecs_to_jiffies+0x18/0x24) from [<c01ec3ec>] (omap_i2c_xfer+0x30c/0x458) [ 1.080000] [<c01ec3ec>] (omap_i2c_xfer+0x30c/0x458) from [<c01e9724>] (__i2c_transfer+0x3c/0x74) [ 1.080000] [<c01e9724>] (__i2c_transfer+0x3c/0x74) from [<c01eac4c>] (i2c_transfer+0x78/0x94) [ 1.080000] [<c01eac4c>] (i2c_transfer+0x78/0x94) from [<c01eb0bc>] (i2c_smbus_xfer+0x3c0/0x4f8) [ 1.080000] [<c01eb0bc>] (i2c_smbus_xfer+0x3c0/0x4f8) from [<c01eb414>] (i2c_smbus_write_byte_data+0x34/0x3c) [ 1.080000] [<c01eb414>] (i2c_smbus_write_byte_data+0x34/0x3c) from [<c01bb308>] (menelaus_write_reg+0x1c/0x40) [ 1.080000] [<c01bb308>] (menelaus_write_reg+0x1c/0x40) from [<c01bb904>] (menelaus_work+0xa0/0xc4) [ 1.080000] [<c01bb904>] (menelaus_work+0xa0/0xc4) from [<c00439c4>] (process_one_work+0x1fc/0x334) [ 1.080000] [<c00439c4>] (process_one_work+0x1fc/0x334) from [<c0043d6c>] (worker_thread+0x244/0x380) [ 1.080000] [<c0043d6c>] (worker_thread+0x244/0x380) from [<c0049d04>] (kthread+0xc0/0xd4) [ 1.080000] [<c0049d04>] (kthread+0xc0/0xd4) from [<c0012758>] (ret_from_fork+0x14/0x3c) [ 1.080000] Code: bad PC value [ 1.090000] ---[ end trace 7bc2fc7cd14f1d95 ]--- [ 1.100000] Kernel panic - not syncing: Fatal exception in interrupt Reason for this is that omap_notify_cover_event which calls tasklet_hi_schedule gets called before struct cover_tasklet is initialized. Call to omap_notify_cover_event on Nokia N810 happens from menelaus.c PMIC driver via board-n8x0.c during execution of mmc_add_host in case of open miniSD cover. Fix this by moving cover_timer and cover_tasklet initialization before mmc_add_host call in mmc_omap_new_slot. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Tony Lindgren <[email protected]> Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2013-11-26mmc: omap: Fix I2C dependency and make driver usable with device treeTony Lindgren1-1/+10
Some features can be configured by the companion I2C chips, which may not be available at the probe time. Fix the issue by returning -EPROBE_DEFER when the MMC controller slots are not configured. While at it, let's also add minimal device tree support so omap24xx platforms can use this driver without legacy mode since we claim to support device tree for mach-omap2 based systems. Although adding the minimal device tree support is not strictly a fix, it does remove one of the last blockers for dropping a bunch of legacy platform data for mach-omap2. Cc: [email protected] Acked-by: Chris Ball <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2013-11-26mmc: omap: Fix DMA configuration to not rely on device idTony Lindgren1-22/+12
We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: [email protected] Acked-by: Chris Ball <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2013-10-30mmc: omap: Remove redundant suspend and resume callbacksUlf Hansson1-53/+0
Suspend and resume of cards are handled by the protocol layer and consequently the mmc_suspend|resume_host APIs are marked as deprecated. While moving away from using the deprecated APIs, there are nothing left to be done for the suspend and resume callbacks, so remove them. Cc: Jarkko Lavinen <[email protected]> Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2013-07-05mmc: omap: remove unnecessary #if 0'sLuciano Coelho1-16/+0
In commit 3451c067 (mmc: omap: add DMA engine support), some #if 0's were used to comment out parts of the code. This has been in the code for over a year and are not needed anymore (and the commented-out code doesn't even compile). Remove them. Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2013-05-26mmc: remove unnecessary platform_set_drvdata()Jingoo Han1-2/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Sonic Zhang <[email protected]> Acked-by: Seungwon Jeon <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Adrian Hunter <[email protected]> Acked-by: Haojian Zhuang <[email protected]> Acked-by: Jaehoon Chung <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Tony Prisk <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-12-12Merge tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-9/+26
Pull ARM SoC Header cleanups from Olof Johansson: "This is a collection of header file cleanups, mostly for OMAP and AT91, that keeps moving the platforms in the direction of multiplatform by removing the need for mach-dependent header files used in drivers and other places." Fix up mostly trivial conflicts as per Olof. * tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (106 commits) ARM: OMAP2+: Move iommu/iovmm headers to platform_data ARM: OMAP2+: Make some definitions local ARM: OMAP2+: Move iommu2 to drivers/iommu/omap-iommu2.c ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h ARM: OMAP2+: Move iopgtable header to drivers/iommu/ ARM: OMAP: Merge iommu2.h into iommu.h atmel: move ATMEL_MAX_UART to platform_data/atmel.h ARM: OMAP: Remove omap_init_consistent_dma_size() arm: at91: move at91rm9200 rtc header in drivers/rtc arm: at91: move reset controller header to arm/arm/mach-at91 arm: at91: move pit define to the driver arm: at91: move at91_shdwc.h to arch/arm/mach-at91 arm: at91: move board header to arch/arm/mach-at91 arn: at91: move at91_tc.h to arch/arm/mach-at91 arm: at91 move at91_aic.h to arch/arm/mach-at91 arm: at91 move board.h to arch/arm/mach-at91 arm: at91: move platfarm_data to include/linux/platform_data/atmel.h arm: at91: drop machine defconfig ARM: OMAP: Remove NEED_MACH_GPIO_H ARM: OMAP: Remove unnecessary mach and plat includes ...
2012-11-28mmc: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Manuel Lauss <[email protected]> Cc: Chris Ball <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Jarkko Lavinen <[email protected]> Cc: Venkatraman S <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Ian Molton <[email protected]> Cc: Bruce Chang <[email protected]> Cc: Harald Welte <[email protected]> Cc: Pierre Ossman <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28mmc: remove use of __devinitBill Pemberton1-2/+2
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Chris Ball <[email protected]> Cc: Manuel Lauss <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Jarkko Lavinen <[email protected]> Cc: Venkatraman S <[email protected]> Cc: Ian Molton <[email protected]> Cc: Bruce Chang <[email protected]> Cc: Harald Welte <[email protected]> Cc: Pierre Ossman <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-28mmc: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <[email protected]> Cc: Chris Ball <[email protected]> Cc: "Michał Mirosław" <[email protected]> Cc: Jarkko Lavinen <[email protected]> Cc: Venkatraman S <[email protected]> Cc: Ian Molton <[email protected]> Cc: Bruce Chang <[email protected]> Cc: Harald Welte <[email protected]> Cc: Pierre Ossman <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-17Merge branch 'omap-for-v3.8/cleanup-headers-mmc' into ↵Tony Lindgren1-9/+16
omap-for-v3.8/cleanup-headers Conflicts: arch/arm/mach-omap1/devices.c arch/arm/mach-omap2/omap_hwmod_33xx_data.c arch/arm/mach-omap2/omap_hwmod_3xxx_data.c drivers/mmc/host/omap.c
2012-10-15ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.hLokesh Vutla1-1/+1
Move plat/dma.h to plat-omap/dma-omap.h as part of single zImage work Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-15ARM: OMAP2+: DMA: Moving OMAP2+ DMA channel definitions to mach-omap2Lokesh Vutla1-0/+6
Similar to omap1, some of the omap2+ dma channel definitions are used by some drivers. For moving omap2+ dma channel definitions to mach-omap2/, the used ones should be defined locally to driver. Drivers can eliminate it using DT, platform data, or IORESOURCE_DMA And moving omap2+ DMA channel definitions to mach-omap2 Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-15ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1Lokesh Vutla1-0/+4
Some of the omap1 dma channel definitions are used by some drivers. For moving omap1 dma channel definitions to mach-omap1/, the used ones should be defined locally to driver. Driver can eliminate it by using DT, platform data, or IORESOURCE_DMA. And moving OMAP1 DMA channel definitions to mach-omap1 Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-15mmc: omap: Remove cpu_is_omap usage from the driverTony Lindgren1-8/+15
This is needed for the ARM common zImage support. We can use the existing slot features to pass omap1 specific options to the driver. For omap2 we don't want to pass anything new as that will be eventually moved to use device tree based init. Note that this patch depends on earlier patch that moves plat/mmc.h into include/linux/platform_data. Cc: [email protected] Cc: Venkatraman S <[email protected]> Acked-by: Chris Ball <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2012-10-15ARM: OMAP: Split plat/mmc.h into local headers and platform_dataTony Lindgren1-1/+2
We need to remove this from plat for ARM common zImage support. Also remove includes not needed by the omap_hsmmc.c driver. Cc: [email protected] Acked-by: Chris Ball <[email protected]> Acked-by: Venkatraman S <[email protected]> [[email protected]: fold in removal of unused driver includes] Signed-off-by: Tony Lindgren <[email protected]>
2012-09-04mmc: omap: fix mmc_omap_report_irq to use dev_dbg macrosVenkatraman S1-12/+17
The function mmc_omap_report_irq uses raw printks and the actual output was disabled by a static variable. Make the function use dev_vdbg macro and use it under the standard CONFIG_MMC_DEBUG flag. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-09-04mmc: omap: remove unused variables and includesVenkatraman S1-10/+0
Get rid of some unnecessary includes in the driver and a few unused variables. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-09-04mmc: omap: fix broken PIO modePaul Walmsley1-3/+11
After commit 26b88520b80695a6fa5fd95b5d97c03f4daf87e0 ("mmc: omap_hsmmc: remove private DMA API implementation"), the Nokia N800 here stopped booting: [ 2.086181] Waiting for root device /dev/mmcblk0p1... [ 2.324066] Unhandled fault: imprecise external abort (0x406) at 0x00000000 [ 2.331451] Internal error: : 406 [#1] ARM [ 2.335784] Modules linked in: [ 2.339050] CPU: 0 Not tainted (3.6.0-rc3 #60) [ 2.344146] PC is at default_idle+0x28/0x30 [ 2.348602] LR is at trace_hardirqs_on_caller+0x15c/0x1b0 ... This turned out to be due to memory corruption caused by long-broken PIO code in drivers/mmc/host/omap.c. (Previously, this driver had been using DMA; but the above commit caused the MMC driver to fall back to PIO mode with an unmodified Kconfig.) The PIO code, added with the rest of the driver in commit 730c9b7e6630f786fcec026fb11d2e6f2c90fdcb ("[MMC] Add OMAP MMC host driver"), confused bytes with 16-bit words. This bug caused memory located after the PIO transfer buffer to be corrupted with transfers larger than 32 bytes. The driver also did not increment the buffer pointer after the transfer occurred. This bug resulted in data corruption during any transfer larger than 64 bytes. Signed-off-by: Paul Walmsley <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-31mmc: omap: remove private DMA API implementationRussell King1-229/+6
Remove the private DMA API implementation from omap, making it use entirely the DMA engine API. Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31mmc: omap: add DMA engine supportRussell King1-10/+189
Add DMA engine support to the OMAP driver. This supplements the private DMA API implementation contained within this driver, and the driver can be switched at build time between using DMA engine and the private DMA API. Tested-by: Tony Lindgren <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-06-06mmc: omap: Fix broken reg_shift initializationTony Lindgren1-2/+1
Commit fa550189 (mmc: core: Prevent eMMC VCC supply to be cut from late init) slightly affected timings for how things are done for the omap MMC driver causing the MMC cards not getting detected any longer. Turns out this was caused by buggy reg_shift initialization in the omap MMC driver that was happening after mmc_add_host() was being called. Fix this by initializing reg_shift before mmc_add_host() is called. Signed-off-by: Tony Lindgren <[email protected]> Cc: <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-06-06mmc: omap: Fix NULL pointer dereference if mmc_omap_new_slot() failsTony Lindgren1-5/+8
Commit b01a4f1c (mmc: omap: convert to per instance workqueue) initializes the workqueue too late causing the following: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 Not tainted (3.4.0-08218-gb48b2c3 #158) PC is at __queue_work+0x8/0x46c LR is at queue_work_on+0x38/0x40 pc : [<c005bb4c>] lr : [<c005c00c>] psr: 60000193 sp : c0691e1c ip : 00000000 fp : c07374ac r10: c7aae400 r9 : c0395700 r8 : 00000100 r7 : c0691e70 r6 : 00000000 r5 : 00000000 r4 : c7aae440 r3 : 00000001 r2 : c7aae440 r1 : 00000000 r0 : 00000000 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 00c5387d Table: 80004000 DAC: 00000017 Process swapper/0 (pid: 0, stack limit = 0xc06902f8) Stack: (0xc0691e1c to 0xc0692000) Fix this by initializing the workqueue before mmc_omap_remove_slot() get called. Tested on n770, looks like n800 at least still has some other issue with MMC. Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-06-06mmc: omap: Fix a section warning regressionTony Lindgren1-1/+1
Commit b6e0703b (mmc: omap: make it behave well as a module) made some __devinit changes but missed one function causing a section warning: WARNING: vmlinux.o(.devinit.text+0x8604): Section mismatch in reference from the function mmc_omap_probe) The function __devinit mmc_omap_probe() references a function __init mmc_omap_new_slot(). Signed-off-by: Tony Lindgren <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-05-17mmc: omap: convert to module_platform_driverVenkatraman S1-13/+1
Get rid of boilerplate code by using module_platform_driver macro, no functional changes. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-05-17mmc: omap: make it behave well as a moduleVenkatraman S1-4/+5
Use proper __devinit and __devexit annotation for driver functions. Instantiate the probe function for driver_ops instead of a probe in the register function. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-05-17mmc: omap: convert to per instance workqueueVenkatraman S1-17/+12
Currently, a global mmc_omap_wq is created for all instances of omap hosts, which can lead to races and doesn't lend itself to unload the module cleanly. Instead, create per instance workqueue and remove the common workqueue. Signed-off-by: Venkatraman S <[email protected]> Acked-by: Balaji T K <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-01-02misc latin1 to utf8 conversionsAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-08-08ARM: gpio: omap: convert drivers to use asm/gpio.h rather than mach/gpio.hRussell King1-1/+1
Signed-off-by: Russell King <[email protected]>
2011-04-27mmc: omap: Fix possible NULL pointer derefMichael Buesch1-1/+1
Either OMAP_MMC_STAT_CARD_ERR or OMAP_MMC_STAT_END_OF_CMD might fire if there is no host->cmd pointer. Check for a valid host->cmd pointer before calling mmc_omap_cmd_done(). Signed-off-by: Michael Buesch <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Chris Ball <[email protected]>