Go to the documentation of this file.
17 #define SL811_EP_A(base) ((base) + 0)
18 #define SL811_EP_B(base) ((base) + 8)
20 #define SL811_HOST_BUF 0x00
21 #define SL811_PERIPH_EP0 0x00
22 #define SL811_PERIPH_EP1 0x10
23 #define SL811_PERIPH_EP2 0x20
24 #define SL811_PERIPH_EP3 0x30
30 #define SL11H_HOSTCTLREG 0
31 # define SL11H_HCTLMASK_ARM 0x01
32 # define SL11H_HCTLMASK_ENABLE 0x02
33 # define SL11H_HCTLMASK_IN 0x00
34 # define SL11H_HCTLMASK_OUT 0x04
35 # define SL11H_HCTLMASK_ISOCH 0x10
36 # define SL11H_HCTLMASK_AFTERSOF 0x20
37 # define SL11H_HCTLMASK_TOGGLE 0x40
38 # define SL11H_HCTLMASK_PREAMBLE 0x80
39 #define SL11H_BUFADDRREG 1
40 #define SL11H_BUFLNTHREG 2
41 #define SL11H_PKTSTATREG 3
42 # define SL11H_STATMASK_ACK 0x01
43 # define SL11H_STATMASK_ERROR 0x02
44 # define SL11H_STATMASK_TMOUT 0x04
45 # define SL11H_STATMASK_SEQ 0x08
46 # define SL11H_STATMASK_SETUP 0x10
47 # define SL11H_STATMASK_OVF 0x20
48 # define SL11H_STATMASK_NAK 0x40
49 # define SL11H_STATMASK_STALL 0x80
50 #define SL11H_PIDEPREG 3
51 # define SL_SETUP 0xd0
55 # define SL_PREAMBLE 0xc0
57 # define SL_STALL 0xe0
58 # define SL_DATA0 0x30
59 # define SL_DATA1 0xb0
60 #define SL11H_XFERCNTREG 4
61 #define SL11H_DEVADDRREG 4
66 #define SL11H_CTLREG1 5
67 # define SL11H_CTL1MASK_SOF_ENA 0x01
68 # define SL11H_CTL1MASK_FORCE 0x18
69 # define SL11H_CTL1MASK_NORMAL 0x00
70 # define SL11H_CTL1MASK_SE0 0x08
71 # define SL11H_CTL1MASK_J 0x10
72 # define SL11H_CTL1MASK_K 0x18
73 # define SL11H_CTL1MASK_LSPD 0x20
74 # define SL11H_CTL1MASK_SUSPEND 0x40
75 #define SL11H_IRQ_ENABLE 6
76 # define SL11H_INTMASK_DONE_A 0x01
77 # define SL11H_INTMASK_DONE_B 0x02
78 # define SL11H_INTMASK_SOFINTR 0x10
79 # define SL11H_INTMASK_INSRMV 0x20
80 # define SL11H_INTMASK_RD 0x40
81 # define SL11H_INTMASK_DP 0x80
82 #define SL11S_ADDRESS 7
86 #define SL11H_IRQ_STATUS 0x0D
87 #define SL11H_HWREVREG 0x0E
88 # define SL11H_HWRMASK_HWREV 0xF0
89 #define SL11H_SOFLOWREG 0x0E
90 #define SL11H_SOFTMRREG 0x0F
95 #define SL811HS_CTLREG2 0x0F
96 # define SL811HS_CTL2MASK_SOF_MASK 0x3F
97 # define SL811HS_CTL2MASK_DSWAP 0x40
98 # define SL811HS_CTL2MASK_HOST 0x80
100 #define SL811HS_CTL2_INIT (SL811HS_CTL2MASK_HOST | 0x2e)
108 #define H_MAXPACKET 120
110 #define SL11H_DATA_START 0x10
111 #define SL811HS_PACKET_BUF(is_a) ((is_a) \
113 : (SL11H_DATA_START + H_MAXPACKET))
117 #define LOG2_PERIODIC_SIZE 5
118 #define PERIODIC_SIZE (1 << LOG2_PERIODIC_SIZE)
158 static inline struct sl811 *hcd_to_sl811(
struct usb_hcd *hcd)
160 return (
struct sl811 *) (hcd->hcd_priv);
163 static inline struct usb_hcd *sl811_to_hcd(
struct sl811 *
sl811)
165 return container_of((
void *) sl811,
struct usb_hcd, hcd_priv);
169 struct usb_host_endpoint *
hep;
197 static inline u8 sl811_read(
struct sl811 *sl811,
int reg)
203 static inline void sl811_write(
struct sl811 *sl811,
int reg,
u8 val)
210 sl811_write_buf(
struct sl811 *sl811,
int addr,
const void *
buf,
size_t count)
222 writeb(*data++, data_reg);
227 sl811_read_buf(
struct sl811 *sl811,
int addr,
void *buf,
size_t count)
239 *data++ =
readb(data_reg);
246 #define DBG(stuff...) printk(KERN_DEBUG "sl811: " stuff)
248 #define DBG(stuff...) do{}while(0)
254 # define VDBG(stuff...) do{}while(0)
260 # define PACKET(stuff...) do{}while(0)
263 #define ERR(stuff...) printk(KERN_ERR "sl811: " stuff)
264 #define WARNING(stuff...) printk(KERN_WARNING "sl811: " stuff)
265 #define INFO(stuff...) printk(KERN_INFO "sl811: " stuff)