| 1 |
|
| 2 |
|
| 3 |
#include <symbols.h> |
| 4 |
#include <device/device.h> |
| 5 |
#include <soc/mmu.h> |
| 6 |
#include <soc/mmu_common.h> |
| 7 |
#include <soc/symbols_common.h> |
| 8 |
#include <soc/aop_common.h> |
| 9 |
|
| 10 |
static void soc_read_resources(struct device *dev) |
| 11 |
{ |
| 12 |
void *start = NULL; |
| 13 |
void *end = NULL; |
| 14 |
|
| 15 |
ram_range(dev, 0, (uintptr_t)region_offset(ddr_region), region_sz(ddr_region)); |
| 16 |
reserved_ram_range(dev, 1, (uintptr_t)_dram_aop, REGION_SIZE(dram_aop)); |
| 17 |
reserved_ram_range(dev, 2, (uintptr_t)_dram_soc, REGION_SIZE(dram_soc)); |
| 18 |
if (soc_modem_carve_out(&start, &end)) |
| 19 |
reserved_ram_range(dev, 3, (uintptr_t)start, end - start); |
| 20 |
} |
| 21 |
|
| 22 |
static void soc_init(struct device *dev) |
| 23 |
{ |
| 24 |
aop_fw_load_reset(); |
| 25 |
} |
| 26 |
|
| 27 |
static struct device_operations soc_ops = { |
| 28 |
.read_resources = soc_read_resources, |
| 29 |
.set_resources = noop_set_resources, |
| 30 |
.init = soc_init, |
| 31 |
}; |
| 32 |
|
| 33 |
static void enable_soc_dev(struct device *dev) |
| 34 |
{ |
| 35 |
dev->ops = &soc_ops; |
| 36 |
} |
| 37 |
|
| 38 |
struct chip_operations soc_qualcomm_sc7180_ops = { |
| 39 |
.name = "SOC Qualcomm SC7180", |
| 40 |
.enable_dev = enable_soc_dev, |
| 41 |
}; |