Rajeshwari Birje | 5b475ae | 2013-12-26 09:44:24 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Chromium OS Authors. |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/arch/cpu.h> |
| 9 | #include <asm/arch/spl.h> |
| 10 | #include <asm/arch/clk.h> |
| 11 | |
| 12 | #define SIGNATURE 0xdeadbeef |
| 13 | |
| 14 | /* Parameters of early board initialization in SPL */ |
| 15 | static struct spl_machine_param machine_param |
| 16 | __attribute__((section(".machine_param"))) = { |
| 17 | .signature = SIGNATURE, |
| 18 | .version = 1, |
| 19 | .params = "vmubfasirM", |
| 20 | .size = sizeof(machine_param), |
| 21 | |
| 22 | .mem_iv_size = 0x1f, |
| 23 | .mem_type = DDR_MODE_DDR3, |
| 24 | |
| 25 | /* |
| 26 | * Set uboot_size to 0x100000 bytes. |
| 27 | * |
| 28 | * This is an overly conservative value chosen to accommodate all |
| 29 | * possible U-Boot image. You are advised to set this value to a |
| 30 | * smaller realistic size via scripts that modifies the .machine_param |
| 31 | * section of output U-Boot image. |
| 32 | */ |
| 33 | .uboot_size = 0x100000, |
| 34 | |
| 35 | .boot_source = BOOT_MODE_OM, |
| 36 | .frequency_mhz = 800, |
| 37 | .arm_freq_mhz = 900, |
| 38 | .serial_base = 0x12c30000, |
| 39 | .i2c_base = 0x12c60000, |
| 40 | .mem_manuf = MEM_MANUF_SAMSUNG, |
| 41 | }; |
| 42 | |
| 43 | struct spl_machine_param *spl_get_machine_params(void) |
| 44 | { |
| 45 | if (machine_param.signature != SIGNATURE) { |
| 46 | /* Will hang if SIGNATURE dont match */ |
| 47 | while (1) |
| 48 | ; |
| 49 | } |
| 50 | |
| 51 | return &machine_param; |
| 52 | } |