1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

- 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.
This commit is contained in:
Marius Strobl 2007-01-20 14:06:01 +00:00
parent e499c6135c
commit e6770fff6b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166147

View File

@ -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 */