drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / soc / mediatek / mt8173 / soc.c
blobf6ee122bf96a25fcb71866622c6b3732e6f013ba
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootmem.h>
4 #include <device/device.h>
5 #include <program_loading.h>
6 #include <symbols.h>
7 #include <soc/emi.h>
9 int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size)
11 if (size > REGION_SIZE(sram))
12 return 0;
14 if (start >= (uintptr_t)_sram && (start + size) <= (uintptr_t)_esram) {
15 printk(BIOS_DEBUG, "MT8173 uses SRAM for loading BL31.\n");
16 return 1;
19 return 0;
22 void bootmem_platform_add_ranges(void)
24 bootmem_add_range(0x101000, 124 * KiB, BM_MEM_BL31);
27 static void soc_read_resources(struct device *dev)
29 ram_range(dev, 0, (uintptr_t)_dram, sdram_size());
32 static void soc_init(struct device *dev)
36 static struct device_operations soc_ops = {
37 .read_resources = soc_read_resources,
38 .set_resources = noop_set_resources,
39 .init = soc_init,
42 static void enable_soc_dev(struct device *dev)
44 dev->ops = &soc_ops;
47 struct chip_operations soc_mediatek_mt8173_ops = {
48 .name = "SOC Mediatek MT8173",
49 .enable_dev = enable_soc_dev,