Patrick Georgi | 02363b5 | 2020-05-05 20:48:50 +0200 | [diff] [blame] | 1 | /* This file is part of the coreboot project. */ |
Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame^] | 2 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 3 | |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 4 | #include <symbols.h> |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 5 | #include <device/device.h> |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 6 | #include <soc/mmu.h> |
| 7 | #include <soc/symbols.h> |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 8 | |
| 9 | static void soc_read_resources(struct device *dev) |
| 10 | { |
Nitheesh Sekar | 717050d | 2018-09-16 16:16:42 +0530 | [diff] [blame] | 11 | ram_resource(dev, 0, (uintptr_t)_dram / KiB, (1 * GiB) / KiB); |
| 12 | reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB, |
| 13 | REGION_SIZE(dram_reserved) / KiB); |
Nitheesh Sekar | 20e7587 | 2018-09-14 11:24:10 +0530 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | static void soc_init(struct device *dev) |
| 17 | { |
| 18 | |
| 19 | } |
| 20 | |
| 21 | static struct device_operations soc_ops = { |
| 22 | .read_resources = soc_read_resources, |
| 23 | .init = soc_init, |
| 24 | }; |
| 25 | |
| 26 | static void enable_soc_dev(struct device *dev) |
| 27 | { |
| 28 | dev->ops = &soc_ops; |
| 29 | } |
| 30 | |
| 31 | struct chip_operations soc_qualcomm_qcs405_ops = { |
| 32 | CHIP_NAME("SOC Qualcomm QCS405") |
| 33 | .enable_dev = enable_soc_dev, |
| 34 | }; |