aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-31 16:40:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-31 16:40:29 -0400
commit57eb06e584be3b702d1ba5c39e0b57ddcdabdc66 (patch)
tree2b438f438748ff0c9dec86ee44cfb615f7ccee46 /drivers
parent2ed45b07c957e37db88d7d3696b63eb79b0ef5ef (diff)
parent558de8a74efe37a4b5e2ef944da17d23e701dd98 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4634/1: DaVinci GPIO header build fix [ARM] 4636/1: pxa: add default configuration for zylonite [ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.com [ARM] Fix assignment instead of condition in arm/mach-omap2/clock.c [ARM] nommu: fix breakage caused by f9720205d1f847cb59e197e851b5276425363f6b [ARM] pxa: shut up CLOCK_EVT_MODE_RESUME warning [ARM] Fix FIQ issue with ARM926 [ARM] Fix pxamci regression [ARM] Fix netx_defconfig regression [ARM] Fix ateb9200_defconfig build regression [ARM] Fix an rpc_defconfig regression [ARM] Fix omap_h2_1610_defconfig regressions [ARM] 4632/1: Fix a typo in include/asm-arm/plat-s3c/regs-nand.h
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/pxamci.c11
-rw-r--r--drivers/scsi/arm/scsi.h8
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index a25ee71998a9..1654a3330340 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -39,6 +39,7 @@
39#define DRIVER_NAME "pxa2xx-mci" 39#define DRIVER_NAME "pxa2xx-mci"
40 40
41#define NR_SG 1 41#define NR_SG 1
42#define CLKRT_OFF (~0)
42 43
43struct pxamci_host { 44struct pxamci_host {
44 struct mmc_host *mmc; 45 struct mmc_host *mmc;
@@ -371,6 +372,9 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
371 unsigned long rate = host->clkrate; 372 unsigned long rate = host->clkrate;
372 unsigned int clk = rate / ios->clock; 373 unsigned int clk = rate / ios->clock;
373 374
375 if (host->clkrt == CLKRT_OFF)
376 clk_enable(host->clk);
377
374 /* 378 /*
375 * clk might result in a lower divisor than we 379 * clk might result in a lower divisor than we
376 * desire. check for that condition and adjust 380 * desire. check for that condition and adjust
@@ -379,14 +383,16 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
379 if (rate / clk > ios->clock) 383 if (rate / clk > ios->clock)
380 clk <<= 1; 384 clk <<= 1;
381 host->clkrt = fls(clk) - 1; 385 host->clkrt = fls(clk) - 1;
382 clk_enable(host->clk);
383 386
384 /* 387 /*
385 * we write clkrt on the next command 388 * we write clkrt on the next command
386 */ 389 */
387 } else { 390 } else {
388 pxamci_stop_clock(host); 391 pxamci_stop_clock(host);
389 clk_disable(host->clk); 392 if (host->clkrt != CLKRT_OFF) {
393 host->clkrt = CLKRT_OFF;
394 clk_disable(host->clk);
395 }
390 } 396 }
391 397
392 if (host->power_mode != ios->power_mode) { 398 if (host->power_mode != ios->power_mode) {
@@ -498,6 +504,7 @@ static int pxamci_probe(struct platform_device *pdev)
498 host->mmc = mmc; 504 host->mmc = mmc;
499 host->dma = -1; 505 host->dma = -1;
500 host->pdata = pdev->dev.platform_data; 506 host->pdata = pdev->dev.platform_data;
507 host->clkrt = CLKRT_OFF;
501 508
502 host->clk = clk_get(&pdev->dev, "MMCCLK"); 509 host->clk = clk_get(&pdev->dev, "MMCCLK");
503 if (IS_ERR(host->clk)) { 510 if (IS_ERR(host->clk)) {
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
index 21ba57155bea..bb6550e31926 100644
--- a/drivers/scsi/arm/scsi.h
+++ b/drivers/scsi/arm/scsi.h
@@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
38 if (ret) { 38 if (ret) {
39 SCp->buffer++; 39 SCp->buffer++;
40 SCp->buffers_residual--; 40 SCp->buffers_residual--;
41 SCp->ptr = (char *) 41 SCp->ptr = sg_virt(SCp->buffer);
42 (page_address(SCp->buffer->page) +
43 SCp->buffer->offset);
44 SCp->this_residual = SCp->buffer->length; 42 SCp->this_residual = SCp->buffer->length;
45 } else { 43 } else {
46 SCp->ptr = NULL; 44 SCp->ptr = NULL;
@@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
76 74
77 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer; 75 SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
78 SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; 76 SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
79 SCpnt->SCp.ptr = (char *) 77 SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
80 (page_address(SCpnt->SCp.buffer->page) +
81 SCpnt->SCp.buffer->offset);
82 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; 78 SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
83 SCpnt->SCp.phase = SCpnt->request_bufflen; 79 SCpnt->SCp.phase = SCpnt->request_bufflen;
84 80