linux/arch/mips/ralink
Chuanhong Guo 139c949f7f MIPS: ralink: mt7621: add memory detection support
mt7621 has the following memory map:
0x0-0x1c000000: lower 448m memory
0x1c000000-0x2000000: peripheral registers
0x20000000-0x2400000: higher 64m memory

detect_memory_region in arch/mips/kernel/setup.c only adds the first
memory region and isn't suitable for 512m memory detection because
it may accidentally read the memory area for peripheral registers.

This commit adds memory detection capability for mt7621:
  1. Add the highmem area when 512m is detected.
  2. Guard memcmp from accessing peripheral registers:
     This only happens when a user decided to change kernel load address
     to 256m or higher address. Since this is a quite unusual case, we
     just skip 512m testing and return 256m as memory size.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Minor commit message reword, make mt7621_memory_detect static]
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2021-03-29 11:18:54 +02:00
..
bootrom.c MIPS: ralink: bootrom: mark a function as __init to save some memory 2020-05-31 13:35:13 +02:00
cevt-rt3352.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
clk.c MIPS: ralink: define stubs for clk_set_parent to fix compile testing 2021-03-25 10:47:52 +01: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: add missing put_device in ill_acc_of_setup 2020-01-09 09:40:47 -08:00
irq-gic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
Kconfig clk: Allow the common clk framework to be selectable 2020-05-05 12:34:11 -07:00
Makefile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mt7620.c MIPS: ralink: annotate prom_soc_init() with __init 2021-03-29 11:18:36 +02:00
mt7621.c MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
of.c MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
Platform MIPS: ralink: Don't include objects twice 2020-05-15 09:10:07 +02:00
prom.c MIPS: Remove empty prom_free_prom_memory functions 2021-01-07 17:11:33 +01:00
reset.c MIPS: ralink: manage low reset lines 2021-02-04 13:35:01 +01:00
rt288x.c MIPS: ralink: annotate prom_soc_init() with __init 2021-03-29 11:18:36 +02:00
rt305x.c MIPS: ralink: annotate prom_soc_init() with __init 2021-03-29 11:18:36 +02:00
rt3883.c MIPS: ralink: annotate prom_soc_init() with __init 2021-03-29 11:18:36 +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