From 68cb700c59fae6cd539c9dc1e9f2584f671935a0 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 31 Aug 2012 17:04:35 -0700 Subject: ARM: OMAP1: Move SoC specific headers from plat to mach for omap1 There's no need to have these in plat-omap any longer. Note that these could eventually be made local to mach-omap1 instead of being in mach. But to do that, at least various driver access using omap7xxx.h registers needs to be fixed first. Cc: spi-devel-general@lists.sourceforge.net Cc: Grant Likely Signed-off-by: Tony Lindgren --- drivers/spi/spi-omap-uwire.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/spi') diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 9b0d71696039..a3996a1c6345 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -53,7 +53,8 @@ #include #include -#include /* OMAP7XX_IO_CONF registers */ + +#include /* OMAP7XX_IO_CONF registers */ /* FIXME address is now a platform device resource, -- cgit v1.2.3 From 5bd27611818920b29597eb01ca11f079280cf218 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 16 Aug 2012 04:13:16 +0000 Subject: spi: tegra: remove support of legacy DMA driver based access Remove the support code which uses the legacy APB DMA driver for accessing the SPI FIFO. The driver will use the dmaengine based APB DMA driver for accessing reqding/writing to SPI FIFO. Signed-off-by: Laxman Dewangan Signed-off-by: Stephen Warren Acked-by: Mark Brown --- drivers/spi/Kconfig | 2 +- drivers/spi/spi-tegra.c | 55 +------------------------------------------------ 2 files changed, 2 insertions(+), 55 deletions(-) (limited to 'drivers/spi') diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 5f84b5563c2d..2d198a01a410 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -366,7 +366,7 @@ config SPI_STMP3XXX config SPI_TEGRA tristate "Nvidia Tegra SPI controller" - depends on ARCH_TEGRA && (TEGRA_SYSTEM_DMA || TEGRA20_APB_DMA) + depends on ARCH_TEGRA && TEGRA20_APB_DMA help SPI driver for NVidia Tegra SoCs diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c index ef52c1c6f5c5..488d9b6e9cbe 100644 --- a/drivers/spi/spi-tegra.c +++ b/drivers/spi/spi-tegra.c @@ -164,23 +164,15 @@ struct spi_tegra_data { * for the generic case. */ int dma_req_len; -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - struct tegra_dma_req rx_dma_req; - struct tegra_dma_channel *rx_dma; -#else struct dma_chan *rx_dma; struct dma_slave_config sconfig; struct dma_async_tx_descriptor *rx_dma_desc; dma_cookie_t rx_cookie; -#endif u32 *rx_bb; dma_addr_t rx_bb_phys; }; -#if !defined(CONFIG_TEGRA_SYSTEM_DMA) static void tegra_spi_rx_dma_complete(void *args); -#endif - static inline unsigned long spi_tegra_readl(struct spi_tegra_data *tspi, unsigned long reg) { @@ -204,10 +196,6 @@ static void spi_tegra_go(struct spi_tegra_data *tspi) val &= ~SLINK_DMA_BLOCK_SIZE(~0) & ~SLINK_DMA_EN; val |= SLINK_DMA_BLOCK_SIZE(tspi->dma_req_len / 4 - 1); spi_tegra_writel(tspi, val, SLINK_DMA_CTL); -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - tspi->rx_dma_req.size = tspi->dma_req_len; - tegra_dma_enqueue_req(tspi->rx_dma, &tspi->rx_dma_req); -#else tspi->rx_dma_desc = dmaengine_prep_slave_single(tspi->rx_dma, tspi->rx_bb_phys, tspi->dma_req_len, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT); @@ -219,7 +207,6 @@ static void spi_tegra_go(struct spi_tegra_data *tspi) tspi->rx_dma_desc->callback_param = tspi; tspi->rx_cookie = dmaengine_submit(tspi->rx_dma_desc); dma_async_issue_pending(tspi->rx_dma); -#endif val |= SLINK_DMA_EN; spi_tegra_writel(tspi, val, SLINK_DMA_CTL); @@ -405,19 +392,12 @@ static void handle_spi_rx_dma_complete(struct spi_tegra_data *tspi) spin_unlock_irqrestore(&tspi->lock, flags); } -#if defined(CONFIG_TEGRA_SYSTEM_DMA) -static void tegra_spi_rx_dma_complete(struct tegra_dma_req *req) -{ - struct spi_tegra_data *tspi = req->dev; - handle_spi_rx_dma_complete(tspi); -} -#else + static void tegra_spi_rx_dma_complete(void *args) { struct spi_tegra_data *tspi = args; handle_spi_rx_dma_complete(tspi); } -#endif static int spi_tegra_setup(struct spi_device *spi) { @@ -509,9 +489,7 @@ static int __devinit spi_tegra_probe(struct platform_device *pdev) struct spi_tegra_data *tspi; struct resource *r; int ret; -#if !defined(CONFIG_TEGRA_SYSTEM_DMA) dma_cap_mask_t mask; -#endif master = spi_alloc_master(&pdev->dev, sizeof *tspi); if (master == NULL) { @@ -563,14 +541,6 @@ static int __devinit spi_tegra_probe(struct platform_device *pdev) INIT_LIST_HEAD(&tspi->queue); -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - tspi->rx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT); - if (!tspi->rx_dma) { - dev_err(&pdev->dev, "can not allocate rx dma channel\n"); - ret = -ENODEV; - goto err3; - } -#else dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); tspi->rx_dma = dma_request_channel(mask, NULL, NULL); @@ -580,8 +550,6 @@ static int __devinit spi_tegra_probe(struct platform_device *pdev) goto err3; } -#endif - tspi->rx_bb = dma_alloc_coherent(&pdev->dev, sizeof(u32) * BB_LEN, &tspi->rx_bb_phys, GFP_KERNEL); if (!tspi->rx_bb) { @@ -590,17 +558,6 @@ static int __devinit spi_tegra_probe(struct platform_device *pdev) goto err4; } -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - tspi->rx_dma_req.complete = tegra_spi_rx_dma_complete; - tspi->rx_dma_req.to_memory = 1; - tspi->rx_dma_req.dest_addr = tspi->rx_bb_phys; - tspi->rx_dma_req.dest_bus_width = 32; - tspi->rx_dma_req.source_addr = tspi->phys + SLINK_RX_FIFO; - tspi->rx_dma_req.source_bus_width = 32; - tspi->rx_dma_req.source_wrap = 4; - tspi->rx_dma_req.req_sel = spi_tegra_req_sels[pdev->id]; - tspi->rx_dma_req.dev = tspi; -#else /* Dmaengine Dma slave config */ tspi->sconfig.src_addr = tspi->phys + SLINK_RX_FIFO; tspi->sconfig.dst_addr = tspi->phys + SLINK_RX_FIFO; @@ -616,7 +573,6 @@ static int __devinit spi_tegra_probe(struct platform_device *pdev) ret); goto err4; } -#endif master->dev.of_node = pdev->dev.of_node; ret = spi_register_master(master); @@ -630,11 +586,7 @@ err5: dma_free_coherent(&pdev->dev, sizeof(u32) * BB_LEN, tspi->rx_bb, tspi->rx_bb_phys); err4: -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - tegra_dma_free_channel(tspi->rx_dma); -#else dma_release_channel(tspi->rx_dma); -#endif err3: clk_put(tspi->clk); err2: @@ -656,12 +608,7 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev) tspi = spi_master_get_devdata(master); spi_unregister_master(master); -#if defined(CONFIG_TEGRA_SYSTEM_DMA) - tegra_dma_free_channel(tspi->rx_dma); -#else dma_release_channel(tspi->rx_dma); -#endif - dma_free_coherent(&pdev->dev, sizeof(u32) * BB_LEN, tspi->rx_bb, tspi->rx_bb_phys); -- cgit v1.2.3 From 2203747c97712975accc5e69bdaf1ad38a691635 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 24 Aug 2012 15:21:06 +0200 Subject: ARM: omap: move platform_data definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the omap include directories Signed-off-by: Arnd Bergmann Acked-by: Mark Brown Acked-by: Greg Kroah-Hartman Acked-by: Nicolas Pitre Acked-by: Tony Lindgren Cc: Kevin Hilman Cc: "BenoƮt Cousson" Cc: Dmitry Torokhov Cc: David Woodhouse Cc: Kyungmin Park Cc: Ohad Ben-Cohen Cc: Grant Likely Cc: Omar Ramirez Luna Cc: Tomi Valkeinen Cc: Florian Tobias Schandinat Cc: Peter Ujfalusi Cc: Jarkko Nikula Cc: Liam Girdwood Cc: Artem Bityutskiy Cc: Jean Pihet Cc: J Keerthy Cc: linux-omap@vger.kernel.org --- arch/arm/mach-omap1/board-ams-delta.c | 2 +- arch/arm/mach-omap1/board-fsample.c | 2 +- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 2 +- arch/arm/mach-omap1/board-nokia770.c | 5 +- arch/arm/mach-omap1/board-osk.c | 2 +- arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-perseus2.c | 2 +- arch/arm/mach-omap1/board-sx1.c | 2 +- arch/arm/mach-omap1/mcbsp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 4 +- arch/arm/mach-omap2/board-cm-t3517.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 4 +- arch/arm/mach-omap2/board-flash.c | 4 +- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-n8x0.c | 4 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 4 +- arch/arm/mach-omap2/board-omap3pandora.c | 4 +- arch/arm/mach-omap2/board-omap3stalker.c | 4 +- arch/arm/mach-omap2/board-omap3touchbook.c | 4 +- arch/arm/mach-omap2/board-overo.c | 5 +- arch/arm/mach-omap2/board-rm680.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 5 +- arch/arm/mach-omap2/board-rx51-video.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-zoom-display.c | 2 +- arch/arm/mach-omap2/common-board-devices.c | 4 +- arch/arm/mach-omap2/devices.c | 2 +- arch/arm/mach-omap2/dsp.c | 2 +- arch/arm/mach-omap2/gpmc-nand.c | 2 +- arch/arm/mach-omap2/gpmc-onenand.c | 2 +- arch/arm/mach-omap2/mcbsp.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 3 +- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 5 +- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 4 +- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 4 +- arch/arm/mach-omap2/voltage.h | 2 +- arch/arm/plat-omap/common.c | 2 +- arch/arm/plat-omap/include/plat/dsp.h | 34 ------------ arch/arm/plat-omap/include/plat/keypad.h | 52 ------------------ arch/arm/plat-omap/include/plat/lcd_mipid.h | 29 ---------- arch/arm/plat-omap/include/plat/mcbsp.h | 62 ---------------------- arch/arm/plat-omap/include/plat/mcspi.h | 23 -------- arch/arm/plat-omap/include/plat/nand.h | 43 --------------- arch/arm/plat-omap/include/plat/onenand.h | 53 ------------------ arch/arm/plat-omap/include/plat/remoteproc.h | 57 -------------------- arch/arm/plat-omap/include/plat/voltage.h | 39 -------------- drivers/input/keyboard/omap-keypad.c | 2 +- drivers/mtd/nand/omap2.c | 2 +- drivers/mtd/onenand/omap2.c | 2 +- drivers/remoteproc/omap_remoteproc.c | 2 +- drivers/spi/spi-omap2-mcspi.c | 2 +- drivers/staging/tidspbridge/core/dsp-clock.c | 2 +- drivers/staging/tidspbridge/core/tiomap3430.c | 2 +- drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 2 +- drivers/staging/tidspbridge/core/tiomap_io.c | 2 +- drivers/staging/tidspbridge/rmgr/drv_interface.c | 2 +- drivers/video/omap/lcd_mipid.c | 2 +- include/linux/platform_data/asoc-ti-mcbsp.h | 62 ++++++++++++++++++++++ include/linux/platform_data/dsp-omap.h | 34 ++++++++++++ include/linux/platform_data/keypad-omap.h | 52 ++++++++++++++++++ include/linux/platform_data/lcd-mipid.h | 29 ++++++++++ include/linux/platform_data/mtd-nand-omap2.h | 43 +++++++++++++++ include/linux/platform_data/mtd-onenand-omap2.h | 53 ++++++++++++++++++ include/linux/platform_data/remoteproc-omap.h | 57 ++++++++++++++++++++ include/linux/platform_data/spi-omap2-mcspi.h | 23 ++++++++ include/linux/platform_data/voltage-omap.h | 39 ++++++++++++++ include/linux/power/smartreflex.h | 2 +- sound/soc/omap/am3517evm.c | 2 +- sound/soc/omap/ams-delta.c | 2 +- sound/soc/omap/igep0020.c | 2 +- sound/soc/omap/mcbsp.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap-mcbsp.c | 2 +- sound/soc/omap/omap3beagle.c | 2 +- sound/soc/omap/omap3evm.c | 2 +- sound/soc/omap/omap3pandora.c | 2 +- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/overo.c | 2 +- sound/soc/omap/rx51.c | 2 +- sound/soc/omap/sdp3430.c | 2 +- sound/soc/omap/zoom2.c | 2 +- 90 files changed, 484 insertions(+), 479 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/dsp.h delete mode 100644 arch/arm/plat-omap/include/plat/keypad.h delete mode 100644 arch/arm/plat-omap/include/plat/lcd_mipid.h delete mode 100644 arch/arm/plat-omap/include/plat/mcbsp.h delete mode 100644 arch/arm/plat-omap/include/plat/mcspi.h delete mode 100644 arch/arm/plat-omap/include/plat/nand.h delete mode 100644 arch/arm/plat-omap/include/plat/onenand.h delete mode 100644 arch/arm/plat-omap/include/plat/remoteproc.h delete mode 100644 arch/arm/plat-omap/include/plat/voltage.h create mode 100644 include/linux/platform_data/asoc-ti-mcbsp.h create mode 100644 include/linux/platform_data/dsp-omap.h create mode 100644 include/linux/platform_data/keypad-omap.h create mode 100644 include/linux/platform_data/lcd-mipid.h create mode 100644 include/linux/platform_data/mtd-nand-omap2.h create mode 100644 include/linux/platform_data/mtd-onenand-omap2.h create mode 100644 include/linux/platform_data/remoteproc-omap.h create mode 100644 include/linux/platform_data/spi-omap2-mcspi.h create mode 100644 include/linux/platform_data/voltage-omap.h (limited to 'drivers/spi') diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 6f192c4900b1..56446d2b2844 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 6d985521a39e..ad5ba9f00efe 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index fe79c56b2dc0..519d827570bb 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 6c46f33894fb..4733eb510bad 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 1dcb751b8fe5..87ab2086ef96 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -37,12 +37,12 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index f21c2966daad..083afa79dfb1 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index ec01f03d0446..7b9fc99e705e 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -21,13 +21,14 @@ #include #include +#include +#include + #include #include #include #include -#include -#include #include #include diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 3b2d9071022a..c780a1b80c2a 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -304,7 +304,7 @@ static struct omap_lcd_config osk_lcd_config __initdata = { #include #include -#include +#include static struct at24_platform_data at24c04 = { .byte_len = SZ_4K / 8, diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 49f8d745ea1f..e46f5c2ea63f 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 01523cd78e58..e1c842be749e 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index a7abce69043a..a71b7f59b7c3 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 277e0bc60a43..87797025d6bb 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 2e1fff26a2f3..a6a1ab638292 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index adf00975b9bb..cf2ed9ef1351 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 5453173ff57b..e5635ab407bc 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include -#include #include #include "common.h" #include diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 34cb90471d96..599a72a7ee05 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -39,13 +39,13 @@ #include #include "common.h" -#include +#include #include #include #include