From 87de27a3a7d24964af1c80223856d625c1a48671 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 5 Sep 2006 17:20:15 +0300 Subject: [PATCH] MUSB: tusb multipoint fixes tusb multipoint fixes --- drivers/usb/musb/musb_gadget.c | 2 +- drivers/usb/musb/plat_uds.c | 5 +++++ drivers/usb/musb/tusb6010.c | 6 ++++-- drivers/usb/musb/tusb6010.h | 6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index eb568bf00eb..bd889aeeed9 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1614,7 +1614,7 @@ static inline void __devinit musb_g_init_endpoints(struct musb *pThis) } } DBG(2, "initialized %d (max %d) endpoints\n", count, - pThis->bEndCount * 2 - 1); + MUSB_C_NUM_EPS * 2 - 1); } /* called once during driver setup to initialize and link into diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 3b5514f4c41..9ba7b230ca5 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -950,6 +950,11 @@ static int __devinit ep_config_from_table(struct musb *musb) musb->bEndCount = max(epn, musb->bEndCount); } + printk(KERN_DEBUG "%s: %d/%d max ep, %d/%d memory\n", + musb_driver_name, + musb->bEndCount, MUSB_C_NUM_EPS * 2 - 1, + offset, DYN_FIFO_SIZE); + #ifdef CONFIG_USB_MUSB_HDRC_HCD if (!musb->bulk_ep) { pr_debug( "%s: missing bulk\n", musb_driver_name); diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 54a8b7c9524..205dc2f23e0 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -43,7 +43,8 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf) prefetch(bufp); - DBG(3, "%cX ep%d count %d bufp %p\n", 'T', epnum, len, bufp); + DBG(4, "%cX ep%d fifo %p count %d buf %p\n", + 'T', epnum, fifo, len, bufp); if (epnum) musb_writel(ep_conf, TUSB_EP_TX_OFFSET, @@ -97,7 +98,8 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf) int i, remain; u32 val; - DBG(3, "%cX ep%d count %d buf %p\n", 'R', epnum, len, bufp); + DBG(4, "%cX ep%d fifo %p count %d buf %p\n", + 'R', epnum, fifo, len, bufp); if (epnum) musb_writel(ep_conf, TUSB_EP_RX_OFFSET, diff --git a/drivers/usb/musb/tusb6010.h b/drivers/usb/musb/tusb6010.h index b1de9cd0cd0..c8c05e2f638 100644 --- a/drivers/usb/musb/tusb6010.h +++ b/drivers/usb/musb/tusb6010.h @@ -225,10 +225,10 @@ /* configuration parameters specific to this silicon */ /* Number of Tx endpoints. Legal values are 1 - 16 (this value includes EP0) */ -#define MUSB_C_NUM_EPT 5 +#define MUSB_C_NUM_EPT 16 /* Number of Rx endpoints. Legal values are 1 - 16 (this value includes EP0) */ -#define MUSB_C_NUM_EPR 5 +#define MUSB_C_NUM_EPR 16 /* Endpoint 1 to 15 direction types. C_EP1_DEF is defined if either Tx endpoint * 1 or Rx endpoint 1 are used. @@ -383,7 +383,7 @@ * addresses). It is defined as log2 of the sum of 2** of all the endpoint FIFO * dword address bits (rounded up). */ -#define MUSB_C_RAM_BITS 10 +#define MUSB_C_RAM_BITS 12 #endif /* CONFIG_USB_TUSB6010 */ -- 2.41.1