* [PATCH 0/7] musb/tusb6010 fixes for host mode
@ 2007-05-03 16:41 Tony Lindgren
2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw)
To: linux-omap-open-source
Hi all,
Here are some USB patches that make tusb6010 host mode work
finally reliably on at least N800. Now all testusb cases pass
with N800 running as a host.
Some of the patches should also help other musb devices.
I'd like to push them to linux-omap tree, so please test
and comment.
Regards,
Tony
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs 2007-05-03 16:41 [PATCH 0/7] musb/tusb6010 fixes for host mode Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 2007-05-04 16:22 ` [PATCH 0/7] musb/tusb6010 fixes for host mode Kevin Hilman 2007-05-04 17:26 ` Tony Lindgren 2 siblings, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source This can be used on systems that don't use ID pin, or have mini-B connector. For example, to force N800 into host mode with non-standard mini-B to mini-B cable connected to a powered hub: Note that connected mini-A cable cannot be forced to peripheral mode as the ID pin is grounded by the cable. Also note that any VBUS load above the 100mA will cause the host mode to fail. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/musbdefs.h | 2 + drivers/usb/musb/plat_uds.c | 21 ++++++++++- drivers/usb/musb/tusb6010.c | 82 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musbdefs.h b/drivers/usb/musb/musbdefs.h index f4be080..f641297 100644 --- a/drivers/usb/musb/musbdefs.h +++ b/drivers/usb/musb/musbdefs.h @@ -506,9 +506,11 @@ extern void musb_platform_disable(struct musb *musb); #ifdef CONFIG_USB_TUSB6010 extern void musb_platform_try_idle(struct musb *musb); extern int musb_platform_get_vbus_status(struct musb *musb); +extern void musb_platform_set_mode(struct musb *musb, u8 musb_mode); #else #define musb_platform_try_idle(x) do {} while (0) #define musb_platform_get_vbus_status(x) 0 +#define musb_platform_set_mode(x, y) do {} while (0) #endif extern int __init musb_platform_init(struct musb *musb); diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index d208db8..14fbeba 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -1511,7 +1511,26 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) return ret; } -static DEVICE_ATTR(mode, S_IRUGO, musb_mode_show, NULL); + +static ssize_t +musb_mode_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t n) +{ + struct musb *musb = dev_to_musb(dev); + unsigned long flags; + + spin_lock_irqsave(&musb->Lock, flags); + if (!strncmp(buf, "host", 4)) + musb_platform_set_mode(musb, MUSB_HOST); + if (!strncmp(buf, "peripheral", 10)) + musb_platform_set_mode(musb, MUSB_PERIPHERAL); + if (!strncmp(buf, "otg", 3)) + musb_platform_set_mode(musb, MUSB_OTG); + spin_unlock_irqrestore(&musb->Lock, flags); + + return n; +} +static DEVICE_ATTR(mode, 0644, musb_mode_show, musb_mode_store); static ssize_t musb_cable_show(struct device *dev, struct device_attribute *attr, char *buf) diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index eeaeb16..9f01329 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -400,6 +400,88 @@ static void tusb_source_power(struct musb *musb, int is_on) conf, prcm); } +/* + * Sets the mode to OTG, peripheral or host by changing the ID detection. + * Caller must take care of locking. + * + * Note that if a mini-A cable is plugged in the ID line will stay down as + * the weak ID pull-up is not able to pull the ID up. + * + * REVISIT: It would be possible to add support for changing between host + * and peripheral modes in non-OTG configurations by reconfiguring hardware + * and then setting musb->board_mode. For now, only support OTG mode. + */ +void musb_platform_set_mode(struct musb *musb, u8 musb_mode) +{ + void __iomem *base = musb->ctrl_base; + u32 otg_stat, phy_otg_ena, phy_otg_ctrl, dev_conf; + int vbus = 0; + + if (musb->board_mode != MUSB_OTG) { + ERR("Changing mode currently only supported in OTG mode\n"); + return; + } + + otg_stat = musb_readl(base, TUSB_DEV_OTG_STAT); + phy_otg_ena = musb_readl(base, TUSB_PHY_OTG_CTRL_ENABLE); + phy_otg_ctrl = musb_readl(base, TUSB_PHY_OTG_CTRL); + dev_conf = musb_readl(base, TUSB_DEV_CONF); + + switch (musb_mode) { + +#ifdef CONFIG_USB_MUSB_HDRC_HCD + case MUSB_HOST: /* Disable PHY ID detect, ground ID */ + if (!(otg_stat & TUSB_DEV_OTG_STAT_ID_STATUS)) { + ERR("Already in host mode otg_stat: %08x\n", otg_stat); + return; + } + phy_otg_ena |= TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + phy_otg_ctrl &= ~TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + dev_conf |= TUSB_DEV_CONF_ID_SEL; + dev_conf &= ~TUSB_DEV_CONF_SOFT_ID; + vbus = 1; + break; +#endif + +#ifdef CONFIG_USB_GADGET_MUSB_HDRC + case MUSB_PERIPHERAL: /* Disable PHY ID detect, keep ID pull-up on */ + if (otg_stat & TUSB_DEV_OTG_STAT_ID_STATUS) { + ERR("Already in peripheral mode otg_stat: %08x\n", + otg_stat); + return; + } + phy_otg_ena |= TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + phy_otg_ctrl |= TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + dev_conf |= (TUSB_DEV_CONF_ID_SEL | TUSB_DEV_CONF_SOFT_ID); + break; +#endif + +#ifdef CONFIG_USB_MUSB_OTG + case MUSB_OTG: /* Use PHY ID detection */ + phy_otg_ena &= ~TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + phy_otg_ctrl &= ~TUSB_PHY_OTG_CTRL_OTG_ID_PULLUP; + dev_conf &= ~(TUSB_DEV_CONF_ID_SEL | TUSB_DEV_CONF_SOFT_ID); + break; +#endif + + default: + DBG(2, "Trying to set unknown mode %i\n", musb_mode); + } + + musb_writel(base, TUSB_PHY_OTG_CTRL_ENABLE, + TUSB_PHY_OTG_CTRL_WRPROTECT | phy_otg_ena); + musb_writel(base, TUSB_PHY_OTG_CTRL, + TUSB_PHY_OTG_CTRL_WRPROTECT | phy_otg_ctrl); + musb_writel(base, TUSB_DEV_CONF, dev_conf); + + msleep(1); + otg_stat = musb_readl(base, TUSB_DEV_OTG_STAT); + if ((musb_mode == MUSB_PERIPHERAL) && + !(otg_stat & TUSB_DEV_OTG_STAT_ID_STATUS)) + ERR("Cannot be peripheral with mini-A cable " + "otg_stat: %08x\n", otg_stat); +} + static inline void tusb_otg_ints(struct musb *musb, u32 int_src, void __iomem *base) { -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Enable host DMA for tusb6010 2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes Tony Lindgren 2007-05-04 17:05 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 0 siblings, 2 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source This patch allows host to try to use DMA on tusb6010. Please note that until tusb6010 DMA size limitations are fixed, DMA happens with host side rarely. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/musb_host.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index ef473e9..440df48 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -236,7 +236,7 @@ start: if (!pEnd->tx_channel) musb_h_tx_start(pEnd); - else if (is_cppi_enabled()) + else if (is_cppi_enabled() || tusb_dma_omap()) cppi_host_txdma_start(pEnd); } } @@ -806,7 +806,7 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd, #endif /* candidate for DMA */ - if (is_cppi_enabled() && pDmaChannel) { + if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) { /* program endpoint CSRs first, then setup DMA. * assume CPPI setup succeeds. @@ -897,7 +897,7 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd, /* kick things off */ - if (is_cppi_enabled()) { + if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) { /* candidate for DMA */ if (pDmaChannel) { pDmaChannel->dwActualLength = 0L; -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes 2007-05-03 16:41 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Transfer remaining bytes with PIO Tony Lindgren 2007-05-04 17:05 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 1 sibling, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source With this patch tusb can transfer sizes that are not multiples of 32 bytes. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/tusb6010_omap.c | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 07f9efe..8e864d6 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -171,7 +171,22 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) remaining = TUSB_EP_CONFIG_XFR_SIZE(remaining); channel->dwActualLength = chdat->transfer_len - remaining; - DBG(2, "remaining %lu/%u\n", remaining, chdat->transfer_len); + DBG(2, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); + + /* Transfer remaining 1 - 31 bytes if DMA worked */ + if (remaining == 0) { + u32 pio; + u8 *buf; + + pio = chdat->len - channel->dwActualLength; + buf = phys_to_virt((u32)chdat->dma_addr) + + chdat->transfer_len; + if (chdat->tx) + musb_write_fifo(hw_ep, pio, buf); + else + musb_read_fifo(hw_ep, pio, buf); + channel->dwActualLength += pio; + } if (!dmareq_works()) tusb_omap_free_shared_dmareq(chdat); @@ -224,14 +239,10 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, s8 dmareq; s8 sync_dev; - if (unlikely(dma_addr & 0x1)) - return FALSE; - if (len < 32) - return FALSE; - if ((len % 32 != 0)) + if (unlikely(dma_addr & 0x1) || len < 32) return FALSE; - else - chdat->transfer_len = len; + + chdat->transfer_len = len & ~0x1f; if (len < packet_sz) chdat->transfer_packet_sz = chdat->transfer_len; -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Transfer remaining bytes with PIO 2007-05-03 16:41 ` [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: DMA RX workaround for tusb6010 Tony Lindgren 0 siblings, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source DMA callback can manually transfer remaining 1 - 31 bytes after DMA transfer using PIO. This allows transferring a wider range of sizes with DMA. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/tusb6010_omap.c | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 8e864d6..1d9d80f 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -146,7 +146,7 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) struct musb_hw_ep *hw_ep = chdat->hw_ep; void __iomem *ep_conf = hw_ep->conf; void __iomem *musb_base = musb->pRegs; - unsigned long remaining, flags; + unsigned long remaining, flags, pio; int ch; spin_lock_irqsave(&musb->Lock, flags); @@ -170,21 +170,25 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) remaining = TUSB_EP_CONFIG_XFR_SIZE(remaining); channel->dwActualLength = chdat->transfer_len - remaining; + pio = chdat->len - channel->dwActualLength; DBG(2, "DMA remaining %lu/%u\n", remaining, chdat->transfer_len); - /* Transfer remaining 1 - 31 bytes if DMA worked */ - if (remaining == 0) { - u32 pio; + /* Transfer remaining 1 - 31 bytes */ + if (pio > 0 && pio < 32) { u8 *buf; - pio = chdat->len - channel->dwActualLength; - buf = phys_to_virt((u32)chdat->dma_addr) - + chdat->transfer_len; - if (chdat->tx) + DBG(2, "Using PIO for remaining %i bytes\n", pio); + buf = phys_to_virt((u32)chdat->dma_addr) + chdat->transfer_len; + if (chdat->tx) { + consistent_sync(phys_to_virt((u32)chdat->dma_addr), + chdat->transfer_len, DMA_TO_DEVICE); musb_write_fifo(hw_ep, pio, buf); - else + } else { musb_read_fifo(hw_ep, pio, buf); + consistent_sync(phys_to_virt((u32)chdat->dma_addr), + chdat->transfer_len, DMA_FROM_DEVICE); + } channel->dwActualLength += pio; } @@ -201,7 +205,7 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) if (!chdat->tx) musb_dma_completion(musb, chdat->epnum, chdat->tx); - /* We musb terminate short tx transfers manually by setting TXPKTRDY. + /* We must terminate short tx transfers manually by setting TXPKTRDY. * REVISIT: This same problem may occur with other MUSB dma as well. * Easy to test with g_ether by pinging the MUSB board with ping -s54. */ @@ -239,7 +243,7 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, s8 dmareq; s8 sync_dev; - if (unlikely(dma_addr & 0x1) || len < 32) + if (unlikely(dma_addr & 0x1) || (len < 32) || (len > packet_sz)) return FALSE; chdat->transfer_len = len & ~0x1f; -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: DMA RX workaround for tusb6010 2007-05-03 16:41 ` [PATCH] musb_hdrc: Transfer remaining bytes with PIO Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Stop host session on BABBLE Tony Lindgren 0 siblings, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source Async RX DMA on tusb6010 will eventually corrupt the XFR_SIZE register. This patch blocks DMA transfers for async RX DMA. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/tusb6010_omap.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 1d9d80f..1ca6a3a 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c @@ -169,6 +169,13 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) remaining = musb_readl(ep_conf, TUSB_EP_RX_OFFSET); remaining = TUSB_EP_CONFIG_XFR_SIZE(remaining); + + /* HW issue #10: XFR_SIZE may get corrupt on async DMA */ + if (unlikely(remaining > chdat->transfer_len)) { + WARN("Corrupt XFR_SIZE with async DMA: %lu\n", remaining); + remaining = 0; + } + channel->dwActualLength = chdat->transfer_len - remaining; pio = chdat->len - channel->dwActualLength; @@ -246,6 +253,15 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, if (unlikely(dma_addr & 0x1) || (len < 32) || (len > packet_sz)) return FALSE; + /* + * HW issue #10: Async dma will eventually corrupt the XFR_SIZE + * register which will cause missed DMA interrupt. We could try to + * use a timer for the callback, but it is unsafe as the XFR_SIZE + * register is corrupt, and we won't know if the DMA worked. + */ + if (dma_addr & 0x2) + return FALSE; + chdat->transfer_len = len & ~0x1f; if (len < packet_sz) -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Stop host session on BABBLE 2007-05-03 16:41 ` [PATCH] musb_hdrc: DMA RX workaround for tusb6010 Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Avoid host babble by checking tx fifo Tony Lindgren 0 siblings, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source Babble is a non-recoverable error condition and we need to fix whatever causes it. Stop the session on BABBLE to make debugging the cause of BABBLE possible. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/plat_uds.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 14fbeba..86dd6b2 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -534,19 +534,14 @@ static irqreturn_t musb_stage0_irq(struct musb * pThis, u8 bIntrUSB, */ if (bIntrUSB & MGC_M_INTR_RESET) { if (devctl & MGC_M_DEVCTL_HM) { - DBG(1, "BABBLE\n"); - - /* REVISIT it's unclear how to handle this. Mentor's - * code stopped the whole USB host, which is clearly - * very wrong. Docs say (15.1) that babble ends the - * current sesssion, so shutdown _with restart_ would - * be appropriate ... except that seems to be wrong, - * at least some lowspeed enumerations trigger the - * babbles without aborting the session! - * - * (A "babble" IRQ seems quite pointless...) + /* + * BABBLE is an error condition, so the solution is + * to avoid babble in the first place and fix whatever + * causes BABBLE. When BABBLE happens we can only stop + * the session. */ - + ERR("Stopping host session because of babble\n"); + musb_writeb(pBase, MGC_O_HDRC_DEVCTL, 0); } else { DBG(1, "BUS RESET\n"); -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Avoid host babble by checking tx fifo 2007-05-03 16:41 ` [PATCH] musb_hdrc: Stop host session on BABBLE Tony Lindgren @ 2007-05-03 16:41 ` Tony Lindgren 2007-05-03 18:43 ` [PATCH] musb_hdrc: Clean-up TUSB fifo access Tony Lindgren 0 siblings, 1 reply; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 16:41 UTC (permalink / raw) To: linux-omap-open-source Running a tusb6010 system in host mode would fail with testusb -a -t12 -c1 most of the time with BABBLE errors. Turns out this was caused by incorrect handling of TX FIFONOTEMPTY, where the code did not wait for it to clear. This patch introduces musb_h_tx_flush_fifo(), and makes musb_host.c to use it. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/musb_host.c | 58 +++++++++++++++++++++++++++-------------- 1 files changed, 38 insertions(+), 20 deletions(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 440df48..82ece3b 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -108,6 +108,29 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd, u8 * pBuffer, u32 dwLength); /* + * Clear TX fifo. Needed to avoid BABBLE errors. + */ +static inline void musb_h_tx_flush_fifo(struct musb_hw_ep *ep) +{ + void __iomem *epio = ep->regs; + u16 csr; + int retries = 1000; + + csr = musb_readw(epio, MGC_O_HDRC_TXCSR); + while (csr & MGC_M_TXCSR_FIFONOTEMPTY) { + DBG(5, "Host TX FIFONOTEMPTY csr: %02x\n", csr); + csr |= MGC_M_TXCSR_FLUSHFIFO; + musb_writew(epio, MGC_O_HDRC_TXCSR, csr); + csr = musb_readw(epio, MGC_O_HDRC_TXCSR); + if (retries-- < 1) { + ERR("Could not flush host TX fifo: csr: %04x\n", csr); + return; + } + mdelay(1); + } +} + +/* * Start transmit. Caller is responsible for locking shared resources. * pThis must be locked. */ @@ -570,14 +593,9 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep) if (ep->bIsSharedFifo) { csr = musb_readw(ep->regs, MGC_O_HDRC_TXCSR); if (csr & MGC_M_TXCSR_MODE) { - if (csr & MGC_M_TXCSR_FIFONOTEMPTY) { - /* this shouldn't happen; irq?? */ - ERR("shared fifo not empty?\n"); - musb_writew(ep->regs, MGC_O_HDRC_TXCSR, - MGC_M_TXCSR_FLUSHFIFO); - musb_writew(ep->regs, MGC_O_HDRC_TXCSR, - MGC_M_TXCSR_FRCDATATOG); - } + musb_h_tx_flush_fifo(ep); + musb_writew(ep->regs, MGC_O_HDRC_TXCSR, + MGC_M_TXCSR_FRCDATATOG); } /* clear mode (and everything else) to enable Rx */ musb_writew(ep->regs, MGC_O_HDRC_TXCSR, 0); @@ -683,14 +701,12 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd, /* ASSERT: TXCSR_DMAENAB was already cleared */ /* flush all old state, set default */ - if (csr & MGC_M_TXCSR_FIFONOTEMPTY) - csr |= MGC_M_TXCSR_FLUSHFIFO; + musb_h_tx_flush_fifo(pEnd); csr &= ~(MGC_M_TXCSR_H_NAKTIMEOUT | MGC_M_TXCSR_DMAMODE | MGC_M_TXCSR_FRCDATATOG | MGC_M_TXCSR_H_RXSTALL | MGC_M_TXCSR_H_ERROR - | MGC_M_TXCSR_FIFONOTEMPTY | MGC_M_TXCSR_TXPKTRDY ); csr |= MGC_M_TXCSR_MODE; @@ -1229,11 +1245,8 @@ void musb_host_tx(struct musb *pThis, u8 bEnd) /* do the proper sequence to abort the transfer in the * usb core; the dma engine should already be stopped. */ -// SCRUB (TX) - if (wTxCsrVal & MGC_M_TXCSR_FIFONOTEMPTY) - wTxCsrVal |= MGC_M_TXCSR_FLUSHFIFO; - wTxCsrVal &= ~(MGC_M_TXCSR_FIFONOTEMPTY - | MGC_M_TXCSR_AUTOSET + musb_h_tx_flush_fifo(pEnd); + wTxCsrVal &= ~(MGC_M_TXCSR_AUTOSET | MGC_M_TXCSR_DMAENAB | MGC_M_TXCSR_H_ERROR | MGC_M_TXCSR_H_RXSTALL @@ -1949,16 +1962,13 @@ static int musb_cleanup_urb(struct urb *urb, struct musb_qh *qh, int is_in) * clearing that status is platform-specific... */ } else { -// SCRUB (TX) + musb_h_tx_flush_fifo(ep); csr = musb_readw(epio, MGC_O_HDRC_TXCSR); - if (csr & MGC_M_TXCSR_FIFONOTEMPTY) - csr |= MGC_M_TXCSR_FLUSHFIFO; csr &= ~( MGC_M_TXCSR_AUTOSET | MGC_M_TXCSR_DMAENAB | MGC_M_TXCSR_H_RXSTALL | MGC_M_TXCSR_H_NAKTIMEOUT | MGC_M_TXCSR_H_ERROR - | MGC_M_TXCSR_FIFONOTEMPTY ); musb_writew(epio, MGC_O_HDRC_TXCSR, csr); /* REVISIT may need to clear FLUSHFIFO ... */ @@ -2002,6 +2012,14 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb) } } spin_unlock(&urb->lock); + + /* already completed */ + if (!qh) { + status = 0; + goto done; + } + + /* still queued but not found on the list */ if (status) goto done; -- 1.4.4.2 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] musb_hdrc: Clean-up TUSB fifo access 2007-05-03 16:41 ` [PATCH] musb_hdrc: Avoid host babble by checking tx fifo Tony Lindgren @ 2007-05-03 18:43 ` Tony Lindgren 0 siblings, 0 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-03 18:43 UTC (permalink / raw) To: linux-omap-open-source [-- Attachment #1: Type: text/plain, Size: 177 bytes --] I found one more patch in addition to these seven patches that has been pending a while but never got pushed because of the remaining flakeyness. Seems to work just fine. Tony [-- Attachment #2: 0008-musb_hdrc-Clean-up-TUSB-fifo-access.txt --] [-- Type: text/plain, Size: 7885 bytes --] >From be9d415b172e8c3fb375058ef3a35aca95192233 Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Thu, 3 May 2007 18:31:35 +0000 Subject: [PATCH] musb_hdrc: Clean-up TUSB fifo access This patch cleans-up TUSB fifo access and uses readsl/writesl() when possible. It also has hooks for some further optimization, notably synchronous burst access using PIO. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> --- drivers/usb/musb/musbdefs.h | 2 + drivers/usb/musb/plat_uds.c | 3 + drivers/usb/musb/tusb6010.c | 170 ++++++++++++++++++++++++++----------------- 3 files changed, 108 insertions(+), 67 deletions(-) diff --git a/drivers/usb/musb/musbdefs.h b/drivers/usb/musb/musbdefs.h index f641297..a64e2ed 100644 --- a/drivers/usb/musb/musbdefs.h +++ b/drivers/usb/musb/musbdefs.h @@ -296,6 +296,7 @@ struct musb_hw_ep { /* TUSB has "asynchronous" and "synchronous" dma modes */ dma_addr_t fifo_async; dma_addr_t fifo_sync; + void __iomem *fifo_sync_va; #endif #ifdef CONFIG_USB_MUSB_HDRC_HCD @@ -381,6 +382,7 @@ struct musb { #ifdef CONFIG_USB_TUSB6010 dma_addr_t async; dma_addr_t sync; + void __iomem *sync_va; #endif /* passed down from chip/board specific irq handlers */ diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c index 86dd6b2..856075f 100644 --- a/drivers/usb/musb/plat_uds.c +++ b/drivers/usb/musb/plat_uds.c @@ -1269,6 +1269,9 @@ static int __init musb_core_init(u16 wType, struct musb *pThis) #ifdef CONFIG_USB_TUSB6010 hw_ep->fifo_async = pThis->async + 0x400 + MUSB_FIFO_OFFSET(i); hw_ep->fifo_sync = pThis->sync + 0x400 + MUSB_FIFO_OFFSET(i); + hw_ep->fifo_sync_va = + pThis->sync_va + 0x400 + MUSB_FIFO_OFFSET(i); + if (i == 0) hw_ep->conf = pBase - 0x400 + TUSB_EP0_CONF; else diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 9f01329..48c3ab3 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -31,19 +31,58 @@ * so both loading and unloading FIFOs need explicit byte counts. */ +static inline void +tusb_fifo_write_unaligned(void __iomem *fifo, const u8 *buf, u16 len) +{ + u32 val; + int i; + + if (len > 4) { + for (i = 0; i < (len >> 2); i++) { + memcpy(&val, buf, 4); + musb_writel(fifo, 0, val); + buf += 4; + } + len %= 4; + } + if (len > 0) { + /* Write the rest 1 - 3 bytes to FIFO */ + memcpy(&val, buf, len); + musb_writel(fifo, 0, val); + } +} + +static inline void tusb_fifo_read_unaligned(void __iomem *fifo, + void __iomem *buf, u16 len) +{ + u32 val; + int i; + + if (len > 4) { + for (i = 0; i < (len >> 2); i++) { + val = musb_readl(fifo, 0); + memcpy(buf, &val, 4); + buf += 4; + } + len %= 4; + } + if (len > 0) { + /* Read the rest 1 - 3 bytes from FIFO */ + val = musb_readl(fifo, 0); + memcpy(buf, &val, len); + } +} + void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf) { void __iomem *ep_conf = hw_ep->conf; void __iomem *fifo = hw_ep->fifo; u8 epnum = hw_ep->bLocalEnd; - u8 *bufp = (u8 *)buf; - int i, remain; - u32 val; - prefetch(bufp); + prefetch(buf); DBG(4, "%cX ep%d fifo %p count %d buf %p\n", - 'T', epnum, fifo, len, bufp); + 'T', epnum, fifo, len, buf); if (epnum) musb_writel(ep_conf, TUSB_EP_TX_OFFSET, @@ -52,40 +91,35 @@ void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *buf) musb_writel(ep_conf, 0, TUSB_EP0_CONFIG_DIR_TX | TUSB_EP0_CONFIG_XFR_SIZE(len)); - /* Write 32-bit blocks from buffer to FIFO - * REVISIT: Optimize for burst ... writesl/writesw - */ - if (len >= 4) { - if (((unsigned long)bufp & 0x3) == 0) { - for (i = 0; i < (len / 4); i++ ) { - val = *(u32 *)bufp; - bufp += 4; - musb_writel(fifo, 0, val); - } - } else if (((unsigned long)bufp & 0x2) == 0x2) { - for (i = 0; i < (len / 4); i++ ) { - val = (u32)(*(u16 *)bufp); - bufp += 2; - val |= (*(u16 *)bufp) << 16; - bufp += 2; - musb_writel(fifo, 0, val); + if (likely((0x01 & (unsigned long) buf) == 0)) { + + /* Best case is 32bit-aligned destination address */ + if ((0x02 & (unsigned long) buf) == 0) { + if (len >= 4) { + writesl(fifo, buf, len >> 2); + buf += (len & ~0x03); + len &= 0x03; } } else { - for (i = 0; i < (len / 4); i++ ) { - memcpy(&val, bufp, 4); - bufp += 4; - musb_writel(fifo, 0, val); + if (len >= 2) { + u32 val; + int i; + + /* Cannot use writesw, fifo is 32-bit */ + for (i = 0; i < (len >> 2); i++) { + val = (u32)(*(u16 *)buf); + buf += 2; + val |= (*(u16 *)buf) << 16; + buf += 2; + musb_writel(fifo, 0, val); + } + len &= 0x03; } } - remain = len - (i * 4); - } else - remain = len; - - if (remain) { - /* Write rest of 1-3 bytes from buffer into FIFO */ - memcpy(&val, bufp, remain); - musb_writel(fifo, 0, val); } + + if (len > 0) + tusb_fifo_write_unaligned(fifo, buf, len); } void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf) @@ -93,12 +127,9 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf) void __iomem *ep_conf = hw_ep->conf; void __iomem *fifo = hw_ep->fifo; u8 epnum = hw_ep->bLocalEnd; - u8 *bufp = (u8 *)buf; - int i, remain; - u32 val; DBG(4, "%cX ep%d fifo %p count %d buf %p\n", - 'R', epnum, fifo, len, bufp); + 'R', epnum, fifo, len, buf); if (epnum) musb_writel(ep_conf, TUSB_EP_RX_OFFSET, @@ -106,40 +137,35 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf) else musb_writel(ep_conf, 0, TUSB_EP0_CONFIG_XFR_SIZE(len)); - /* Read 32-bit blocks from FIFO to buffer - * REVISIT: Optimize for burst ... writesl/writesw - */ - if (len >= 4) { - if (((unsigned long)bufp & 0x3) == 0) { - for (i = 0; i < (len / 4); i++) { - val = musb_readl(fifo, 0); - *(u32 *)bufp = val; - bufp += 4; - } - } else if (((unsigned long)bufp & 0x2) == 0x2) { - for (i = 0; i < (len / 4); i++) { - val = musb_readl(fifo, 0); - *(u16 *)bufp = (u16)(val & 0xffff); - bufp += 2; - *(u16 *)bufp = (u16)(val >> 16); - bufp += 2; + if (likely((0x01 & (unsigned long) buf) == 0)) { + + /* Best case is 32bit-aligned destination address */ + if ((0x02 & (unsigned long) buf) == 0) { + if (len >= 4) { + readsl(fifo, buf, len >> 2); + buf += (len & ~0x03); + len &= 0x03; } } else { - for (i = 0; i < (len / 4); i++) { - val = musb_readl(fifo, 0); - memcpy(bufp, &val, 4); - bufp += 4; + if (len >= 2) { + u32 val; + int i; + + /* Cannot use readsw, fifo is 32-bit */ + for (i = 0; i < (len >> 2); i++) { + val = musb_readl(fifo, 0); + *(u16 *)buf = (u16)(val & 0xffff); + buf += 2; + *(u16 *)buf = (u16)(val >> 16); + buf += 2; + } + len &= 0x03; } } - remain = len - (i * 4); - } else - remain = len; - - if (remain) { - /* Read rest of 1-3 bytes from FIFO */ - val = musb_readl(fifo, 0); - memcpy(bufp, &val, remain); } + + if (len > 0) + tusb_fifo_read_unaligned(fifo, buf, len); } #ifdef CONFIG_USB_GADGET_MUSB_HDRC @@ -900,6 +926,7 @@ int __init musb_platform_init(struct musb *musb) { struct platform_device *pdev; struct resource *mem; + void __iomem *sync; int ret; pdev = to_platform_device(musb->controller); @@ -916,6 +943,13 @@ int __init musb_platform_init(struct musb *musb) } musb->sync = mem->start; + sync = ioremap(mem->start, mem->end - mem->start + 1); + if (!sync) { + pr_debug("ioremap for sync failed\n"); + return -ENOMEM; + } + musb->sync_va = sync; + /* Offsets from base: VLYNQ at 0x000, MUSB regs at 0x400, * FIFOs at 0x600, TUSB at 0x800 */ @@ -946,5 +980,7 @@ int musb_platform_exit(struct musb *musb) if (musb->board_set_power) musb->board_set_power(0); + iounmap(musb->sync_va); + return 0; } -- 1.4.4.2 [-- Attachment #3: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] musb_hdrc: Enable host DMA for tusb6010 2007-05-03 16:41 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes Tony Lindgren @ 2007-05-04 17:05 ` Tony Lindgren 1 sibling, 0 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-04 17:05 UTC (permalink / raw) To: linux-omap-open-source [-- Attachment #1: Type: text/plain, Size: 215 bytes --] * Tony Lindgren <tony@atomide.com> [070503 09:42]: > This patch allows host to try to use DMA on tusb6010. Here's an updated version of this to fix the compile problem Kevin pointed out on non-tusb systems. Tony [-- Attachment #2: 0002-musb_hdrc-Enable-host-DMA-for-tusb6010.txt --] [-- Type: text/plain, Size: 1673 bytes --] >From cac0b797100c284366305471b8d12ca7daa73861 Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@atomide.com> Date: Tue, 6 Feb 2007 15:41:54 -0800 Subject: [PATCH] musb_hdrc: Enable host DMA for tusb6010 This patch allows host to try to use DMA on tusb6010. Please note that until tusb6010 DMA size limitations are fixed, DMA happens with host side rarely. Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/musb_host.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -236,7 +236,7 @@ start: if (!pEnd->tx_channel) musb_h_tx_start(pEnd); - else if (is_cppi_enabled()) + else if (is_cppi_enabled() || tusb_dma_omap()) cppi_host_txdma_start(pEnd); } } @@ -806,7 +806,7 @@ static void musb_ep_program(struct musb #endif /* candidate for DMA */ - if (is_cppi_enabled() && pDmaChannel) { + if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) { /* program endpoint CSRs first, then setup DMA. * assume CPPI setup succeeds. @@ -897,7 +897,7 @@ static void musb_ep_program(struct musb /* kick things off */ - if (is_cppi_enabled()) { + if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) { /* candidate for DMA */ if (pDmaChannel) { pDmaChannel->dwActualLength = 0L; --- a/drivers/usb/musb/dma.h +++ b/drivers/usb/musb/dma.h @@ -73,6 +73,11 @@ struct musb_hw_ep; #define is_cppi_enabled() 0 #endif +#ifdef CONFIG_USB_TUSB_OMAP_DMA +#define tusb_dma_omap() 1 +#else +#define tusb_dma_omap() 0 +#endif /* * DMA channel status ... updated by the dma controller driver whenever that [-- Attachment #3: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-03 16:41 [PATCH 0/7] musb/tusb6010 fixes for host mode Tony Lindgren 2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren @ 2007-05-04 16:22 ` Kevin Hilman 2007-05-04 16:48 ` Tony Lindgren 2007-05-04 17:26 ` Tony Lindgren 2 siblings, 1 reply; 16+ messages in thread From: Kevin Hilman @ 2007-05-04 16:22 UTC (permalink / raw) To: Tony Lindgren; +Cc: linux-omap-open-source On Thu, 2007-05-03 at 16:41 +0000, Tony Lindgren wrote: > Here are some USB patches that make tusb6010 host mode work > finally reliably on at least N800. Now all testusb cases pass > with N800 running as a host. Tony, There are some uses of tusb_dma_omap() that are not defined when compiling for !tusb platforms. The hack below gets it to compile on 2430, but is probably not "the right thing." Also, with your fixes, it's still not working on 2430. Looks like I have some more digging to do. Kevin Index: dev/drivers/usb/musb/musbdefs.h =================================================================== --- dev.orig/drivers/usb/musb/musbdefs.h +++ dev/drivers/usb/musb/musbdefs.h @@ -518,6 +518,10 @@ extern void musb_platform_set_mode(struc extern int __init musb_platform_init(struct musb *musb); extern int musb_platform_exit(struct musb *musb); +#ifndef tusb_dma_omap +#define tusb_dma_omap() 0 +#endif + /*-------------------------- ProcFS definitions ---------------------*/ struct proc_dir_entry; ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-04 16:22 ` [PATCH 0/7] musb/tusb6010 fixes for host mode Kevin Hilman @ 2007-05-04 16:48 ` Tony Lindgren 2007-05-04 17:01 ` Tony Lindgren 2007-05-04 17:17 ` Kevin Hilman 0 siblings, 2 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-04 16:48 UTC (permalink / raw) To: Kevin Hilman; +Cc: linux-omap-open-source * Kevin Hilman <khilman@mvista.com> [070504 09:23]: > On Thu, 2007-05-03 at 16:41 +0000, Tony Lindgren wrote: > > > Here are some USB patches that make tusb6010 host mode work > > finally reliably on at least N800. Now all testusb cases pass > > with N800 running as a host. > > Tony, > > There are some uses of tusb_dma_omap() that are not defined when > compiling for !tusb platforms. The hack below gets it to compile on > 2430, but is probably not "the right thing." Thanks, looks like I missed that. That's how it should be :) I'll push it today. > Also, with your fixes, it's still not working on 2430. Looks like I > have some more digging to do. Is the peripheral working OK? Tony ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-04 16:48 ` Tony Lindgren @ 2007-05-04 17:01 ` Tony Lindgren 2007-05-04 17:17 ` Kevin Hilman 1 sibling, 0 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-04 17:01 UTC (permalink / raw) To: Kevin Hilman; +Cc: linux-omap-open-source * Tony Lindgren <tony@atomide.com> [070504 09:49]: > * Kevin Hilman <khilman@mvista.com> [070504 09:23]: > > On Thu, 2007-05-03 at 16:41 +0000, Tony Lindgren wrote: > > > > > Here are some USB patches that make tusb6010 host mode work > > > finally reliably on at least N800. Now all testusb cases pass > > > with N800 running as a host. > > > > Tony, > > > > There are some uses of tusb_dma_omap() that are not defined when > > compiling for !tusb platforms. The hack below gets it to compile on > > 2430, but is probably not "the right thing." > > Thanks, looks like I missed that. That's how it should be :) I'll push > it today. Actually, I'll just move the #define tusb_dma_omap() to dma.h there. Tony ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-04 16:48 ` Tony Lindgren 2007-05-04 17:01 ` Tony Lindgren @ 2007-05-04 17:17 ` Kevin Hilman 2007-05-04 17:22 ` Tony Lindgren 1 sibling, 1 reply; 16+ messages in thread From: Kevin Hilman @ 2007-05-04 17:17 UTC (permalink / raw) To: Tony Lindgren; +Cc: linux-omap-open-source On Fri, 2007-05-04 at 09:48 -0700, Tony Lindgren wrote: > * Kevin Hilman <khilman@mvista.com> [070504 09:23]: > > > Also, with your fixes, it's still not working on 2430. Looks like I > > have some more digging to do. > > Is the peripheral working OK? > Yes. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-04 17:17 ` Kevin Hilman @ 2007-05-04 17:22 ` Tony Lindgren 0 siblings, 0 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-04 17:22 UTC (permalink / raw) To: Kevin Hilman; +Cc: linux-omap-open-source * Kevin Hilman <khilman@mvista.com> [070504 10:18]: > On Fri, 2007-05-04 at 09:48 -0700, Tony Lindgren wrote: > > * Kevin Hilman <khilman@mvista.com> [070504 09:23]: > > > > > Also, with your fixes, it's still not working on 2430. Looks like I > > > have some more digging to do. > > > > Is the peripheral working OK? > > > > Yes. And that's the musb peripheral, not the built in omap_udc, right? Assuming it has both... Tony ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] musb/tusb6010 fixes for host mode 2007-05-03 16:41 [PATCH 0/7] musb/tusb6010 fixes for host mode Tony Lindgren 2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren 2007-05-04 16:22 ` [PATCH 0/7] musb/tusb6010 fixes for host mode Kevin Hilman @ 2007-05-04 17:26 ` Tony Lindgren 2 siblings, 0 replies; 16+ messages in thread From: Tony Lindgren @ 2007-05-04 17:26 UTC (permalink / raw) To: linux-omap-open-source * Tony Lindgren <tony@atomide.com> [070503 09:42]: > Hi all, > > Here are some USB patches that make tusb6010 host mode work > finally reliably on at least N800. Now all testusb cases pass > with N800 running as a host. > > Some of the patches should also help other musb devices. > > I'd like to push them to linux-omap tree, so please test > and comment. Pushed these. Tony ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2007-05-04 17:26 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-03 16:41 [PATCH 0/7] musb/tusb6010 fixes for host mode Tony Lindgren 2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Transfer remaining bytes with PIO Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: DMA RX workaround for tusb6010 Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Stop host session on BABBLE Tony Lindgren 2007-05-03 16:41 ` [PATCH] musb_hdrc: Avoid host babble by checking tx fifo Tony Lindgren 2007-05-03 18:43 ` [PATCH] musb_hdrc: Clean-up TUSB fifo access Tony Lindgren 2007-05-04 17:05 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren 2007-05-04 16:22 ` [PATCH 0/7] musb/tusb6010 fixes for host mode Kevin Hilman 2007-05-04 16:48 ` Tony Lindgren 2007-05-04 17:01 ` Tony Lindgren 2007-05-04 17:17 ` Kevin Hilman 2007-05-04 17:22 ` Tony Lindgren 2007-05-04 17:26 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox