diff options
-rw-r--r-- | drivers/usb/musb/musb_core.h | 16 | ||||
-rw-r--r-- | drivers/usb/musb/musb_regs.h | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 74a55b95ecb..17e7115493f 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -52,6 +52,15 @@ struct musb; | |||
52 | struct musb_hw_ep; | 52 | struct musb_hw_ep; |
53 | struct musb_ep; | 53 | struct musb_ep; |
54 | 54 | ||
55 | /* Helper defines for struct musb->hwvers */ | ||
56 | #define MUSB_HWVERS_MAJOR(x) ((x >> 10) & 0x1f) | ||
57 | #define MUSB_HWVERS_MINOR(x) (x & 0x3ff) | ||
58 | #define MUSB_HWVERS_RC 0x8000 | ||
59 | #define MUSB_HWVERS_1300 0x52C | ||
60 | #define MUSB_HWVERS_1400 0x590 | ||
61 | #define MUSB_HWVERS_1800 0x720 | ||
62 | #define MUSB_HWVERS_1900 0x784 | ||
63 | #define MUSB_HWVERS_2000 0x800 | ||
55 | 64 | ||
56 | #include "musb_debug.h" | 65 | #include "musb_debug.h" |
57 | #include "musb_dma.h" | 66 | #include "musb_dma.h" |
@@ -322,13 +331,6 @@ struct musb { | |||
322 | struct clk *clock; | 331 | struct clk *clock; |
323 | irqreturn_t (*isr)(int, void *); | 332 | irqreturn_t (*isr)(int, void *); |
324 | struct work_struct irq_work; | 333 | 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; | 334 | u16 hwvers; |
333 | 335 | ||
334 | /* this hub status bit is reserved by USB 2.0 and not seen by usbcore */ | 336 | /* this hub status bit is reserved by USB 2.0 and not seen by usbcore */ |
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h index 895fb057e44..292894a2c24 100644 --- a/drivers/usb/musb/musb_regs.h +++ b/drivers/usb/musb/musb_regs.h | |||
@@ -533,7 +533,11 @@ static inline u8 musb_read_configdata(void __iomem *mbase) | |||
533 | 533 | ||
534 | static inline u16 musb_read_hwvers(void __iomem *mbase) | 534 | static inline u16 musb_read_hwvers(void __iomem *mbase) |
535 | { | 535 | { |
536 | return 0; | 536 | /* |
537 | * This register is invisible on Blackfin, actually the MUSB | ||
538 | * RTL version of Blackfin is 1.9, so just harcode its value. | ||
539 | */ | ||
540 | return MUSB_HWVERS_1900; | ||
537 | } | 541 | } |
538 | 542 | ||
539 | static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase) | 543 | static inline void __iomem *musb_read_target_reg_base(u8 i, void __iomem *mbase) |