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