Re: [PATCH v4][mmc/host]:Blackfin SD Host Controller Driver

From: Mike Frysinger
Date: Thu Dec 03 2009 - 21:09:26 EST


On Wed, Nov 25, 2009 at 17:04, Andrew Morton wrote:
> --- a/drivers/mmc/host/bfin_sdh.c~blackfin-sd-host-controller-driver-fix
> +++ a/drivers/mmc/host/bfin_sdh.c
> @@ -149,15 +149,17 @@ static int sdh_setup_data(struct sdh_hos
> Â Â Â Âsdh_enable_stat_irq(host, (DAT_CRC_FAIL | DAT_TIME_OUT | DAT_END));
> Â Â Â Âhost->dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma_dir);
> Â#if defined(CONFIG_BF54x)
> - Â Â Â int i;
> Â Â Â Âdma_cfg |= DMAFLOW_ARRAY | NDSIZE_5 | RESTART | WDSIZE_32 | DMAEN;
> - Â Â Â for_each_sg(data->sg, sg, host->dma_len, i) {
> - Â Â Â Â Â Â Â host->sg_cpu[i].start_addr = sg_dma_address(sg);
> - Â Â Â Â Â Â Â host->sg_cpu[i].cfg = dma_cfg;
> - Â Â Â Â Â Â Â host->sg_cpu[i].x_count = sg_dma_len(sg) / 4;
> - Â Â Â Â Â Â Â host->sg_cpu[i].x_modify = 4;
> - Â Â Â Â Â Â Â dev_dbg(mmc_dev(host->mmc), "%d: start_addr:0x%lx, cfg:0x%x, x_count:0x%x,\
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â x_modify:0x%x\n", i, host->sg_cpu[i].start_addr,
> + Â Â Â {
> + Â Â Â Â Â Â Â int i;
> + Â Â Â Â Â Â Â for_each_sg(data->sg, sg, host->dma_len, i) {
> + Â Â Â Â Â Â Â Â Â Â Â host->sg_cpu[i].start_addr = sg_dma_address(sg);
> + Â Â Â Â Â Â Â Â Â Â Â host->sg_cpu[i].cfg = dma_cfg;
> + Â Â Â Â Â Â Â Â Â Â Â host->sg_cpu[i].x_count = sg_dma_len(sg) / 4;
> + Â Â Â Â Â Â Â Â Â Â Â host->sg_cpu[i].x_modify = 4;
> + Â Â Â Â Â Â Â Â Â Â Â dev_dbg(mmc_dev(host->mmc), "%d: start_addr:0x%lx, "
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â "cfg:0x%x, x_count:0x%x, x_modify:0x%x\n",
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â i, host->sg_cpu[i].start_addr,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âhost->sg_cpu[i].cfg, host->sg_cpu[i].x_count,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âhost->sg_cpu[i].x_modify);
> Â Â Â Â}

this change also has an error in it ... the new opening brace brace
stole the closing brace from the for_each_sg()
-mike
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_