OMAP_INT_EP("ep9in",   USB_DIR_IN  | 9, 16); OMAP_INT_EP("ep10out", USB_DIR_IN  | 10, 16); OMAP_INT_EP("ep11in",  USB_DIR_IN  | 9, 16); OMAP_INT_EP("ep12out", USB_DIR_IN  | 10, 16); 
OMAP_BULK_EP("ep15in",  USB_DIR_IN  | 15); OMAP_BULK_EP("ep15out", USB_DIR_OUT | 15);  
omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv){	unsigned	tmp, buf;	/* abolish any previous hardware state */	UDC_SYSCON1_REG = 0;	UDC_IRQ_EN_REG = 0;	UDC_IRQ_SRC_REG = UDC_IRQ_SRC_MASK;	UDC_DMA_IRQ_EN_REG = 0;	UDC_RXDMA_CFG_REG = 0;	UDC_TXDMA_CFG_REG = 0;	/* UDC_PULLUP_EN gates the chip clock */	// OTG_SYSCON_1_REG |= DEV_IDLE_EN;	udc = kmalloc (sizeof *udc, SLAB_KERNEL);	if (!udc)		return -ENOMEM;	memset(udc, 0, sizeof *udc);	spin_lock_init (&udc->lock);	udc->gadget.ops = &omap_gadget_ops;	udc->gadget.ep0 = &udc->ep[0].ep;	INIT_LIST_HEAD(&udc->gadget.ep_list);	INIT_LIST_HEAD(&udc->iso);	udc->gadget.speed = USB_SPEED_UNKNOWN;	udc->gadget.name = driver_name;	device_initialize(&udc->gadget.dev);	strcpy (udc->gadget.dev.bus_id, "gadget");	udc->gadget.dev.release = omap_udc_release;	udc->gadget.dev.parent = &odev->dev;	if (use_dma)		udc->gadget.dev.dma_mask = odev->dev.dma_mask;	udc->transceiver = xceiv;	/* ep0 is special; put it right after the SETUP buffer */	buf = omap_ep_setup("ep0", 0, USB_ENDPOINT_XFER_CONTROL,			8 /* after SETUP */, 64 /* maxpacket */, 0);	list_del_init(&udc->ep[0].ep.ep_list);	/* initially disable all non-ep0 endpoints */	for (tmp = 1; tmp < 15; tmp++) {		UDC_EP_RX_REG(tmp) = 0;		UDC_EP_TX_REG(tmp) = 0;	}#define OMAP_BULK_EP(name,addr) \	buf = omap_ep_setup(name "-bulk", addr, \			USB_ENDPOINT_XFER_BULK, buf, 64, 1);#define OMAP_INT_EP(name,addr, maxp) \	buf = omap_ep_setup(name "-int", addr, \			USB_ENDPOINT_XFER_INT, buf, maxp, 0);#define OMAP_ISO_EP(name,addr, maxp) \	buf = omap_ep_setup(name "-iso", addr, \			USB_ENDPOINT_XFER_ISOC, buf, maxp, 1);	switch (fifo_mode) {	case 0:		OMAP_BULK_EP("ep1in",  USB_DIR_IN  | 1);		OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);		OMAP_INT_EP("ep3in",   USB_DIR_IN  | 3, 16);		break;	case 1:		OMAP_BULK_EP("ep1in",  USB_DIR_IN  | 1);		OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);		OMAP_BULK_EP("ep3in",  USB_DIR_IN  | 3);		OMAP_BULK_EP("ep4out", USB_DIR_OUT | 4);		OMAP_BULK_EP("ep5in",  USB_DIR_IN  | 5);		OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5);		OMAP_BULK_EP("ep6in",  USB_DIR_IN  | 6);		OMAP_BULK_EP("ep6out", USB_DIR_OUT | 6);		OMAP_BULK_EP("ep7in",  USB_DIR_IN  | 7);		OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7);		OMAP_BULK_EP("ep8in",  USB_DIR_IN  | 8);		OMAP_BULK_EP("ep8out", USB_DIR_OUT | 8);		OMAP_INT_EP("ep9in",   USB_DIR_IN  | 9, 16);		OMAP_INT_EP("ep10out", USB_DIR_IN  | 10, 16);		OMAP_INT_EP("ep11in",  USB_DIR_IN  | 9, 16);		OMAP_INT_EP("ep12out", USB_DIR_IN  | 10, 16);		break;#ifdef	USE_ISO	case 2:			/* mixed iso/bulk */		OMAP_ISO_EP("ep1in",   USB_DIR_IN  | 1, 256);		OMAP_ISO_EP("ep2out",  USB_DIR_OUT | 2, 256);		OMAP_ISO_EP("ep3in",   USB_DIR_IN  | 3, 128);		OMAP_ISO_EP("ep4out",  USB_DIR_OUT | 4, 128);		OMAP_INT_EP("ep5in",   USB_DIR_IN  | 5, 16);		OMAP_BULK_EP("ep6in",  USB_DIR_IN  | 6);		OMAP_BULK_EP("ep7out", USB_DIR_OUT | 7);		OMAP_INT_EP("ep8in",   USB_DIR_IN  | 8, 16);		break;	case 3:			/* mixed bulk/iso */		OMAP_BULK_EP("ep1in",  USB_DIR_IN  | 1);		OMAP_BULK_EP("ep2out", USB_DIR_OUT | 2);		OMAP_INT_EP("ep3in",   USB_DIR_IN  | 3, 16);		OMAP_BULK_EP("ep4in",  USB_DIR_IN  | 4);		OMAP_BULK_EP("ep5out", USB_DIR_OUT | 5);		OMAP_INT_EP("ep6in",   USB_DIR_IN  | 6, 16);		OMAP_ISO_EP("ep7in",   USB_DIR_IN  | 7, 256);		OMAP_ISO_EP("ep8out",  USB_DIR_OUT | 8, 256);		OMAP_INT_EP("ep9in",   USB_DIR_IN  | 9, 16);		break;#endif	/* add more modes as needed */	default:		ERR("unsupported fifo_mode #%d\n", fifo_mode);		return -ENODEV;	}	UDC_SYSCON1_REG = UDC_CFG_LOCK|UDC_SELF_PWR;	INFO("fifo mode %d, %d bytes not used\n", fifo_mode, 2048 - buf);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/313980c92724cf42877a7bdafdef439ee9d68ccb/omap_udc.c/clean/drivers/usb/gadget/omap_udc.c