config.h 2.1 KB

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