public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/15][v4] imx: usb: ehci-mx7 add usb driver for i.MX7D
Date: Fri, 24 Jul 2015 18:30:14 +0200	[thread overview]
Message-ID: <201507241830.14880.marex@denx.de> (raw)
In-Reply-To: <CY1PR03MB15206CA99489620EA5632046A8810@CY1PR03MB1520.namprd03.prod.outlook.com>

On Friday, July 24, 2015 at 05:34:27 PM, Alonso Adrian wrote:
> Hi Marek,

Hi!

> > -----Original Message-----
> > From: Marek Vasut [mailto:marex at denx.de]
> > Sent: Friday, July 24, 2015 4:44 AM
> > To: Alonso Lazcano Adrian-B38018
> > Cc: u-boot at lists.denx.de; sbabic at denx.de; otavio at ossystems.com.br;
> > Estevam Fabio-R49496; Li Frank-B20596; Garg Nitin-B37173
> > Subject: Re: [PATCH 02/15][v4] imx: usb: ehci-mx7 add usb driver for
> > i.MX7D
> > 
> > On Thursday, July 23, 2015 at 09:25:17 PM, Adrian Alonso wrote:
> > > Add support for usb driver for i.MX7D SoC
> > > 
> > > Signed-off-by: Adrian Alonso <aalonso@freescale.com>
> > > Signed-off-by: Ye.Li <B37916@freescale.com>
> > > Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> > 
> > So errr, why exactly can ehci-mx6 not be used here ? The code looks
> > almost like a copy of ehci-mx6 with minor tweaks here and there.
> > 
> > Best regards,
> > Marek Vasut
> 
> [Adrian] We can definitely have a single driver to support imx7 and imx6,
> but we mainly decide to have a driver for each SoC to try to make easier
> to maintain, there are so many variants of imx6
> (Quad/Dual/Solo/SoloX/QuadPlus/UL) and imx7 (Dual/Solo);

I just took a look into ehci-mx6.c and I see 1 (one) bogus conditional
which involves a board type. I see zero conditionals there which would
check CPU type.

> while there are
> several similarities in USB IP for iMX6 and iMX7, USB PHY Control and
> clock settings differ slightly making code harder to Understand and
> maintain in a single driver for imx7 and imx6.

The downside of having multiple copies of the code is that if you fix bug
in one copy and not in the other, the bug will remain unfixed on many of
the other machines. I don't like that. I am also not convinced that there
is justification for having separate drivers for MX6 and MX7 EHCI. I would
like to see a patch adding MX7 support into ehci-mx6 and in case it is
really as hairy as you say, I'd pick a separate one.

Best regards,
Marek Vasut

  reply	other threads:[~2015-07-24 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <--no-signed-off-by-cc>
2015-07-23 19:25 ` [U-Boot] [PATCH 02/15][v4] imx: usb: ehci-mx7 add usb driver for i.MX7D Adrian Alonso
2015-07-24  9:43   ` Marek Vasut
2015-07-24 15:34     ` Alonso Adrian
2015-07-24 16:30       ` Marek Vasut [this message]
2015-07-26  9:29       ` Stefano Babic
2015-07-26 10:36         ` Marek Vasut

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=201507241830.14880.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