From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-fx0-f161.google.com (mail-fx0-f161.google.com [209.85.220.161]) by ozlabs.org (Postfix) with ESMTP id BCF1BDDF3D for ; Wed, 25 Feb 2009 23:52:18 +1100 (EST) Received: by fxm5 with SMTP id 5so11897854fxm.9 for ; Wed, 25 Feb 2009 04:52:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <200902251327.02082.sr@denx.de> Date: Wed, 25 Feb 2009 18:15:15 +0530 Message-ID: Subject: Re: PPC 405 EX USB Development From: Adish Kuvelker To: Stefan Roese Content-Type: multipart/alternative; boundary=0016e6de005e7be7cf0463bd9b51 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0016e6de005e7be7cf0463bd9b51 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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 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 >> > > --0016e6de005e7be7cf0463bd9b51 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Stefan,

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

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

I think that there is some problem in the SETUP (Token) Stage. Can you= =20 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.

Rega= rds;
Aadish


On Wed, Feb 25, 2009 at 5:57 PM, Stefan Roese <sr@denx.de> wrot= e:
<= div>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 Control= ler
> and thus I am witting a HCD for the same. I am stuck at the Control st= age
> wherein although my SETUP stage seems to be going through I get a STAL= L.
>
> 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 (Sy= nopsys DWC) or
some other OTG controller?

Best regards,
Stefan


--0016e6de005e7be7cf0463bd9b51--