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