aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.14/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
Commit message (Collapse)AuthorAgeFilesLines
* ramips: move mtk-mmc driver code out of patches-*/ and into files-*/Felix Fietkau2018-04-051-4779/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ramips: mt7620: eMMC: fix compiler warnings in non-debug modeAndré Draszik2018-04-041-20/+13
| | | | | | | | | | | drivers/mmc/host/mtk-mmc/dbg.c:51:13: warning: 'cmd_buf' defined but not used [-Wunused-variable] static char cmd_buf[256]; ^~~~~~~ In addition, msdc_reg[] is completely unused, even in debug mode. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: remove unused variableAndré Draszik2018-04-041-4/+1
| | | | | | | | msdc_6575_host[] is unused, just remove it. Also, it was the source of memory corruption up until the previous fix to this driver. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: stop invalid memory access if only one device is definedAndré Draszik2018-04-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pdev->id is -1 when only one device exists, and is used: * as an index into drv_mode[] to determine whether to use PIO or DMA mode (via host->id) * as an index into msdc_6575_host[], to store the mmc_priv() data. Obviously, -1 is not a valid index in either case, causing us to read invalid memory, and memory corruption, respectively. The invalid memory read is causing non-deterministic behaviour, in particular in the v4.4 kernel it still picked DMA mode, but in the v4.9 it now always picks PIO mode. Also, PIO mode doesn't work, causing the following: / # echo 3 > /proc/sys/vm/drop_caches [ 3845.249237] sh (128): drop_caches: 3 / # /root/usr/lib/libc.so [ 3846.096070] do_page_fault(): sending SIGSEGV to libc.so for invalid read access from 7f9cb5a0 [ 3846.104758] epc = 779b0ea4 in libc.so[7792f000+c3000] [ 3846.109907] ra = 779a8004 in libc.so[7792f000+c3000] Segmentation fault / # /root/usr/lib/libc.so musl libc (mipsel-sf) Version 1.1.16-git-40-g54807d47 Dynamic Program Loader Usage: /root/usr/lib/libc.so [options] [--] pathname [args] (i.e. initial page-in of any binary causes a segfault, subsequent access works.) While this change doesn't fix PIO mode, it at least makes us deterministically use DMA (which works), and it also stops us from corrupting memory. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: fix MODULE_DEVICE_TABLEAndré Draszik2018-04-041-1/+1
| | | | | | | This was referencing an undefined symbol, probably due to copy/paste error. Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: fix compiler warning (misleading indentation)André Draszik2018-04-041-4/+4
| | | | | | | | | | | drivers/mmc/host/mtk-mmc/sd.c:2782:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if ((hw->flags & MSDC_SDIO_IRQ) || (hw->flags & MSDC_EXT_SDIO_IRQ)) ^~ drivers/mmc/host/mtk-mmc/sd.c:2785:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' cd_active_low = !of_property_read_bool(pdev->dev.of_node, "mediatek,cd-high"); ^~~~~~~~~~~~~ Signed-off-by: André Draszik <git@andred.net>
* ramips: mt7620: eMMC: clear owner fieldAndré Draszik2018-04-041-2/+1
| | | | | | | a) This is not needed in recent kernels anymore (> 3.x ??) b) this allows driver unloading now Signed-off-by: André Draszik <git@andred.net>
* ramips: preliminary support for 4.14Roman Yeryomin2018-02-151-0/+4831
- removed upstreamed patches - 0901-spansion_nand_id_fix.patch is disabled, not clear if it's needed Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: John Crispin <john@phrozen.org>