blob: ff2b7cc65045c767d116b37f2ca1c6da3927d29a [file] [log] [blame]
Ravi Kumar Bokka0c9eb312021-03-31 08:04:13 +05301/* SPDX-License-Identifier: GPL-2.0-only */
2
Ravi Kumar Bokka0c9eb312021-03-31 08:04:13 +05303#include <device/device.h>
4#include <soc/mmu.h>
5#include <soc/mmu_common.h>
6#include <soc/symbols_common.h>
Ravi Kumar Bokka5fa09cb2021-10-21 20:18:12 +05307#include <soc/aop_common.h>
Ravi Kumar Bokka0c9eb312021-03-31 08:04:13 +05308
9static void soc_read_resources(struct device *dev)
10{
11 ram_resource(dev, 0, (uintptr_t)ddr_region->offset / KiB,
12 ddr_region->size / KiB);
13 reserved_ram_resource(dev, 1, (uintptr_t)_dram_soc / KiB,
14 REGION_SIZE(dram_soc) / KiB);
Ravi Kumar Bokka414b4262021-05-31 20:50:12 +053015 reserved_ram_resource(dev, 2, (uintptr_t)_dram_wlan / KiB,
Ravi Kumar Bokka1a47c6a2021-02-09 11:33:46 +053016 REGION_SIZE(dram_wlan) / KiB);
Ravi Kumar Bokka414b4262021-05-31 20:50:12 +053017 reserved_ram_resource(dev, 3, (uintptr_t)_dram_wpss / KiB,
Ravi Kumar Bokka1a47c6a2021-02-09 11:33:46 +053018 REGION_SIZE(dram_wpss) / KiB);
Ravi Kumar Bokkaf8e4ba02021-10-21 20:14:09 +053019 reserved_ram_resource(dev, 4, (uintptr_t)_dram_aop / KiB,
20 REGION_SIZE(dram_aop) / KiB);
Ravi Kumar Bokka0c9eb312021-03-31 08:04:13 +053021}
22
23static void soc_init(struct device *dev)
24{
Ravi Kumar Bokka5fa09cb2021-10-21 20:18:12 +053025 aop_fw_load_reset();
Ravi Kumar Bokka0c9eb312021-03-31 08:04:13 +053026}
27
28static struct device_operations soc_ops = {
29 .read_resources = soc_read_resources,
30 .init = soc_init,
31};
32
33static void enable_soc_dev(struct device *dev)
34{
35 dev->ops = &soc_ops;
36}
37
38struct chip_operations soc_qualcomm_sc7280_ops = {
39 CHIP_NAME("SOC Qualcomm SC7280")
40 .enable_dev = enable_soc_dev,
41};