blob: 96a2678ee0b1b19b5b1de6903e2690d9751d296c [file] [log] [blame]
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2018 Jonathan Neuschäfer
5 *
Martin Rothb28f4662018-05-26 17:58:47 -06006 * 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.
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +02009 *
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
Elyes HAOUAS351e3e52019-04-05 18:11:19 +020016#include <device/device.h>
Philipp Hug7c5acd42018-09-15 15:30:08 +020017#include <soc/sdram.h>
18#include <symbols.h>
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020019
Elyes HAOUAS66ea1652018-05-04 22:01:42 +020020static void mainboard_enable(struct device *dev)
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020021{
Philipp Hug7c5acd42018-09-15 15:30:08 +020022 ram_resource(dev, 0, (uintptr_t)_dram/KiB, sdram_size_mb()*KiB);
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020023}
24
25struct chip_operations mainboard_ops = {
26 .name = CONFIG_MAINBOARD_PART_NUMBER,
27 .enable_dev = mainboard_enable,
28};