constants.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* include/asm-arm/arch-lh7a40x/constants.h
  2. *
  3. * Copyright (C) 2004 Coastal Environmental Systems
  4. * Copyright (C) 2004 Logic Product Development
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 as published by the Free Software Foundation.
  9. *
  10. */
  11. #ifndef __ASM_ARCH_CONSTANTS_H
  12. #define __ASM_ARCH_CONSTANTS_H
  13. /* Addressing constants */
  14. /* SoC CPU IO addressing */
  15. #define IO_PHYS (0x80000000)
  16. #define IO_VIRT (0xf8000000)
  17. #define IO_SIZE (0x0000B000)
  18. #ifdef CONFIG_MACH_KEV7A400
  19. # define CPLD_PHYS (0x20000000)
  20. # define CPLD_VIRT (0xf2000000)
  21. # define CPLD_SIZE PAGE_SIZE
  22. #endif
  23. #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
  24. # define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */
  25. # define IOBARRIER_VIRT 0xf0000000
  26. # define IOBARRIER_SIZE PAGE_SIZE
  27. # define CF_PHYS 0x60200000
  28. # define CF_VIRT 0xf6020000
  29. # define CF_SIZE (8*1024)
  30. /* The IO mappings for the LPD CPLD are, unfortunately, sparse. */
  31. # define CPLDX_PHYS(x) (0x70000000 | ((x) << 20))
  32. # define CPLDX_VIRT(x) (0xf7000000 | ((x) << 16))
  33. # define CPLD00_PHYS CPLDX_PHYS (0x00) /* Wired LAN */
  34. # define CPLD00_VIRT CPLDX_VIRT (0x00)
  35. # define CPLD00_SIZE PAGE_SIZE
  36. # define CPLD02_PHYS CPLDX_PHYS (0x02)
  37. # define CPLD02_VIRT CPLDX_VIRT (0x02)
  38. # define CPLD02_SIZE PAGE_SIZE
  39. # define CPLD06_PHYS CPLDX_PHYS (0x06)
  40. # define CPLD06_VIRT CPLDX_VIRT (0x06)
  41. # define CPLD06_SIZE PAGE_SIZE
  42. # define CPLD08_PHYS CPLDX_PHYS (0x08)
  43. # define CPLD08_VIRT CPLDX_VIRT (0x08)
  44. # define CPLD08_SIZE PAGE_SIZE
  45. # define CPLD0A_PHYS CPLDX_PHYS (0x0a)
  46. # define CPLD0A_VIRT CPLDX_VIRT (0x0a)
  47. # define CPLD0A_SIZE PAGE_SIZE
  48. # define CPLD0C_PHYS CPLDX_PHYS (0x0c)
  49. # define CPLD0C_VIRT CPLDX_VIRT (0x0c)
  50. # define CPLD0C_SIZE PAGE_SIZE
  51. # define CPLD0E_PHYS CPLDX_PHYS (0x0e)
  52. # define CPLD0E_VIRT CPLDX_VIRT (0x0e)
  53. # define CPLD0E_SIZE PAGE_SIZE
  54. # define CPLD10_PHYS CPLDX_PHYS (0x10)
  55. # define CPLD10_VIRT CPLDX_VIRT (0x10)
  56. # define CPLD10_SIZE PAGE_SIZE
  57. # define CPLD12_PHYS CPLDX_PHYS (0x12)
  58. # define CPLD12_VIRT CPLDX_VIRT (0x12)
  59. # define CPLD12_SIZE PAGE_SIZE
  60. # define CPLD14_PHYS CPLDX_PHYS (0x14)
  61. # define CPLD14_VIRT CPLDX_VIRT (0x14)
  62. # define CPLD14_SIZE PAGE_SIZE
  63. # define CPLD16_PHYS CPLDX_PHYS (0x16)
  64. # define CPLD16_VIRT CPLDX_VIRT (0x16)
  65. # define CPLD16_SIZE PAGE_SIZE
  66. # define CPLD18_PHYS CPLDX_PHYS (0x18)
  67. # define CPLD18_VIRT CPLDX_VIRT (0x18)
  68. # define CPLD18_SIZE PAGE_SIZE
  69. # define CPLD1A_PHYS CPLDX_PHYS (0x1a)
  70. # define CPLD1A_VIRT CPLDX_VIRT (0x1a)
  71. # define CPLD1A_SIZE PAGE_SIZE
  72. #endif
  73. /* Timing constants */
  74. #define XTAL_IN 14745600 /* 14.7456 MHz crystal */
  75. #define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */
  76. #define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */
  77. #define HCLK (99993600)
  78. //#define HCLK (119808000)
  79. #endif /* __ASM_ARCH_CONSTANTS_H */