All pastes #1062881 Raw Edit

Diff

public text v1 · immutable
#1062881 ·published 2008-07-05 08:10 UTC
rendered paste body
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.cindex 65210fc..ba580d3 100644--- a/drivers/mmc/host/pxamci.c+++ b/drivers/mmc/host/pxamci.c@@ -114,6 +114,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) 	unsigned int nob = data->blocks; 	unsigned long long clks; 	unsigned int timeout;+	bool dalgn = 0; 	u32 dcmd; 	int i; @@ -152,6 +153,8 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) 		host->sg_cpu[i].dcmd = dcmd | length; 		if (length & 31 && !(data->flags & MMC_DATA_READ)) 			host->sg_cpu[i].dcmd |= DCMD_ENDIRQEN;+		if (sg_dma_address(&data->sg[i]) & 0x7)+			dalgn = 1; 		if (data->flags & MMC_DATA_READ) { 			host->sg_cpu[i].dsadr = host->res->start + MMC_RXFIFO; 			host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]);@@ -165,6 +168,11 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) 	host->sg_cpu[host->dma_len - 1].ddadr = DDADR_STOP; 	wmb(); +	if (dalgn) {+		pr_warning("PXAMCI: byte aligned DMA transfer\n");+		DALGN |= (1 << host->dma);+	} else+		DALGN &= (1 << host->dma); 	DDADR(host->dma) = host->sg_dma; 	DCSR(host->dma) = DCSR_RUN; }