aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-omap2-mcspi.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-01 08:49:06 -0400
committerMark Brown <broonie@linaro.org>2013-09-01 08:49:06 -0400
commit85cac431329bd09f7d30d489591d7af0d658b008 (patch)
tree8e81e687c9104c297b9d985e2c5f37f05a6e4b83 /drivers/spi/spi-omap2-mcspi.c
parent793b3cb6acc081e557dabcf11ce781d64dafb4d4 (diff)
parentb6460366fbadc160604f50047d0394c7fc39ceab (diff)
Merge remote-tracking branch 'spi/topic/qspi' into spi-next
Diffstat (limited to 'drivers/spi/spi-omap2-mcspi.c')
-rw-r--r--drivers/spi/spi-omap2-mcspi.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index fc190a5a0bad..ed4af4708d9a 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -335,23 +335,6 @@ static void omap2_mcspi_restore_ctx(struct omap2_mcspi *mcspi)
335 __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0); 335 __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0);
336} 336}
337 337
338static int omap2_prepare_transfer(struct spi_master *master)
339{
340 struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
341
342 pm_runtime_get_sync(mcspi->dev);
343 return 0;
344}
345
346static int omap2_unprepare_transfer(struct spi_master *master)
347{
348 struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
349
350 pm_runtime_mark_last_busy(mcspi->dev);
351 pm_runtime_put_autosuspend(mcspi->dev);
352 return 0;
353}
354
355static int mcspi_wait_for_reg_bit(void __iomem *reg, unsigned long bit) 338static int mcspi_wait_for_reg_bit(void __iomem *reg, unsigned long bit)
356{ 339{
357 unsigned long timeout; 340 unsigned long timeout;
@@ -1318,8 +1301,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
1318 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; 1301 master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
1319 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32); 1302 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
1320 master->setup = omap2_mcspi_setup; 1303 master->setup = omap2_mcspi_setup;
1321 master->prepare_transfer_hardware = omap2_prepare_transfer; 1304 master->auto_runtime_pm = true;
1322 master->unprepare_transfer_hardware = omap2_unprepare_transfer;
1323 master->transfer_one_message = omap2_mcspi_transfer_one_message; 1305 master->transfer_one_message = omap2_mcspi_transfer_one_message;
1324 master->cleanup = omap2_mcspi_cleanup; 1306 master->cleanup = omap2_mcspi_cleanup;
1325 master->dev.of_node = node; 1307 master->dev.of_node = node;