]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/m66592-udc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / m66592-udc.h
index be0a4c1f80a2d66fa8c26ed66f9aacc81093e811..286ce07e7960423ac2a18f4b2075c440fab1b010 100644 (file)
 #ifndef __M66592_UDC_H__
 #define __M66592_UDC_H__
 
+#if defined(CONFIG_SUPERH_BUILT_IN_M66592) && defined(CONFIG_HAVE_CLK)
+#include <linux/clk.h>
+#endif
+
 #define M66592_SYSCFG          0x00
 #define M66592_XTAL            0xC000  /* b15-14: Crystal selection */
 #define   M66592_XTAL48                 0x8000         /* 48MHz */
@@ -476,6 +480,9 @@ struct m66592_ep {
 struct m66592 {
        spinlock_t              lock;
        void __iomem            *reg;
+#if defined(CONFIG_SUPERH_BUILT_IN_M66592) && defined(CONFIG_HAVE_CLK)
+       struct clk *clk;
+#endif
 
        struct usb_gadget               gadget;
        struct usb_gadget_driver        *driver;
@@ -485,7 +492,7 @@ struct m66592 {
        struct m66592_ep        *epaddr2ep[16];
 
        struct usb_request      *ep0_req;       /* for internal request */
-       u16                     ep0_data;       /* for internal request */
+       __le16                  ep0_data;       /* for internal request */
        u16                     old_vbus;
 
        struct timer_list       timer;
@@ -604,26 +611,6 @@ static inline void m66592_mdfy(struct m66592 *m66592, u16 val, u16 pat,
 #define m66592_bset(m66592, val, offset)       \
                        m66592_mdfy(m66592, val, 0, offset)
 
-#if defined(CONFIG_SUPERH_BUILT_IN_M66592)
-#include <asm/io.h>
-#define MSTPCR2                0xA4150038      /* for SH7722 */
-#define MSTPCR2_USB    0x00000800
-
-static inline void usbf_start_clock(void)
-{
-       ctrl_outl(ctrl_inl(MSTPCR2) & ~MSTPCR2_USB, MSTPCR2);
-}
-
-static inline void usbf_stop_clock(void)
-{
-       ctrl_outl(ctrl_inl(MSTPCR2) | MSTPCR2_USB, MSTPCR2);
-}
-
-#else
-#define usbf_start_clock(x)
-#define usbf_stop_clock(x)
-#endif /* if defined(CONFIG_SUPERH_BUILT_IN_M66592) */
-
 #endif /* ifndef __M66592_UDC_H__ */