smdk5250_spl.c 1.2 KB

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