blob: 1d63cacf60e73d2b14599595a8169be408c02099 [file] [log] [blame]
Vadim Bendebury41a5d0d2014-05-13 17:47:57 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved.
6 * Copyright 2013 Google Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include <console/console.h>
23#include <device/device.h>
Julius Wernerec5e5e02014-08-20 15:29:56 -070024#include <symbols.h>
David Hendricks24452742014-07-02 13:50:57 -070025
26#define RESERVED_SIZE_KB (0x01500000 / KiB)
27
Vadim Bendebury41a5d0d2014-05-13 17:47:57 -070028static void soc_read_resources(device_t dev)
29{
David Hendricks24452742014-07-02 13:50:57 -070030 /* Reserve bottom 0x150_0000 bytes for NSS, SMEM, etc. */
Julius Wernerec5e5e02014-08-20 15:29:56 -070031 reserved_ram_resource(dev, 0, (uintptr_t)_dram / KiB, RESERVED_SIZE_KB);
32 ram_resource(dev, 0, (uintptr_t)_dram / KiB + RESERVED_SIZE_KB,
David Hendricks24452742014-07-02 13:50:57 -070033 (CONFIG_DRAM_SIZE_MB * KiB) - RESERVED_SIZE_KB);
Vadim Bendebury41a5d0d2014-05-13 17:47:57 -070034}
35
36static void soc_init(device_t dev)
37{
38 printk(BIOS_INFO, "CPU: Qualcomm 8064\n");
39}
40
41static struct device_operations soc_ops = {
42 .read_resources = soc_read_resources,
43 .init = soc_init,
44};
45
46static void enable_soc_dev(device_t dev)
47{
48 dev->ops = &soc_ops;
49}
50
51struct chip_operations soc_qualcomm_ipq806x_ops = {
52 CHIP_NAME("SOC Qualcomm 8064")
53 .enable_dev = enable_soc_dev,
54};