smdk5250_spl.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2012 The Chromium OS Authors.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/arch/cpu.h>
  8. #include <asm/arch/spl.h>
  9. #include <asm/arch/clk.h>
  10. #define SIGNATURE 0xdeadbeef
  11. /* Parameters of early board initialization in SPL */
  12. static struct spl_machine_param machine_param
  13. __attribute__((section(".machine_param"))) = {
  14. .signature = SIGNATURE,
  15. .version = 1,
  16. .params = "vmubfasirM",
  17. .size = sizeof(machine_param),
  18. .mem_iv_size = 0x1f,
  19. .mem_type = DDR_MODE_DDR3,
  20. /*
  21. * Set uboot_size to 0x100000 bytes.
  22. *
  23. * This is an overly conservative value chosen to accommodate all
  24. * possible U-Boot image. You are advised to set this value to a
  25. * smaller realistic size via scripts that modifies the .machine_param
  26. * section of output U-Boot image.
  27. */
  28. .uboot_size = 0x100000,
  29. .boot_source = BOOT_MODE_OM,
  30. .frequency_mhz = 800,
  31. .arm_freq_mhz = 1700,
  32. .serial_base = 0x12c30000,
  33. .i2c_base = 0x12c60000,
  34. .mem_manuf = MEM_MANUF_SAMSUNG,
  35. };
  36. struct spl_machine_param *spl_get_machine_params(void)
  37. {
  38. if (machine_param.signature != SIGNATURE) {
  39. /* Will hang if SIGNATURE dont match */
  40. while (1)
  41. ;
  42. }
  43. return &machine_param;
  44. }