Commit a59ca977 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'spi/topic/dspi' into spi-next

parents a35a1df6 05209f45
...@@ -264,6 +264,7 @@ config SPI_FSL_SPI ...@@ -264,6 +264,7 @@ config SPI_FSL_SPI
config SPI_FSL_DSPI config SPI_FSL_DSPI
tristate "Freescale DSPI controller" tristate "Freescale DSPI controller"
select SPI_BITBANG select SPI_BITBANG
depends on SOC_VF610 || COMPILE_TEST
help help
This enables support for the Freescale DSPI controller in master This enables support for the Freescale DSPI controller in master
mode. VF610 platform uses the controller. mode. VF610 platform uses the controller.
......
...@@ -108,7 +108,7 @@ struct fsl_dspi { ...@@ -108,7 +108,7 @@ struct fsl_dspi {
struct spi_bitbang bitbang; struct spi_bitbang bitbang;
struct platform_device *pdev; struct platform_device *pdev;
void *base; void __iomem *base;
int irq; int irq;
struct clk *clk; struct clk *clk;
...@@ -165,7 +165,7 @@ static void hz_to_spi_baud(char *pbr, char *br, int speed_hz, ...@@ -165,7 +165,7 @@ static void hz_to_spi_baud(char *pbr, char *br, int speed_hz,
} }
} }
pr_warn("Can not find valid buad rate,speed_hz is %d,clkrate is %ld\ pr_warn("Can not find valid baud rate,speed_hz is %d,clkrate is %ld\
,we use the max prescaler value.\n", speed_hz, clkrate); ,we use the max prescaler value.\n", speed_hz, clkrate);
*pbr = ARRAY_SIZE(pbr_tbl) - 1; *pbr = ARRAY_SIZE(pbr_tbl) - 1;
*br = ARRAY_SIZE(brs) - 1; *br = ARRAY_SIZE(brs) - 1;
...@@ -520,7 +520,6 @@ static int dspi_probe(struct platform_device *pdev) ...@@ -520,7 +520,6 @@ static int dspi_probe(struct platform_device *pdev)
clk_disable_unprepare(dspi->clk); clk_disable_unprepare(dspi->clk);
out_master_put: out_master_put:
spi_master_put(master); spi_master_put(master);
platform_set_drvdata(pdev, NULL);
return ret; return ret;
} }
...@@ -531,6 +530,7 @@ static int dspi_remove(struct platform_device *pdev) ...@@ -531,6 +530,7 @@ static int dspi_remove(struct platform_device *pdev)
/* Disconnect from the SPI framework */ /* Disconnect from the SPI framework */
spi_bitbang_stop(&dspi->bitbang); spi_bitbang_stop(&dspi->bitbang);
clk_disable_unprepare(dspi->clk);
spi_master_put(dspi->bitbang.master); spi_master_put(dspi->bitbang.master);
return 0; return 0;
...@@ -547,5 +547,5 @@ static struct platform_driver fsl_dspi_driver = { ...@@ -547,5 +547,5 @@ static struct platform_driver fsl_dspi_driver = {
module_platform_driver(fsl_dspi_driver); module_platform_driver(fsl_dspi_driver);
MODULE_DESCRIPTION("Freescale DSPI Controller Driver"); MODULE_DESCRIPTION("Freescale DSPI Controller Driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRIVER_NAME); MODULE_ALIAS("platform:" DRIVER_NAME);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment