config.h 2.1 KB

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