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