config.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. #ifndef CONFIG_MAX_MEM_MAPPED
  28. #if defined(CONFIG_E500) || \
  29. defined(CONFIG_MPC86xx) || \
  30. defined(CONFIG_E300)
  31. #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
  32. #else
  33. #define CONFIG_MAX_MEM_MAPPED (256 << 20)
  34. #endif
  35. #endif
  36. /* Check if boards need to enable FSL DMA engine for SDRAM init */
  37. #if !defined(CONFIG_FSL_DMA) && defined(CONFIG_DDR_ECC)
  38. #if (defined(CONFIG_MPC83xx) && defined(CONFIG_DDR_ECC_INIT_VIA_DMA)) || \
  39. ((defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)) && \
  40. !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER))
  41. #define CONFIG_FSL_DMA
  42. #endif
  43. #endif
  44. /*
  45. * Provide a default boot page translation virtual address that lines up with
  46. * Freescale's default e500 reset page.
  47. */
  48. #if (defined(CONFIG_E500) && defined(CONFIG_MP))
  49. #ifndef CONFIG_BPTR_VIRT_ADDR
  50. #define CONFIG_BPTR_VIRT_ADDR 0xfffff000
  51. #endif
  52. #endif
  53. /* Since so many PPC SOCs have a semi-common LBC, define this here */
  54. #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
  55. defined(CONFIG_MPC83xx)
  56. #if !defined(CONFIG_FSL_IFC)
  57. #define CONFIG_FSL_LBC
  58. #endif
  59. #endif
  60. /* The TSEC driver uses the PHYLIB infrastructure */
  61. #if defined(CONFIG_TSEC_ENET) && defined(CONFIG_PHYLIB)
  62. #include <config_phylib_all_drivers.h>
  63. #endif /* TSEC_ENET */
  64. /* The FMAN driver uses the PHYLIB infrastructure */
  65. /* All PPC boards must swap IDE bytes */
  66. #define CONFIG_IDE_SWAP_IO
  67. #if defined(CONFIG_DM_SERIAL)
  68. /*
  69. * TODO: Convert this to a clock driver exists that can give us the UART
  70. * clock here.
  71. */
  72. #define CONFIG_SYS_NS16550_CLK get_serial_clock()
  73. #endif
  74. #endif /* _ASM_CONFIG_H_ */