Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 2 | |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 3 | #include <symbols.h> |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 4 | #include <device/device.h> |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 5 | #include <soc/mmu.h> |
| 6 | #include <soc/symbols.h> |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 7 | |
| 8 | static void soc_read_resources(struct device *dev) |
| 9 | { |
Kyösti Mälkki | 27d6299 | 2022-05-24 20:25:58 +0300 | [diff] [blame] | 10 | ram_resource_kb(dev, 0, (uintptr_t)_dram / KiB, (1 * GiB) / KiB); |
| 11 | reserved_ram_resource_kb(dev, 1, (uintptr_t)_dram_reserved / KiB, |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 12 | REGION_SIZE(dram_reserved) / KiB); |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | static void soc_init(struct device *dev) |
| 16 | { |
| 17 | |
| 18 | } |
| 19 | |
| 20 | static struct device_operations soc_ops = { |
| 21 | .read_resources = soc_read_resources, |
| 22 | .init = soc_init, |
| 23 | }; |
| 24 | |
| 25 | static void enable_soc_dev(struct device *dev) |
| 26 | { |
| 27 | dev->ops = &soc_ops; |
| 28 | } |
| 29 | |
| 30 | struct chip_operations soc_qualcomm_qcs405_ops = { |
| 31 | CHIP_NAME("SOC Qualcomm QCS405") |
| 32 | .enable_dev = enable_soc_dev, |
| 33 | }; |