From 01c0ad58548fa1fa76379d1bea060f6e1d6ba2af Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 26 Oct 2007 17:47:34 +0100 Subject: [ARM] Fix an rpc_defconfig regression Fix: CC drivers/scsi/arm/powertec.o In file included from drivers/scsi/arm/powertec.c:29: drivers/scsi/arm/scsi.h: In function 'next_SCp': drivers/scsi/arm/scsi.h:42: error: 'struct scatterlist' has no member named 'page' drivers/scsi/arm/scsi.h: In function 'init_SCp': drivers/scsi/arm/scsi.h:80: error: 'struct scatterlist' has no member named 'page' Signed-off-by: Russell King --- drivers/scsi/arm/scsi.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers') 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) if (ret) { SCp->buffer++; SCp->buffers_residual--; - SCp->ptr = (char *) - (page_address(SCp->buffer->page) + - SCp->buffer->offset); + SCp->ptr = sg_virt(SCp->buffer); SCp->this_residual = SCp->buffer->length; } else { SCp->ptr = NULL; @@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt) SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer; SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; - SCpnt->SCp.ptr = (char *) - (page_address(SCpnt->SCp.buffer->page) + - SCpnt->SCp.buffer->offset); + SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer); SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length; SCpnt->SCp.phase = SCpnt->request_bufflen; -- cgit v1.2.3-59-g8ed1b From d8cb70d10a2d4e6b083b89044a68d860d0bf1eec Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 26 Oct 2007 17:56:40 +0100 Subject: [ARM] Fix pxamci regression Fix: WARNING: at arch/arm/mach-pxa/clock.c:69 clk_disable() [] (dump_stack+0x0/0x14) from [] (clk_disable+0x34/0xa0) [] (clk_disable+0x0/0xa0) from [] (pxamci_set_ios+0x74/0xf0) [] (pxamci_set_ios+0x0/0xf0) from [] (mmc_power_off+0x90/0x9c) [] (mmc_power_off+0x0/0x9c) from [] (mmc_start_host+0x18/0x28) [] (mmc_start_host+0x0/0x28) from [] (mmc_add_host+0xe8/0x104) [] (mmc_add_host+0x0/0x104) from [] (pxamci_probe+0x24c/0x2f4) [] (pxamci_probe+0x0/0x2f4) from [] (platform_drv_probe+0x20/0x24) ... Signed-off-by: Russell King --- drivers/mmc/host/pxamci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers') 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 @@ #define DRIVER_NAME "pxa2xx-mci" #define NR_SG 1 +#define CLKRT_OFF (~0) struct pxamci_host { struct mmc_host *mmc; @@ -371,6 +372,9 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) unsigned long rate = host->clkrate; unsigned int clk = rate / ios->clock; + if (host->clkrt == CLKRT_OFF) + clk_enable(host->clk); + /* * clk might result in a lower divisor than we * desire. check for that condition and adjust @@ -379,14 +383,16 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (rate / clk > ios->clock) clk <<= 1; host->clkrt = fls(clk) - 1; - clk_enable(host->clk); /* * we write clkrt on the next command */ } else { pxamci_stop_clock(host); - clk_disable(host->clk); + if (host->clkrt != CLKRT_OFF) { + host->clkrt = CLKRT_OFF; + clk_disable(host->clk); + } } if (host->power_mode != ios->power_mode) { @@ -498,6 +504,7 @@ static int pxamci_probe(struct platform_device *pdev) host->mmc = mmc; host->dma = -1; host->pdata = pdev->dev.platform_data; + host->clkrt = CLKRT_OFF; host->clk = clk_get(&pdev->dev, "MMCCLK"); if (IS_ERR(host->clk)) { -- cgit v1.2.3-59-g8ed1b