Date: Wed, 13 Dec 2006 18:55:19 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111642 for review Message-ID: <200612131855.kBDItJdN001084@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111642 Change 111642 by imp@imp_paco-paco on 2006/12/13 18:55:09 use bus_dma_get_tag(dev) Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91_mci.c#27 edit .. //depot/projects/arm/src/sys/arm/at91/at91_spi.c#15 edit .. //depot/projects/arm/src/sys/arm/at91/at91_ssc.c#21 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91_mci.c#27 (text+ko) ==== @@ -175,9 +175,9 @@ /* * Allocate DMA tags and maps */ - err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, MAXPHYS, 1, MAXPHYS, - BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag); + err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MAXPHYS, + 1, MAXPHYS, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag); if (err != 0) goto out; ==== //depot/projects/arm/src/sys/arm/at91/at91_spi.c#15 (text+ko) ==== @@ -95,11 +95,11 @@ goto out; /* - * Allocate DMA tags and maps + * Allocate DMA tags and maps XXX should be larger than 10k? */ - err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, 1024 * 10, 1, 1024 * 10, - BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag); + err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 1024 * 10, + 1, 1024 * 10, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag); if (err != 0) goto out; for (i = 0; i < 4; i++) { @@ -208,6 +208,8 @@ int i, j, rxdone, err, mode[4]; bus_addr_t addr; + // XXX need to check to make sure that we don't exceed 10k + // size that we define for tags above. sc = device_get_softc(dev); WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS); i = 0; ==== //depot/projects/arm/src/sys/arm/at91/at91_ssc.c#21 (text+ko) ==== @@ -192,9 +192,9 @@ /* * Allocate DMA tags and maps */ - err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, 2048, 1, 2048, BUS_DMA_ALLOCNOW, - busdma_lock_mutex, &sc->sc_mtx, &sc->tag); + err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 2048, 1, + 2048, BUS_DMA_ALLOCNOW, busdma_lock_mutex, &sc->sc_mtx, &sc->tag); if (err != 0) goto out; err = bus_dmamap_create(sc->tag, 0, &sc->tx_map);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612131855.kBDItJdN001084>