OpenCloudOS-Kernel/arch/mips/ralink
NeilBrown a63d706ea7
MIPS: ralink: Fix booting on MT7621
Since commit 3af5a67c86 ("MIPS: Fix early CM probing") the MT7621 has
not been able to boot.

This commit caused mips_cm_probe() to be called before
mt7621.c::proc_soc_init().

prom_soc_init() has a comment explaining that mips_cm_probe() "wipes out
the bootloader config" and means that configuration registers are no
longer available. It has some code to re-enable this config.

Before this re-enable code is run, the sysc register cannot be read, so
when SYSC_REG_CHIP_NAME0 is read, a garbage value is returned and
panic() is called.

If we move the config-repair code to the top of prom_soc_init(), the
registers can be read and boot can proceed.

Very occasionally, the first register read after the reconfiguration
returns garbage, so add a call to __sync().

Fixes: 3af5a67c86 ("MIPS: Fix early CM probing")
Signed-off-by: NeilBrown <neil@brown.name>
Reviewed-by: Matt Redfearn <matt.redfearn@mips.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 4.5+
Patchwork: https://patchwork.linux-mips.org/patch/18859/
Signed-off-by: James Hogan <jhogan@kernel.org>
2018-03-22 00:06:30 +00:00
..
Kconfig MIPS changes for 4.15 2017-11-15 11:36:08 -08:00
Makefile MIPS: Change my email address 2016-05-13 14:02:18 +02:00
Platform MIPS: ralink: add MT7621 support 2016-01-20 00:39:20 +01:00
bootrom.c MIPS: Change my email address 2016-05-13 14:02:18 +02:00
cevt-rt3352.c clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE 2017-06-14 11:58:45 +02:00
clk.c MIPS: ralink: allow NULL clock for clk_get_rate 2017-09-06 12:37:45 +02:00
common.h MIPS: Change my email address 2016-05-13 14:02:18 +02:00
early_printk.c MIPS: ralink: Add tty detection 2015-11-11 08:38:03 +01:00
ill_acc.c MIPS: Change my email address 2016-05-13 14:02:18 +02:00
irq-gic.c irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h 2017-09-04 13:53:14 +02:00
irq.c MIPS: ralink: Fix request_mem_region error handling 2017-01-25 02:51:10 +01:00
mt7620.c MIPS: ralink: Fix typo in mt7628 pinmux function 2017-11-13 11:46:37 +00:00
mt7621.c MIPS: ralink: Fix booting on MT7621 2018-03-22 00:06:30 +00:00
of.c MIPS: ralink: Fix request_mem_region error handling 2017-01-25 02:51:10 +01:00
prom.c MIPS: ralink: Cosmetic change to prom_init(). 2017-01-03 16:34:48 +01:00
reset.c MIPS: ralink: Remove ralink_halt() 2018-03-21 23:43:39 +00:00
rt288x.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
rt305x.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
rt3883.c MIPS: ralink: Fix typos in rt3883 pinctrl 2017-03-08 11:29:48 +01:00
timer-gic.c clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
timer.c MIPS: ralink: Fix platform_get_irq's error checking 2018-01-10 16:45:44 +01:00