blob: 686f9738b1b751353ad25dd228b3326c2d65137b [file] [log] [blame]
Yidi Lin3d7b6062015-07-31 17:10:40 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2015 MediaTek Inc.
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 as published by
8 * the Free Software Foundation; version 2 of the License.
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.
Yidi Lin3d7b6062015-07-31 17:10:40 +080014 */
15
16#include <cpu/cpu.h>
17#include <console/console.h>
18#include <device/device.h>
Yidi Lin3d7b6062015-07-31 17:10:40 +080019#include <symbols.h>
Yidi Linc6d7dcc2016-02-04 17:26:48 +080020#include <soc/emi.h>
Yidi Lin3d7b6062015-07-31 17:10:40 +080021
22static void soc_read_resources(device_t dev)
23{
Yidi Linc6d7dcc2016-02-04 17:26:48 +080024 ram_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB);
Yidi Lin3d7b6062015-07-31 17:10:40 +080025}
26
27static void soc_init(device_t dev)
28{
29}
30
31static struct device_operations soc_ops = {
32 .read_resources = soc_read_resources,
33 .init = soc_init,
34};
35
36static void enable_soc_dev(device_t dev)
37{
38 dev->ops = &soc_ops;
39}
40
41struct chip_operations soc_mediatek_mt8173_ops = {
Paul Menzel37277762016-07-03 09:45:26 +020042 CHIP_NAME("SOC Mediatek MT8173")
Yidi Lin47a9af42016-03-28 15:16:45 +080043 .enable_dev = enable_soc_dev,
Yidi Lin3d7b6062015-07-31 17:10:40 +080044};