diff options
Diffstat (limited to 'drivers/usb/host/fusbh200.h')
-rw-r--r-- | drivers/usb/host/fusbh200.h | 62 |
1 files changed, 3 insertions, 59 deletions
diff --git a/drivers/usb/host/fusbh200.h b/drivers/usb/host/fusbh200.h index 6b719e066c3f..d6e5b3d4aa68 100644 --- a/drivers/usb/host/fusbh200.h +++ b/drivers/usb/host/fusbh200.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_FUSBH200_H | 1 | #ifndef __LINUX_FUSBH200_H |
2 | #define __LINUX_FUSBH200_H | 2 | #define __LINUX_FUSBH200_H |
3 | 3 | ||
4 | #include <linux/usb/ehci-dbgp.h> | ||
5 | |||
4 | /* definitions used for the EHCI driver */ | 6 | /* definitions used for the EHCI driver */ |
5 | 7 | ||
6 | /* | 8 | /* |
@@ -84,7 +86,7 @@ struct fusbh200_hcd { /* one per controller */ | |||
84 | /* glue to PCI and HCD framework */ | 86 | /* glue to PCI and HCD framework */ |
85 | struct fusbh200_caps __iomem *caps; | 87 | struct fusbh200_caps __iomem *caps; |
86 | struct fusbh200_regs __iomem *regs; | 88 | struct fusbh200_regs __iomem *regs; |
87 | struct fusbh200_dbg_port __iomem *debug; | 89 | struct ehci_dbg_port __iomem *debug; |
88 | 90 | ||
89 | __u32 hcs_params; /* cached register copy */ | 91 | __u32 hcs_params; /* cached register copy */ |
90 | spinlock_t lock; | 92 | spinlock_t lock; |
@@ -285,64 +287,6 @@ struct fusbh200_regs { | |||
285 | #define BMIER_VBUS_ERR_EN (1<<0) | 287 | #define BMIER_VBUS_ERR_EN (1<<0) |
286 | }; | 288 | }; |
287 | 289 | ||
288 | /* Appendix C, Debug port ... intended for use with special "debug devices" | ||
289 | * that can help if there's no serial console. (nonstandard enumeration.) | ||
290 | */ | ||
291 | struct fusbh200_dbg_port { | ||
292 | u32 control; | ||
293 | #define DBGP_OWNER (1<<30) | ||
294 | #define DBGP_ENABLED (1<<28) | ||
295 | #define DBGP_DONE (1<<16) | ||
296 | #define DBGP_INUSE (1<<10) | ||
297 | #define DBGP_ERRCODE(x) (((x)>>7)&0x07) | ||
298 | # define DBGP_ERR_BAD 1 | ||
299 | # define DBGP_ERR_SIGNAL 2 | ||
300 | #define DBGP_ERROR (1<<6) | ||
301 | #define DBGP_GO (1<<5) | ||
302 | #define DBGP_OUT (1<<4) | ||
303 | #define DBGP_LEN(x) (((x)>>0)&0x0f) | ||
304 | u32 pids; | ||
305 | #define DBGP_PID_GET(x) (((x)>>16)&0xff) | ||
306 | #define DBGP_PID_SET(data, tok) (((data)<<8)|(tok)) | ||
307 | u32 data03; | ||
308 | u32 data47; | ||
309 | u32 address; | ||
310 | #define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) | ||
311 | }; | ||
312 | |||
313 | #ifdef CONFIG_EARLY_PRINTK_DBGP | ||
314 | #include <linux/init.h> | ||
315 | extern int __init early_dbgp_init(char *s); | ||
316 | extern struct console early_dbgp_console; | ||
317 | #endif /* CONFIG_EARLY_PRINTK_DBGP */ | ||
318 | |||
319 | struct usb_hcd; | ||
320 | |||
321 | static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd) | ||
322 | { | ||
323 | return 1; /* Shouldn't this be 0? */ | ||
324 | } | ||
325 | |||
326 | static inline int xen_dbgp_external_startup(struct usb_hcd *hcd) | ||
327 | { | ||
328 | return -1; | ||
329 | } | ||
330 | |||
331 | #ifdef CONFIG_EARLY_PRINTK_DBGP | ||
332 | /* Call backs from fusbh200 host driver to fusbh200 debug driver */ | ||
333 | extern int dbgp_external_startup(struct usb_hcd *); | ||
334 | extern int dbgp_reset_prep(struct usb_hcd *hcd); | ||
335 | #else | ||
336 | static inline int dbgp_reset_prep(struct usb_hcd *hcd) | ||
337 | { | ||
338 | return xen_dbgp_reset_prep(hcd); | ||
339 | } | ||
340 | static inline int dbgp_external_startup(struct usb_hcd *hcd) | ||
341 | { | ||
342 | return xen_dbgp_external_startup(hcd); | ||
343 | } | ||
344 | #endif | ||
345 | |||
346 | /*-------------------------------------------------------------------------*/ | 290 | /*-------------------------------------------------------------------------*/ |
347 | 291 | ||
348 | #define QTD_NEXT(fusbh200, dma) cpu_to_hc32(fusbh200, (u32)dma) | 292 | #define QTD_NEXT(fusbh200, dma) cpu_to_hc32(fusbh200, (u32)dma) |