spl.h 2.2 KB

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