diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c index d62522e62c69..a75574072548 100644 --- a/sys/arm/arm/busdma_machdep-v6.c +++ b/sys/arm/arm/busdma_machdep-v6.c @@ -473,11 +473,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, bus_dma_tag_t newtag; int error = 0; -#if 0 - if (!parent) - parent = arm_root_dma_tag; -#endif - /* Basic sanity checking. */ KASSERT(boundary == 0 || powerof2(boundary), ("dma tag boundary %lu, must be a power of 2", boundary)); diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index d2f517a8d71d..f7e0e261a097 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -224,9 +224,6 @@ static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static void bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op, int bufaligned); -/* Default tag, as most drivers provide no parent tag. */ -bus_dma_tag_t arm_root_dma_tag; - /* * ---------------------------------------------------------------------------- * Begin block of code useful to transplant to other implementations. @@ -406,8 +403,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, int error = 0; /* Return a NULL tag on failure */ *dmat = NULL; - if (!parent) - parent = arm_root_dma_tag; newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_NOWAIT); if (newtag == NULL) { diff --git a/sys/arm/include/bus_dma.h b/sys/arm/include/bus_dma.h index 98803efd6b7f..ddf5504dbafd 100644 --- a/sys/arm/include/bus_dma.h +++ b/sys/arm/include/bus_dma.h @@ -94,8 +94,6 @@ struct arm32_dma_range { struct arm32_dma_range *bus_dma_get_range(void); int bus_dma_get_range_nb(void); -extern bus_dma_tag_t arm_root_dma_tag; - #endif /* _ARM32_BUS_DMA_PRIVATE */ #endif /* _ARM_BUS_DMA_H */ diff --git a/sys/arm/xscale/ixp425/ixp425_pci.c b/sys/arm/xscale/ixp425/ixp425_pci.c index 5a1321864621..9bda385cf8fd 100644 --- a/sys/arm/xscale/ixp425/ixp425_pci.c +++ b/sys/arm/xscale/ixp425/ixp425_pci.c @@ -135,14 +135,6 @@ ixppcib_attach(device_t dev) BUS_SPACE_MAXADDR, NULL, NULL, 0xffffffff, 0xff, 0xffffffff, 0, NULL, NULL, &sc->sc_dmat)) panic("couldn't create the PCI dma tag !"); - /* - * The PCI bus can only address 64MB. However, due to the way our - * implementation of busdma works, busdma can't tell if a device - * is a PCI device or not. So defaults to the PCI dma tag, which - * restrict the DMA'able memory to the first 64MB, and explicitely - * create less restrictive tags for non-PCI devices. - */ - arm_root_dma_tag = sc->sc_dmat; /* * Initialize the bus space tags. */ @@ -361,6 +353,14 @@ ixppcib_release_resource(device_t bus, device_t child, int type, int rid, return (ENXIO); } +static bus_dma_tag_t +ixppcib_get_dma_tag(device_t bus, device_t child) +{ + struct ixppcib_softc *sc = device_get_softc(bus); + + return (sc->sc_dmat); +} + static void ixppcib_conf_setup(struct ixppcib_softc *sc, int bus, int slot, int func, int reg) @@ -459,7 +459,7 @@ static device_method_t ixppcib_methods[] = { DEVMETHOD(bus_activate_resource, ixppcib_activate_resource), DEVMETHOD(bus_deactivate_resource, ixppcib_deactivate_resource), DEVMETHOD(bus_release_resource, ixppcib_release_resource), - /* DEVMETHOD(bus_get_dma_tag, ixppcib_get_dma_tag), */ + DEVMETHOD(bus_get_dma_tag, ixppcib_get_dma_tag), /* pcib interface */ DEVMETHOD(pcib_maxslots, ixppcib_maxslots),