spl.h 2.2 KB

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