summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.h
diff options
context:
space:
mode:
authorAnand Gadiyar <gadiyar@ti.com>2009-11-16 21:09:21 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 11:55:25 -0800
commit32c3b94e2b643bfeca5e48b0f7f0b81812c7a1d3 (patch)
tree8c868427abac6a9c8006cd2c44fa32ee164694ee /drivers/usb/musb/musb_core.h
parent32340d3f75dba732a0545173ac65aab6fc3d4952 (diff)
downloadop-kernel-dev-32c3b94e2b643bfeca5e48b0f7f0b81812c7a1d3.zip
op-kernel-dev-32c3b94e2b643bfeca5e48b0f7f0b81812c7a1d3.tar.gz
USB: MUSB: save hardware revision at init
MUSB: save hardware revision at init This can be used later to flag workarounds for issues affecting particular revisions. Saving this at init avoids having to read the HWVERS register multiple times in code. While at it, use macros to extract the version information instead of using hardcoded values. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r--drivers/usb/musb/musb_core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 6aa5f22..03d5090 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -322,6 +322,14 @@ struct musb {
struct clk *clock;
irqreturn_t (*isr)(int, void *);
struct work_struct irq_work;
+#define MUSB_HWVERS_MAJOR(x) ((x >> 10) & 0x1f)
+#define MUSB_HWVERS_MINOR(x) (x & 0x3ff)
+#define MUSB_HWVERS_RC 0x8000
+#define MUSB_HWVERS_1300 0x52C
+#define MUSB_HWVERS_1400 0x590
+#define MUSB_HWVERS_1800 0x720
+#define MUSB_HWVERS_2000 0x800
+ u16 hwvers;
/* this hub status bit is reserved by USB 2.0 and not seen by usbcore */
#define MUSB_PORT_STAT_RESUME (1 << 31)
OpenPOWER on IntegriCloud