T Michael Turney | 7783c60 | 2019-10-09 07:04:54 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2018-2019, The Linux Foundation. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 and |
| 8 | * only version 2 as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #include <symbols.h> |
| 17 | #include <device/device.h> |
| 18 | #include <soc/mmu.h> |
| 19 | #include <soc/mmu_common.h> |
| 20 | #include <soc/symbols.h> |
| 21 | |
| 22 | static void soc_read_resources(struct device *dev) |
| 23 | { |
| 24 | ram_resource(dev, 0, (uintptr_t)ddr_region->offset / KiB, |
| 25 | ddr_region->size / KiB); |
| 26 | reserved_ram_resource(dev, 1, (uintptr_t)_dram_soc / KiB, |
| 27 | REGION_SIZE(dram_soc) / KiB); |
| 28 | } |
| 29 | |
| 30 | static void soc_init(struct device *dev) |
| 31 | { |
| 32 | |
| 33 | } |
| 34 | |
| 35 | static struct device_operations soc_ops = { |
| 36 | .read_resources = soc_read_resources, |
| 37 | .init = soc_init, |
| 38 | }; |
| 39 | |
| 40 | static void enable_soc_dev(struct device *dev) |
| 41 | { |
| 42 | dev->ops = &soc_ops; |
| 43 | } |
| 44 | |
| 45 | struct chip_operations soc_qualcomm_sc7180_ops = { |
| 46 | CHIP_NAME("SOC Qualcomm SC7180") |
| 47 | .enable_dev = enable_soc_dev, |
| 48 | }; |