2015-07-31 11:10:40 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright 2015 MediaTek Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <cpu/cpu.h>
|
|
|
|
#include <console/console.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <symbols.h>
|
2016-02-04 10:26:48 +01:00
|
|
|
#include <soc/emi.h>
|
2015-07-31 11:10:40 +02:00
|
|
|
|
2018-05-25 10:09:55 +02:00
|
|
|
static void soc_read_resources(struct device *dev)
|
2015-07-31 11:10:40 +02:00
|
|
|
{
|
2016-02-04 10:26:48 +01:00
|
|
|
ram_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB);
|
2015-07-31 11:10:40 +02:00
|
|
|
}
|
|
|
|
|
2018-05-25 10:09:55 +02:00
|
|
|
static void soc_init(struct device *dev)
|
2015-07-31 11:10:40 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct device_operations soc_ops = {
|
|
|
|
.read_resources = soc_read_resources,
|
|
|
|
.init = soc_init,
|
|
|
|
};
|
|
|
|
|
2018-05-25 10:09:55 +02:00
|
|
|
static void enable_soc_dev(struct device *dev)
|
2015-07-31 11:10:40 +02:00
|
|
|
{
|
|
|
|
dev->ops = &soc_ops;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct chip_operations soc_mediatek_mt8173_ops = {
|
2016-07-03 09:45:26 +02:00
|
|
|
CHIP_NAME("SOC Mediatek MT8173")
|
2016-03-28 09:16:45 +02:00
|
|
|
.enable_dev = enable_soc_dev,
|
2015-07-31 11:10:40 +02:00
|
|
|
};
|