Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

85 lines
1.9 KiB

  1. /*
  2. * (C) Copyright 2011
  3. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  4. *
  5. * Vased on:
  6. * (C) Copyright 2009
  7. * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
  8. *
  9. * SPDX-License-Identifier: GPL-2.0+
  10. */
  11. #ifndef _UBLIMAGE_H_
  12. #define _UBLIMAGE_H_
  13. enum ublimage_cmd {
  14. CMD_INVALID,
  15. CMD_BOOT_MODE,
  16. CMD_ENTRY,
  17. CMD_PAGE,
  18. CMD_ST_BLOCK,
  19. CMD_ST_PAGE,
  20. CMD_LD_ADDR
  21. };
  22. enum ublimage_fld_types {
  23. CFG_INVALID = -1,
  24. CFG_COMMAND,
  25. CFG_REG_VALUE
  26. };
  27. /*
  28. * from sprufg5a.pdf Table 110
  29. * Used by RBL when doing NAND boot
  30. */
  31. #define UBL_MAGIC_BASE (0xA1ACED00)
  32. /* Safe boot mode */
  33. #define UBL_MAGIC_SAFE (0x00)
  34. /* DMA boot mode */
  35. #define UBL_MAGIC_DMA (0x11)
  36. /* I Cache boot mode */
  37. #define UBL_MAGIC_IC (0x22)
  38. /* Fast EMIF boot mode */
  39. #define UBL_MAGIC_FAST (0x33)
  40. /* DMA + ICache boot mode */
  41. #define UBL_MAGIC_DMA_IC (0x44)
  42. /* DMA + ICache + Fast EMIF boot mode */
  43. #define UBL_MAGIC_DMA_IC_FAST (0x55)
  44. /* Define max UBL image size */
  45. #define UBL_IMAGE_SIZE (0x00003800u)
  46. /* one NAND block */
  47. #define UBL_BLOCK_SIZE 2048
  48. /* from sprufg5a.pdf Table 109 */
  49. struct ubl_header {
  50. uint32_t magic; /* Magic Number, see UBL_* defines */
  51. uint32_t entry; /* entry point address for bootloader */
  52. uint32_t pages; /* number of pages (size of bootloader) */
  53. uint32_t block; /*
  54. * blocknumber where user bootloader is
  55. * present
  56. */
  57. uint32_t page; /*
  58. * page number where user bootloader is
  59. * present.
  60. */
  61. uint32_t pll_m; /*
  62. * PLL setting -Multiplier (only valid if
  63. * Magic Number indicates PLL enable).
  64. */
  65. uint32_t pll_n; /*
  66. * PLL setting -Divider (only valid if
  67. * Magic Number indicates PLL enable).
  68. */
  69. uint32_t emif; /*
  70. * fast EMIF setting (only valid if
  71. * Magic Number indicates fast EMIF boot).
  72. */
  73. /* to fit in one nand block */
  74. unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
  75. };
  76. #endif /* _UBLIMAGE_H_ */