diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 10 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.h | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 547e0e390726..49f2346afad3 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1319,7 +1319,6 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) | |||
1319 | #endif | 1319 | #endif |
1320 | u8 reg; | 1320 | u8 reg; |
1321 | char *type; | 1321 | char *type; |
1322 | u16 hwvers, rev_major, rev_minor; | ||
1323 | char aInfo[78], aRevision[32], aDate[12]; | 1322 | char aInfo[78], aRevision[32], aDate[12]; |
1324 | void __iomem *mbase = musb->mregs; | 1323 | void __iomem *mbase = musb->mregs; |
1325 | int status = 0; | 1324 | int status = 0; |
@@ -1391,11 +1390,10 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) | |||
1391 | } | 1390 | } |
1392 | 1391 | ||
1393 | /* log release info */ | 1392 | /* log release info */ |
1394 | hwvers = musb_read_hwvers(mbase); | 1393 | musb->hwvers = musb_read_hwvers(mbase); |
1395 | rev_major = (hwvers >> 10) & 0x1f; | 1394 | snprintf(aRevision, 32, "%d.%d%s", MUSB_HWVERS_MAJOR(musb->hwvers), |
1396 | rev_minor = hwvers & 0x3ff; | 1395 | MUSB_HWVERS_MINOR(musb->hwvers), |
1397 | snprintf(aRevision, 32, "%d.%d%s", rev_major, | 1396 | (musb->hwvers & MUSB_HWVERS_RC) ? "RC" : ""); |
1398 | rev_minor, (hwvers & 0x8000) ? "RC" : ""); | ||
1399 | printk(KERN_DEBUG "%s: %sHDRC RTL version %s %s\n", | 1397 | printk(KERN_DEBUG "%s: %sHDRC RTL version %s %s\n", |
1400 | musb_driver_name, type, aRevision, aDate); | 1398 | musb_driver_name, type, aRevision, aDate); |
1401 | 1399 | ||
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 6aa5f22e5274..03d50909b078 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -322,6 +322,14 @@ struct musb { | |||
322 | struct clk *clock; | 322 | struct clk *clock; |
323 | irqreturn_t (*isr)(int, void *); | 323 | irqreturn_t (*isr)(int, void *); |
324 | struct work_struct irq_work; | 324 | struct work_struct irq_work; |
325 | #define MUSB_HWVERS_MAJOR(x) ((x >> 10) & 0x1f) | ||
326 | #define MUSB_HWVERS_MINOR(x) (x & 0x3ff) | ||
327 | #define MUSB_HWVERS_RC 0x8000 | ||
328 | #define MUSB_HWVERS_1300 0x52C | ||
329 | #define MUSB_HWVERS_1400 0x590 | ||
330 | #define MUSB_HWVERS_1800 0x720 | ||
331 | #define MUSB_HWVERS_2000 0x800 | ||
332 | u16 hwvers; | ||
325 | 333 | ||
326 | /* this hub status bit is reserved by USB 2.0 and not seen by usbcore */ | 334 | /* this hub status bit is reserved by USB 2.0 and not seen by usbcore */ |
327 | #define MUSB_PORT_STAT_RESUME (1 << 31) | 335 | #define MUSB_PORT_STAT_RESUME (1 << 31) |