From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 0/3] AM335x: Add USB support in u-boot.
Date: Sat, 30 Jun 2012 06:14:44 +0200 [thread overview]
Message-ID: <201206300614.44399.marex@denx.de> (raw)
In-Reply-To: <CAJ_ou-4J950SbHqHDjGn=3SprwEi_OUxVuKkviM79hMYx=yWZA@mail.gmail.com>
Dear Harman Sohanpal,
> On Sat, Jun 30, 2012 at 9:28 AM, Marek Vasut <marex@denx.de> wrote:
> > Dear Harman Sohanpal,
> >
> >> On Sat, Jun 30, 2012 at 6:15 AM, Marek Vasut <marex@denx.de> wrote:
> >> > Dear Harman Sohanpal,
> >> >
> >> >> These patches add USB support in u-boot for AM335x.
> >> >> The support for host or device is selected
> >> >> depending on the config selected from boards.cfg file.
> >> >> Host mode is selected for USB1 and device mode is
> >> >> selected for USB0.
> >> >> Base addresses are selected accordingly.
> >> >>
> >> >> Gene Zarkhin (1):
> >> >> AM335x : Add USB support for AM335x in u-boot
> >> >>
> >> >> Harman Sohanpal (2):
> >> >> AM335x : Configs to add USB host support.
> >> >> musb_udc : Fix compile warning.
> >> >
> >> > Dumb question ... but, can this not be made part of am35x USB ?
> >>
> >> Hi Marek,
> >> Well this can always be made part of am35x.c.
> >> But there would be a lot of changes required in the file.
> >
> > Why? They use different IP block or something?
> >
> >> And also I believe it would not make much sense.
> >> It would require ifdefs at a lot of places.
> >> Best example I can give to support what i said is
> >> that the control register
> >> is at an offset of 4 in am35x and 14 in am335x.
> >
> > So what, define two sets of register structures and pass them according
> > to CPU ID.
> >
> >> I am sure adding an ifdef at that place would not seem
> >> good to you to change address from 4 to 14 acc to platform.
> >
> > well ...
> > struct regs_a {
> > uint32_t padding[?];
> > uint32_t reg;
> > ...
> > };
> >
> > struct regs_b {
> > uint32_t reg;
> > ...
> > };
> >
> > Create IO accessors ... like ... my_usb_writel() and my_usb_readl() to
> > read and write the registers. And those accessors will cover the
> > differences. Or is there more?
> >
> >> Is there much pain to add these 2 files?
> >
> > Yes, duplication of code is always bad.
> >
> >> In my opinion we must need to have a separate file for this.
> >
> > Why? If it's only about the registers, won't the approach above work?
> >
> >> This is as per my understanding.
> >> It could also cause confusions to some due to name. maybe :)
> >
> > I'm no omap guru, Tom is. Tom?
> >
> >> Kindly give your thoughts.
> >
> > Oh my brain is spinning from this :-)
> >
> >> In case still some changes are required, we can think upon it :)
> >
> > I'm really glad to hear that, let's do our best to find the best possible
> > solution :-)
> >
> >> Thanks,
> >> Harman
> >
> > Best regards,
> > Marek Vasut
>
> Also we are adding the USB module to be selected dynamically
> from boards.cfg as suggested by Tom.
> If such is the case I believe the same should be done for am35x.
> Also from the previous mail of Tom, he seemed to be fine with
> separate files.
> The best approach would be to wait for Tom's reply.
> Thanks for the review :)
Hm, previous review? Was I not CCed on it maybe ? I'll check it.
> Harman
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-06-30 4:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 11:33 [U-Boot] [PATCH v4 0/3] AM335x: Add USB support in u-boot Harman Sohanpal
2012-06-29 11:33 ` [U-Boot] [PATCH v4 1/3] AM335x : Add USB support for AM335x " Harman Sohanpal
2012-06-29 11:33 ` [U-Boot] [PATCH v4 2/3] AM335x : Configs to add USB support Harman Sohanpal
2012-06-29 11:33 ` [U-Boot] [PATCH v4 3/3] musb_udc : Fix compile warning Harman Sohanpal
2012-10-16 5:43 ` Marek Vasut
2012-10-16 14:33 ` Tom Rini
2012-06-29 11:37 ` [U-Boot] [PATCH v4 0/3] AM335x: Add USB support in u-boot Marek Vasut
2012-06-30 0:45 ` Marek Vasut
2012-06-30 3:08 ` Harman Sohanpal
2012-06-30 3:58 ` Marek Vasut
2012-06-30 4:05 ` Harman Sohanpal
2012-06-30 4:14 ` Marek Vasut [this message]
2012-07-02 14:58 ` Tom Rini
2012-07-05 0:29 ` Marek Vasut
2012-07-05 17:24 ` Tom Rini
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=201206300614.44399.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox