- 26 11月, 2014 3 次提交
-
-
由 James Hogan 提交于
Commit f1d2736c (mmc: dw_mmc: control card read threshold) added dw_mci_ctrl_rd_thld() with an unconditional write to the CDTHRCTL register at offset 0x100. However before version 240a, the FIFO region started at 0x100, so the write messes with the FIFO and completely breaks the driver. If the version id < 240A, return early from dw_mci_ctl_rd_thld() so as not to hit this problem. Fixes: f1d2736c (mmc: dw_mmc: control card read threshold) Signed-off-by: NJames Hogan <james.hogan@imgtec.com> Cc: <stable@vger.kernel.org> # v3.13+ Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Addy Ke 提交于
The bit of sdio interrupt is 16 in designware implementation, but it is 24 on Rockchip SoCs.This patch add sdio_id0 for the number of slot0 in the SDIO interrupt registers. Signed-off-by: NAddy Ke <addy.ke@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Prabu Thangamuthu 提交于
Synopsys DW_MMC IP core supports Internal DMA Controller with 64-bit address mode from IP version 2.70a onwards. Updated the driver to support IDMAC 64-bit addressing mode. Signed-off-by: NPrabu Thangamuthu <prabu.t@synopsys.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 10 11月, 2014 3 次提交
-
-
由 Doug Anderson 提交于
The dw_mmc driver had a bunch of code that ran whenever a card was ejected and inserted. However, this code was old and crufty and should be removed. Some evidence that it's really not needed: 1. Is is supposed to be legal to use 'cd-gpio' on dw_mmc instead of using the built-in card detect mechanism. The 'cd-gpio' code doesn't run any of the crufty old code but yet still works. 2. While looking at this, I realized that my old change (369ac861 mmc: dw_mmc: don't queue up a card detect at slot startup) actually castrated the old code a little bit already and nobody noticed. Specifically "last_detect_state" was left as 0 at bootup. That means that on the first card removal none of the crufty code ran. 3. I can run "while true; do dd if=/dev/mmcblk1 of=/dev/null; done" while ejecting and inserting an SD Card and the world doesn't explode. If some of the crufty old code is actually needed, we should justify it and also put it in some place where it will be run even with "cd-gpio". Note that in my case I'm using the "cd-gpio" mechanism but for various reasons the hardware triggers a dw_mmc "card detect" at bootup. That was actually causing a real bug. The card detect workqueue was running while the system was trying to enumerate the card. The "present != slot->last_detect_state" triggered and we were doing all kinds of crazy stuff and messing up enumeration. The new mechanism of just asking the core to check the card is much safer and then the bogus interrupt doesn't hurt. Signed-off-by: NDoug Anderson <dianders@chromium.org> Tested-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Tested-by: Nalim.akhtar <alim.akhtar@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Doug Anderson 提交于
In (28f92b5 mmc: core: Try other signal levels during power up) we can see that there are times when it's valid to try several signal voltages. Don't print an ugly error in the logs when that happens. Signed-off-by: NDoug Anderson <dianders@chromium.org> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Sonny Rao 提交于
We've already got a reset of DMA after it's done. Add one before we start DMA too. This fixes a data corruption on Rockchip SoCs which will get bad data when doing a DMA transfer after doing a PIO transfer. We tested this on an Exynos 5800 with HS200 and didn't notice any difference in sequential read throughput. Signed-off-by: NSonny Rao <sonnyrao@chromium.org> Signed-off-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Tested-by: NJaehoon Chung <jh80.chung@samsung.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 23 9月, 2014 1 次提交
-
-
由 Stephen Boyd 提交于
The same tuning block exists in the dw_mmc h.c and sdhci-msm.c files. Move these into mmc.c so that they can be shared across drivers. Reported-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 19 9月, 2014 1 次提交
-
-
由 Tobias Klauser 提交于
dw_mci_of_find_slot_node() is only used in dw_mci_of_get_slot_quirks() if CONFIG_OF is defined, thus there is no need to have a !CONFIG_OF version of it. Fixes the following compile warning with !CONFIG_OF: CC [M] drivers/mmc/host/dw_mmc.o drivers/mmc/host/dw_mmc.c:2223:28: warning: ‘dw_mci_of_find_slot_node’ defined but not used [-Wunused-function] Signed-off-by: NTobias Klauser <tklauser@distanz.ch> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 09 9月, 2014 4 次提交
-
-
由 Doug Anderson 提交于
It's possible that mmc_of_parse() could return errors (possibly in some future version it might return -EPROBE_DEFER even). Let's pass those errors back. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Doug Anderson 提交于
For UHS cards we need the ability to switch voltages from 3.3V to 1.8V. Add support to the dw_mmc driver to handle this. Note that dw_mmc needs a little bit of extra code since the interface needs a special bit programmed to the CMD register while CMD11 is progressing. This means adding a few extra states to the state machine to track. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Yuvaraj CD 提交于
This patch makes use of mmc_regulator_get_supply() to handle the vmmc and vqmmc regulators.Also it moves the code handling the these regulators to dw_mci_set_ios().It turned on the vmmc and vqmmc during MMC_POWER_UP and MMC_POWER_ON,and turned off during MMC_POWER_OFF. Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Doug Anderson 提交于
If we happened to get a data error at just the wrong time the dw_mmc driver could get into a state where it would never complete its request. That would leave the caller just hanging there. We fix this two ways and both of the two fixes on their own appear to fix the problems we've seen: 1. Fix a race in the tasklet where the interrupt setting the data error happens _just after_ we check for it, then we get a EVENT_XFER_COMPLETE. We fix this by repeating a bit of code. 2. Fix it so that if we detect that we've got an error in the "data busy" state and we're not going to do anything else we end the request and unblock anyone waiting. Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@gmail.com> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 11 8月, 2014 2 次提交
-
-
由 Jaehoon Chung 提交于
Slot quirks "disable-wp" is deprecated. Instead, use the host quirk "disable-wp". (Because the slot-node is removed in dt-file.) Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Tested-by: NSachin Kamat <sachin.kamat@samsung.com> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Sonny Rao 提交于
This patch changes the fifo reset code to follow the reset procedure outlined in the documentation of Synopsys Mobile storage host databook. Signed-off-by: NSonny Rao <sonnyrao@chromium.org> Signed-off-by: NYuvaraj Kumar C D <yuvaraj.cd@samsung.com> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> [sonnyrao: fix compile for !CONFIG_MMC_DW_IDMAC case] Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 22 5月, 2014 1 次提交
-
-
由 Doug Anderson 提交于
Data errors are completely expected during tuning. Printing them out is confusing people looking at the kernel logs. They see things like: [ 3.613296] dwmmc_exynos 12200000.dwmmc0: data error, status 0x00000088 ...and they think something is wrong with their hardware. Remove the printouts. We'll leave it up to a higher level to report about errors. Signed-off-by: NDoug Anderson <dianders@chromium.org> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
- 13 5月, 2014 7 次提交
-
-
由 Jaehoon Chung 提交于
Restore the card-present checking point. (The following part was removed from commit bf626e55 ("mmc: dw_mmc: use slot-gpio to handle cd pin") Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
If mmc_of_parse() is used, dw_mci_of_get_cd_gpio/wp_gpio didn't need. Already implemented into mmc_of_parse(). Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
Remove unnecessary function. This function didn't re-use anywhere. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
Fixed an indentation block. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
Since using the device-tree, didn't use the callback pointer. So removed the unused callback pointer. When the set_power callback is used, it should be added in future. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
It's right to check immediately whether host->bus_hz is assigned or not. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
由 Jaehoon Chung 提交于
mmc_of_parse() have been already parsed the general capability. Didn't need to use the local parser. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
- 21 4月, 2014 1 次提交
-
-
由 Seungwon Jeon 提交于
Replaced UHS_DDR50 with MMC_DDR52. And MMC_CAP_UHS_DDR50 is removed because of non-implementation of UHS signaling. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <chris@printf.net>
-
- 29 3月, 2014 1 次提交
-
-
由 ZhangZhen 提交于
Tejun Heo has made WQ_NON_REENTRANT useless in the dbf2576e ("workqueue: make all workqueues non-reentrant"). So remove its usages and definition. This patch doesn't introduce any behavior changes. tj: minor description updates. Signed-off-by: NZhangZhen <zhenzhang.zhang@huawei.com> Sigend-off-by: NTejun Heo <tj@kernel.org> Acked-by: NJames Chapman <jchapman@katalix.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 26 2月, 2014 1 次提交
-
-
由 Sachin Kamat 提交于
If mrq->sbc is not NULL but data->stop happens to be NULL, it will lead to NULL pointer dereferencing. Avoid this by having a NULL check for data->stop. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NChris Ball <chris@printf.net>
-
- 17 1月, 2014 1 次提交
-
-
由 Zhangfei Gao 提交于
bf626e55 ("mmc: dw_mmc: use slot-gpio to handle cd pin") caused CDETECT to be ignored, since negated return value of mmc_gpio_get_cd(mmc) can not be checked by IS_ERR_VALUE. Also, add spin_lock_bh(&host->lock) for atomic access to DW_MMC_CARD_PRESENT, otherwise sd detect may occasionally fail. Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org> Reported-by: NKevin Hilman <khilman@linaro.org> Reviewed-by: NSachin Kamat <sachin.kamat@linaro.org> Tested-by: NSachin Kamat <sachin.kamat@linaro.org> Tested-by: NKevin Hilman <khilman@linaro.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NChris Ball <chris@printf.net>
-
- 14 1月, 2014 1 次提交
-
-
由 Zhangfei Gao 提交于
Suggested by Jaehoon: Use slot-gpio to handle cd-gpio Add function dw_mci_of_get_cd_gpio to check "cd-gpios" from dts. mmc_gpio_request_cd and mmc_gpio_get_cd are used to handle cd pin Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NChris Ball <chris@printf.net>
-
- 31 10月, 2013 1 次提交
-
-
由 Ulf Hansson 提交于
Suspend and resume of cards are being handled from the protocol layer and consequently the mmc_suspend|resume_host APIs are deprecated. This means we can simplify the suspend|resume callbacks by removing the use of the deprecated APIs. Cc: Seungwon Jeon <tgih.jun@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 26 9月, 2013 12 次提交
-
-
由 Seungwon Jeon 提交于
In IDMAC mode EVENT_XFER_COMPLETE is set when RI/TI of last descriptor is done. So if errors are happened in the middle of data transfers, 'dw_mci_stop_dma' during error handing can be called and eventually prevents this flag to be set. This results in permanent wait for EVENT_XFER_COMPLETE in 'dw_mci_tasklet_func'. Therefore, if dma running is stopped forcibly, EVENT_XFER_COMPLETE should be set. Reported-by: NBing Zhao <bzhao@marvell.com> Signed-off-by: NDoug Anderson <dianders@chromium.org> Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Acked-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
First, compiling warning along with previous change is removed. [drivers/mmc/host/dw_mmc.c:1890:7: warning: unused variable 'ctrl'] And with the recommendation in manual, IDMAC software reset is followed by dma-reset of the CTRL register in order to terminate the transfer. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
There are three resets in CTRL register. FIFO reset is especially used in several points with the same routine. It could be replaced with one function and the others may be applied similarly if needed. So, mci_wait_reset() is modified to allow various bit field of reset. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
Main change corresponds to dw_mci_command_complete(). And EBE is divided into read and write. Some minor changes for code readability. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
In error cases, DTO interrupt may or may not be generated depending on remained data. Stop/Abort command ensures DTO generation for that situation. Currently if 'stop' field of data is empty, there is no stop/abort command. So, it could hang waiting DTO. This change reinforces these cases. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
Even if response error is detected in case data command, data transfer is continued. It means that data can live in FIFO. Current handling just breaks out the request when seeing the command error. This causes kernel panic in dw_mci_read_data_pio() [host->data = NULL]. And also, FIFO should be guaranteed to be empty. Unable to handle kernel NULL pointer dereference at virtual address 00000018 <...> [<c02af814>] (dw_mci_read_data_pio+0x68/0x198) from [<c02b04b4>] (dw_mci_interrupt+0x374/0x3a0) [<c02b04b4>] (dw_mci_interrupt+0x374/0x3a0) from [<c006b094>] (handle_irq_event_percpu+0x50/0x194) [<c006b094>] (handle_irq_event_percpu+0x50/0x194) from [<c006b214>] (handle_irq_event+0x3c/0x5c) [<c006b214>] (handle_irq_event+0x3c/0x5c) from [<c006de1c>] (handle_fasteoi_irq+0xa4/0x148) [<c006de1c>] (handle_fasteoi_irq+0xa4/0x148) from [<c006aa88>] (generic_handle_irq+0x20/0x30) [<c006aa88>] (generic_handle_irq+0x20/0x30) from [<c000f154>] (handle_IRQ+0x38/0x90) [<c000f154>] (handle_IRQ+0x38/0x90) from [<c00085bc>] (gic_handle_irq+0x34/0x68) [<c00085bc>] (gic_handle_irq+0x34/0x68) from [<c0011f40>] (__irq_svc+0x40/0x70) Exception stack(0xef0b1c00 to 0xef0b1c48) 1c00: 000eb0cf ffffffff 00001300 c01a7738 ef295e10 0000000a c04df298 ef0b1dc0 1c20: ef295ec0 00000000 00000000 00000006 00000000 ef0b1c48 c02b1274 c01a7764 1c40: 20000113 ffffffff [<c0011f40>] (__irq_svc+0x40/0x70) from [<c01a7764>] (__loop_delay+0x0/0xc) Code: e1a00005 e0891006 e0662004 e12fff33 (e59a3018) ---[ end trace a7043b9ba9aed1db ]--- Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
Card Read Threshold should be ensured that the card clock does not stop in the middle of a block of data being transferred from the card to the Host. Specially, clock stop is allowed in fast transfer such as HS200 or SDR104 mode. And so, it should be enabled. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
This change helps to choose msize, rx_watermark and tx_watermark depending on block size for IDMAC mode. For SDIO block size can be variable, so if these values are set incorrectly, card clock may stop. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
Both f_max and f_min will be informed for core layer to request valid clock rate. But current setting from 'host->bus_hz' may not represent the max/min frequency properly. Even if host can actually support high speed than bus_hz, core layer will not request clock rate over bus_hz. Basically, f_max/f_min can be set with the values according to spec. And then host will make its best effort to meet the rate. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
'supports-highspeed' is not one of the quirks but is a capability. So, it's removed from quirks. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
As host controller can support eMMC's HS200 mode at 1.8V or 1.2V, these capability will be added. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
For the speed modes HS200 and SDR104, tuning is needed to determine the correct sampling point. Actual tuning procedure is provided by specific host controller driver. This patch defines the tuning command and tuning data. Additionally, 'struct dw_mci_slot' is moved to header file to consider the extensive usages in driver. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-