linux/arch/mips/include/asm/mach-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
..
mt7620 MIPS: remove cpu_has_64bit_addresses 2020-04-19 16:08:29 +02:00
mt7621 MIPS: remove cpu_has_64bit_addresses 2020-04-19 16:08:29 +02:00
rt288x MIPS: remove cpu_has_64bit_addresses 2020-04-19 16:08:29 +02:00
rt305x MIPS: remove cpu_has_64bit_addresses 2020-04-19 16:08:29 +02:00
rt3883 MIPS: remove cpu_has_64bit_addresses 2020-04-19 16:08:29 +02:00
irq.h MIPS: Add header files reference with path prefix 2020-03-19 13:12:27 +01:00
mt7620.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mt7621.h MIPS: ralink: mt7621: add memory detection support 2021-03-29 11:18:54 +02:00
pinmux.h The main MIPS changes for a pretty light v5.3 cycle, including: 2019-07-17 09:42:03 -07:00
ralink_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt288x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt305x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt3883.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00