Rex-BC Chen | 73e6b8e | 2021-11-02 10:31:53 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <device/device.h> |
| 4 | #include <soc/emi.h> |
| 5 | #include <symbols.h> |
| 6 | |
| 7 | static void soc_read_resources(struct device *dev) |
| 8 | { |
| 9 | ram_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB); |
| 10 | } |
| 11 | |
| 12 | static void soc_init(struct device *dev) |
| 13 | { |
| 14 | } |
| 15 | |
| 16 | static struct device_operations soc_ops = { |
| 17 | .read_resources = soc_read_resources, |
| 18 | .init = soc_init, |
| 19 | }; |
| 20 | |
| 21 | static void enable_soc_dev(struct device *dev) |
| 22 | { |
| 23 | dev->ops = &soc_ops; |
| 24 | } |
| 25 | |
| 26 | struct chip_operations soc_mediatek_mt8186_ops = { |
| 27 | CHIP_NAME("SOC Mediatek MT8186") |
| 28 | .enable_dev = enable_soc_dev, |
| 29 | }; |