diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-08-10 07:48:46 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-08-10 07:48:46 +0000 |
commit | ed34835726c8a340bb361b8410525a60129a3f08 (patch) | |
tree | b2884e2862fd1323fcb51bdc908e44f1b9c58eba /sys | |
parent | ff15eee627d66e8dbd2c70669b6afa904644af41 (diff) |
give mace some dma; pefo@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sgi/include/autoconf.h | 3 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macebus.c | 21 |
2 files changed, 22 insertions, 2 deletions
diff --git a/sys/arch/sgi/include/autoconf.h b/sys/arch/sgi/include/autoconf.h index 046b369c77c..58cccfae3be 100644 --- a/sys/arch/sgi/include/autoconf.h +++ b/sys/arch/sgi/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.2 2004/08/09 14:57:26 pefo Exp $ */ +/* $OpenBSD: autoconf.h,v 1.3 2004/08/10 07:48:45 mickey Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -121,6 +121,7 @@ struct confargs { struct abus *ca_bus; /* Bus device resides on. */ bus_space_tag_t ca_iot; bus_space_tag_t ca_memt; + bus_dma_tag_t ca_dmat; u_int32_t ca_num; /* which system */ u_int32_t ca_sys; /* which system */ int ca_nreg; diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index e2e6897c195..2b53c663699 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macebus.c,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: macebus.c,v 1.2 2004/08/10 07:48:45 mickey Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) @@ -108,6 +108,23 @@ bus_space_t crimebus_tag = { bus_space_handle_t crime_h; bus_space_handle_t mace_h; +struct machine_bus_dma_tag mace_bus_dma_tag = { + NULL, /* _cookie */ + _dmamap_create, + _dmamap_destroy, + _dmamap_load, + _dmamap_load_mbuf, + _dmamap_load_uio, + _dmamap_load_raw, + _dmamap_unload, + _dmamap_sync, + _dmamem_alloc, + _dmamem_free, + _dmamem_map, + _dmamem_unmap, + _dmamem_mmap, + NULL +}; /* * Match bus only to targets which have this bus. @@ -170,6 +187,7 @@ macebusscan(struct device *parent, void *child, void *args) lba.ca_num = dev->dv_unit; lba.ca_iot = &macebus_tag; lba.ca_memt = &macebus_tag; + lba.ca_dmat = &mace_bus_dma_tag; return (*cf->cf_attach->ca_match)(parent, cf, &lba); } @@ -242,6 +260,7 @@ macebusattach(parent, self, aux) lba.ca_bus->ab_matchname = NULL; lba.ca_iot = &macebus_tag; lba.ca_memt = &macebus_tag; + lba.ca_dmat = &mace_bus_dma_tag; /* * On O2 systems all interrupts are handled by the |