linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PPC 405 EX USB Development
@ 2009-02-25  9:15 Adish Kuvelker
  2009-02-25 12:27 ` Stefan Roese
  0 siblings, 1 reply; 5+ messages in thread
From: Adish Kuvelker @ 2009-02-25  9:15 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

Hello,

I am developing a Host Controller Driver for the PPC405EX based board. I
have a OTG controller on it, which I have to configure as Host Controller
and thus I am witting a HCD for the same. I am stuck at the Control stage
wherein although my SETUP stage seems to be going through I get a STALL.

Can anyone help me in this regard as to where would I get a reference code
for this?

Regards;
Aadish

[-- Attachment #2: Type: text/html, Size: 444 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPC 405 EX USB Development
  2009-02-25  9:15 PPC 405 EX USB Development Adish Kuvelker
@ 2009-02-25 12:27 ` Stefan Roese
       [not found]   ` <d9c5f2890902250439u58c819a5pbd4a1bdda11d1dc4@mail.gmail.com>
  2009-02-25 12:45   ` Stefan Roese
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Roese @ 2009-02-25 12:27 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Adish Kuvelker

On Wednesday 25 February 2009, Adish Kuvelker wrote:
> I am developing a Host Controller Driver for the PPC405EX based board. I
> have a OTG controller on it, which I have to configure as Host Controller
> and thus I am witting a HCD for the same. I am stuck at the Control stage
> wherein although my SETUP stage seems to be going through I get a STALL.
>
> Can anyone help me in this regard as to where would I get a reference code
> for this?

Are you talking about the 405EX internal USB OTG controller (Synopsys DWC) or 
some other OTG controller? 

Best regards,
Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPC 405 EX USB Development
       [not found]   ` <d9c5f2890902250439u58c819a5pbd4a1bdda11d1dc4@mail.gmail.com>
@ 2009-02-25 12:45     ` Adish Kuvelker
  0 siblings, 0 replies; 5+ messages in thread
From: Adish Kuvelker @ 2009-02-25 12:45 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 2163 bytes --]

Hi Stefan,

Also in the SETUP stage where I have set my packet size as 1, as I treat
each of this 3 stages (SETUP, DATA and STATUS) as three different
stages/transactions,  I find that the "Non-Periodic Transmit FIFO/Queue
Status Register" read as soon as I write to the "Non-Periodic Transmit FIFO
Size Register" as "0x10500fa". Before writing the value is "0x80100". Is it
fine that the bit 7 which defines the termination of channel a right thing
to happen? Secondly since i am writing 2 bytes to the FIFO why should the
"Non-periodic TxFIFO Space Avail (NPTxFSpcAvail)" bits of USB0_GNPTXSTS be
0xfa?

The FIFO to which I write:
*USB0_GRXFSIZ - 0x213            USB0_GNPTXFSIZ - 0x1000213*
The above setting mean that my Non-Periodic Transmit register starts at
0x213. So I write my data (8 byte SETUP Token Data) in the following way:
-    Write the first 4 bytes to the starting adress of  0x1000 since I am
using Channel 0  --- (*(volatile unsigned  *)(DHc->base + 0x1000 + (bEnd *
0x1000) + 0x213 + fifo_address_offset))=*((volatile       unsigned
*)pSrcBuf);
-   Then increment the "fifo_adress_offset" by 4 and write the next 4 bytes.


I think that there is some problem in the SETUP (Token) Stage. Can you
please pass any pointers over this?

Regards;
Aadish

On Wed, Feb 25, 2009 at 6:09 PM, Adish Kuvelker <adish.kuvelker@gmail.com>wrote:

