isa_machdep.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* $OpenBSD: isa_machdep.h,v 1.2 2010/05/08 21:59:56 miod Exp $ */
  2. /*
  3. * Copyright (c) 2007 Miodrag Vallat.
  4. *
  5. * Permission to use, copy, modify, and distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice, this permission notice, and the disclaimer below
  8. * appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _MACHINE_ISA_MACHDEP_H_
  19. #define _MACHINE_ISA_MACHDEP_H_
  20. #include <machine/bus.h>
  21. #define __NO_ISA_INTR_CHECK
  22. typedef struct mips_isa_chipset *isa_chipset_tag_t;
  23. struct mips_isa_chipset {
  24. void *ic_v;
  25. void (*ic_attach_hook)(struct device *, struct device *,
  26. struct isabus_attach_args *);
  27. void *(*ic_intr_establish)(void *, int, int, int, int (*)(void *),
  28. void *, char *);
  29. void (*ic_intr_disestablish)(void *, void *);
  30. };
  31. #define isa_attach_hook(p, s, iba) \
  32. (*(iba)->iba_ic->ic_attach_hook)((p), (s), (iba))
  33. #define isa_intr_establish(c, i, t, l, f, a, n) \
  34. (*(c)->ic_intr_establish)((c)->ic_v, (i), (t), (l), (f), (a), (n))
  35. #define isa_intr_disestablish(c, h) \
  36. (*(c)->ic_intr_disestablish)((c)->ic_v, (h))
  37. void loongson_generic_isa_attach_hook(struct device *, struct device *,
  38. struct isabus_attach_args *);
  39. void loongson_isa_specific_eoi(int);
  40. void loongson_set_isa_imr(uint);
  41. #endif