]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/musb/musb_dma.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[~andy/linux] / drivers / usb / musb / musb_dma.h
index 1b6b827b769f5f9fb0398f54208d425bbaafc446..1345a4ff041a00380eb539f1a1c5bae2f9db13f4 100644 (file)
@@ -62,13 +62,13 @@ struct musb_hw_ep;
 
 #define        DMA_ADDR_INVALID        (~(dma_addr_t)0)
 
-#ifndef CONFIG_MUSB_PIO_ONLY
-#define        is_dma_capable()        (1)
-#else
+#ifdef CONFIG_MUSB_PIO_ONLY
 #define        is_dma_capable()        (0)
+#else
+#define        is_dma_capable()        (1)
 #endif
 
-#ifdef CONFIG_USB_TI_CPPI_DMA
+#if defined(CONFIG_USB_TI_CPPI_DMA) || defined(CONFIG_USB_TI_CPPI41_DMA)
 #define        is_cppi_enabled()       1
 #else
 #define        is_cppi_enabled()       0
@@ -159,8 +159,6 @@ dma_channel_status(struct dma_channel *c)
  * Controllers manage dma channels.
  */
 struct dma_controller {
-       int                     (*start)(struct dma_controller *);
-       int                     (*stop)(struct dma_controller *);
        struct dma_channel      *(*channel_alloc)(struct dma_controller *,
                                        struct musb_hw_ep *, u8 is_tx);
        void                    (*channel_release)(struct dma_channel *);
@@ -177,9 +175,20 @@ struct dma_controller {
 /* called after channel_program(), may indicate a fault */
 extern void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit);
 
+#ifdef CONFIG_MUSB_PIO_ONLY
+static inline struct dma_controller *dma_controller_create(struct musb *m,
+               void __iomem *io)
+{
+       return NULL;
+}
+
+static inline void dma_controller_destroy(struct dma_controller *d) { }
+
+#else
 
 extern struct dma_controller *dma_controller_create(struct musb *, void __iomem *);
 
 extern void dma_controller_destroy(struct dma_controller *);
+#endif
 
 #endif /* __MUSB_DMA_H__ */