From 76d9cc454a8d0bb7484616a4b8136280068c8a8b Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Mon, 10 Jan 2011 11:05:06 +0000 Subject: [PATCH 1/6] spi: tegra: don't treat NULL clk as an error Some platforms have been known to return NULL from clk_get() if they support only a single struct clk. Whilst tegra doesn't do this, make the drivers consistent with others. Signed-off-by: Jamie Iles Acked-by: Russell King Signed-off-by: Grant Likely --- drivers/spi/spi_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi_tegra.c b/drivers/spi/spi_tegra.c index bb7df02a5472..891e5909038c 100644 --- a/drivers/spi/spi_tegra.c +++ b/drivers/spi/spi_tegra.c @@ -513,7 +513,7 @@ static int __init spi_tegra_probe(struct platform_device *pdev) } tspi->clk = clk_get(&pdev->dev, NULL); - if (IS_ERR_OR_NULL(tspi->clk)) { + if (IS_ERR(tspi->clk)) { dev_err(&pdev->dev, "can not get clock\n"); ret = PTR_ERR(tspi->clk); goto err2; From 50c01fc355c6a97c511d58411f9bc0e4b8fc4659 Mon Sep 17 00:00:00 2001 From: Jamie Iles Date: Tue, 11 Jan 2011 12:43:52 +0000 Subject: [PATCH 2/6] spi/dw_spi: don't treat NULL clk as an error clk_get() returns a struct clk cookie to the driver and some platforms may return NULL if they only support a single clock. clk_get() has only failed if it returns a ERR_PTR() encoded pointer. Signed-off-by: Jamie Iles Signed-off-by: Grant Likely --- drivers/spi/dw_spi_mmio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/dw_spi_mmio.c b/drivers/spi/dw_spi_mmio.c index db35bd9c1b24..2fa012c109bc 100644 --- a/drivers/spi/dw_spi_mmio.c +++ b/drivers/spi/dw_spi_mmio.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -68,8 +69,8 @@ static int __devinit dw_spi_mmio_probe(struct platform_device *pdev) } dwsmmio->clk = clk_get(&pdev->dev, NULL); - if (!dwsmmio->clk) { - ret = -ENODEV; + if (IS_ERR(dwsmmio->clk)) { + ret = PTR_ERR(dwsmmio->clk); goto err_irq; } clk_enable(dwsmmio->clk); From 77e7bc6194655c36d43707ea53b4f86d1f1c8cf5 Mon Sep 17 00:00:00 2001 From: Yong Shen Date: Tue, 11 Jan 2011 17:21:53 +0800 Subject: [PATCH 3/6] spi/imx: Add i.MX53 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Change the Kconfig to include i.MX53 2. add devtype entry for i.MX53 Signed-off-by: Yong Shen Acked-by: Sascha Hauer Acked-by: Uwe Kleine-König Signed-off-by: Grant Likely --- drivers/spi/Kconfig | 4 ++-- drivers/spi/spi_imx.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 1906840c1113..879b2a974d64 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -156,10 +156,10 @@ config SPI_IMX_VER_0_4 def_bool y if ARCH_MX31 config SPI_IMX_VER_0_7 - def_bool y if ARCH_MX25 || ARCH_MX35 || ARCH_MX51 + def_bool y if ARCH_MX25 || ARCH_MX35 || ARCH_MX51 || ARCH_MX53 config SPI_IMX_VER_2_3 - def_bool y if ARCH_MX51 + def_bool y if ARCH_MX51 || ARCH_MX53 config SPI_IMX tristate "Freescale i.MX SPI controllers" diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 9469564e6888..1cf9d5faabf4 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -742,6 +742,12 @@ static struct platform_device_id spi_imx_devtype[] = { }, { .name = "imx51-ecspi", .driver_data = SPI_IMX_VER_2_3, + }, { + .name = "imx53-cspi", + .driver_data = SPI_IMX_VER_0_7, + }, { + .name = "imx53-ecspi", + .driver_data = SPI_IMX_VER_2_3, }, { /* sentinel */ } From c289ef41431144a538b5fb5f94fc83c81b3020e2 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 16 Nov 2010 14:33:52 -0600 Subject: [PATCH 4/6] mmc: sdhci-of: fix build on non-powerpc platforms Explicitly include err.h, of_address.h and of_irq.h. Make use of machine_is() conditional on PPC. Signed-off-by: Rob Herring Signed-off-by: Grant Likely --- drivers/mmc/host/sdhci-of-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index fa19d849a920..dd84124f4209 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c @@ -13,6 +13,7 @@ * your option) any later version. */ +#include #include #include #include @@ -20,8 +21,12 @@ #include #include #include +#include +#include #include +#ifdef CONFIG_PPC #include +#endif #include "sdhci-of.h" #include "sdhci.h" @@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np) return true; /* Old device trees don't have the wp-inverted property. */ +#ifdef CONFIG_PPC return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds); +#else + return false; +#endif } static int __devinit sdhci_of_probe(struct platform_device *ofdev, From 5f35765d836befebdfabf745fdbf2e070c887fac Mon Sep 17 00:00:00 2001 From: Abhilash Kesavan Date: Wed, 12 Jan 2011 15:00:23 +0900 Subject: [PATCH 5/6] spi: Enable SPI driver for S5P6440 and S5P6450 This patch enables the existing S3C64XX series SPI driver for S5P64X0 and removed dependency on EXPERIMENTAL because we don't need it now. v3: Changed dependency of S3C64XX_DMA v2: Removed dependency on EXPERIMENTAL Signed-off-by: Abhilash Kesavan Signed-off-by: Sangbeom Kim Acked-by: Jassi Brar Signed-off-by: Kukjin Kim Signed-off-by: Grant Likely --- drivers/spi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 879b2a974d64..13bfa9d48082 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -310,8 +310,8 @@ config SPI_S3C24XX_GPIO config SPI_S3C64XX tristate "Samsung S3C64XX series type SPI" - depends on ARCH_S3C64XX && EXPERIMENTAL - select S3C64XX_DMA + depends on (ARCH_S3C64XX || ARCH_S5P64X0) + select S3C64XX_DMA if ARCH_S3C64XX help SPI driver for Samsung S3C64XX and newer SoCs. From 94a1b6d8eb903818773ad24fe48529b0d295052d Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 13 Jan 2011 17:24:22 +0530 Subject: [PATCH 6/6] spi/amba-pl022: fixing compilation warning. clk_freq is used uninitialized in pl022_setup routine. This patch fix compilation warning for using uninitialized variable Signed-off-by: Viresh Kumar Acked-by: Linus Walleij Signed-off-by: Grant Likely --- drivers/spi/amba-pl022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index a2a5921c730a..71a1219a995d 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c @@ -1795,7 +1795,7 @@ static int pl022_setup(struct spi_device *spi) { struct pl022_config_chip const *chip_info; struct chip_data *chip; - struct ssp_clock_params clk_freq; + struct ssp_clock_params clk_freq = {0, }; int status = 0; struct pl022 *pl022 = spi_master_get_devdata(spi->master); unsigned int bits = spi->bits_per_word;