All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: Jan Andersson <jan@gaisler.com>
Cc: linuxppc-dev@ozlabs.org, linux-usb@vger.kernel.org, wd@denx.de,
	dzu@denx.de
Subject: Re: [PATCH 5/8 v2] powerpc/mpc5121: add USB host support
Date: Wed, 27 Jan 2010 16:45:19 +0100	[thread overview]
Message-ID: <20100127164519.4124580c@wker> (raw)
In-Reply-To: <4B60333C.9040806@gaisler.com>

On Wed, 27 Jan 2010 13:36:12 +0100
Jan Andersson <jan@gaisler.com> wrote:

> Anatolij Gustschin wrote:
> > @@ -259,6 +305,11 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
> >  {
> >  	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> >  	int retval;
> > +	struct fsl_usb2_platform_data *pdata;
> > +
> > +	pdata = hcd->self.controller->platform_data;
> > +	ehci->big_endian_desc = pdata->big_endian_desc;
> > +	ehci->big_endian_mmio = pdata->big_endian_mmio;
> 
> I recently posted some questions to linux-usb@vger about big_endian_mmio 
> and the definition of the HC_LENGTH and HC_VERSION macros. The thread 
> can be found here: http://marc.info/?l=linux-usb&m=126441448626924&w=2
> 
> The EHCI specification defines the CAPLENGTH register as an 8-bit 
> register at byte offset 0 and HCIVERSION as a 16-bit register at byte 
> offset 2. Performing a 32-bit read on a big endian system should 
> therefore results in the following organisation (MSB .. LSB):
> CAPLENGTH : RESERVED : HCIVERSION
> 
> The macros for reading CAPLENGTH and HCIVERSION (defined in 
> include/linux/usb/ehci-def.h) look like:
> 
> #define HC_LENGTH(p)		(((p)>>00)&0x00ff)	/* bits 7:0 */
> #define HC_VERSION(p)		(((p)>>16)&0xffff)	/* bits 31:16 */
> 
> That is, they select the registers as they were organized within the 
> word according to little endian. Is this not a problem for your 
> controller/driver?

On this controller the CAPLENGTH register is an 8-bit regiser at
byte offset 3 and HCIVERSION register is a 16-bit register at
byte offset 0. Performing a 32-bit read results in:
HCIVERSION : RESERVED : CAPLENGTH

So it is not a problem for the driver.

Best regards,
Anatolij

  reply	other threads:[~2010-01-27 15:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 12:07 [PATCH 0/8] Update support for MPC512x Anatolij Gustschin
2010-01-27 12:07 ` Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 1/8 v2] powerpc/mpc5121: Add machine restart support Anatolij Gustschin
2010-01-27 15:46   ` Grant Likely
2010-01-27 12:07 ` [PATCH 2/8 v2] rtc: Add MPC5121 Real time clock driver Anatolij Gustschin
2010-01-27 15:58   ` Grant Likely
2010-01-27 12:07 ` [PATCH 3/8 v2] mtd: Add MPC5121 NAND Flash Controller driver Anatolij Gustschin
2010-01-27 12:07   ` Anatolij Gustschin
2010-01-27 16:43   ` Grant Likely
2010-01-27 16:43     ` Grant Likely
2010-01-27 20:24     ` Wolfgang Denk
2010-01-27 20:24       ` Wolfgang Denk
2010-01-27 12:07 ` [PATCH 4/8 v2] dma: Add MPC512x DMA driver Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 5/8 v2] powerpc/mpc5121: add USB host support Anatolij Gustschin
2010-01-27 12:36   ` Jan Andersson
2010-01-27 15:45     ` Anatolij Gustschin [this message]
2010-01-27 16:54   ` Grant Likely
2010-01-27 12:07 ` [PATCH 6/8 v2] powerpc/mpc5121: shared DIU framebuffer support Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 7/8 v2] powerpc/mpc5121: update mpc5121ads DTS Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 8/8 v2] powerpc/mpc5121: Add default config for MPC5121 Anatolij Gustschin
2010-01-27 14:23 ` [PATCH 0/8] Update support for MPC512x Anatolij Gustschin
2010-01-27 14:23   ` Anatolij Gustschin

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=20100127164519.4124580c@wker \
    --to=agust@denx.de \
    --cc=dzu@denx.de \
    --cc=jan@gaisler.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=wd@denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.