riscv: Allow device trees to be built into the kernel
authorPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 14 Apr 2020 04:43:24 +0000 (13:43 +0900)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:05 +0000 (11:38 -0700)
commit2d2682512f0faf4d09a696184bf3c0bb6838baca
tree31d238d63d671ff6b8ade87e521186d30afec7e7
parentb9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce
riscv: Allow device trees to be built into the kernel

Some systems don't provide a useful device tree to the kernel on boot.
Chasing around bootloaders for these systems is a headache, so instead
le't's just keep a device tree table in the kernel, keyed by the SOC's
unique identifier, that contains the relevant DTB.

This is only implemented for M mode right now. While we could implement
this via the SBI calls that allow access to these identifiers, we don't
have any systems that need this right now.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kbuild
arch/riscv/Kconfig
arch/riscv/include/asm/soc.h
arch/riscv/kernel/setup.c
arch/riscv/kernel/soc.c
arch/riscv/kernel/vmlinux.lds.S
arch/riscv/mm/init.c