From owner-p4-projects@FreeBSD.ORG Wed Dec 13 18:57:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65E4F16A4B3; Wed, 13 Dec 2006 18:57:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17A2416A492 for ; Wed, 13 Dec 2006 18:57:42 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 981A843D9B for ; Wed, 13 Dec 2006 18:54:12 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kBDItJCx001090 for ; Wed, 13 Dec 2006 18:55:19 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kBDItJdN001084 for perforce@freebsd.org; Wed, 13 Dec 2006 18:55:19 GMT (envelope-from imp@freebsd.org) Date: Wed, 13 Dec 2006 18:55:19 GMT Message-Id: <200612131855.kBDItJdN001084@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 111642 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 18:57:42 -0000 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);