blob: e3796446800b564406a47dfd07aa2090b23dc0b1 [file] [log] [blame]
huang lin82ba4d02014-08-16 10:49:32 +08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2014 Rockchip 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.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
Julius Werner7a453eb2014-10-20 13:14:55 -070020#include <arch/cache.h>
21#include <cbmem.h>
22#include <console/console.h>
23#include <delay.h>
24#include <device/device.h>
25#include <soc/gpio.h>
26#include <soc/soc.h>
27#include <stddef.h>
huang lin82ba4d02014-08-16 10:49:32 +080028#include <stdlib.h>
29#include <string.h>
Julius Werner7a453eb2014-10-20 13:14:55 -070030
huang lin82ba4d02014-08-16 10:49:32 +080031#include "chip.h"
32
33static void soc_enable(device_t dev)
34{
35 ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB);
36}
37
huang lin82ba4d02014-08-16 10:49:32 +080038static struct device_operations soc_ops = {
Edward O'Callaghanc1a9dfe2015-03-26 20:10:09 +110039 .read_resources = DEVICE_NOOP,
40 .set_resources = DEVICE_NOOP,
huang lin82ba4d02014-08-16 10:49:32 +080041 .enable_resources = soc_enable,
Edward O'Callaghanc1a9dfe2015-03-26 20:10:09 +110042 .init = DEVICE_NOOP,
huang lin82ba4d02014-08-16 10:49:32 +080043 .scan_bus = 0,
44};
45
46static void enable_rk3288_dev(device_t dev)
47{
48 dev->ops = &soc_ops;
49}
50
51struct chip_operations soc_rockchip_rk3288_ops = {
52 CHIP_NAME("SOC Rockchip 3288")
53 .enable_dev = enable_rk3288_dev,
54};