linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 3/3] ahci: imx: Add i.MX53 support
Date: Tue, 10 Dec 2013 14:51:16 +0100	[thread overview]
Message-ID: <201312101451.16910.marex@denx.de> (raw)
In-Reply-To: <20131210133723.GC26728@S2101-09.ap.freescale.net>

On Tuesday, December 10, 2013 at 02:37:27 PM, Shawn Guo wrote:
> On Tue, Dec 10, 2013 at 12:47:38PM +0100, Sascha Hauer wrote:
> > > @@ -34,10 +34,21 @@ enum {
> > > 
> > >  	HOST_TIMER1MS = 0xe0,			/* Timer 1-ms */
> > >  
> > >  };
> > > 
> > > +enum ahci_imx_type {
> > > +	AHCI_IMX53,
> > > +	AHCI_IMX6Q,
> > > +};
> > 
> > Please next time introduce a SoC specific struct to encode the
> > differences between SoCs. This way you can abstract away the differences
> > in flags and function callbacks and don't end up with functions which
> > do completely different things for different SoCs like currently in
> > imx_sata_clock_enable(). The if (type == SOC_XY) style doesn't scale in
> > many drivers anymore.
> 
> Yea, I was thinking about the same thing when reviewing the patch in the
> first time, but decided to not comment on that because currently the
> added functions are doing the similar/related thing.  But I agree that
> SoC specific structure should be some thing more scalable and we should
> go for in the future.

Full ACK on this one, yes. Thus far, the chips are similar so that the ID is 
enough, once we get some more exotic chip, this should be changed to a 
structure. I guess the IOMUX register layout might be different on the MX7 at 
least for example ?

Best regards,
Marek Vasut

  reply	other threads:[~2013-12-10 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25  8:47 [PATCH V3 1/3] ahci: imx: Explicitly clear IMX6Q_GPR13_SATA_MPLL_CLK_EN Marek Vasut
2013-11-25  8:47 ` [PATCH V6 2/3] ahci: imx: Pull out the clock enable/disable calls Marek Vasut
2013-12-03 12:42   ` Tejun Heo
2013-11-25  8:47 ` [PATCH V6 3/3] ahci: imx: Add i.MX53 support Marek Vasut
2013-12-10 11:47   ` Sascha Hauer
2013-12-10 13:37     ` Shawn Guo
2013-12-10 13:51       ` Marek Vasut [this message]
2013-11-29 22:28 ` [PATCH V3 1/3] ahci: imx: Explicitly clear IMX6Q_GPR13_SATA_MPLL_CLK_EN Tejun Heo
2013-12-03  7:20   ` Shawn Guo
2013-12-03 12:41 ` Tejun Heo
2013-12-03 13:41   ` 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=201312101451.16910.marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).