config.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #ifndef CONFIG_PHYLIB
  62. #if defined(CONFIG_TSEC_ENET)
  63. #include <config_phylib_all_drivers.h>
  64. #endif /* TSEC_ENET */
  65. #endif /* !CONFIG_PHYLIB */
  66. /* The FMAN driver uses the PHYLIB infrastructure */
  67. /* All PPC boards must swap IDE bytes */
  68. #define CONFIG_IDE_SWAP_IO
  69. #if defined(CONFIG_DM_SERIAL)
  70. /*
  71. * TODO: Convert this to a clock driver exists that can give us the UART
  72. * clock here.
  73. */
  74. #define CONFIG_SYS_NS16550_CLK get_serial_clock()
  75. #endif
  76. #endif /* _ASM_CONFIG_H_ */