blob: baf44d4486b480c785f62f7ab28ab47b87203804 [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
Philipp Hug7c5acd42018-09-15 15:30:08 +020016#include <arch/io.h>
17#include <console/console.h>
18#include <soc/sdram.h>
19#include <symbols.h>
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020020
Elyes HAOUAS66ea1652018-05-04 22:01:42 +020021static void mainboard_enable(struct device *dev)
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020022{
Philipp Hug7c5acd42018-09-15 15:30:08 +020023 ram_resource(dev, 0, (uintptr_t)_dram/KiB, sdram_size_mb()*KiB);
Jonathan Neuschäfer1c09cfa2018-04-19 16:23:55 +020024}
25
26struct chip_operations mainboard_ops = {
27 .name = CONFIG_MAINBOARD_PART_NUMBER,
28 .enable_dev = mainboard_enable,
29};