Align descriptors and data buffers to 32 bits. This restriction is
described in the A20 (and later) user manuals.
This commit is contained in:
parent
4e3ae1e52c
commit
6b3911b95d
@ -316,7 +316,8 @@ a10_mmc_setup_dma(struct a10_mmc_softc *sc)
|
||||
|
||||
/* 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 *sc)
|
||||
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,
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user