lede-Heleguo/target/linux/ipq806x
Shane Synan be692b5939 ipq806x: revert SDC clock changes for NBG6817 MMC
Revert the SDC "CLK_SET_RATE_GATE" changes to the SDC clock regulator
structures.

See https://elinux.org/images/b/b8/Elc2013_Clement.pdf
> if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) {
>
> For this particular clock, setting its rate is possible only if the
> clock is ungated (not yet prepared)

This fixes the MMC failing to initialize on newer ZyXEL NBG6817
hardware revisions with Kingston MMC.  Older revisions should
hopefully be unaffected.

Check MMC hardware details with:
cd /sys/block/mmcblk0/device/ && \
  tail -v cid date name manfid fwrev hwrev oemid rev

Known problematic MMC names (broken before this commit):
* M62704 (dated 12/2018) via myself
* M62704 (dated 11/2018) via Drake Stefani

Known unaffected MMC names (already working without this commit):
* S10004 (dated 12/2015) via slh

Now, the MMC properly initializes and later switches to high speed.

Thanks to:
* Ansuel for maintaining/help with the IPQ806x platform, kernel code
* slh for additional debugging and suggestions
* dwfreed for confirming newer MMC details, clock frequency
* robimarko for device driver debug printing help, clock debugging
* Drake for testing and confirmation with their own newer NBG6817
...and anyone else I missed!

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Tested-by: Shane Synan <digitalcircuit36939@gmail.com>
2021-12-16 09:22:06 +08:00
..
base-files ipq806x: update some script paths 2021-12-09 10:25:20 +08:00
files ipq806x: Add Norton 518 support (#8330) 2021-11-27 18:15:26 +08:00
generic x64: fix grub2 booting 2021-06-15 17:58:07 +08:00
image ipq806x: Add Norton 518 support (#8330) 2021-11-27 18:15:26 +08:00
patches-5.4 ipq806x: Add Norton 518 support (#8330) 2021-11-27 18:15:26 +08:00
patches-5.10 ipq806x: revert SDC clock changes for NBG6817 MMC 2021-12-16 09:22:06 +08:00
config-5.4 Revert "ipq806x: skip MTDBLOCK error to speedup booting time by 5x" 2021-10-08 11:31:03 +08:00
config-5.10 ipq806x: re-added support for Ruijie M520 again (#7330) 2021-07-11 01:25:59 +08:00
Makefile ipq807x: add autocore-arm and some packages to target 2021-07-25 17:53:08 +08:00
modules.mk ipq806x: sync upstream source code (#5320) 2020-08-18 01:41:42 +08:00