map-s3c.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* linux/arch/arm/plat-samsung/include/plat/map-s3c.h
  2. *
  3. * Copyright (c) 2008 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * S3C24XX - Memory map definitions
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __ASM_PLAT_MAP_S3C_H
  13. #define __ASM_PLAT_MAP_S3C_H __FILE__
  14. #define S3C24XX_VA_IRQ S3C_VA_IRQ
  15. #define S3C24XX_VA_MEMCTRL S3C_VA_MEM
  16. #define S3C24XX_VA_UART S3C_VA_UART
  17. #define S3C24XX_VA_TIMER S3C_VA_TIMER
  18. #define S3C24XX_VA_CLKPWR S3C_VA_SYS
  19. #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG
  20. #define S3C2412_VA_SSMC S3C_ADDR_CPU(0x00000000)
  21. #define S3C2412_VA_EBI S3C_ADDR_CPU(0x00100000)
  22. #define S3C2410_PA_UART (0x50000000)
  23. #define S3C24XX_PA_UART S3C2410_PA_UART
  24. #ifndef S3C_UART_OFFSET
  25. #define S3C_UART_OFFSET (0x400)
  26. #endif
  27. /*
  28. * GPIO ports
  29. *
  30. * the calculation for the VA of this must ensure that
  31. * it is the same distance apart from the UART in the
  32. * phsyical address space, as the initial mapping for the IO
  33. * is done as a 1:1 mapping. This puts it (currently) at
  34. * 0xFA800000, which is not in the way of any current mapping
  35. * by the base system.
  36. */
  37. #define S3C2410_PA_GPIO (0x56000000)
  38. #define S3C24XX_PA_GPIO S3C2410_PA_GPIO
  39. #define S3C24XX_VA_GPIO ((S3C24XX_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART)
  40. #define S3C64XX_VA_GPIO S3C_ADDR_CPU(0x00000000)
  41. #define S3C64XX_VA_MODEM S3C_ADDR_CPU(0x00100000)
  42. #define S3C64XX_VA_USB_HSPHY S3C_ADDR_CPU(0x00200000)
  43. #define S3C_VA_USB_HSPHY S3C64XX_VA_USB_HSPHY
  44. /*
  45. * ISA style IO, for each machine to sort out mappings for,
  46. * if it implements it. We reserve two 16M regions for ISA.
  47. */
  48. #define S3C2410_ADDR(x) S3C_ADDR(x)
  49. #define S3C24XX_VA_ISA_WORD S3C2410_ADDR(0x02000000)
  50. #define S3C24XX_VA_ISA_BYTE S3C2410_ADDR(0x03000000)
  51. /* deal with the registers that move under the 2412/2413 */
  52. #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
  53. #ifndef __ASSEMBLY__
  54. extern void __iomem *s3c24xx_va_gpio2;
  55. #endif
  56. #ifdef CONFIG_CPU_S3C2412_ONLY
  57. #define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10)
  58. #else
  59. #define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2
  60. #endif
  61. #else
  62. #define s3c24xx_va_gpio2 S3C24XX_VA_GPIO
  63. #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
  64. #endif
  65. #include <plat/map-s5p.h>
  66. #endif /* __ASM_PLAT_MAP_S3C_H */