Commit Graph

13 Commits (a3383e4b016478c73cf149ae7f42ad8f9b87ffbb)

Author SHA1 Message Date
Mathias Kresin 287b7aa583 ramips: drop obsolete sd card driver code
The pinmux for all SoCs using this driver is now set via the pinmux. It
makes this code obsolete.

Some of the code targeting the mt76x8 SoCs is still required. The sd
card pins share the pads with the EPHY. These pads need to be switched
to digital mode if the pins are used for sd cards.

The eMMC 8-bit mode has to be enabled via pinmux instead of a kernel
option. The uart2 group need to be set to function "sdxc d5 d4", pwm1
to "sdxc d6" and pwm0 to "sdxc d7" to do so. It can't be done by as
part of a default pinmux, as it would break the normal operation of
uart2.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Jo-Philipp Wich 4302c917cc Revert "ramips: mmc: Fix init for MT7628AN"
This reverts commit 3a8efaef00.

The change reportedly breaks UART2 on some boards. Furthermore it uses
bitwise logic on an uninitialized variable and fails to explain what it
is fixing exactly.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
LoveSy 3a8efaef00 ramips: mmc: Fix init for MT7628AN
There is another thing about crc to do when initialize SD card on
MT7628.
This commit is to fix this init issue.

Signed-off-by: LoveSy <shana@zju.edu.cn>
6 years ago
Rosen Penev 66cc6dd6c4 ramips: mmc: Add back some non-mt7621 code that staging removed
This reverts commit 8a570921b5.

This seems to have been accidentally reverted. This fixes mt7620 and
mt7628.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
John Crispin 8a570921b5 Revert "ramips: Add back some non-mt7621 code that staging removed"
This reverts commit 048e41f649.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Rosen Penev 048e41f649 ramips: Add back some non-mt7621 code that staging removed
Staging is meant only for mt7621 but for OpenWrt more is needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Rosen Penev fec205f654 ramips: mmc: Sync with staging driver
Mostly whitespace cleanups. Some unneeded code was removed.

MMC init was also moved to the probe function as in
6069bdd

The cleanup commits are over 100, making it hard to do them individually.

Tested on GnuBee PC1 with an SD card being used as swap.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
v2: Fixed compile issue with mt7620
6 years ago
John Crispin 7e15e21766 Revert "ramips: mmc: Sync with staging drivers"
This reverts commit 2d401925b9.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Rosen Penev 2d401925b9 ramips: mmc: Sync with staging drivers
Mostly whitespace cleanups. Some unneeded code was removed.

MMC init was also moved to the probe function as in
6069bdd087

The cleanup commits are over 100, making it hard to do them individually.

Tested on GnuBee PC1 with an SD card being used as swap.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
6 years ago
Felix Fietkau 6069bdd087 ramips: move mtk-mmc init to probe function to avoid breaking NAND flash
The driver messes with the pin control settings - MMC and NAND are
mutually exclusive

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
NeilBrown f27336e115 ramips: mtk-mmc: don't advertise highmem support.
of_dma_configure() sets a default ->dma_mask of
DMA_BIT_MASK(32), claiming devices can DMA from
the full 32bit address space.
The mtk-mmc driver does not support access to
highmem pages, so it is really limited to the
bottom 512M (actually 448M due to 64M of IO space).
Setting ->dma_mask to NULL causes mmc_setup_queue()
to fall-back to using BLK_BOUNCE_HIGH to tell the
block layer to use a bounce-buffer for any highmem
pages requiring IO.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 6a621f4bd9 ramips: fix BUG_ON on mtk-mmc driver probe
Our .dts files only have one device defined and this is unlikely to
change, so statically initialize host->id to 0.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau f9b2d369a6 ramips: move mtk-mmc driver code out of patches-*/ and into files-*/
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago