iop321.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * linux/include/asm/arch-iop32x/iop321.h
  3. *
  4. * Intel IOP321 Chip definitions
  5. *
  6. * Author: Rory Bolt <rorybolt@pacbell.net>
  7. * Copyright (C) 2002 Rory Bolt
  8. * Copyright (C) 2004 Intel Corp.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef _IOP321_HW_H_
  15. #define _IOP321_HW_H_
  16. /*
  17. * This is needed for mixed drivers that need to work on all
  18. * IOP3xx variants but behave slightly differently on each.
  19. */
  20. #ifndef __ASSEMBLY__
  21. #define iop_is_321() 1
  22. #endif
  23. /*
  24. * IOP321 chipset registers
  25. */
  26. #define IOP321_VIRT_MEM_BASE 0xfeffe000 /* chip virtual mem address*/
  27. #define IOP321_PHYS_MEM_BASE 0xffffe000 /* chip physical memory address */
  28. #define IOP321_REG_ADDR(reg) (IOP321_VIRT_MEM_BASE | (reg))
  29. /* Reserved 0x00000000 through 0x000000FF */
  30. /* Address Translation Unit 0x00000100 through 0x000001FF */
  31. /* Messaging Unit 0x00000300 through 0x000003FF */
  32. /* DMA Controller 0x00000400 through 0x000004FF */
  33. /* Memory controller 0x00000500 through 0x0005FF */
  34. /* Peripheral bus interface unit 0x00000680 through 0x0006FF */
  35. /* Peripheral performance monitoring unit 0x00000700 through 0x00077F */
  36. /* Internal arbitration unit 0x00000780 through 0x0007BF */
  37. #define IOP321_IACR (volatile u32 *)IOP321_REG_ADDR(0x00000780)
  38. #define IOP321_MTTR1 (volatile u32 *)IOP321_REG_ADDR(0x00000784)
  39. #define IOP321_MTTR2 (volatile u32 *)IOP321_REG_ADDR(0x00000788)
  40. /* General Purpose I/O Registers */
  41. #define IOP321_GPOE (volatile u32 *)IOP321_REG_ADDR(0x000007C4)
  42. #define IOP321_GPID (volatile u32 *)IOP321_REG_ADDR(0x000007C8)
  43. #define IOP321_GPOD (volatile u32 *)IOP321_REG_ADDR(0x000007CC)
  44. /* Interrupt Controller */
  45. #define IOP321_INTCTL (volatile u32 *)IOP321_REG_ADDR(0x000007D0)
  46. #define IOP321_INTSTR (volatile u32 *)IOP321_REG_ADDR(0x000007D4)
  47. #define IOP321_IINTSRC (volatile u32 *)IOP321_REG_ADDR(0x000007D8)
  48. #define IOP321_FINTSRC (volatile u32 *)IOP321_REG_ADDR(0x000007DC)
  49. /* Application accelerator unit 0x00000800 - 0x000008FF */
  50. /* SSP serial port unit 0x00001600 - 0x0000167F */
  51. /* I2C bus interface unit 0x00001680 - 0x000016FF */
  52. /* for I2C bit defs see drivers/i2c/i2c-iop3xx.h */
  53. /*
  54. * Peripherals that are shared between the iop32x and iop33x but
  55. * located at different addresses.
  56. */
  57. #define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c0 + (reg))
  58. #define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
  59. #include <asm/hardware/iop3xx.h>
  60. #ifndef __ASSEMBLY__
  61. extern void iop321_init_irq(void);
  62. extern void iop321_time_init(void);
  63. #endif
  64. #endif // _IOP321_HW_H_