summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2017-06-23 20:13:58 +0200
committerTom Rini <trini@konsulko.com>2017-06-29 10:01:11 -0400
commit2fa5130d461a16c4b979db1e521929876ed14ca7 (patch)
tree3a932f91d675d3b032b68384d3e9fd1491044a8d
parent95ebcbffd4bab255bfbea65c06a6d070d40dccb8 (diff)
drivers, usb, gadget: fix compiler warnings for at91_udc.c
fix warnings: drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' defined but not used [-Wunused-function] drivers/usb/gadget/at91_udc.c:1379:13: warning: 'at91rm9200_udc_pullup' defined but not used [-Wunused-function] drivers/usb/gadget/at91_udc.c:1476:12: warning: 'at91sam9263_udc_init' defined but not used [-Wunused-function] Signed-off-by: Heiko Schocher <hs@denx.de>
-rw-r--r--drivers/usb/gadget/at91_udc.c72
1 files changed, 1 insertions, 71 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 01a59078b84..9df6d32c65f 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1341,51 +1341,7 @@ static int at91_stop(struct usb_gadget *gadget)
/*-------------------------------------------------------------------------*/
-static int at91rm9200_udc_init(struct at91_udc *udc)
-{
- struct at91_ep *ep;
- int ret;
- int i;
-
- for (i = 0; i < NUM_ENDPOINTS; i++) {
- ep = &udc->ep[i];
-
- switch (i) {
- case 0:
- case 3:
- ep->maxpacket = 8;
- break;
- case 1 ... 2:
- ep->maxpacket = 64;
- break;
- case 4 ... 5:
- ep->maxpacket = 256;
- break;
- }
- }
-
- ret = gpio_request(udc->board.pullup_pin, "udc_pullup");
- if (ret) {
- DBG("D+ pullup is busy\n");
- return ret;
- }
-
- gpio_direction_output(udc->board.pullup_pin,
- udc->board.pullup_active_low);
-
- return 0;
-}
-
-static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
-{
- int active = !udc->board.pullup_active_low;
-
- if (is_on)
- gpio_set_value(udc->board.pullup_pin, active);
- else
- gpio_set_value(udc->board.pullup_pin, !active);
-}
-
+#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
static int at91sam9260_udc_init(struct at91_udc *udc)
{
struct at91_ep *ep;
@@ -1407,7 +1363,6 @@ static int at91sam9260_udc_init(struct at91_udc *udc)
return 0;
}
-#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
static void at91sam9260_udc_pullup(struct at91_udc *udc, int is_on)
{
u32 txvc = at91_udp_read(udc, AT91_UDP_TXVC);
@@ -1473,31 +1428,6 @@ static const struct at91_udc_caps at91sam9261_udc_caps = {
};
#endif
-static int at91sam9263_udc_init(struct at91_udc *udc)
-{
- struct at91_ep *ep;
- int i;
-
- for (i = 0; i < NUM_ENDPOINTS; i++) {
- ep = &udc->ep[i];
-
- switch (i) {
- case 0:
- case 1:
- case 2:
- case 3:
- ep->maxpacket = 64;
- break;
- case 4:
- case 5:
- ep->maxpacket = 256;
- break;
- }
- }
-
- return 0;
-}
-
int usb_gadget_handle_interrupts(int index)
{
struct at91_udc *udc = controller;