> Hi Stefan,
>
> I am working on the internal OTG controller. The synopsys DWC.
>
> Regards;
> Aadish
>
>
> On Wed, Feb 25, 2009 at 5:57 PM, Stefan Roese <sr@denx.de> wrote:
>
>> On Wednesday 25 February 2009, Adish Kuvelker wrote:
>> > I am developing a Host Controller Driver for the PPC405EX based board. I
>> > have a OTG controller on it, which I have to configure as Host
>> Controller
>> > and thus I am witting a HCD for the same. I am stuck at the Control
>> stage
>> > wherein although my SETUP stage seems to be going through I get a STALL.
>> >
>> > Can anyone help me in this regard as to where would I get a reference
>> code
>> > for this?
>>
>> Are you talking about the 405EX internal USB OTG controller (Synopsys DWC)
>> or
>> some other OTG controller?
>>
>> Best regards,
>> Stefan
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2979 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPC 405 EX USB Development
  2009-02-25 12:27 ` Stefan Roese
       [not found]   ` <d9c5f2890902250439u58c819a5pbd4a1bdda11d1dc4@mail.gmail.com>
@ 2009-02-25 12:45   ` Stefan Roese
  2009-03-03 21:18     ` Felix Radensky
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Roese @ 2009-02-25 12:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Adish Kuvelker

On Wednesday 25 February 2009, Stefan Roese wrote:
> On Wednesday 25 February 2009, Adish Kuvelker wrote:
> > I am developing a Host Controller Driver for the PPC405EX based board. I
> > have a OTG controller on it, which I have to configure as Host Controller
> > and thus I am witting a HCD for the same. I am stuck at the Control stage
> > wherein although my SETUP stage seems to be going through I get a STALL.
> >
> > Can anyone help me in this regard as to where would I get a reference
> > code for this?
>
> Are you talking about the 405EX internal USB OTG controller (Synopsys DWC)
> or some other OTG controller?

You can find a driver for this Synopsys DWC OTG controller in our 
linux-2.6-denx repository:

http://git.denx.de/?p=linux-2.6-denx.git;a=tree;f=drivers/usb/gadget/dwc_otg;h=526d515e4764a0c92cebbf909c245d6aec7e198c;hb=HEAD

But please note that this driver is currently not in shape for mainline 
inclusion. It's working though, so it should help you while writing a new, 
clean driver.

Best regards,
Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PPC 405 EX USB Development
  2009-02-25 12:45   ` Stefan Roese
@ 2009-03-03 21:18     ` Felix Radensky
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Radensky @ 2009-03-03 21:18 UTC (permalink / raw)
  To: linuxppc-dev




Stefan Roese wrote:
> 
> On Wednesday 25 February 2009, Stefan Roese wrote:
> 
> 
> You can find a driver for this Synopsys DWC OTG controller in our 
> linux-2.6-denx repository:
> 
> http://git.denx.de/?p=linux-2.6-denx.git;a=tree;f=drivers/usb/gadget/dwc_otg;h=526d515e4764a0c92cebbf909c245d6aec7e198c;hb=HEAD
> 
> But please note that this driver is currently not in shape for mainline 
> inclusion. It's working though, so it should help you while writing a new, 
> clean driver.
> 
> 

Hi, Stefan

Was this driver tested in host-only mode ?
Also, would this be a correct combination of flags for host-only mode 
on 405EX:
KBUILD_CPPFLAGS	+= -Dlinux -DOTG_PLB_DMA -DOTG_PLB_DMA_TASKLET
-DDWC_HOST_ONLY

Thanks a lot.

Felix.
-- 
View this message in context: http://www.nabble.com/PPC-405-EX-USB-Development-tp22201577p22318178.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-03 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25  9:15 PPC 405 EX USB Development Adish Kuvelker
2009-02-25 12:27 ` Stefan Roese
     [not found]   ` <d9c5f2890902250439u58c819a5pbd4a1bdda11d1dc4@mail.gmail.com>
2009-02-25 12:45     ` Adish Kuvelker
2009-02-25 12:45   ` Stefan Roese
2009-03-03 21:18     ` Felix Radensky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).