]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/gadget/atmel_usba_udc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
[~andy/linux] / drivers / usb / gadget / atmel_usba_udc.h
index a68304e31a684791d606e1590998b68142f5e948..f7baea307f0d00be4433c2df62a1f64c6b7b5567 100644 (file)
 #define USBA_EN_USBA                           (1 <<  8)
 #define USBA_DETACH                            (1 <<  9)
 #define USBA_REMOTE_WAKE_UP                    (1 << 10)
+#define USBA_PULLD_DIS                         (1 << 11)
+
+#if defined(CONFIG_AVR32)
+#define USBA_ENABLE_MASK                       USBA_EN_USBA
+#define USBA_DISABLE_MASK                      0
+#elif defined(CONFIG_ARCH_AT91)
+#define USBA_ENABLE_MASK                       (USBA_EN_USBA | USBA_PULLD_DIS)
+#define USBA_DISABLE_MASK                      USBA_DETACH
+#endif /* CONFIG_ARCH_AT91 */
 
 /* Bitfields in FNUM */
 #define USBA_MICRO_FRAME_NUM_OFFSET            0
 #define FIFO_IOMEM_ID  0
 #define CTRL_IOMEM_ID  1
 
-#ifdef DEBUG
 #define DBG_ERR                0x0001  /* report all error returns */
 #define DBG_HW         0x0002  /* debug hardware initialization */
 #define DBG_GADGET     0x0004  /* calls to/from gadget driver */
 #define DBG_NONE       0x0000
 
 #define DEBUG_LEVEL    (DBG_ERR)
+
 #define DBG(level, fmt, ...)                                   \
        do {                                                    \
                if ((level) & DEBUG_LEVEL)                      \
-                       printk(KERN_DEBUG "udc: " fmt, ## __VA_ARGS__); \
+                       pr_debug("udc: " fmt, ## __VA_ARGS__);  \
        } while (0)
-#else
-#define DBG(level, fmt...)
-#endif
 
 enum usba_ctrl_state {
        WAIT_FOR_SETUP,