immortalwrt/target/linux
Ansuel Smith e2a04cfbca ipq806x: fix bug in L2 cache scaling
It has been notice a buf in L2 cache scaling where the scaling is not
done proprely if the frequency is set to the initial state before
the new frequency.

From: https://patchwork.kernel.org/patch/10565443/

* The clocks are set to aux clock rate first to make sure the
* secondary mux is not sourcing off of QSB. The rate is then set to
* two different rates to force a HFPLL reinit under all
* circumstances.

In the initial stage of boot to force a new frequency to apply, is
needed to first set the frequency back to the lowest one (aux_rate)
and then to the target one. This force and make sure the controller
actually switch the frequency to the right one. Apply the same
mechanism to L2 frequency scaling. Before scaling to the target
frequency, first set the frequency to the aux_rate to force the
transition, then scale it to the target frequency. Doing the wrong way
can produce unexpected results and could lock the scaling mechanism
until a full reboot is done (Causing a full reset by the krait-cc driver)

From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=77612720a2362230af726baa4149c40ec7a7fb05

When the Hfplls are reprogrammed during the rate change,
the primary muxes which are sourced from the same hfpll
for higher frequencies, needs to be switched to the 'safe
secondary mux' as the parent for that small window. This
is done by registering a clk notifier for the muxes and
switching to the safe parent in the PRE_RATE_CHANGE notifier
and back to the original parent in the POST_RATE_CHANGE notifier.

This should apply also to L2 scaling... as we can't relly use
the notifier, we manually do this on L2 scaling.

Tested-By: Marc Benoit <marcb62185@gmail.com> [19.07: R7800]
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [nbg6817/ipq8065]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 5ab9c0b388)
2020-03-02 12:01:48 +08:00
..
apm821xx kernel: bump to 4.14.169, 4.19.101 (#2963) 2020-02-06 21:45:40 +08:00
ar7 kernel: bump to 4.9.207, 4.14.160, 4.19.91 2019-12-24 23:57:52 -08:00
ar71xx Merge Lean's source 2020-03-02 11:58:03 +08:00
arc770 update target 2019-08-19 22:26:19 +08:00
archs38 update target 2019-08-19 22:26:19 +08:00
armvirt update target 2019-08-19 22:26:19 +08:00
at91 at91: switch to 4.14 (#3040) 2020-02-11 17:26:30 +08:00
ath25 kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
ath79 kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
bcm27xx bcm27xx: update to latest patches and firmware (#3450) 2020-03-01 22:16:48 +08:00
bcm53xx kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
brcm47xx kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
brcm63xx kernel: bump to 4.14.169, 4.19.101 (#2963) 2020-02-06 21:45:40 +08:00
cns3xxx kernel: bump to 4.9.205, 4.14.156, 4.19.86 2019-12-01 05:59:29 -08:00
gemini gemini:refresh upstream patch 2019-12-10 22:03:39 -08:00
generic Merge Lean's source 2020-03-01 15:56:30 +08:00
imx6 update target 2019-08-19 22:26:19 +08:00
ipq40xx kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
ipq806x ipq806x: fix bug in L2 cache scaling 2020-03-02 12:01:48 +08:00
ipq807x ipq807x: add very basic target support 2020-02-29 22:59:08 -08:00
ixp4xx Revert "files: sync from openwrt v19.07 (#2690)" 2020-02-03 12:33:25 +08:00
kirkwood kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
lantiq Revert "files: sync from openwrt v19.07 (#2690)" 2020-02-03 12:33:25 +08:00
layerscape kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
malta update target 2019-08-19 22:26:19 +08:00
mediatek mediatek: add latest fixes provided by MTK 2020-02-26 15:21:03 +08:00
mpc85xx kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
mvebu kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
mxs update target 2019-08-19 22:26:19 +08:00
octeon update target 2019-08-19 22:26:19 +08:00
octeontx kernel: bump to 4.9.207, 4.14.160, 4.19.91 2019-12-24 23:57:52 -08:00
omap update target 2019-08-19 22:26:19 +08:00
orion update target 2019-08-19 22:26:19 +08:00
oxnas kernel: bump to 4.9.206, 4.14.158, 4.19.88 2019-12-10 19:40:41 -08:00
pistachio kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
ramips kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
rb532 build: allow overriding default selection state for devices 2019-10-19 11:35:16 -07:00
rockchip-rk3328 Add support for FriendlyARM rk3328 boards routers 2020-02-06 20:03:56 +08:00
samsung update target 2019-08-19 22:26:19 +08:00
sunxi kernel: bump to 4.9.214, 4.14.171, 4.19.106 (#3375) 2020-02-29 16:28:07 +08:00
tegra kernel: bump to 4.14.167, 4.19.98 (#2871) 2020-01-30 01:43:29 +08:00
uml update target 2019-08-19 22:26:19 +08:00
x86 Merge Lean's source 2020-02-20 22:04:38 +08:00
zynq update target 2019-08-19 22:26:19 +08:00
Makefile update target 2019-08-19 22:26:19 +08:00