Re: [PATCH 28/28] usb: musb: fallback to static method if only one type of DMA is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 12-12-2010 20:02, tom.leiming@xxxxxxxxx wrote:

From: Ming Lei<tom.leiming@xxxxxxxxx>

If only one DMA type for musb is defined, we always use
this DMA type.

Signed-off-by: Ming Lei<tom.leiming@xxxxxxxxx>
[...]

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 97b9760..e233678 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -695,20 +695,31 @@ static inline const char *get_dma_name(struct musb *musb)
  }

  #ifdef CONFIG_USB_INVENTRA_DMA
+#if !defined(CONFIG_USB_TI_CPPI_DMA) && !defined(CONFIG_USB_TUSB_OMAP_DMA)
+#define	is_inventra_dma(musb)	1
+#else
  #define	is_inventra_dma(musb)	(musb->ops->flags & MUSB_GLUE_DMA_INVENTRA)
+#endif
  #else
  #define	is_inventra_dma(musb)	0
  #endif

  #ifdef CONFIG_USB_TI_CPPI_DMA
+#if !defined(CONFIG_USB_INVENTRA_DMA) && !defined(CONFIG_USB_TUSB_OMAP_DMA)
+#define	is_cppi_enabled(musb)	1
+#else
  #define	is_cppi_enabled(musb)	(musb->ops->flags & MUSB_GLUE_DMA_CPPI)
-
+#endif
  #else
  #define	is_cppi_enabled(musb)	0
  #endif

  #ifdef CONFIG_USB_TUSB_OMAP_DMA
+#if !defined(CONFIG_USB_INVENTRA_DMA) && !defined(CONFIG_USB_TI_CPPI_DMA)
+#define tusb_dma_omap(musb)			1
+#else
  #define tusb_dma_omap(musb)			(musb->ops->flags & MUSB_GLUE_DMA_TUSB)
+#endif
  #else
  #define tusb_dma_omap(musb)			0
  #endif

   This doesn't really scale.

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux