cpc700.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Header file for IBM CPC700 Host Bridge, et. al.
  3. *
  4. * Author: Mark A. Greer
  5. * mgreer@mvista.com
  6. *
  7. * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under
  8. * the terms of the GNU General Public License version 2. This program
  9. * is licensed "as is" without any warranty of any kind, whether express
  10. * or implied.
  11. */
  12. /*
  13. * This file contains the defines and macros for the IBM CPC700 host bridge,
  14. * memory controller, PIC, UARTs, IIC, and Timers.
  15. */
  16. #ifndef __PPC_SYSLIB_CPC700_H__
  17. #define __PPC_SYSLIB_CPC700_H__
  18. #include <linux/stddef.h>
  19. #include <linux/types.h>
  20. #include <linux/init.h>
  21. /* XXX no barriers? not even any volatiles? -- paulus */
  22. #define CPC700_OUT_32(a,d) (*(u_int *)a = d)
  23. #define CPC700_IN_32(a) (*(u_int *)a)
  24. /*
  25. * PCI Section
  26. */
  27. #define CPC700_PCI_CONFIG_ADDR 0xfec00000
  28. #define CPC700_PCI_CONFIG_DATA 0xfec00004
  29. /* CPU -> PCI memory window 0 */
  30. #define CPC700_PMM0_LOCAL 0xff400000 /* CPU physical addr */
  31. #define CPC700_PMM0_MASK_ATTR 0xff400004 /* size and attrs */
  32. #define CPC700_PMM0_PCI_LOW 0xff400008 /* PCI addr, low word */
  33. #define CPC700_PMM0_PCI_HIGH 0xff40000c /* PCI addr, high wd */
  34. /* CPU -> PCI memory window 1 */
  35. #define CPC700_PMM1_LOCAL 0xff400010
  36. #define CPC700_PMM1_MASK_ATTR 0xff400014
  37. #define CPC700_PMM1_PCI_LOW 0xff400018
  38. #define CPC700_PMM1_PCI_HIGH 0xff40001c
  39. /* CPU -> PCI memory window 2 */
  40. #define CPC700_PMM2_LOCAL 0xff400020
  41. #define CPC700_PMM2_MASK_ATTR 0xff400024
  42. #define CPC700_PMM2_PCI_LOW 0xff400028
  43. #define CPC700_PMM2_PCI_HIGH 0xff40002c
  44. /* PCI memory -> CPU window 1 */
  45. #define CPC700_PTM1_MEMSIZE 0xff400030 /* window size */
  46. #define CPC700_PTM1_LOCAL 0xff400034 /* CPU phys addr */
  47. /* PCI memory -> CPU window 2 */
  48. #define CPC700_PTM2_MEMSIZE 0xff400038 /* size and enable */
  49. #define CPC700_PTM2_LOCAL 0xff40003c
  50. /*
  51. * PIC Section
  52. *
  53. * IBM calls the CPC700's programmable interrupt controller the Universal
  54. * Interrupt Controller or UIC.
  55. */
  56. /*
  57. * UIC Register Addresses.
  58. */
  59. #define CPC700_UIC_UICSR 0xff500880 /* Status Reg (Rd/Clr)*/
  60. #define CPC700_UIC_UICSRS 0xff500884 /* Status Reg (Set) */
  61. #define CPC700_UIC_UICER 0xff500888 /* Enable Reg */
  62. #define CPC700_UIC_UICCR 0xff50088c /* Critical Reg */
  63. #define CPC700_UIC_UICPR 0xff500890 /* Polarity Reg */
  64. #define CPC700_UIC_UICTR 0xff500894 /* Trigger Reg */
  65. #define CPC700_UIC_UICMSR 0xff500898 /* Masked Status Reg */
  66. #define CPC700_UIC_UICVR 0xff50089c /* Vector Reg */
  67. #define CPC700_UIC_UICVCR 0xff5008a0 /* Vector Config Reg */
  68. #define CPC700_UIC_UICER_ENABLE 0x00000001 /* Enable an IRQ */
  69. #define CPC700_UIC_UICVCR_31_HI 0x00000000 /* IRQ 31 hi priority */
  70. #define CPC700_UIC_UICVCR_0_HI 0x00000001 /* IRQ 0 hi priority */
  71. #define CPC700_UIC_UICVCR_BASE_MASK 0xfffffffc
  72. #define CPC700_UIC_UICVCR_ORDER_MASK 0x00000001
  73. /* Specify value of a bit for an IRQ. */
  74. #define CPC700_UIC_IRQ_BIT(i) ((0x00000001) << (31 - (i)))
  75. /*
  76. * UIC Exports...
  77. */
  78. extern struct hw_interrupt_type cpc700_pic;
  79. extern unsigned int cpc700_irq_assigns[32][2];
  80. extern void __init cpc700_init_IRQ(void);
  81. extern int cpc700_get_irq(struct pt_regs *);
  82. #endif /* __PPC_SYSLIB_CPC700_H__ */