u-boot.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * (C) Copyright 2000 - 2002
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. ********************************************************************
  7. * NOTE: This header file defines an interface to U-Boot. Including
  8. * this (unmodified) header file in another file is considered normal
  9. * use of U-Boot, and does *not* fall under the heading of "derived
  10. * work".
  11. ********************************************************************
  12. */
  13. #ifndef __U_BOOT_H__
  14. #define __U_BOOT_H__
  15. /*
  16. * Board information passed to Linux kernel from U-Boot
  17. *
  18. * include/asm-ppc/u-boot.h
  19. */
  20. #ifdef CONFIG_SYS_GENERIC_BOARD
  21. /* Use the generic board which requires a unified bd_info */
  22. #include <asm-generic/u-boot.h>
  23. #else
  24. #ifndef __ASSEMBLY__
  25. typedef struct bd_info {
  26. unsigned long bi_memstart; /* start of DRAM memory */
  27. phys_size_t bi_memsize; /* size of DRAM memory in bytes */
  28. unsigned long bi_flashstart; /* start of FLASH memory */
  29. unsigned long bi_flashsize; /* size of FLASH memory */
  30. unsigned long bi_flashoffset; /* reserved area for startup monitor */
  31. unsigned long bi_sramstart; /* start of SRAM memory */
  32. unsigned long bi_sramsize; /* size of SRAM memory */
  33. #if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_MPC8260) \
  34. || defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
  35. unsigned long bi_immr_base; /* base of IMMR register */
  36. #endif
  37. #if defined(CONFIG_MPC5xxx)
  38. unsigned long bi_mbar_base; /* base of internal registers */
  39. #endif
  40. #if defined(CONFIG_MPC83xx)
  41. unsigned long bi_immrbar;
  42. #endif
  43. unsigned long bi_bootflags; /* boot / reboot flag (Unused) */
  44. unsigned long bi_ip_addr; /* IP Address */
  45. unsigned char bi_enetaddr[6]; /* OLD: see README.enetaddr */
  46. unsigned short bi_ethspeed; /* Ethernet speed in Mbps */
  47. unsigned long bi_intfreq; /* Internal Freq, in MHz */
  48. unsigned long bi_busfreq; /* Bus Freq, in MHz */
  49. #if defined(CONFIG_CPM2)
  50. unsigned long bi_cpmfreq; /* CPM_CLK Freq, in MHz */
  51. unsigned long bi_brgfreq; /* BRG_CLK Freq, in MHz */
  52. unsigned long bi_sccfreq; /* SCC_CLK Freq, in MHz */
  53. unsigned long bi_vco; /* VCO Out from PLL, in MHz */
  54. #endif
  55. #if defined(CONFIG_MPC512X)
  56. unsigned long bi_ipsfreq; /* IPS Bus Freq, in MHz */
  57. #endif /* CONFIG_MPC512X */
  58. #if defined(CONFIG_MPC5xxx)
  59. unsigned long bi_ipbfreq; /* IPB Bus Freq, in MHz */
  60. unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */
  61. #endif
  62. #if defined(CONFIG_405) || \
  63. defined(CONFIG_405GP) || \
  64. defined(CONFIG_405EP) || \
  65. defined(CONFIG_405EZ) || \
  66. defined(CONFIG_405EX) || \
  67. defined(CONFIG_440)
  68. unsigned char bi_s_version[4]; /* Version of this structure */
  69. unsigned char bi_r_version[32]; /* Version of the ROM (AMCC) */
  70. unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */
  71. unsigned int bi_plb_busfreq; /* PLB Bus speed, in Hz */
  72. unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
  73. unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
  74. #endif
  75. #ifdef CONFIG_HAS_ETH1
  76. unsigned char bi_enet1addr[6]; /* OLD: see README.enetaddr */
  77. #endif
  78. #ifdef CONFIG_HAS_ETH2
  79. unsigned char bi_enet2addr[6]; /* OLD: see README.enetaddr */
  80. #endif
  81. #ifdef CONFIG_HAS_ETH3
  82. unsigned char bi_enet3addr[6]; /* OLD: see README.enetaddr */
  83. #endif
  84. #ifdef CONFIG_HAS_ETH4
  85. unsigned char bi_enet4addr[6]; /* OLD: see README.enetaddr */
  86. #endif
  87. #ifdef CONFIG_HAS_ETH5
  88. unsigned char bi_enet5addr[6]; /* OLD: see README.enetaddr */
  89. #endif
  90. #if defined(CONFIG_405GP) || defined(CONFIG_405EP) || \
  91. defined(CONFIG_405EZ) || defined(CONFIG_440GX) || \
  92. defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
  93. defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
  94. defined(CONFIG_460EX) || defined(CONFIG_460GT)
  95. unsigned int bi_opbfreq; /* OPB clock in Hz */
  96. int bi_iic_fast[2]; /* Use fast i2c mode */
  97. #endif
  98. #if defined(CONFIG_4xx)
  99. #if defined(CONFIG_440GX) || \
  100. defined(CONFIG_460EX) || defined(CONFIG_460GT)
  101. int bi_phynum[4]; /* Determines phy mapping */
  102. int bi_phymode[4]; /* Determines phy mode */
  103. #elif defined(CONFIG_405EP) || defined(CONFIG_405EX) || defined(CONFIG_440)
  104. int bi_phynum[2]; /* Determines phy mapping */
  105. int bi_phymode[2]; /* Determines phy mode */
  106. #else
  107. int bi_phynum[1]; /* Determines phy mapping */
  108. int bi_phymode[1]; /* Determines phy mode */
  109. #endif
  110. #endif /* defined(CONFIG_4xx) */
  111. } bd_t;
  112. #endif /* __ASSEMBLY__ */
  113. #endif /* !CONFIG_SYS_GENERIC_BOARD */
  114. /* For image.h:image_check_target_arch() */
  115. #define IH_ARCH_DEFAULT IH_ARCH_PPC
  116. #endif /* __U_BOOT_H__ */