From owner-svn-src-all@freebsd.org Sun Jul 10 10:38:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F734B84A35; Sun, 10 Jul 2016 10:38:29 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483251818; Sun, 10 Jul 2016 10:38:29 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6AAcSGi001151; Sun, 10 Jul 2016 10:38:28 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6AAcS8t001149; Sun, 10 Jul 2016 10:38:28 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201607101038.u6AAcS8t001149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 10 Jul 2016 10:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302522 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2016 10:38:29 -0000 Author: jmcneill Date: Sun Jul 10 10:38:28 2016 New Revision: 302522 URL: https://svnweb.freebsd.org/changeset/base/302522 Log: Align descriptors and data buffers to 32 bits. This restriction is described in the A20 (and later) user manuals. Modified: head/sys/arm/allwinner/a10_mmc.c head/sys/arm/allwinner/a10_mmc.h Modified: head/sys/arm/allwinner/a10_mmc.c ============================================================================== --- head/sys/arm/allwinner/a10_mmc.c Sun Jul 10 10:21:22 2016 (r302521) +++ head/sys/arm/allwinner/a10_mmc.c Sun Jul 10 10:38:28 2016 (r302522) @@ -316,7 +316,8 @@ a10_mmc_setup_dma(struct a10_mmc_softc * /* Allocate the DMA descriptor memory. */ dma_desc_size = sizeof(struct a10_mmc_dma_desc) * A10_MMC_DMA_SEGS; - error = bus_dma_tag_create(bus_get_dma_tag(sc->a10_dev), 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->a10_dev), + A10_MMC_DMA_ALIGN, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, dma_desc_size, 1, dma_desc_size, 0, NULL, NULL, &sc->a10_dma_tag); if (error) @@ -334,7 +335,8 @@ a10_mmc_setup_dma(struct a10_mmc_softc * return (sc->a10_dma_map_err); /* Create the DMA map for data transfers. */ - error = bus_dma_tag_create(bus_get_dma_tag(sc->a10_dev), 1, 0, + error = bus_dma_tag_create(bus_get_dma_tag(sc->a10_dev), + A10_MMC_DMA_ALIGN, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, A10_MMC_DMA_MAX_SIZE * A10_MMC_DMA_SEGS, A10_MMC_DMA_SEGS, A10_MMC_DMA_MAX_SIZE, BUS_DMA_ALLOCNOW, NULL, NULL, Modified: head/sys/arm/allwinner/a10_mmc.h ============================================================================== --- head/sys/arm/allwinner/a10_mmc.h Sun Jul 10 10:21:22 2016 (r302521) +++ head/sys/arm/allwinner/a10_mmc.h Sun Jul 10 10:38:28 2016 (r302522) @@ -196,4 +196,7 @@ struct a10_mmc_dma_desc { uint32_t next; }; +/* DMA descriptors and data buffers must be aligned to 32-bits */ +#define A10_MMC_DMA_ALIGN 4 + #endif /* _A10_MMC_H_ */