linux/arch/mips/ralink
Andreas Rammhold 2a12187d58 of/fdt: run soc memory setup when early_init_dt_scan_memory fails
If memory has been found early_init_dt_scan_memory now returns 1. If
it hasn't found any memory it will return 0, allowing other memory
setup mechanisms to carry on.

Previously early_init_dt_scan_memory always returned 0 without
distinguishing between any kind of memory setup being done or not. Any
code path after the early_init_dt_scan memory call in the ramips
plat_mem_setup code wouldn't be executed anymore. Making
early_init_dt_scan_memory the only way to initialize the memory.

Some boards, including my mt7621 based Cudy X6 board, depend on memory
initialization being done via the soc_info.mem_detect function
pointer. Those wouldn't be able to obtain memory and panic the kernel
during early bootup with the message "early_init_dt_alloc_memory_arch:
Failed to allocate 12416 bytes align=0x40".

Fixes: 1f012283e9 ("of/fdt: Rework early_init_dt_scan_memory() to call directly")
Cc: stable@vger.kernel.org
Signed-off-by: Andreas Rammhold <andreas@rammhold.de>
Link: https://lore.kernel.org/r/20221223112748.2935235-1-andreas@rammhold.de
Signed-off-by: Rob Herring <robh@kernel.org>
2023-01-03 18:41:01 -06:00
..
bootrom.c mips: ralink: convert to DEFINE_SHOW_ATTRIBUTE 2022-09-19 16:40:39 +02:00
cevt-rt3352.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
clk.c mips: ralink: convert to CONFIG_COMMON_CLK 2021-06-08 17:00:09 +02:00
common.h MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
early_printk.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ill_acc.c mips: ralink: fix a refcount leak in ill_acc_of_setup() 2022-03-01 17:25:42 +01:00
irq-gic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq.c mips: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:40 +01:00
Kconfig mips: dts: ralink: add MT7621 SoC 2022-03-16 15:10:23 +01:00
Makefile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mt7620.c pinctrl: ralink: move MT7620 SoC pinmux config into a new 'pinctrl-mt7620.c' file 2021-06-07 09:17:47 +02:00
mt7621.c mips: ralink: mt7621: do not use kzalloc too early 2022-12-01 13:32:49 +01:00
of.c of/fdt: run soc memory setup when early_init_dt_scan_memory fails 2023-01-03 18:41:01 -06:00
Platform MIPS: ralink: Don't include objects twice 2020-05-15 09:10:07 +02:00
prom.c pinctrl: ralink: move ralink architecture pinmux header into the driver 2021-06-07 09:17:47 +02:00
reset.c MIPS: ralink: manage low reset lines 2021-02-04 13:35:01 +01:00
rt288x.c pinctrl: ralink: move RT288X SoC pinmux config into a new 'pinctrl-rt288x.c' file 2021-06-07 09:17:48 +02:00
rt305x.c pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file 2021-06-07 09:17:47 +02:00
rt3883.c pinctrl: ralink: move RT3883 SoC pinmux config into a new 'pinctrl-rt3883.c' file 2021-06-07 09:17:47 +02:00
timer-gic.c MIPS: ralink: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-19 10:37:58 -08:00
timer.c MIPS: Remove dev_err() usage after platform_get_irq() 2019-08-26 11:26:04 +01:00