blob: 1d453cafc2261fc504f7eb47382f0a5bfbaa937c [file] [log] [blame]
Rajeshwari Shinde14633d12012-07-03 20:02:52 +00001/*
2 * Copyright (c) 2012 The Chromium OS Authors.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
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., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#include <common.h>
24#include <asm/arch/cpu.h>
25#include <asm/arch/spl.h>
26#include <asm/arch/clk.h>
27
28#define SIGNATURE 0xdeadbeef
29
30/* Parameters of early board initialization in SPL */
31static struct spl_machine_param machine_param
32 __attribute__((section(".machine_param"))) = {
33 .signature = SIGNATURE,
34 .version = 1,
35 .params = "vmubfasirM",
36 .size = sizeof(machine_param),
37
38 .mem_iv_size = 0x1f,
39 .mem_type = DDR_MODE_DDR3,
40
41 /*
42 * Set uboot_size to 0x100000 bytes.
43 *
44 * This is an overly conservative value chosen to accommodate all
45 * possible U-Boot image. You are advised to set this value to a
46 * smaller realistic size via scripts that modifies the .machine_param
47 * section of output U-Boot image.
48 */
49 .uboot_size = 0x100000,
50
51 .boot_source = BOOT_MODE_OM,
52 .frequency_mhz = 800,
53 .arm_freq_mhz = 1700,
54 .serial_base = 0x12c30000,
55 .i2c_base = 0x12c60000,
56 .mem_manuf = MEM_MANUF_SAMSUNG,
57};
58
59struct spl_machine_param *spl_get_machine_params(void)
60{
61 if (machine_param.signature != SIGNATURE) {
62 /* Will hang if SIGNATURE dont match */
63 while (1)
64 ;
65 }
66
67 return &machine_param;
68}