diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-11-10 19:20:47 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-11-10 19:20:47 +0000 |
commit | 00549f6de02bdb40a6470fe998edcbd3e048357e (patch) | |
tree | 1f37fd1e10fcb9d617f0a09e3de37551a3e34095 /target/linux/adm5120/files/drivers/usb/host/adm5120.h | |
parent | 8c23d0644ab3698c5c47d47f54f3ccece265c84c (diff) |
[adm5120] more USB driver fixes [http://openwrt.pastebin.ca/768610 bootlog :)]
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9530 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/drivers/usb/host/adm5120.h')
-rw-r--r-- | target/linux/adm5120/files/drivers/usb/host/adm5120.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120.h b/target/linux/adm5120/files/drivers/usb/host/adm5120.h index bdfdbc713c..f8b576a4c6 100644 --- a/target/linux/adm5120/files/drivers/usb/host/adm5120.h +++ b/target/linux/adm5120/files/drivers/usb/host/adm5120.h @@ -436,8 +436,13 @@ 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...) \ @@ -645,16 +650,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 */ |