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