config.h 2.3 KB

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