hardware.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * This file contains the hardware definitions of the Nomadik.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * YOU should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __ASM_ARCH_HARDWARE_H
  19. #define __ASM_ARCH_HARDWARE_H
  20. /* Nomadik registers live from 0x1000.0000 to 0x1023.0000 -- currently */
  21. #define NOMADIK_IO_VIRTUAL 0xF0000000 /* VA of IO */
  22. #define NOMADIK_IO_PHYSICAL 0x10000000 /* PA of IO */
  23. #define NOMADIK_IO_SIZE 0x00300000 /* 3MB for all regs */
  24. /* used in C code, so cast to proper type */
  25. #define io_p2v(x) ((void __iomem *)(x) \
  26. - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL)
  27. #define io_v2p(x) ((unsigned long)(x) \
  28. - NOMADIK_IO_VIRTUAL + NOMADIK_IO_PHYSICAL)
  29. /* used in asm code, so no casts */
  30. #define IO_ADDRESS(x) ((x) - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL)
  31. /*
  32. * Base address defination for Nomadik Onchip Logic Block
  33. */
  34. #define NOMADIK_FSMC_BASE 0x10100000 /* FSMC registers */
  35. #define NOMADIK_SDRAMC_BASE 0x10110000 /* SDRAM Controller */
  36. #define NOMADIK_CLCDC_BASE 0x10120000 /* CLCD Controller */
  37. #define NOMADIK_MDIF_BASE 0x10120000 /* MDIF */
  38. #define NOMADIK_DMA0_BASE 0x10130000 /* DMA0 Controller */
  39. #define NOMADIK_IC_BASE 0x10140000 /* Vectored Irq Controller */
  40. #define NOMADIK_DMA1_BASE 0x10150000 /* DMA1 Controller */
  41. #define NOMADIK_USB_BASE 0x10170000 /* USB-OTG conf reg base */
  42. #define NOMADIK_CRYP_BASE 0x10180000 /* Crypto processor */
  43. #define NOMADIK_SHA1_BASE 0x10190000 /* SHA-1 Processor */
  44. #define NOMADIK_XTI_BASE 0x101A0000 /* XTI */
  45. #define NOMADIK_RNG_BASE 0x101B0000 /* Random number generator */
  46. #define NOMADIK_SRC_BASE 0x101E0000 /* SRC base */
  47. #define NOMADIK_WDOG_BASE 0x101E1000 /* Watchdog */
  48. #define NOMADIK_MTU0_BASE 0x101E2000 /* Multiple Timer 0 */
  49. #define NOMADIK_MTU1_BASE 0x101E3000 /* Multiple Timer 1 */
  50. #define NOMADIK_GPIO0_BASE 0x101E4000 /* GPIO0 */
  51. #define NOMADIK_GPIO1_BASE 0x101E5000 /* GPIO1 */
  52. #define NOMADIK_GPIO2_BASE 0x101E6000 /* GPIO2 */
  53. #define NOMADIK_GPIO3_BASE 0x101E7000 /* GPIO3 */
  54. #define NOMADIK_RTC_BASE 0x101E8000 /* Real Time Clock base */
  55. #define NOMADIK_PMU_BASE 0x101E9000 /* Power Management Unit */
  56. #define NOMADIK_OWM_BASE 0x101EA000 /* One wire master */
  57. #define NOMADIK_SCR_BASE 0x101EF000 /* Secure Control registers */
  58. #define NOMADIK_MSP2_BASE 0x101F0000 /* MSP 2 interface */
  59. #define NOMADIK_MSP1_BASE 0x101F1000 /* MSP 1 interface */
  60. #define NOMADIK_UART2_BASE 0x101F2000 /* UART 2 interface */
  61. #define NOMADIK_SSIRx_BASE 0x101F3000 /* SSI 8-ch rx interface */
  62. #define NOMADIK_SSITx_BASE 0x101F4000 /* SSI 8-ch tx interface */
  63. #define NOMADIK_MSHC_BASE 0x101F5000 /* Memory Stick(Pro) Host */
  64. #define NOMADIK_SDI_BASE 0x101F6000 /* SD-card/MM-Card */
  65. #define NOMADIK_I2C1_BASE 0x101F7000 /* I2C1 interface */
  66. #define NOMADIK_I2C0_BASE 0x101F8000 /* I2C0 interface */
  67. #define NOMADIK_MSP0_BASE 0x101F9000 /* MSP 0 interface */
  68. #define NOMADIK_FIRDA_BASE 0x101FA000 /* FIrDA interface */
  69. #define NOMADIK_UART1_BASE 0x101FB000 /* UART 1 interface */
  70. #define NOMADIK_SSP_BASE 0x101FC000 /* SSP interface */
  71. #define NOMADIK_UART0_BASE 0x101FD000 /* UART 0 interface */
  72. #define NOMADIK_SGA_BASE 0x101FE000 /* SGA interface */
  73. #define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */
  74. /* Other ranges, not for p2v/v2p */
  75. #define NOMADIK_BACKUP_RAM 0x80010000
  76. #define NOMADIK_EBROM 0x80000000 /* Embedded boot ROM */
  77. #define NOMADIK_HAMACV_DMEM_BASE 0xA0100000 /* HAMACV Data Memory Start */
  78. #define NOMADIK_HAMACV_DMEM_END 0xA01FFFFF /* HAMACV Data Memory End */
  79. #define NOMADIK_HAMACA_DMEM 0xA0200000 /* HAMACA Data Memory Space */
  80. #define NOMADIK_FSMC_VA IO_ADDRESS(NOMADIK_FSMC_BASE)
  81. #define NOMADIK_MTU0_VA IO_ADDRESS(NOMADIK_MTU0_BASE)
  82. #define NOMADIK_MTU1_VA IO_ADDRESS(NOMADIK_MTU1_BASE)
  83. #endif /* __ASM_ARCH_HARDWARE_H */