blob: 775f4e597edd6bafdcb9d507bb4a59a5c6e365fd [file] [log] [blame]
Patrick Georgi02363b52020-05-05 20:48:50 +02001/* This file is part of the coreboot project. */
T Michael Turney7783c602019-10-09 07:04:54 -07002/*
T Michael Turney7783c602019-10-09 07:04:54 -07003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <symbols.h>
15#include <device/device.h>
16#include <soc/mmu.h>
17#include <soc/mmu_common.h>
18#include <soc/symbols.h>
Ravi Kumar Bokka6bbf8f22019-08-12 14:54:21 +053019#include <soc/aop.h>
T Michael Turney7783c602019-10-09 07:04:54 -070020
21static void soc_read_resources(struct device *dev)
22{
23 ram_resource(dev, 0, (uintptr_t)ddr_region->offset / KiB,
24 ddr_region->size / KiB);
Ravi Kumar Bokka6bbf8f22019-08-12 14:54:21 +053025 reserved_ram_resource(dev, 1, (uintptr_t)_dram_aop / KiB,
26 REGION_SIZE(dram_aop) / KiB);
27 reserved_ram_resource(dev, 2, (uintptr_t)_dram_soc / KiB,
T Michael Turney7783c602019-10-09 07:04:54 -070028 REGION_SIZE(dram_soc) / KiB);
29}
30
31static void soc_init(struct device *dev)
32{
Ravi Kumar Bokka6bbf8f22019-08-12 14:54:21 +053033 aop_fw_load_reset();
T Michael Turney7783c602019-10-09 07:04:54 -070034}
35
36static struct device_operations soc_ops = {
37 .read_resources = soc_read_resources,
38 .init = soc_init,
39};
40
41static void enable_soc_dev(struct device *dev)
42{
43 dev->ops = &soc_ops;
44}
45
46struct chip_operations soc_qualcomm_sc7180_ops = {
47 CHIP_NAME("SOC Qualcomm SC7180")
48 .enable_dev = enable_soc_dev,
49};