omap: mcbsp: Drop SPI mode support
Subsystems (2)
RFC 1/2 omap: mcbsp: Drop SPI mode support
We haven't seen any use for the SPI API in McBSP driver over the years. More over, Peter Ujfalusi <[email protected]> noticed that SPI mode is not even supported since OMAP2430 so it's very unlikely that we'll see any use for it in the future either.
--- arch/arm/plat-omap/include/plat/mcbsp.h | 37 ------ arch/arm/plat-omap/mcbsp.c | 214 ------------------------------- 2 files changed, 0 insertions(+), 251 deletions(-)
arch/arm/plat-omap/include/plat/mcbsp.h +0 -37
@@ -353,38 +353,6 @@ typedef enum { OMAP_MCBSP_WORD_32, } omap_mcbsp_word_length; -typedef enum { -OMAP_MCBSP_CLK_RISING =0 , -OMAP_MCBSP_CLK_FALLING , -}omap_mcbsp_clk_polarity ; - -typedef enum { -OMAP_MCBSP_FS_ACTIVE_HIGH =0 , -OMAP_MCBSP_FS_ACTIVE_LOW , -}omap_mcbsp_fs_polarity ; - -typedef enum { -OMAP_MCBSP_CLK_STP_MODE_NO_DELAY =0 , -OMAP_MCBSP_CLK_STP_MODE_DELAY , -}omap_mcbsp_clk_stp_mode ; - - -/******* SPI specific mode **********/ -typedef enum { -OMAP_MCBSP_SPI_MASTER =0 , -OMAP_MCBSP_SPI_SLAVE , -}omap_mcbsp_spi_mode ; - -struct omap_mcbsp_spi_cfg { -omap_mcbsp_spi_mode spi_mode; -omap_mcbsp_clk_polarity rx_clock_polarity; -omap_mcbsp_clk_polarity tx_clock_polarity; -omap_mcbsp_fs_polarity fsx_polarity; -u8 clk_div; -omap_mcbsp_clk_stp_mode clk_stp_mode; -omap_mcbsp_word_length word_length; -}; -/* Platform specific configuration */ struct omap_mcbsp_ops {void (*request)(unsigned int );
@@ -504,14 +472,9 @@ u32 omap_mcbsp_recv_word(unsigned int id);int omap_mcbsp_xmit_buffer (unsigned int id,dma_addr_t buffer,unsigned int length);int omap_mcbsp_recv_buffer (unsigned int id,dma_addr_t buffer,unsigned int length); -int omap_mcbsp_spi_master_xmit_word_poll (unsigned int id,u32 word); -int omap_mcbsp_spi_master_recv_word_poll (unsigned int id,u32 * word); -/* McBSP functional clock source changing function */ extern int omap2_mcbsp_set_clks_src (u8 id,u8 fck_src_id); -/* SPI specific API */ -void omap_mcbsp_set_spi_mode (unsigned int id,const struct omap_mcbsp_spi_cfg * spi_cfg);/* Polled read/write functions */ int omap_mcbsp_pollread (unsigned int id,u16 * buf);
arch/arm/plat-omap/mcbsp.c +0 -214
226 lines not on this page · raw message
Signature · 1 line
1.7.5.3
RFC 2/2 omap: mcbsp: Drop in-driver transfer support
We haven't seen either use for in-driver transfer API in McBSP driver over the years so it looks they can be removed too.
--- arch/arm/plat-omap/include/plat/mcbsp.h | 25 -- arch/arm/plat-omap/mcbsp.c | 382 ++----------------------------- 2 files changed, 19 insertions(+), 388 deletions(-)
arch/arm/plat-omap/include/plat/mcbsp.h +0 -25
@@ -24,7 +24,6 @@#ifndef __ASM_ARCH_OMAP_MCBSP_H#define __ASM_ARCH_OMAP_MCBSP_H -#include <linux/completion.h> #include <linux/spinlock.h> #include <mach/hardware.h>
@@ -340,10 +339,6 @@ typedef enum {OMAP_MCBSP5 } omap_mcbsp_id; -typedef int __bitwise omap_mcbsp_io_type_t ; -#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1) -#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2) - typedef enum { OMAP_MCBSP_WORD_8 = 0, OMAP_MCBSP_WORD_12,
@@ -393,22 +388,12 @@ struct omap_mcbsp {omap_mcbsp_word_length rx_word_length;omap_mcbsp_word_length tx_word_length; -omap_mcbsp_io_type_t io_type;/* IRQ or poll */ -/* IRQ based TX/RX */ int rx_irq;int tx_irq;/* DMA stuff */ u8 dma_rx_sync; -short dma_rx_lch;u8 dma_tx_sync; -short dma_tx_lch; - -/* Completion queues */ -struct completion tx_irq_completion; -struct completion rx_irq_completion; -struct completion tx_dma_completion; -struct completion rx_dma_completion;/* Protect the field .free, while checking if the mcbsp is in use */ spinlock_t lock;
@@ -467,20 +452,10 @@ int omap_mcbsp_request(unsigned int id);void omap_mcbsp_free (unsigned int id);void omap_mcbsp_start (unsigned int id,int tx,int rx);void omap_mcbsp_stop (unsigned int id,int tx,int rx); -void omap_mcbsp_xmit_word (unsigned int id,u32 word); -u32 omap_mcbsp_recv_word (unsigned int id); - -int omap_mcbsp_xmit_buffer (unsigned int id,dma_addr_t buffer,unsigned int length); -int omap_mcbsp_recv_buffer (unsigned int id,dma_addr_t buffer,unsigned int length);/* McBSP functional clock source changing function */ extern int omap2_mcbsp_set_clks_src (u8 id,u8 fck_src_id); -/* Polled read/write functions */ -int omap_mcbsp_pollread (unsigned int id,u16 * buf); -int omap_mcbsp_pollwrite (unsigned int id,u16 buf); -int omap_mcbsp_set_io_type (unsigned int id,omap_mcbsp_io_type_t io_type); -/* McBSP signal muxing API */ void omap2_mcbsp1_mux_clkr_src (u8 mux);void omap2_mcbsp1_mux_fsr_src (u8 mux);
arch/arm/plat-omap/mcbsp.c +19 -363
449 lines not on this page · raw message
Signature · 1 line
1.7.5.3
RFC 1/2 omap: mcbsp: Drop SPI mode support
In reply to Jarkko NikulaQuoted 4 lines · Jarkko Nikula
We haven't seen any use for the SPI API in McBSP driver over the years. More over, Peter Ujfalusi <[email protected]> noticed that SPI mode is not even supported since OMAP2430 so it's very unlikely that we'll see any use for it in the future either.
Sounds fair to me, our first priority should be to get this code moved to live under drivers. If the SPI support is needed, it can be added back later on.
Regards,
Tony
RFC 1/2 omap: mcbsp: Drop SPI mode support
In reply to Jarkko NikulaQuoted 6 lines · On Tuesday 14 June 2011 13:23:51 Jarkko Nikula wrote:
We haven't seen any use for the SPI API in McBSP driver over the years. More over, Peter Ujfalusi <[email protected]> noticed that SPI mode is not even supported since OMAP2430 so it's very unlikely that we'll see any use for it in the future either.
Signed-off-by Jarkko Nikula <[email protected]>
Either now or later, but for both:
RFC 1/2 omap: mcbsp: Drop SPI mode support
Quoted 11 lines · P?ter Ujfalusi
Quoted 6 lines · On Tuesday 14 June 2011 13:23:51 Jarkko Nikula wrote:
We haven't seen any use for the SPI API in McBSP driver over the years. More over, Peter Ujfalusi <[email protected]> noticed that SPI mode is not even supported since OMAP2430 so it's very unlikely that we'll see any use for it in the future either.
Signed-off-by Jarkko Nikula <[email protected]>Either now or later, but for both:
Acked-by Peter Ujfalusi <[email protected]>
Applying both of these into devel-cleanup branch.
Tony