summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ra5478@freescale.com>2010-12-15 13:50:09 -0600
committerRanjani Vaidyanathan <ra5478@freescale.com>2010-12-15 17:31:37 -0600
commit773170537241f88ac5c38fa6e827e487a9b400e7 (patch)
treeedd0cdfa473b5230e10f71aaf457be7407624a55
parentd27fdc7b98277b981a7f493b7d8256a4f3fe313b (diff)
ENGR00136939-1: SPI:Fix suspend/resume issue on MX50 RDP
Fixed the SPI driver suspend/resume code. The SPI driver was missing releasing the spin lock in certain conditions.In the resume code, the master bit needs to be set while re-enabling the spi. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
-rw-r--r--drivers/spi/mxc_spi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 93a66715e0c3..8e255f48bd7a 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -1199,6 +1199,7 @@ static int spi_bitbang_suspend(struct spi_bitbang *bitbang)
}
if (!list_empty(&bitbang->queue)) {
dev_err(&bitbang->master->dev, "queue didn't empty\n");
+ spin_unlock_irqrestore(&bitbang->lock, flags);
return -EBUSY;
}
spin_unlock_irqrestore(&bitbang->lock, flags);
@@ -1256,9 +1257,11 @@ static int mxc_spi_resume(struct platform_device *pdev)
spi_bitbang_resume(&master_drv_data->mxc_bitbang);
clk_enable(master_drv_data->clk);
- __raw_writel(master_drv_data->spi_ver_def->spi_enable,
- master_drv_data->base + MXC_CSPICTRL);
+ __raw_writel((master_drv_data->spi_ver_def->spi_enable +
+ master_drv_data->spi_ver_def->master_enable),
+ master_drv_data->base + MXC_CSPICTRL);
clk_disable(master_drv_data->clk);
+
return 0;
}
#else