The .direction field of the config passed to dmaengine_slave_config() must be set in order to make the generic code store the configured bus width. Without this patch, I keep getting the following error on a AM33xx board: [ 1.963144] edma-dma-engine edma-dma-engine.0: Undefined slave buswidth [ 1.970158] omap_hsmmc mmc.4: prep_slave_sg() failed [ 1.975454] mmc1: error -1 whilst initialising SD card Signed-off-by: Daniel Mack <zonque@xxxxxxxxx> Cc: Venkatraman S <svenkatr@xxxxxx> Cc: Chris Ball <cjb@xxxxxxxxxx> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx> Cc: Rob Herring <rob.herring@xxxxxxxxxxx> Cc: linux-omap@xxxxxxxxxxxxxxx Cc: Matt Porter <mporter@xxxxxx> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> --- drivers/mmc/host/omap_hsmmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4b70823..2c57b0d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1260,6 +1260,8 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; cfg.src_maxburst = data->blksz / 4; cfg.dst_maxburst = data->blksz / 4; + cfg.direction = data->flags & MMC_DATA_WRITE ? + DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; ret = dmaengine_slave_config(chan, &cfg); if (ret) @@ -1270,8 +1272,8 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, return ret; tx = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len, - data->flags & MMC_DATA_WRITE ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); + cfg.direction, + DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!tx) { dev_err(mmc_dev(host->mmc), "prep_slave_sg() failed\n"); /* FIXME: cleanup */ -- 1.7.11.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html