From c83c338c91a7a7cbe21eb289c5ab9f9bb9015a58 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 15 Aug 2007 06:44:27 -0700 Subject: [PATCH] musb_hdrc: Search and replace MGC_END0_FIFOSIZE with MUSB_EP0_FIFOSIZE, remove MGC_MAX_USB_ENDS Search and replace MGC_END0_FIFOSIZE with MUSB_EP0_FIFOSIZE, remove MGC_MAX_USB_ENDS Signed-off-by: Tony Lindgren --- drivers/usb/musb/g_ep0.c | 2 +- drivers/usb/musb/musbdefs.h | 2 +- drivers/usb/musb/musbhdrc.h | 4 +--- drivers/usb/musb/plat_uds.c | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/g_ep0.c b/drivers/usb/musb/g_ep0.c index 1fa0cadfd8e..9585d006226 100644 --- a/drivers/usb/musb/g_ep0.c +++ b/drivers/usb/musb/g_ep0.c @@ -497,7 +497,7 @@ static void ep0_txstate(struct musb *musb) /* load the data */ pFifoSource = (u8 *) request->buf + request->actual; - fifo_count = min((unsigned) MGC_END0_FIFOSIZE, + fifo_count = min((unsigned) MUSB_EP0_FIFOSIZE, request->length - request->actual); musb_write_fifo(&musb->endpoints[0], fifo_count, pFifoSource); request->actual += fifo_count; diff --git a/drivers/usb/musb/musbdefs.h b/drivers/usb/musb/musbdefs.h index 25dce14b6a5..5ce0505e3b0 100644 --- a/drivers/usb/musb/musbdefs.h +++ b/drivers/usb/musb/musbdefs.h @@ -175,7 +175,7 @@ static inline void musb_host_rx(struct musb *m, u8 e) {} #endif #ifndef MUSB_MAX_END0_PACKET -#define MUSB_MAX_END0_PACKET ((u16)MGC_END0_FIFOSIZE) +#define MUSB_MAX_END0_PACKET ((u16)MUSB_EP0_FIFOSIZE) #endif /* host side ep0 states */ diff --git a/drivers/usb/musb/musbhdrc.h b/drivers/usb/musb/musbhdrc.h index d26910fcafa..225fac9f6d2 100644 --- a/drivers/usb/musb/musbhdrc.h +++ b/drivers/usb/musb/musbhdrc.h @@ -38,9 +38,7 @@ * HDRC-specific definitions */ -#define MGC_MAX_USB_ENDS 16 - -#define MGC_END0_FIFOSIZE 64 /* this is non-configurable */ +#define MUSB_EP0_FIFOSIZE 64 /* this is non-configurable */ /* * MUSBMHDRC Register map diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 7b516ad7f00..71e89d8fc32 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -1335,8 +1335,8 @@ static int __init musb_core_init(u16 wType, struct musb *musb) musb_driver_name, type, aRevision, aDate); /* configure ep0 */ - musb->endpoints[0].max_packet_sz_tx = MGC_END0_FIFOSIZE; - musb->endpoints[0].max_packet_sz_rx = MGC_END0_FIFOSIZE; + musb->endpoints[0].max_packet_sz_tx = MUSB_EP0_FIFOSIZE; + musb->endpoints[0].max_packet_sz_rx = MUSB_EP0_FIFOSIZE; /* discover endpoint configuration */ musb->nr_endpoints = 1; -- 2.41.1