linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, leoli@freescale.com,
	Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH] Add USB support to mpc8349-mitx board port
Date: Fri, 6 Jul 2007 23:46:48 -0600	[thread overview]
Message-ID: <fa686aa40707062246j71a347acje8559b7b6be9d38b@mail.gmail.com> (raw)
In-Reply-To: <200707070148.20526.arnd@arndb.de>

On 7/6/07, Arnd Bergmann <arnd@arndb.de> wrote:
> On Saturday 07 July 2007, Grant Likely wrote:
> > --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
> > +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> > @@ -63,6 +63,8 @@ static void __init mpc834x_itx_setup_arch(void)
> >
> > ppc_md.pci_exclude_device = mpc83xx_exclude_device;
> > #endif
> > +
> > +mpc834x_usb_cfg();
> > }
>
> Why is that necessary? Shouldn't there be an of_platform_driver that
> simply does all the setup automatically if the device is present?

This call is actually for SoC setup stuff.  There are actually 2 USB
engines on the SoC, and this call figures out what mode the pins are
supposed to be in.  I think this stuff firmly falls into the platform
setup arena since it is highly chip specific.

You bring up a good point though.  The current usb support code in
sysdev/fsl_soc.c uses arch_initcall(fsl_usb_of_init) to go searching
for USB interfaces in the device tree, which are EHCI (and sometimes
OTG) compatible.  fsl_usb_of_init calls
platform_device_register_simple() for each USB device found which is
kind of a round about way of doing things.  That should probably be
depreciated and an of_platform_device binding should be added to the
EHCI driver.

This same comment probably goes for the other arch_initcall functions
in fsl_soc.c which do exactly the same thing for other devices.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-07-07  5:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 22:29 [PATCH] Add USB support to mpc8349-mitx board port Grant Likely
2007-07-06 23:48 ` Arnd Bergmann
2007-07-07  5:46   ` Grant Likely [this message]
2007-07-08  0:34     ` John Rigby
2007-07-08  0:48       ` Grant Likely
2007-07-09  3:55         ` John Rigby
2007-07-09 17:03           ` Grant Likely
2007-07-09 23:35             ` John Rigby

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=fa686aa40707062246j71a347acje8559b7b6be9d38b@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=arnd@arndb.de \
    --cc=leoli@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=timur@freescale.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;
as well as URLs for NNTP newsgroup(s).