iop331.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * linux/include/asm/arch-iop33x/iop331.h
  3. *
  4. * Intel IOP331 Chip definitions
  5. *
  6. * Author: Dave Jiang (dave.jiang@intel.com)
  7. * Copyright (C) 2003, 2004 Intel Corp.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef _IOP331_HW_H_
  14. #define _IOP331_HW_H_
  15. /*
  16. * This is needed for mixed drivers that need to work on all
  17. * IOP3xx variants but behave slightly differently on each.
  18. */
  19. #ifndef __ASSEMBLY__
  20. #define iop_is_331() 1
  21. #endif
  22. /*
  23. * IOP331 chipset registers
  24. */
  25. #define IOP331_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/
  26. #define IOP331_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */
  27. #define IOP331_REG_ADDR(reg) (IOP331_VIRT_MEM_BASE | (reg))
  28. /* Reserved 0x00000000 through 0x000000FF */
  29. /* Address Translation Unit 0x00000100 through 0x000001FF */
  30. /* Messaging Unit 0x00000300 through 0x000003FF */
  31. /* DMA Controller 0x00000400 through 0x000004FF */
  32. /* Memory controller 0x00000500 through 0x0005FF */
  33. /* Peripheral bus interface unit 0x00000680 through 0x0006FF */
  34. /* Peripheral performance monitoring unit 0x00000700 through 0x00077F */
  35. /* Internal arbitration unit 0x00000780 through 0x0007BF */
  36. /* Interrupt Controller */
  37. #define IOP331_INTCTL0 (volatile u32 *)IOP331_REG_ADDR(0x00000790)
  38. #define IOP331_INTCTL1 (volatile u32 *)IOP331_REG_ADDR(0x00000794)
  39. #define IOP331_INTSTR0 (volatile u32 *)IOP331_REG_ADDR(0x00000798)
  40. #define IOP331_INTSTR1 (volatile u32 *)IOP331_REG_ADDR(0x0000079C)
  41. #define IOP331_IINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A0)
  42. #define IOP331_IINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007A4)
  43. #define IOP331_FINTSRC0 (volatile u32 *)IOP331_REG_ADDR(0x000007A8)
  44. #define IOP331_FINTSRC1 (volatile u32 *)IOP331_REG_ADDR(0x000007AC)
  45. #define IOP331_IPR0 (volatile u32 *)IOP331_REG_ADDR(0x000007B0)
  46. #define IOP331_IPR1 (volatile u32 *)IOP331_REG_ADDR(0x000007B4)
  47. #define IOP331_IPR2 (volatile u32 *)IOP331_REG_ADDR(0x000007B8)
  48. #define IOP331_IPR3 (volatile u32 *)IOP331_REG_ADDR(0x000007BC)
  49. #define IOP331_INTBASE (volatile u32 *)IOP331_REG_ADDR(0x000007C0)
  50. #define IOP331_INTSIZE (volatile u32 *)IOP331_REG_ADDR(0x000007C4)
  51. #define IOP331_IINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007C8)
  52. #define IOP331_FINTVEC (volatile u32 *)IOP331_REG_ADDR(0x000007CC)
  53. /* Application accelerator unit 0x00000800 - 0x000008FF */
  54. #define IOP331_SPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C0)
  55. #define IOP331_PPDSCR (volatile u32 *)IOP331_REG_ADDR(0x000015C8)
  56. /* SSP serial port unit 0x00001600 - 0x0000167F */
  57. /* I2C bus interface unit 0x00001680 - 0x000016FF */
  58. /* 0x00001700 through 0x0000172C UART 0 */
  59. /* Reserved 0x00001730 through 0x0000173F */
  60. /* 0x00001740 through 0x0000176C UART 1 */
  61. #define IOP331_UART0_PHYS (IOP331_PHYS_MEM_BASE | 0x00001700) /* UART #1 physical */
  62. #define IOP331_UART1_PHYS (IOP331_PHYS_MEM_BASE | 0x00001740) /* UART #2 physical */
  63. #define IOP331_UART0_VIRT (IOP331_VIRT_MEM_BASE | 0x00001700) /* UART #1 virtual addr */
  64. #define IOP331_UART1_VIRT (IOP331_VIRT_MEM_BASE | 0x00001740) /* UART #2 virtual addr */
  65. /* Reserved 0x00001770 through 0x0000177F */
  66. /* General Purpose I/O Registers */
  67. #define IOP331_GPOE (volatile u32 *)IOP331_REG_ADDR(0x00001780)
  68. #define IOP331_GPID (volatile u32 *)IOP331_REG_ADDR(0x00001784)
  69. #define IOP331_GPOD (volatile u32 *)IOP331_REG_ADDR(0x00001788)
  70. /* Reserved 0x0000178c through 0x000019ff */
  71. /*
  72. * Peripherals that are shared between the iop32x and iop33x but
  73. * located at different addresses.
  74. */
  75. #define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780 + (reg))
  76. #define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg))
  77. #include <asm/hardware/iop3xx.h>
  78. #ifndef __ASSEMBLY__
  79. extern void iop331_init_irq(void);
  80. extern void iop331_time_init(void);
  81. #endif
  82. #endif // _IOP331_HW_H_