#define _nbu2ss_zero_len_pkt(udc, epnum) \
_nbu2ss_ep_in_end(udc, epnum, 0, 0)
-
/*===========================================================================*/
/* Global */
struct nbu2ss_udc udc_controller;
-
/*-------------------------------------------------------------------------*/
/* Read */
static inline u32 _nbu2ss_readl(void *address)
}
}
-
/*-------------------------------------------------------------------------*/
/* Device Descriptor */
static struct usb_device_descriptor device_desc = {
_nbu2ss_writel(&udc->p_regs->EP0_INT_ENA, EP0_INT_EN_BIT);
}
-
/*-------------------------------------------------------------------------*/
static int _nbu2ss_nuke(struct nbu2ss_udc *udc,
struct nbu2ss_ep *ep,
return 0;
}
-
/*-------------------------------------------------------------------------*/
static void _nbu2ss_reset_controller(struct nbu2ss_udc *udc)
{
.fifo_flush = nbu2ss_ep_fifo_flush,
};
-
/*-------------------------------------------------------------------------*/
/* usb_gadget_ops */
return 0;
}
-
static const struct usb_gadget_ops nbu2ss_gadget_ops = {
.get_frame = nbu2ss_gad_get_frame,
.wakeup = nbu2ss_gad_wakeup,
return 0;
}
-
static struct platform_driver udc_driver = {
.probe = nbu2ss_drv_probe,
.shutdown = nbu2ss_drv_shutdown,
MODULE_AUTHOR("Renesas Electronics Corporation");
MODULE_LICENSE("GPL");
-
* GNU General Public License for more details.
*/
-
-
-
#ifndef _LINUX_EMXX_H
#define _LINUX_EMXX_H
-
-
/*---------------------------------------------------------------------------*/
/*----------------- Default undef */
#if 0
#define USE_DMA 1
#define USE_SUSPEND_WAIT 1
-
-
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
-
/*------------ Board dependence(Resource) */
#define VBUS_VALUE GPIO_VBUS
/* DMA Abort wait time ms */
#define DMA_DISABLE_TIME 10
-
-
/*------------ Controller dependence */
#define NUM_ENDPOINTS 14 /* Endpoint */
#define REG_EP_NUM 15 /* Endpoint Register */
#define DMA_MAX_COUNT 256 /* DMA Block */
-
-
#define EPC_RST_DISABLE_TIME 1 /* 1 usec */
#define EPC_DIRPD_DISABLE_TIME 1 /* 1 msec */
#define EPC_PLL_LOCK_COUNT 1000 /* 1000 */
#define CHATGER_TIME 700 /* 700msec */
#define USB_SUSPEND_TIME 2000 /* 2 sec */
-
/* U2F FLAG */
#define U2F_ENABLE 1
#define U2F_DISABLE 0
-
/*------- BIT */
#define BIT00 0x00000001
#define BIT01 0x00000002
/*------- (0x1118:) EPnTADR Register */
#define EPn_TADR 0xFFFFFFFF /* RW */
-
-
/*===========================================================================*/
/* Struct */
/*------- ep_regs */
u8 Reserved1200[0x1000-0x200]; /* Reserved */
} __aligned(32);
-
-
-
-
-
-
-
#define EP0_PACKETSIZE 64
#define EP_PACKETSIZE 1024
#define D_FS_RAM_SIZE_BULK 64
#define D_HS_RAM_SIZE_BULK 512
-
struct nbu2ss_udc;
-
enum ep0_state {
EP0_IDLE,
EP0_IN_DATA_PHASE,
dma_addr_t phys_buf;
};
-
struct nbu2ss_udc {
struct usb_gadget gadget;
struct usb_gadget_driver *driver;