Ravi Kumar Bokka | 0c9eb31 | 2021-03-31 08:04:13 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 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 | |
| 9 | static 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 Bokka | 414b426 | 2021-05-31 20:50:12 +0530 | [diff] [blame] | 15 | reserved_ram_resource(dev, 2, (uintptr_t)_dram_wlan / KiB, |
Ravi Kumar Bokka | 1a47c6a | 2021-02-09 11:33:46 +0530 | [diff] [blame] | 16 | REGION_SIZE(dram_wlan) / KiB); |
Ravi Kumar Bokka | 414b426 | 2021-05-31 20:50:12 +0530 | [diff] [blame] | 17 | reserved_ram_resource(dev, 3, (uintptr_t)_dram_wpss / KiB, |
Ravi Kumar Bokka | 1a47c6a | 2021-02-09 11:33:46 +0530 | [diff] [blame] | 18 | REGION_SIZE(dram_wpss) / KiB); |
Ravi Kumar Bokka | 0c9eb31 | 2021-03-31 08:04:13 +0530 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | static void soc_init(struct device *dev) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | static struct device_operations soc_ops = { |
| 26 | .read_resources = soc_read_resources, |
| 27 | .init = soc_init, |
| 28 | }; |
| 29 | |
| 30 | static void enable_soc_dev(struct device *dev) |
| 31 | { |
| 32 | dev->ops = &soc_ops; |
| 33 | } |
| 34 | |
| 35 | struct chip_operations soc_qualcomm_sc7280_ops = { |
| 36 | CHIP_NAME("SOC Qualcomm SC7280") |
| 37 | .enable_dev = enable_soc_dev, |
| 38 | }; |