diff options
author | ian <ian@FreeBSD.org> | 2015-11-02 22:49:39 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2015-11-02 22:49:39 +0000 |
commit | 4070a7c2a03ef5837cb99a2aa4f6ad9ff332ecfe (patch) | |
tree | 3be930e3ae1578d0dbb2994e705742fe28f8b98c /sys/arm/xscale | |
parent | ac99afcf9666808d9ff0d10f5f7c9ffca374bc97 (diff) | |
download | FreeBSD-src-4070a7c2a03ef5837cb99a2aa4f6ad9ff332ecfe.zip FreeBSD-src-4070a7c2a03ef5837cb99a2aa4f6ad9ff332ecfe.tar.gz |
Eliminate the last dregs of the old global arm_root_dma_tag.
In the old days, device drivers passed NULL for the parent tag when creating
a new tag, and on arm platforms that resulted in a global tag representing
overall platform constraints being substituted in the busdma code. Now all
drivers use bus_get_dma_tag() and if there is a need to represent overall
platform constraints they will be inherited from a tag supplied by nexus or
some bus driver in the hierarchy.
The only arm platforms still relying on the old global-tag scheme were some
xscale boards with special PCI-bus constraints. This change provides those
constraints through a tag supplied by the xscale PCI bus driver, and
eliminates the few remaining references to the old global var.
Reviewed by: cognet
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425_pci.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arm/xscale/ixp425/ixp425_pci.c b/sys/arm/xscale/ixp425/ixp425_pci.c index 5a13218..9bda385 100644 --- a/sys/arm/xscale/ixp425/ixp425_pci.c +++ b/sys/arm/xscale/ixp425/ixp425_pci.c @@ -136,14 +136,6 @@ ixppcib_attach(device_t dev) 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. */ ixp425_io_bs_init(&sc->sc_pci_iot, sc); @@ -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), |