[adm5120] USB driver cleanups, no it is still not finished
[openwrt.git] / target / linux / adm5120 / files / drivers / usb / host / adm5120.h
index bdfdbc7..a682856 100644 (file)
@@ -143,7 +143,6 @@ struct td {
 
        /* rest are purely for the driver's use */
        __u8            index;
-/*     struct ed       *ed;*/
        struct urb      *urb;
 
        dma_addr_t      td_dma;         /* addr of this TD */
@@ -436,11 +435,16 @@ static inline struct usb_hcd *admhcd_to_hcd(const struct admhcd *ahcd)
 #define STUB_DEBUG_FILES
 #endif /* DEBUG */
 
-#define admhc_dbg(ahcd, fmt, args...) \
-       printk(KERN_DEBUG "adm5120-hcd: " fmt , ## args )
+#ifdef DEBUG
+#      define admhc_dbg(ahcd, fmt, args...) \
+               printk(KERN_DEBUG "adm5120-hcd: " fmt , ## args )
+#else
+#      define admhc_dbg(ahcd, fmt, args...) do { } while (0)
+#endif
+
 #define admhc_err(ahcd, fmt, args...) \
        printk(KERN_ERR "adm5120-hcd: " fmt , ## args )
-#define ahcd_info(ahcd, fmt, args...) \
+#define admhc_info(ahcd, fmt, args...) \
        printk(KERN_INFO "adm5120-hcd: " fmt , ## args )
 #define admhc_warn(ahcd, fmt, args...) \
        printk(KERN_WARNING "adm5120-hcd: " fmt , ## args )
@@ -645,16 +649,22 @@ static inline void periodic_reinit(struct admhcd *ahcd)
                                        &ahcd->regs->fminterval);
 }
 
-static inline u32 admhc_get_rhdesc(struct admhcd *ahcd)
+static inline u32 admhc_read_rhdesc(struct admhcd *ahcd)
 {
        return admhc_readl(ahcd, &ahcd->regs->rhdesc);
 }
 
-static inline u32 admhc_get_portstatus(struct admhcd *ahcd, int port)
+static inline u32 admhc_read_portstatus(struct admhcd *ahcd, int port)
 {
        return admhc_readl(ahcd, &ahcd->regs->portstatus[port]);
 }
 
+static inline void admhc_write_portstatus(struct admhcd *ahcd, int port,
+               u32 value)
+{
+       admhc_writel(ahcd, value, &ahcd->regs->portstatus[port]);
+}
+
 static inline void roothub_write_status(struct admhcd *ahcd, u32 value)
 {
        /* FIXME: read-only bits must be masked out */
This page took 0.027983 seconds and 4 git commands to generate.