summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/schizo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc64/dev/schizo.c')
-rw-r--r--sys/arch/sparc64/dev/schizo.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c
index b8ae049f7cd..10b2e3287e5 100644
--- a/sys/arch/sparc64/dev/schizo.c
+++ b/sys/arch/sparc64/dev/schizo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schizo.c,v 1.52 2007/11/13 15:51:59 kettenis Exp $ */
+/* $OpenBSD: schizo.c,v 1.53 2008/01/19 11:13:43 kettenis Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -85,6 +85,9 @@ bus_space_tag_t schizo_alloc_bus_tag(struct schizo_pbm *, const char *,
int, int, int);
bus_dma_tag_t schizo_alloc_dma_tag(struct schizo_pbm *);
+pcireg_t schizo_conf_read(pci_chipset_tag_t, pcitag_t, int);
+void schizo_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t);
+
int schizo_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
int schizo_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t,
bus_size_t, int, bus_space_handle_t *);
@@ -223,6 +226,8 @@ schizo_init(struct schizo_softc *sc, int busa)
pba.pba_dmat = pbm->sp_dmat;
pba.pba_memt = pbm->sp_memt;
pba.pba_iot = pbm->sp_iot;
+ pba.pba_pc->conf_read = schizo_conf_read;
+ pba.pba_pc->conf_write = schizo_conf_write;
pba.pba_pc->intr_map = schizo_intr_map;
free(busranges, M_DEVBUF);
@@ -433,6 +438,20 @@ schizo_print(void *aux, const char *p)
return (QUIET);
}
+pcireg_t
+schizo_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)
+{
+ return (bus_space_read_4(pc->bustag, pc->bushandle,
+ PCITAG_OFFSET(tag) + reg));
+}
+
+void
+schizo_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data)
+{
+ bus_space_write_4(pc->bustag, pc->bushandle,
+ PCITAG_OFFSET(tag) + reg, data);
+}
+
/*
* Bus-specific interrupt mapping
*/