Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2012 The Chromium OS Authors. |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_ARCH_EXYNOS_SPL_H__ |
| 7 | #define __ASM_ARCH_EXYNOS_SPL_H__ |
| 8 | |
Thomas Abraham | 74f8486 | 2015-08-03 17:58:00 +0530 | [diff] [blame] | 9 | #include <asm/arch/dmc.h> |
Przemyslaw Marczak | 93976f7 | 2014-09-01 13:50:44 +0200 | [diff] [blame] | 10 | #include <asm/arch/power.h> |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 11 | |
| 12 | #ifndef __ASSEMBLY__ |
| 13 | /* Parameters of early board initialization in SPL */ |
| 14 | struct spl_machine_param { |
| 15 | /* Add fields as and when required */ |
| 16 | u32 signature; |
| 17 | u32 version; /* Version number */ |
| 18 | u32 size; /* Size of block */ |
| 19 | /** |
| 20 | * Parameters we expect, in order, terminated with \0. Each parameter |
| 21 | * is a single character representing one 32-bit word in this |
| 22 | * structure. |
| 23 | * |
| 24 | * Valid characters in this string are: |
| 25 | * |
| 26 | * Code Name |
| 27 | * v mem_iv_size |
| 28 | * m mem_type |
| 29 | * u uboot_size |
| 30 | * b boot_source |
| 31 | * f frequency_mhz (memory frequency in MHz) |
| 32 | * a ARM clock frequency in MHz |
| 33 | * s serial base address |
| 34 | * i i2c base address for early access (meant for PMIC) |
| 35 | * r board rev GPIO numbers used to read board revision |
| 36 | * (lower halfword=bit 0, upper=bit 1) |
| 37 | * M Memory Manufacturer name |
| 38 | * \0 termination |
| 39 | */ |
| 40 | char params[12]; /* Length must be word-aligned */ |
| 41 | u32 mem_iv_size; /* Memory channel interleaving size */ |
| 42 | enum ddr_mode mem_type; /* Type of on-board memory */ |
| 43 | /* |
Bin Meng | 7557405 | 2016-02-05 19:30:11 -0800 | [diff] [blame] | 44 | * U-Boot size - The iROM mmc copy function used by the SPL takes a |
| 45 | * block count paramter to describe the U-Boot size unlike the spi |
| 46 | * boot copy function which just uses the U-Boot size directly. Align |
| 47 | * the U-Boot size to block size (512 bytes) when populating the SPL |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 48 | * table only for mmc boot. |
| 49 | */ |
| 50 | u32 uboot_size; |
Przemyslaw Marczak | 93976f7 | 2014-09-01 13:50:44 +0200 | [diff] [blame] | 51 | unsigned boot_source; /* Boot device */ |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 52 | unsigned frequency_mhz; /* Frequency of memory in MHz */ |
| 53 | unsigned arm_freq_mhz; /* ARM Frequency in MHz */ |
| 54 | u32 serial_base; /* Serial base address */ |
| 55 | u32 i2c_base; /* i2c base address */ |
Simon Glass | edac8a5 | 2013-02-18 20:32:59 +0000 | [diff] [blame] | 56 | u32 board_rev_gpios; /* Board revision GPIOs */ |
| 57 | enum mem_manuf mem_manuf; /* Memory Manufacturer */ |
Rajeshwari Shinde | ff84384 | 2012-07-03 20:02:51 +0000 | [diff] [blame] | 58 | } __attribute__((__packed__)); |
| 59 | #endif |
| 60 | |
| 61 | /** |
| 62 | * Validate signature and return a pointer to the parameter table. If the |
| 63 | * signature is invalid, call panic() and never return. |
| 64 | * |
| 65 | * @return pointer to the parameter table if signature matched or never return. |
| 66 | */ |
| 67 | struct spl_machine_param *spl_get_machine_params(void); |
| 68 | |
| 69 | #endif /* __ASM_ARCH_EXYNOS_SPL_H__ */ |