Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/usb/controller/musb_otg.h
Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | struct musbotg_flags { | ||||
uint8_t self_powered:1; | uint8_t self_powered:1; | ||||
uint8_t clocks_off:1; | uint8_t clocks_off:1; | ||||
uint8_t port_powered:1; | uint8_t port_powered:1; | ||||
uint8_t port_enabled:1; | uint8_t port_enabled:1; | ||||
uint8_t port_over_current:1; | uint8_t port_over_current:1; | ||||
uint8_t d_pulled_up:1; | uint8_t d_pulled_up:1; | ||||
}; | }; | ||||
struct musb_otg_ep_cfg { | |||||
int ep_end; | |||||
int ep_fifosz_shift; | |||||
uint8_t ep_fifosz_reg; | |||||
}; | |||||
struct musbotg_softc { | struct musbotg_softc { | ||||
struct usb_bus sc_bus; | struct usb_bus sc_bus; | ||||
union musbotg_hub_temp sc_hub_temp; | union musbotg_hub_temp sc_hub_temp; | ||||
struct usb_hw_ep_profile sc_hw_ep_profile[MUSB2_EP_MAX]; | struct usb_hw_ep_profile sc_hw_ep_profile[MUSB2_EP_MAX]; | ||||
struct usb_device *sc_devices[MUSB2_MAX_DEVICES]; | struct usb_device *sc_devices[MUSB2_MAX_DEVICES]; | ||||
struct resource *sc_io_res; | struct resource *sc_io_res; | ||||
struct resource *sc_irq_res; | struct resource *sc_irq_res; | ||||
Show All 20 Lines | struct musbotg_softc { | ||||
uint8_t sc_hub_idata[1]; | uint8_t sc_hub_idata[1]; | ||||
uint16_t sc_channel_mask; /* 16 endpoints */ | uint16_t sc_channel_mask; /* 16 endpoints */ | ||||
struct musbotg_flags sc_flags; | struct musbotg_flags sc_flags; | ||||
uint8_t sc_id; | uint8_t sc_id; | ||||
uint8_t sc_mode; | uint8_t sc_mode; | ||||
void *sc_platform_data; | void *sc_platform_data; | ||||
const struct musb_otg_ep_cfg *sc_ep_cfg; | |||||
}; | }; | ||||
/* prototypes */ | /* prototypes */ | ||||
usb_error_t musbotg_init(struct musbotg_softc *sc); | usb_error_t musbotg_init(struct musbotg_softc *sc); | ||||
void musbotg_uninit(struct musbotg_softc *sc); | void musbotg_uninit(struct musbotg_softc *sc); | ||||
void musbotg_interrupt(struct musbotg_softc *sc, | void musbotg_interrupt(struct musbotg_softc *sc, | ||||
uint16_t rxstat, uint16_t txstat, uint8_t stat); | uint16_t rxstat, uint16_t txstat, uint8_t stat); | ||||
void musbotg_vbus_interrupt(struct musbotg_softc *sc, uint8_t is_on); | void musbotg_vbus_interrupt(struct musbotg_softc *sc, uint8_t is_on); | ||||
void musbotg_connect_interrupt(struct musbotg_softc *sc); | void musbotg_connect_interrupt(struct musbotg_softc *sc); | ||||
#endif /* _MUSB2_OTG_H_ */ | #endif /* _MUSB2_OTG_H_ */ |