From: Steve Poulsen <spoulsen@css-design.us>
To: "Pandita, Vikram" <vikram.pandita@ti.com>
Cc: Linux-omap-open-source@linux.omap.com
Subject: Re: omap_udc does not respond to SETUP transfer properly (OMAP5912)
Date: Fri, 16 Mar 2007 13:44:02 -0500 [thread overview]
Message-ID: <45FAE572.8000209@css-design.us> (raw)
In-Reply-To: <5DF83221BE20114E9C331F665ACBC08002B66C56@dbde01.ent.ti.com>
I appear to get strange results from the UDC registers. In
omap_ep_queue(), there is some code that sets up the EP_NUM register
before writing to the fifo. I added some printk() lines around here to
see what is going on. Even the revision register produces a value that
doesn't agree with the possible documented values. Notice that the
write to EP_NUM_REG doesn't do anything.
/* non-empty DATA stage */
} else if (is_in) {
printk(KERN_ALERT "UDC_EP_NUM_REG = 0x%08x\n", UDC_EP_NUM_REG);
UDC_EP_NUM_REG = UDC_EP_SEL|UDC_EP_DIR;
//*((volatile int*)0xfefb4004) = UDC_EP_SEL|UDC_EP_DIR;
// doesn't help
printk(KERN_ALERT "UDC_EP_NUM_REG = 0x%08x\n", *((volatile
int*)0xfefb4004));
printk(KERN_ALERT "UDC_REV_REG = 0x%08x\n", *((volatile
int*)0xfefb4000));
printk(KERN_ALERT "UDC_OTG_SYSCON1 = 0x%08x\n", *((volatile
int*)0xfefb0404));
} else {
if (udc->ep0_setup)
goto irq_wait;
UDC_EP_NUM_REG = UDC_EP_SEL;
}
MOD_CONF_CTRL_0 : 0xe0005200
SOFT_REQ_REG : 0x00000758
...
UDC_EP_NUM_REG = 0x00000000
UDC_EP_NUM_REG = 0x00000000
UDC_REV_REG = 0x00000036
UDC_OTG_SYSCON1 = 0x00030004
Thanks,
Steve
Pandita, Vikram wrote:
> Have you tried the Interrupt mode of transfer.
> In this mode you will be writing directly to the FIFO the response of
> GET_DESCRIPTOR. Later you can debug the DMA path.
>
>
>
>> -----Original Message-----
>> From: linux-omap-open-source-bounces@linux.omap.com
>>
> [mailto:linux-omap-
>
>> open-source-bounces@linux.omap.com] On Behalf Of Steve Poulsen
>> Sent: Friday, March 16, 2007 12:13 AM
>> To: Linux-omap-open-source@linux.omap.com
>> Subject: omap_udc does not respond to SETUP transfer properly
>>
> (OMAP5912)
>
>> When I plug our device into a Windows PC, we receive the SETUP message
>> (USB_REQ_GET_DESCRIPTOR). The IRQ handler sets the EP_NUM values per
>> Figure 16 of SPRU761A (EP_NUM.EPU_NUM = 0, EP_DIR = 1, EP_SEL = 1,
>> SETUP_SEL=0), then it writes the response into the fifo. After
>>
> writing,
>
>> FIFO_EN is set to 1, then EP_SEL to 0. I then find it remains in this
>> state forever (or at least until Windows decides the device is
>> problematic and turns it off).
>> I have looked at the STAT register at the start of the IRQ and it
>>
> shows
>
>> the FIFO is empty (0x02). After writing the STAT register shows
>>
> (0x04)
>
>> as expected. However, even waiting 500 ms after the write, the STAT
>> still shows 0x04.
>>
>> I have confirmed the HHC and DC clocks are enabled by looking at
>> SOFT_REQ_REG and MOD_CONF_CTRL_0.
>>
>> Shouldn't the STAT 0x04 bit go to zero eventually and it show the fifo
>> empty once again?
>>
>>
>> Thanks,
>>
>> Steve
>>
>> _______________________________________________
>> Linux-omap-open-source mailing list
>> Linux-omap-open-source@linux.omap.com
>> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>>
>
>
>
prev parent reply other threads:[~2007-03-16 18:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-15 18:42 omap_udc does not respond to SETUP transfer properly (OMAP5912) Steve Poulsen
2007-03-16 4:51 ` Pandita, Vikram
2007-03-16 15:26 ` Steve Poulsen
2007-03-16 18:44 ` Steve Poulsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45FAE572.8000209@css-design.us \
--to=spoulsen@css-design.us \
--cc=Linux-omap-open-source@linux.omap.com \
--cc=vikram.pandita@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox