kmp204x.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * (C) Copyright 2013 Keymile AG
  3. * Valentin Longchamp <valentin.longchamp@keymile.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef __CONFIG_H
  8. #define __CONFIG_H
  9. /* KMLION1 */
  10. #if defined(CONFIG_KMLION1)
  11. #define CONFIG_HOSTNAME kmlion1
  12. #define CONFIG_KM_BOARD_NAME "kmlion1"
  13. /* KMCOGE4 */
  14. #elif defined(CONFIG_KMCOGE4)
  15. #define CONFIG_HOSTNAME kmcoge4
  16. #define CONFIG_KM_BOARD_NAME "kmcoge4"
  17. #else
  18. #error ("Board not supported")
  19. #endif
  20. #define CONFIG_KMP204X
  21. #include "km/kmp204x-common.h"
  22. #if defined(CONFIG_KMLION1)
  23. /* App1 Local bus */
  24. #define CONFIG_SYS_LBAPP1_BASE 0xD0000000
  25. #define CONFIG_SYS_LBAPP1_BASE_PHYS 0xFD0000000ull
  26. #define CONFIG_SYS_LBAPP1_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_LBAPP1_BASE_PHYS) \
  27. | BR_PS_8 /* Port Size 8 bits */ \
  28. | BR_DECC_OFF /* no error corr */ \
  29. | BR_MS_GPCM /* MSEL = GPCM */ \
  30. | BR_V) /* valid */
  31. #define CONFIG_SYS_LBAPP1_OR_PRELIM (OR_AM_256MB /* length 256MB */ \
  32. | OR_GPCM_ACS_DIV2 /* LCS 1/2 clk after */ \
  33. | OR_GPCM_CSNT /* LCS 1/4 clk before */ \
  34. | OR_GPCM_SCY_2 /* 2 clk wait cycles */ \
  35. | OR_GPCM_TRLX /* relaxed tmgs */ \
  36. | OR_GPCM_EAD) /* extra bus clk cycles */
  37. /* Local bus app1 Base Address */
  38. #define CONFIG_SYS_BR2_PRELIM CONFIG_SYS_LBAPP1_BR_PRELIM
  39. /* Local bus app1 Options */
  40. #define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_LBAPP1_OR_PRELIM
  41. #endif
  42. /* App2 Local bus */
  43. #define CONFIG_SYS_LBAPP2_BASE 0xE0000000
  44. #define CONFIG_SYS_LBAPP2_BASE_PHYS 0xFE0000000ull
  45. #define CONFIG_SYS_LBAPP2_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_LBAPP2_BASE_PHYS) \
  46. | BR_PS_8 /* Port Size 8 bits */ \
  47. | BR_DECC_OFF /* no error corr */ \
  48. | BR_MS_GPCM /* MSEL = GPCM */ \
  49. | BR_V) /* valid */
  50. #define CONFIG_SYS_LBAPP2_OR_PRELIM (OR_AM_256MB /* length 256MB */ \
  51. | OR_GPCM_ACS_DIV2 /* LCS 1/2 clk after */ \
  52. | OR_GPCM_CSNT /* LCS 1/4 clk before */ \
  53. | OR_GPCM_SCY_2 /* 2 clk wait cycles */ \
  54. | OR_GPCM_TRLX /* relaxed tmgs */ \
  55. | OR_GPCM_EAD) /* extra bus clk cycles */
  56. /* Local bus app2 Base Address */
  57. #define CONFIG_SYS_BR3_PRELIM CONFIG_SYS_LBAPP2_BR_PRELIM
  58. /* Local bus app2 Options */
  59. #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_LBAPP2_OR_PRELIM
  60. #endif /* __CONFIG_H */