• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/musb/

Lines Matching defs:musb

49 #include <linux/usb/musb.h>
51 struct musb;
55 /* Helper defines for struct musb->hwvers */
79 #define is_peripheral_enabled(musb) ((musb)->board_mode != MUSB_HOST)
80 #define is_host_enabled(musb) ((musb)->board_mode != MUSB_PERIPHERAL)
81 #define is_otg_enabled(musb) ((musb)->board_mode == MUSB_OTG)
90 #define is_peripheral_enabled(musb) is_peripheral_capable()
91 #define is_host_enabled(musb) is_host_capable()
92 #define is_otg_enabled(musb) 0
94 #define is_peripheral_active(musb) is_peripheral_capable()
95 #define is_host_active(musb) is_host_capable()
126 extern irqreturn_t musb_g_ep0_irq(struct musb *);
127 extern void musb_g_tx(struct musb *, u8);
128 extern void musb_g_rx(struct musb *, u8);
129 extern void musb_g_reset(struct musb *);
130 extern void musb_g_suspend(struct musb *);
131 extern void musb_g_resume(struct musb *);
132 extern void musb_g_wakeup(struct musb *);
133 extern void musb_g_disconnect(struct musb *);
139 static inline irqreturn_t musb_g_ep0_irq(struct musb *m) { return IRQ_NONE; }
140 static inline void musb_g_reset(struct musb *m) {}
141 static inline void musb_g_suspend(struct musb *m) {}
142 static inline void musb_g_resume(struct musb *m) {}
143 static inline void musb_g_wakeup(struct musb *m) {}
144 static inline void musb_g_disconnect(struct musb *m) {}
154 extern irqreturn_t musb_h_ep0_irq(struct musb *);
155 extern void musb_host_tx(struct musb *, u8);
156 extern void musb_host_rx(struct musb *, u8);
162 static inline irqreturn_t musb_h_ep0_irq(struct musb *m) { return IRQ_NONE; }
163 static inline void musb_host_tx(struct musb *m, u8 e) {}
164 static inline void musb_host_rx(struct musb *m, u8 e) {}
251 #define MUSB_MODE(musb) ((musb)->is_host ? "Host" : "Peripheral")
261 struct musb *musb;
269 /* index in musb->endpoints[] */
326 * struct musb - Driver instance data.
328 struct musb {
364 void (*board_set_vbus)(struct musb *, int is_on);
419 #define can_bulk_split(musb,type) \
420 (((type) == USB_ENDPOINT_XFER_BULK) && (musb)->bulk_split)
423 #define can_bulk_combine(musb,type) \
424 (((type) == USB_ENDPOINT_XFER_BULK) && (musb)->bulk_combine)
489 extern void musb_platform_save_context(struct musb *musb,
491 extern void musb_platform_restore_context(struct musb *musb,
500 static inline void musb_set_vbus(struct musb *musb, int is_on)
502 musb->board_set_vbus(musb, is_on);
506 static inline struct musb *gadget_to_musb(struct usb_gadget *g)
508 return container_of(g, struct musb, g);
513 static inline int musb_read_fifosize(struct musb *musb,
516 musb->nr_endpoints++;
517 musb->epmask |= (1 << epnum);
531 static inline void musb_configure_ep0(struct musb *musb)
533 musb->endpoints[0].max_packet_sz_tx = MUSB_EP0_FIFOSIZE;
534 musb->endpoints[0].max_packet_sz_rx = MUSB_EP0_FIFOSIZE;
535 musb->endpoints[0].is_shared_fifo = true;
540 static inline int musb_read_fifosize(struct musb *musb,
543 void *mbase = musb->mregs;
552 musb->nr_endpoints++;
553 musb->epmask |= (1 << epnum);
570 static inline void musb_configure_ep0(struct musb *musb)
572 musb->endpoints[0].max_packet_sz_tx = MUSB_EP0_FIFOSIZE;
573 musb->endpoints[0].max_packet_sz_rx = MUSB_EP0_FIFOSIZE;
574 musb->endpoints[0].is_shared_fifo = true;
583 extern void musb_start(struct musb *musb);
584 extern void musb_stop(struct musb *musb);
589 extern void musb_load_testpacket(struct musb *);
591 extern irqreturn_t musb_interrupt(struct musb *);
593 extern void musb_platform_enable(struct musb *musb);
594 extern void musb_platform_disable(struct musb *musb);
596 extern void musb_hnp_stop(struct musb *musb);
598 extern int musb_platform_set_mode(struct musb *musb, u8 musb_mode);
603 extern void musb_platform_try_idle(struct musb *musb, unsigned long timeout);
609 extern int musb_platform_get_vbus_status(struct musb *musb);
614 extern int __init musb_platform_init(struct musb *musb, void *board_data);
615 extern int musb_platform_exit(struct musb *musb);