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