ioasicvar.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* $OpenBSD: ioasicvar.h,v 1.10 2009/11/07 23:01:38 miod Exp $ */
  2. /* $NetBSD: ioasicvar.h,v 1.14 2000/10/17 09:45:49 nisimura Exp $ */
  3. /*
  4. * Copyright (c) 1995 Carnegie-Mellon University.
  5. * All rights reserved.
  6. *
  7. * Author: Chris G. Demetriou
  8. *
  9. * Permission to use, copy, modify and distribute this software and
  10. * its documentation is hereby granted, provided that both the copyright
  11. * notice and this permission notice appear in all copies of the
  12. * software, derivative works or modified versions, and any portions
  13. * thereof, and that both notices appear in supporting documentation.
  14. *
  15. * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  16. * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
  17. * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  18. *
  19. * Carnegie Mellon requests users of this software to return to
  20. *
  21. * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
  22. * School of Computer Science
  23. * Carnegie Mellon University
  24. * Pittsburgh PA 15213-3890
  25. *
  26. * any improvements or extensions that they make and grant Carnegie the
  27. * rights to redistribute these changes.
  28. */
  29. #ifndef _DEV_TC_IOASICVAR_H_
  30. #define _DEV_TC_IOASICVAR_H_
  31. struct ioasic_dev {
  32. char *iad_modname;
  33. tc_offset_t iad_offset;
  34. void *iad_cookie;
  35. u_int32_t iad_intrbits;
  36. };
  37. struct ioasicdev_attach_args {
  38. char iada_modname[TC_ROM_LLEN + 1];
  39. tc_offset_t iada_offset;
  40. tc_addr_t iada_addr;
  41. void *iada_cookie;
  42. };
  43. /* Device locators. */
  44. #define ioasiccf_offset cf_loc[0] /* offset */
  45. #define IOASIC_OFFSET_UNKNOWN -1
  46. struct ioasic_softc {
  47. struct device sc_dv;
  48. bus_space_tag_t sc_bst;
  49. bus_space_handle_t sc_bsh;
  50. bus_dma_tag_t sc_dmat;
  51. tc_addr_t sc_base; /* XXX offset XXX */
  52. };
  53. extern struct cfdriver ioasic_cd;
  54. /*
  55. * XXX Some drivers need direct access to IOASIC registers.
  56. */
  57. extern tc_addr_t ioasic_base;
  58. void ioasic_intr_establish(struct device *, void *,
  59. int, int (*)(void *), void *, const char *);
  60. void ioasic_intr_disestablish(struct device *, void *);
  61. int ioasic_submatch(void *, struct ioasicdev_attach_args *);
  62. void ioasic_attach_devs(struct ioasic_softc *,
  63. struct ioasic_dev *, int);
  64. void ioasic_led_blink(void *);
  65. #endif /* _DEV_TC_IOASICVAR_ */