29 writel (index, ®s->idxaddr);
31 return readl (®s->idxdata);
37 writel (index, ®s->idxaddr);
38 writel (value, ®s->idxdata);
46 #define RETRY_COUNTER 16
47 #define FORCE_PCI_SERR 11
48 #define FORCE_PCI_INTERRUPT 10
49 #define FORCE_USB_INTERRUPT 9
50 #define FORCE_CPU_INTERRUPT 8
51 #define ILLEGAL_BYTE_ENABLES 5
53 #define FORCE_RECEIVE_ERROR 2
54 #define FORCE_TRANSMIT_CRC_ERROR 0
55 #define REG_FRAME 0x02
56 #define REG_CHIPREV 0x03
57 #define REG_HS_NAK_RATE 0x0a
59 #define CHIPREV_1 0x0100
60 #define CHIPREV_1A 0x0110
67 #define REG_EP_MAXPKT(dev,num) (((num) + 1) * 0x10 + \
68 (((dev)->gadget.speed == USB_SPEED_HIGH) ? 0 : 1))
90 struct net2280_dma *
dummy;
100 in_fifo_validate : 1,
109 static inline void allow_status (
struct net2280_ep *ep)
115 , &ep->regs->ep_rsp);
120 static inline void set_fifo_bytecount (
struct net2280_ep *ep,
unsigned count)
125 struct net2280_request {
127 struct net2280_dma *
td;
138 struct net2280_ep ep [7];
156 struct pci_pool *requests;
160 static inline void set_halt (
struct net2280_ep *ep)
167 , &ep->regs->ep_rsp);
170 static inline void clear_halt (
struct net2280_ep *ep)
179 , &ep->regs->ep_rsp);
184 static inline void net2280_led_init (
struct net2280 *
dev)
192 , &dev->regs->gpioctl);
213 writel (val, &dev->regs->gpioctl);
217 static inline void net2280_led_active (
struct net2280 *dev,
int is_active)
219 u32 val =
readl (&dev->regs->gpioctl);
226 writel (val, &dev->regs->gpioctl);
228 static inline void net2280_led_shutdown (
struct net2280 *dev)
232 &dev->regs->gpioctl);
237 #define net2280_led_init(dev) do { } while (0)
238 #define net2280_led_speed(dev, speed) do { } while (0)
239 #define net2280_led_shutdown(dev) do { } while (0)
245 #define xprintk(dev,level,fmt,args...) \
246 printk(level "%s %s: " fmt , driver_name , \
247 pci_name(dev->pdev) , ## args)
251 #define DEBUG(dev,fmt,args...) \
252 xprintk(dev , KERN_DEBUG , fmt , ## args)
254 #define DEBUG(dev,fmt,args...) \
261 #define VDEBUG(dev,fmt,args...) \
265 #define ERROR(dev,fmt,args...) \
266 xprintk(dev , KERN_ERR , fmt , ## args)
267 #define WARNING(dev,fmt,args...) \
268 xprintk(dev , KERN_WARNING , fmt , ## args)
269 #define INFO(dev,fmt,args...) \
270 xprintk(dev , KERN_INFO , fmt , ## args)
274 static inline void start_out_naking (
struct net2280_ep *ep)
279 readl (&ep->regs->ep_rsp);
283 static inline void assert_out_naking (
struct net2280_ep *ep,
const char *where)
288 DEBUG (ep->dev,
"%s %s %08x !NAK\n",
289 ep->ep.name, where, tmp);
294 #define ASSERT_OUT_NAKING(ep) assert_out_naking(ep,__func__)
296 #define ASSERT_OUT_NAKING(ep) do {} while (0)
299 static inline void stop_out_naking (
struct net2280_ep *ep)
303 tmp =
readl (&ep->regs->ep_stat);