gsc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * drivers/parisc/gsc.h
  3. * Declarations for functions in gsc.c
  4. * Copyright (c) 2000-2002 Helge Deller, Matthew Wilcox
  5. *
  6. * Distributed under the terms of the GPL, version 2
  7. */
  8. #include <linux/interrupt.h>
  9. #include <asm/hardware.h>
  10. #include <asm/parisc-device.h>
  11. #define OFFSET_IRR 0x0000 /* Interrupt request register */
  12. #define OFFSET_IMR 0x0004 /* Interrupt mask register */
  13. #define OFFSET_IPR 0x0008 /* Interrupt pending register */
  14. #define OFFSET_ICR 0x000C /* Interrupt control register */
  15. #define OFFSET_IAR 0x0010 /* Interrupt address register */
  16. /* PA I/O Architected devices support at least 5 bits in the EIM register. */
  17. #define GSC_EIM_WIDTH 5
  18. struct gsc_irq {
  19. unsigned long txn_addr; /* IRQ "target" */
  20. int txn_data; /* HW "IRQ" */
  21. int irq; /* virtual IRQ */
  22. };
  23. struct gsc_asic {
  24. struct parisc_device *gsc;
  25. unsigned long hpa;
  26. char *name;
  27. int version;
  28. int type;
  29. int eim;
  30. int global_irq[32];
  31. };
  32. int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic);
  33. int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
  34. int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
  35. int gsc_assign_irq(struct irq_chip *type, void *data);
  36. int gsc_find_local_irq(unsigned int irq, int *global_irq, int limit);
  37. void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
  38. void (*choose)(struct parisc_device *child, void *ctrl));
  39. void gsc_asic_assign_irq(struct gsc_asic *asic, int local_irq, int *irqp);
  40. irqreturn_t gsc_asic_intr(int irq, void *dev);