config.h 1.8 KB

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