]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: relocate mips cpc probing 18888/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 23 May 2025 17:21:28 +0000 (13:21 -0400)
committerRobert Marko <robimarko@gmail.com>
Sat, 24 May 2025 19:20:58 +0000 (21:20 +0200)
commitcd808d999739fdf65c5cfd19cd04a8a02e1c0089
tree20208c5e366317f7854b31ee52958381e10ad8ac
parent897abbfc4a340380ae902f59cbcc0240c55fd7ed
realtek: relocate mips cpc probing

The MIPS CPC (Cluster Power Controller) is setup during boot and can take
its configuration from the devicetree. This is currently not possible
because the cpc probing happens before dt initialization. Call order
during startup is:

setup_arch()
  prom_init() <- our function
    mips_cpc_probe()
    smp_stuff()
  arch_mem_init()
    device_tree_init() <- our function
      unflatten_and_copy_device_tree()

To avoid ugly hacking and support a clean devicetree relocate the cps/smp
stuff to device_tree_init(). This is basically the same location as in
generic mips initialization.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Link: https://github.com/openwrt/openwrt/pull/18888
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c