usb: mv_udc: Clean up the EP initialization

Move the constant values that are programmed into mv_ep.ep into
separate static const structure so they can be memcpy()'d when
the initialization happens.

Moveover, we only every init NUM_ENDPOINTS, not 2 * NUM_ENDPOINTS,
so fix this bug as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
Marek Vasut
2013-07-10 03:16:30 +02:00
parent 532d846f89
commit 2ea4b44832
2 changed files with 27 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ struct mv_drv {
struct usb_gadget gadget;
struct usb_gadget_driver *driver;
struct mv_udc *udc;
struct mv_ep ep[2 * NUM_ENDPOINTS];
struct mv_ep ep[NUM_ENDPOINTS];
};
struct ept_queue_head {