mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / qualcomm / ipq806x / soc.c
blobb0c05c964de0ca5d31a1456201d3e5465f687f51
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <symbols.h>
6 #include <soc/ipq_uart.h>
8 #define RESERVED_SIZE 0x01500000 /* 21 MiB */
10 static void soc_read_resources(struct device *dev)
12 /* Reserve bottom 21 MiB for NSS, SMEM, etc. */
13 uintptr_t reserve_ram_end = (uintptr_t)_dram + RESERVED_SIZE;
14 uint64_t ram_end = CONFIG_DRAM_SIZE_MB * (uint64_t)MiB;
16 reserved_ram_from_to(dev, 0, (uintptr_t)_dram, reserve_ram_end);
17 ram_from_to(dev, 1, reserve_ram_end, ram_end);
20 static void soc_init(struct device *dev)
23 * Do this in case console is not enabled: kernel's earlyprintk()
24 * should work no matter what the firmware console configuration is.
26 ipq806x_uart_init();
28 printk(BIOS_INFO, "CPU: Qualcomm 8064\n");
31 static struct device_operations soc_ops = {
32 .read_resources = soc_read_resources,
33 .init = soc_init,
36 static void enable_soc_dev(struct device *dev)
38 dev->ops = &soc_ops;
41 struct chip_operations soc_qualcomm_ipq806x_ops = {
42 .name = "SOC Qualcomm 8064",
43 .enable_dev = enable_soc_dev,