All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	linux-omap@vger.kernel.org, tony@atomide.com,
	aaro.koskinen@iki.fi, jmkrzyszt@gmail.com
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Mark Brown <broonie@kernel.org>, Felipe Balbi <balbi@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	dmaengine@vger.kernel.org, linux-input@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-serial@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 19/41] ARM: omap: dma: make usb support optional
Date: Fri, 29 Apr 2022 22:24:19 +0300	[thread overview]
Message-ID: <a9e1b5ce-861f-021b-b41f-62e5298c11e5@gmail.com> (raw)
In-Reply-To: <20220419133723.1394715-20-arnd@kernel.org>



On 4/19/22 16:37, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Most of the plat-omap/dma.c code is specific to the USB
> driver.

The reason is simple: the omap_udc is the only driver which has not been
ported to DMAengine.
I had a patch if I recall to convert it, but I don't have a way to test
it and the omap_udc sets some funky bits for DMA which we can not figure
out on how to handle.

> Hide that code when it is not in use, to make it
> clearer which parts are actually still required.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/plat-omap/dma.c       | 45 +++++++++++++++++-----------------
>  drivers/usb/gadget/udc/Kconfig |  2 +-
>  include/linux/omap-dma.h       |  5 +++-
>  3 files changed, 27 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 700ba9b600e7..b7757864d0aa 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -66,7 +66,6 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
>  
>  static struct omap_system_dma_plat_info *p;
>  static struct omap_dma_dev_attr *d;
> -static void omap_clear_dma(int lch);
>  static int enable_1510_mode;
>  static u32 errata;
>  
> @@ -90,19 +89,16 @@ static int omap_dma_reserve_channels;
>  static DEFINE_SPINLOCK(dma_chan_lock);
>  static struct omap_dma_lch *dma_chan;
>  
> -static inline void disable_lnk(int lch);
> -static void omap_disable_channel_irq(int lch);
> -static inline void omap_enable_channel_irq(int lch);
> -
> -#ifdef CONFIG_ARCH_OMAP15XX
> -/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> -static int omap_dma_in_1510_mode(void)
> +static inline void omap_disable_channel_irq(int lch)
>  {
> -	return enable_1510_mode;
> +	/* disable channel interrupts */
> +	p->dma_write(0, CICR, lch);
> +	/* Clear CSR */
> +	if (dma_omap1())
> +		p->dma_read(CSR, lch);
> +	else
> +		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
>  }
> -#else
> -#define omap_dma_in_1510_mode()		0
> -#endif
>  
>  #ifdef CONFIG_ARCH_OMAP1
>  static inline void set_gdma_dev(int req, int dev)
> @@ -169,6 +165,17 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
>  #endif
>  EXPORT_SYMBOL(omap_set_dma_priority);
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +#ifdef CONFIG_ARCH_OMAP15XX
> +/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> +static int omap_dma_in_1510_mode(void)
> +{
> +	return enable_1510_mode;
> +}
> +#else
> +#define omap_dma_in_1510_mode()		0
> +#endif
> +
>  void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
>  				  int frame_count, int sync_mode,
>  				  int dma_trigger, int src_or_dst_synch)
> @@ -418,17 +425,6 @@ static inline void omap_enable_channel_irq(int lch)
>  	p->dma_write(dma_chan[lch].enabled_irqs, CICR, lch);
>  }
>  
> -static inline void omap_disable_channel_irq(int lch)
> -{
> -	/* disable channel interrupts */
> -	p->dma_write(0, CICR, lch);
> -	/* Clear CSR */
> -	if (dma_omap1())
> -		p->dma_read(CSR, lch);
> -	else
> -		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
> -}
> -
>  void omap_disable_dma_irq(int lch, u16 bits)
>  {
>  	dma_chan[lch].enabled_irqs &= ~bits;
> @@ -473,6 +469,7 @@ static inline void disable_lnk(int lch)
>  	p->dma_write(l, CLNK_CTRL, lch);
>  	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
>  }
> +#endif
>  
>  int omap_request_dma(int dev_id, const char *dev_name,
>  		     void (*callback)(int lch, u16 ch_status, void *data),
> @@ -572,6 +569,7 @@ static void omap_clear_dma(int lch)
>  	local_irq_restore(flags);
>  }
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
>  void omap_start_dma(int lch)
>  {
>  	u32 l;
> @@ -792,6 +790,7 @@ int omap_get_dma_active_status(int lch)
>  	return (p->dma_read(CCR, lch) & OMAP_DMA_CCR_EN) != 0;
>  }
>  EXPORT_SYMBOL(omap_get_dma_active_status);
> +#endif
>  
>  int omap_dma_running(void)
>  {
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index cee934dce4f0..69394dc1cdfb 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -128,7 +128,7 @@ config USB_GR_UDC
>  
>  config USB_OMAP
>  	tristate "OMAP USB Device Controller"
> -	depends on ARCH_OMAP1 || (ARCH_OMAP && COMPILE_TEST)
> +	depends on ARCH_OMAP1
>  	depends on ISP1301_OMAP || !(MACH_OMAP_H2 || MACH_OMAP_H3)
>  	help
>  	   Many Texas Instruments OMAP processors have flexible full
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 5e228428fda1..07fa58ae9902 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -299,8 +299,9 @@ extern void omap_set_dma_priority(int lch, int dst_port, int priority);
>  extern int omap_request_dma(int dev_id, const char *dev_name,
>  			void (*callback)(int lch, u16 ch_status, void *data),
>  			void *data, int *dma_ch);
> -extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_free_dma(int ch);
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_start_dma(int lch);
>  extern void omap_stop_dma(int lch);
>  extern void omap_set_dma_transfer_params(int lch, int data_type,
> @@ -326,6 +327,8 @@ extern void omap_set_dma_dest_burst_mode(int lch,
>  extern dma_addr_t omap_get_dma_src_pos(int lch);
>  extern dma_addr_t omap_get_dma_dst_pos(int lch);
>  extern int omap_get_dma_active_status(int lch);
> +#endif
> +
>  extern int omap_dma_running(void);
>  
>  #if IS_ENABLED(CONFIG_FB_OMAP)

-- 
Péter

WARNING: multiple messages have this Message-ID
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	linux-omap@vger.kernel.org, tony@atomide.com,
	aaro.koskinen@iki.fi, jmkrzyszt@gmail.com
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-fbdev@vger.kernel.org,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Kevin Hilman <khilman@kernel.org>, Helge Deller <deller@gmx.de>,
	Russell King <linux@armlinux.org.uk>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-serial@vger.kernel.org, linux-input@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	Felipe Balbi <balbi@kernel.org>, Paul Walmsley <paul@pwsan.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	linux-usb@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
	dmaengine@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 19/41] ARM: omap: dma: make usb support optional
Date: Fri, 29 Apr 2022 22:24:19 +0300	[thread overview]
Message-ID: <a9e1b5ce-861f-021b-b41f-62e5298c11e5@gmail.com> (raw)
In-Reply-To: <20220419133723.1394715-20-arnd@kernel.org>



On 4/19/22 16:37, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Most of the plat-omap/dma.c code is specific to the USB
> driver.

The reason is simple: the omap_udc is the only driver which has not been
ported to DMAengine.
I had a patch if I recall to convert it, but I don't have a way to test
it and the omap_udc sets some funky bits for DMA which we can not figure
out on how to handle.

> Hide that code when it is not in use, to make it
> clearer which parts are actually still required.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/plat-omap/dma.c       | 45 +++++++++++++++++-----------------
>  drivers/usb/gadget/udc/Kconfig |  2 +-
>  include/linux/omap-dma.h       |  5 +++-
>  3 files changed, 27 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 700ba9b600e7..b7757864d0aa 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -66,7 +66,6 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
>  
>  static struct omap_system_dma_plat_info *p;
>  static struct omap_dma_dev_attr *d;
> -static void omap_clear_dma(int lch);
>  static int enable_1510_mode;
>  static u32 errata;
>  
> @@ -90,19 +89,16 @@ static int omap_dma_reserve_channels;
>  static DEFINE_SPINLOCK(dma_chan_lock);
>  static struct omap_dma_lch *dma_chan;
>  
> -static inline void disable_lnk(int lch);
> -static void omap_disable_channel_irq(int lch);
> -static inline void omap_enable_channel_irq(int lch);
> -
> -#ifdef CONFIG_ARCH_OMAP15XX
> -/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> -static int omap_dma_in_1510_mode(void)
> +static inline void omap_disable_channel_irq(int lch)
>  {
> -	return enable_1510_mode;
> +	/* disable channel interrupts */
> +	p->dma_write(0, CICR, lch);
> +	/* Clear CSR */
> +	if (dma_omap1())
> +		p->dma_read(CSR, lch);
> +	else
> +		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
>  }
> -#else
> -#define omap_dma_in_1510_mode()		0
> -#endif
>  
>  #ifdef CONFIG_ARCH_OMAP1
>  static inline void set_gdma_dev(int req, int dev)
> @@ -169,6 +165,17 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
>  #endif
>  EXPORT_SYMBOL(omap_set_dma_priority);
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +#ifdef CONFIG_ARCH_OMAP15XX
> +/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> +static int omap_dma_in_1510_mode(void)
> +{
> +	return enable_1510_mode;
> +}
> +#else
> +#define omap_dma_in_1510_mode()		0
> +#endif
> +
>  void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
>  				  int frame_count, int sync_mode,
>  				  int dma_trigger, int src_or_dst_synch)
> @@ -418,17 +425,6 @@ static inline void omap_enable_channel_irq(int lch)
>  	p->dma_write(dma_chan[lch].enabled_irqs, CICR, lch);
>  }
>  
> -static inline void omap_disable_channel_irq(int lch)
> -{
> -	/* disable channel interrupts */
> -	p->dma_write(0, CICR, lch);
> -	/* Clear CSR */
> -	if (dma_omap1())
> -		p->dma_read(CSR, lch);
> -	else
> -		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
> -}
> -
>  void omap_disable_dma_irq(int lch, u16 bits)
>  {
>  	dma_chan[lch].enabled_irqs &= ~bits;
> @@ -473,6 +469,7 @@ static inline void disable_lnk(int lch)
>  	p->dma_write(l, CLNK_CTRL, lch);
>  	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
>  }
> +#endif
>  
>  int omap_request_dma(int dev_id, const char *dev_name,
>  		     void (*callback)(int lch, u16 ch_status, void *data),
> @@ -572,6 +569,7 @@ static void omap_clear_dma(int lch)
>  	local_irq_restore(flags);
>  }
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
>  void omap_start_dma(int lch)
>  {
>  	u32 l;
> @@ -792,6 +790,7 @@ int omap_get_dma_active_status(int lch)
>  	return (p->dma_read(CCR, lch) & OMAP_DMA_CCR_EN) != 0;
>  }
>  EXPORT_SYMBOL(omap_get_dma_active_status);
> +#endif
>  
>  int omap_dma_running(void)
>  {
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index cee934dce4f0..69394dc1cdfb 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -128,7 +128,7 @@ config USB_GR_UDC
>  
>  config USB_OMAP
>  	tristate "OMAP USB Device Controller"
> -	depends on ARCH_OMAP1 || (ARCH_OMAP && COMPILE_TEST)
> +	depends on ARCH_OMAP1
>  	depends on ISP1301_OMAP || !(MACH_OMAP_H2 || MACH_OMAP_H3)
>  	help
>  	   Many Texas Instruments OMAP processors have flexible full
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 5e228428fda1..07fa58ae9902 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -299,8 +299,9 @@ extern void omap_set_dma_priority(int lch, int dst_port, int priority);
>  extern int omap_request_dma(int dev_id, const char *dev_name,
>  			void (*callback)(int lch, u16 ch_status, void *data),
>  			void *data, int *dma_ch);
> -extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_free_dma(int ch);
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_start_dma(int lch);
>  extern void omap_stop_dma(int lch);
>  extern void omap_set_dma_transfer_params(int lch, int data_type,
> @@ -326,6 +327,8 @@ extern void omap_set_dma_dest_burst_mode(int lch,
>  extern dma_addr_t omap_get_dma_src_pos(int lch);
>  extern dma_addr_t omap_get_dma_dst_pos(int lch);
>  extern int omap_get_dma_active_status(int lch);
> +#endif
> +
>  extern int omap_dma_running(void);
>  
>  #if IS_ENABLED(CONFIG_FB_OMAP)

-- 
Péter

WARNING: multiple messages have this Message-ID
From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	linux-omap@vger.kernel.org, tony@atomide.com,
	aaro.koskinen@iki.fi, jmkrzyszt@gmail.com
Cc: Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>,
	Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Mark Brown <broonie@kernel.org>, Felipe Balbi <balbi@kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	dmaengine@vger.kernel.org, linux-input@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-serial@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 19/41] ARM: omap: dma: make usb support optional
Date: Fri, 29 Apr 2022 22:24:19 +0300	[thread overview]
Message-ID: <a9e1b5ce-861f-021b-b41f-62e5298c11e5@gmail.com> (raw)
In-Reply-To: <20220419133723.1394715-20-arnd@kernel.org>



On 4/19/22 16:37, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Most of the plat-omap/dma.c code is specific to the USB
> driver.

The reason is simple: the omap_udc is the only driver which has not been
ported to DMAengine.
I had a patch if I recall to convert it, but I don't have a way to test
it and the omap_udc sets some funky bits for DMA which we can not figure
out on how to handle.

> Hide that code when it is not in use, to make it
> clearer which parts are actually still required.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/plat-omap/dma.c       | 45 +++++++++++++++++-----------------
>  drivers/usb/gadget/udc/Kconfig |  2 +-
>  include/linux/omap-dma.h       |  5 +++-
>  3 files changed, 27 insertions(+), 25 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index 700ba9b600e7..b7757864d0aa 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -66,7 +66,6 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
>  
>  static struct omap_system_dma_plat_info *p;
>  static struct omap_dma_dev_attr *d;
> -static void omap_clear_dma(int lch);
>  static int enable_1510_mode;
>  static u32 errata;
>  
> @@ -90,19 +89,16 @@ static int omap_dma_reserve_channels;
>  static DEFINE_SPINLOCK(dma_chan_lock);
>  static struct omap_dma_lch *dma_chan;
>  
> -static inline void disable_lnk(int lch);
> -static void omap_disable_channel_irq(int lch);
> -static inline void omap_enable_channel_irq(int lch);
> -
> -#ifdef CONFIG_ARCH_OMAP15XX
> -/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> -static int omap_dma_in_1510_mode(void)
> +static inline void omap_disable_channel_irq(int lch)
>  {
> -	return enable_1510_mode;
> +	/* disable channel interrupts */
> +	p->dma_write(0, CICR, lch);
> +	/* Clear CSR */
> +	if (dma_omap1())
> +		p->dma_read(CSR, lch);
> +	else
> +		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
>  }
> -#else
> -#define omap_dma_in_1510_mode()		0
> -#endif
>  
>  #ifdef CONFIG_ARCH_OMAP1
>  static inline void set_gdma_dev(int req, int dev)
> @@ -169,6 +165,17 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
>  #endif
>  EXPORT_SYMBOL(omap_set_dma_priority);
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +#ifdef CONFIG_ARCH_OMAP15XX
> +/* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */
> +static int omap_dma_in_1510_mode(void)
> +{
> +	return enable_1510_mode;
> +}
> +#else
> +#define omap_dma_in_1510_mode()		0
> +#endif
> +
>  void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
>  				  int frame_count, int sync_mode,
>  				  int dma_trigger, int src_or_dst_synch)
> @@ -418,17 +425,6 @@ static inline void omap_enable_channel_irq(int lch)
>  	p->dma_write(dma_chan[lch].enabled_irqs, CICR, lch);
>  }
>  
> -static inline void omap_disable_channel_irq(int lch)
> -{
> -	/* disable channel interrupts */
> -	p->dma_write(0, CICR, lch);
> -	/* Clear CSR */
> -	if (dma_omap1())
> -		p->dma_read(CSR, lch);
> -	else
> -		p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, lch);
> -}
> -
>  void omap_disable_dma_irq(int lch, u16 bits)
>  {
>  	dma_chan[lch].enabled_irqs &= ~bits;
> @@ -473,6 +469,7 @@ static inline void disable_lnk(int lch)
>  	p->dma_write(l, CLNK_CTRL, lch);
>  	dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
>  }
> +#endif
>  
>  int omap_request_dma(int dev_id, const char *dev_name,
>  		     void (*callback)(int lch, u16 ch_status, void *data),
> @@ -572,6 +569,7 @@ static void omap_clear_dma(int lch)
>  	local_irq_restore(flags);
>  }
>  
> +#if IS_ENABLED(CONFIG_USB_OMAP)
>  void omap_start_dma(int lch)
>  {
>  	u32 l;
> @@ -792,6 +790,7 @@ int omap_get_dma_active_status(int lch)
>  	return (p->dma_read(CCR, lch) & OMAP_DMA_CCR_EN) != 0;
>  }
>  EXPORT_SYMBOL(omap_get_dma_active_status);
> +#endif
>  
>  int omap_dma_running(void)
>  {
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index cee934dce4f0..69394dc1cdfb 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -128,7 +128,7 @@ config USB_GR_UDC
>  
>  config USB_OMAP
>  	tristate "OMAP USB Device Controller"
> -	depends on ARCH_OMAP1 || (ARCH_OMAP && COMPILE_TEST)
> +	depends on ARCH_OMAP1
>  	depends on ISP1301_OMAP || !(MACH_OMAP_H2 || MACH_OMAP_H3)
>  	help
>  	   Many Texas Instruments OMAP processors have flexible full
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 5e228428fda1..07fa58ae9902 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -299,8 +299,9 @@ extern void omap_set_dma_priority(int lch, int dst_port, int priority);
>  extern int omap_request_dma(int dev_id, const char *dev_name,
>  			void (*callback)(int lch, u16 ch_status, void *data),
>  			void *data, int *dma_ch);
> -extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_free_dma(int ch);
> +#if IS_ENABLED(CONFIG_USB_OMAP)
> +extern void omap_disable_dma_irq(int ch, u16 irq_bits);
>  extern void omap_start_dma(int lch);
>  extern void omap_stop_dma(int lch);
>  extern void omap_set_dma_transfer_params(int lch, int data_type,
> @@ -326,6 +327,8 @@ extern void omap_set_dma_dest_burst_mode(int lch,
>  extern dma_addr_t omap_get_dma_src_pos(int lch);
>  extern dma_addr_t omap_get_dma_dst_pos(int lch);
>  extern int omap_get_dma_active_status(int lch);
> +#endif
> +
>  extern int omap_dma_running(void);
>  
>  #if IS_ENABLED(CONFIG_FB_OMAP)

-- 
Péter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-29 19:17 UTC|newest]

Thread overview: 245+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 13:36 [PATCH 00/41] OMAP1 full multiplatform conversion Arnd Bergmann
2022-04-19 13:36 ` Arnd Bergmann
2022-04-19 13:36 ` Arnd Bergmann
2022-04-19 13:36 ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 01/41] video: fbdev: omapfb: lcd_ams_delta: fix unused variable warning Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-20  9:24   ` Sergei Shtylyov
2022-04-20  9:24     ` Sergei Shtylyov
2022-04-20  9:24     ` Sergei Shtylyov
2022-04-20  9:24     ` Sergei Shtylyov
2022-04-20 11:32     ` Arnd Bergmann
2022-04-20 11:32       ` Arnd Bergmann
2022-04-20 11:32       ` Arnd Bergmann
2022-04-20 11:32       ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 02/41] ARM: omap1: innovator: pass lcd control address as pdata Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 03/41] ARM: omap1: move lcd_dma code into omapfb driver Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 04/41] ARM: omap1: declare a dummy omap_set_dma_priority Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 05/41] fbdev: omap: pass irqs as resource Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 06/41] ARM: omap1: ams-delta: remove camera leftovers Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 07/41] ARM: omap1: move mach/usb.h to include/linux/soc Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 08/41] ARM: omap1: move some headers " Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 09/41] ARM: omap1: move perseus spi pinconf to board file Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 10/41] ARM: omap1: move CF chipselect setup " Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 11/41] fbdev: omap: avoid using mach/*.h files Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 12/41] usb: omap: avoid mach/*.h headers Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 13/41] clocksource: ti-dmtimer: avoid using mach/hardware.h Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 14/41] serial: 8250/omap1: include linux/soc/ti/omap1-soc.h Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-20 14:46   ` Greg KH
2022-04-20 14:46     ` Greg KH
2022-04-20 14:46     ` Greg KH
2022-04-20 14:46     ` Greg KH
2022-04-19 13:36 ` [PATCH 15/41] input: omap: void using mach/*.h headers Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-20 20:44   ` Dmitry Torokhov
2022-04-20 20:44     ` Dmitry Torokhov
2022-04-20 20:44     ` Dmitry Torokhov
2022-04-20 20:44     ` Dmitry Torokhov
2022-04-19 13:36 ` [PATCH 16/41] ARM: omap1: innovator: move ohci phy power handling to board file Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36 ` [PATCH 17/41] ARM: omap1: move 32k counter from plat-omap to mach-omap1 Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-19 13:36   ` Arnd Bergmann
2022-04-21  6:17   ` Tony Lindgren
2022-04-21  6:17     ` Tony Lindgren
2022-04-21  6:17     ` Tony Lindgren
2022-04-21  6:17     ` Tony Lindgren
2022-04-19 13:37 ` [PATCH 18/41] ARM: omap: remove debug-leds driver Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 19/41] ARM: omap: dma: make usb support optional Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-29 19:24   ` Péter Ujfalusi [this message]
2022-04-29 19:24     ` Péter Ujfalusi
2022-04-29 19:24     ` Péter Ujfalusi
2022-04-19 13:37 ` [PATCH 20/41] dma: omap: hide legacy interface Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-22  5:55   ` Vinod Koul
2022-04-22  5:55     ` Vinod Koul
2022-04-22  5:55     ` Vinod Koul
2022-04-22  5:55     ` Vinod Koul
2022-04-19 13:37 ` [PATCH 21/41] ARM: omap1: dma: remove omap2 specific bits Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-29 19:26   ` Péter Ujfalusi
2022-04-29 19:26     ` Péter Ujfalusi
2022-04-29 19:26     ` Péter Ujfalusi
2022-04-19 13:37 ` [PATCH 22/41] ARM: omap1: move plat/dma.c to mach/omap-dma.c Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-29 19:36   ` Péter Ujfalusi
2022-04-29 19:36     ` Péter Ujfalusi
2022-04-29 19:36     ` Péter Ujfalusi
2022-04-19 13:37 ` [PATCH 23/41] ARM: omap: split up arch/arm/plat-omap/Kconfig Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 24/41] ARM: omap: un-merge plat/sram.c Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-21  6:32   ` Tony Lindgren
2022-04-21  6:32     ` Tony Lindgren
2022-04-21  6:32     ` Tony Lindgren
2022-04-21  6:32     ` Tony Lindgren
2022-04-19 13:37 ` [PATCH 25/41] ARM: omap: remove empty plat-omap directory Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 26/41] ARM: omap1: relocate static I/O mapping Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-20 13:46   ` Aaro Koskinen
2022-04-20 13:46     ` Aaro Koskinen
2022-04-20 13:46     ` Aaro Koskinen
2022-04-20 13:46     ` Aaro Koskinen
2022-04-20 19:20     ` Arnd Bergmann
2022-04-20 19:20       ` Arnd Bergmann
2022-04-20 19:20       ` Arnd Bergmann
2022-04-20 19:20       ` Arnd Bergmann
2022-04-21  5:19       ` Tony Lindgren
2022-04-21  5:19         ` Tony Lindgren
2022-04-21  5:19         ` Tony Lindgren
2022-04-21  5:19         ` Tony Lindgren
2022-04-19 13:37 ` [PATCH 27/41] ARM: omap1: use pci_remap_iospace() for omap_cf Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 28/41] ARM: omap1: move mach/*.h into mach directory Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 29/41] ARM: omap1: fix build with no SoC selected Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 30/41] ARM: OMAP1: Prepare for conversion of OMAP1 clocks to CCF Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 31/41] ARM: OMAP1: clock: Fix early UART rate issues Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 32/41] ARM: OMAP1: clock: Fix UART rate reporting algorithm Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 33/41] ARM: OMAP1: clock: Remove unused code Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 34/41] ARM: OMAP1: clock: Remove noop code Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 35/41] usb: host: ohci-omap: Make it CCF clk API compatible Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 36/41] usb: gadget: omap_udc: " Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 37/41] [MERGED] video: fbdev: omap: " Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 38/41] [MERGED] mmc: " Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 39/41] [MERGED] ASoC: ti: osk5912: " Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37 ` [PATCH 40/41] [TO BE REBASED] ARM: OMAP1: clock: Convert to CCF Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-21  6:24   ` Tony Lindgren
2022-04-21  6:24     ` Tony Lindgren
2022-04-21  6:24     ` Tony Lindgren
2022-04-21  6:24     ` Tony Lindgren
2022-04-19 13:37 ` [PATCH 41/41] [TO BE REBASED] ARM: omap1: enable multiplatform Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 13:37   ` Arnd Bergmann
2022-04-19 14:15 ` [PATCH 00/41] OMAP1 full multiplatform conversion Ulf Hansson
2022-04-19 14:15   ` Ulf Hansson
2022-04-19 14:15   ` Ulf Hansson
2022-04-19 14:15   ` Ulf Hansson
2022-04-21  6:27   ` Tony Lindgren
2022-04-21  6:27     ` Tony Lindgren
2022-04-21  6:27     ` Tony Lindgren
2022-04-21  6:27     ` Tony Lindgren
2022-04-20 17:08 ` Aaro Koskinen
2022-04-20 17:08   ` Aaro Koskinen
2022-04-20 17:08   ` Aaro Koskinen
2022-04-20 17:08   ` Aaro Koskinen
2022-04-20 20:00   ` Arnd Bergmann
2022-04-20 20:00     ` Arnd Bergmann
2022-04-20 20:00     ` Arnd Bergmann
2022-04-20 20:00     ` Arnd Bergmann
2022-04-21 13:34     ` Aaro Koskinen
2022-04-21 13:34       ` Aaro Koskinen
2022-04-21 13:34       ` Aaro Koskinen
2022-04-21 13:34       ` Aaro Koskinen
2022-04-21 14:46       ` Arnd Bergmann
2022-04-21 14:46         ` Arnd Bergmann
2022-04-21 14:46         ` Arnd Bergmann
2022-04-21 14:46         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9e1b5ce-861f-021b-b41f-62e5298c11e5@gmail.com \
    --to=peter.ujfalusi@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=balbi@kernel.org \
    --cc=broonie@kernel.org \
    --cc=daniel.thompson@linaro.org \
    --cc=deller@gmx.de \
    --cc=dmaengine@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=jmkrzyszt@gmail.com \
    --cc=khilman@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@dominikbrodowski.net \
    --cc=paul@pwsan.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    --subject='Re: [PATCH 19/41] ARM: omap: dma: make usb support optional' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.