config.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * Copyright 2009-2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _ASM_CONFIG_H_
  7. #define _ASM_CONFIG_H_
  8. #ifdef CONFIG_MPC85xx
  9. #include <asm/config_mpc85xx.h>
  10. #define CONFIG_SYS_FSL_DDR
  11. #endif
  12. #ifdef CONFIG_MPC86xx
  13. #include <asm/config_mpc86xx.h>
  14. #define CONFIG_SYS_FSL_DDR
  15. #endif
  16. #ifdef CONFIG_MPC83xx
  17. #define CONFIG_SYS_FSL_DDR
  18. #endif
  19. #ifndef HWCONFIG_BUFFER_SIZE
  20. #define HWCONFIG_BUFFER_SIZE 256
  21. #endif
  22. /* CONFIG_HARD_SPI triggers SPI bus initialization in PowerPC */
  23. #if defined(CONFIG_MPC8XXX_SPI) || defined(CONFIG_FSL_ESPI)
  24. # ifndef CONFIG_HARD_SPI
  25. # define CONFIG_HARD_SPI
  26. # endif
  27. #endif
  28. #define CONFIG_LMB
  29. #define CONFIG_SYS_BOOT_RAMDISK_HIGH
  30. #define CONFIG_SYS_BOOT_GET_CMDLINE
  31. #define CONFIG_SYS_BOOT_GET_KBD
  32. #ifndef CONFIG_MAX_MEM_MAPPED
  33. #if defined(CONFIG_4xx) || \
  34. defined(CONFIG_E500) || \
  35. defined(CONFIG_MPC86xx) || \
  36. defined(CONFIG_E300)
  37. #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
  38. #else
  39. #define CONFIG_MAX_MEM_MAPPED (256 << 20)
  40. #endif
  41. #endif
  42. /* Check if boards need to enable FSL DMA engine for SDRAM init */
  43. #if !defined(CONFIG_FSL_DMA) && defined(CONFIG_DDR_ECC)
  44. #if (defined(CONFIG_MPC83xx) && defined(CONFIG_DDR_ECC_INIT_VIA_DMA)) || \
  45. ((defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)) && \
  46. !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER))
  47. #define CONFIG_FSL_DMA
  48. #endif
  49. #endif
  50. /*
  51. * Provide a default boot page translation virtual address that lines up with
  52. * Freescale's default e500 reset page.
  53. */
  54. #if (defined(CONFIG_E500) && defined(CONFIG_MP))
  55. #ifndef CONFIG_BPTR_VIRT_ADDR
  56. #define CONFIG_BPTR_VIRT_ADDR 0xfffff000
  57. #endif
  58. #endif
  59. /*
  60. * SEC (crypto unit) major compatible version determination
  61. */
  62. #if defined(CONFIG_MPC83xx)
  63. #define CONFIG_SYS_FSL_SEC_BE
  64. #define CONFIG_SYS_FSL_SEC_COMPAT 2
  65. #endif
  66. /* Since so many PPC SOCs have a semi-common LBC, define this here */
  67. #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
  68. defined(CONFIG_MPC83xx)
  69. #if !defined(CONFIG_FSL_IFC)
  70. #define CONFIG_FSL_LBC
  71. #endif
  72. #endif
  73. /* The TSEC driver uses the PHYLIB infrastructure */
  74. #ifndef CONFIG_PHYLIB
  75. #if defined(CONFIG_TSEC_ENET)
  76. #define CONFIG_PHYLIB
  77. #include <config_phylib_all_drivers.h>
  78. #endif /* TSEC_ENET */
  79. #endif /* !CONFIG_PHYLIB */
  80. /* The FMAN driver uses the PHYLIB infrastructure */
  81. #if defined(CONFIG_FMAN_ENET)
  82. #define CONFIG_PHYLIB
  83. #endif
  84. /* All PPC boards must swap IDE bytes */
  85. #define CONFIG_IDE_SWAP_IO
  86. #if defined(CONFIG_DM_SERIAL)
  87. /*
  88. * TODO: Convert this to a clock driver exists that can give us the UART
  89. * clock here.
  90. */
  91. #define CONFIG_SYS_NS16550_CLK get_serial_clock()
  92. #endif
  93. #endif /* _ASM_CONFIG_H_ */