1 /* SPDX-License-Identifier: GPL-2.0-only */
5 #include <console/console.h>
6 #include <device/device.h>
7 #include <soc/addressmap.h>
9 #include <soc/display.h>
10 #include <soc/sdram.h>
11 #include <soc/symbols.h>
14 void bootmem_platform_add_ranges(void)
16 bootmem_add_range((uintptr_t)_pmu_sram
, REGION_SIZE(pmu_sram
),
18 bootmem_add_range((uintptr_t)_bl31_sram
, REGION_SIZE(bl31_sram
),
22 static void soc_read_resources(struct device
*dev
)
24 ram_range(dev
, 0, (uintptr_t)_dram
, sdram_size_mb() * MiB
);
27 static void soc_init(struct device
*dev
)
29 if (CONFIG(MAINBOARD_DO_NATIVE_VGA_INIT
) && display_init_required())
32 printk(BIOS_INFO
, "Display initialization disabled.\n");
34 /* We don't need big CPUs, but bring them up as a courtesy to Linux. */
35 rkclk_configure_cpu(APLL_600_MHZ
, CPU_CLUSTER_BIG
);
38 static struct device_operations soc_ops
= {
39 .read_resources
= soc_read_resources
,
43 static void enable_soc_dev(struct device
*dev
)
48 struct chip_operations soc_rockchip_rk3399_ops
= {
49 .name
= "SOC Rockchip RK3399",
50 .enable_dev
= enable_soc_dev
,