diff options
author | marius <marius@FreeBSD.org> | 2007-01-20 14:06:01 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2007-01-20 14:06:01 +0000 |
commit | 46318caabd50a4e13bc4118de6bbb51f8a5b490b (patch) | |
tree | bb7bc4037edd40ef6bdd2b046c818679f77f6529 /sys/sparc64 | |
parent | 49f7e5db025070cecd3ea04c77a927c2678037f0 (diff) | |
download | FreeBSD-src-46318caabd50a4e13bc4118de6bbb51f8a5b490b.zip FreeBSD-src-46318caabd50a4e13bc4118de6bbb51f8a5b490b.tar.gz |
- Use bus_get_dma_tag() to obtain the parent DMA tag so dma(4) will
work when we start requiring this.
- Don't specify an alignment when creating our own parent DMA tag;
the supported DMA engines require no alignment constraint (f.e. the
LANCE child does though) and it's no inherited by the child DMA
tags anyway (which probably is a bug though).
- Fix whitespace nits.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sbus/dma_sbus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sparc64/sbus/dma_sbus.c b/sys/sparc64/sbus/dma_sbus.c index 20cd9d5..2b10562 100644 --- a/sys/sparc64/sbus/dma_sbus.c +++ b/sys/sparc64/sbus/dma_sbus.c @@ -113,7 +113,7 @@ static void dma_destroy_dinfo(struct dma_devinfo *); static int dma_print_res(struct dma_devinfo *); static device_method_t dma_methods[] = { - /* Device interface */ + /* Device interface */ DEVMETHOD(device_probe, dma_probe), DEVMETHOD(device_attach, dma_attach), DEVMETHOD(device_shutdown, bus_generic_shutdown), @@ -159,10 +159,10 @@ dma_probe(device_t dev) name = ofw_bus_get_name(dev); if (strcmp(name, "espdma") == 0 || strcmp(name, "dma") == 0 || strcmp(name, "ledma") == 0) { - device_set_desc_copy(dev, name); - return (0); + device_set_desc_copy(dev, name); + return (0); } - return (ENXIO); + return (ENXIO); } static int @@ -228,8 +228,8 @@ dma_attach(device_t dev) } error = bus_dma_tag_create( - NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, boundary */ + bus_get_dma_tag(dev), /* parent */ + 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ |