RE: [PATCH] ARM: imx: change mx51.h into mx5x.h

From: Nguyen Dinh-R00091
Date: Wed Oct 20 2010 - 09:03:37 EST


Hello Uwe,

> -----Original Message-----
> From: Amit Kucheria [mailto:amit.kucheria@xxxxxxxxxxxxx]
> Sent: Wednesday, October 20, 2010 6:36 AM
> To: Uwe Kleine-KÃnig
> Cc: Nguyen Dinh-R00091; linux-kernel@xxxxxxxxxxxxxxx;
> linux@xxxxxxxxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx;
> grant.likely@xxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
> daniel@xxxxxxxx; Zhang Lily-R58066; valentin.longchamp@xxxxxxx
> Subject: Re: [PATCH] ARM: imx: change mx51.h into mx5x.h
>
> On 10 Oct 20, Uwe Kleine-KÃnig wrote:
> > Hello Dinh,
> >
> > On Tue, Oct 19, 2010 at 04:57:03PM -0500, Dinh.Nguyen@xxxxxxxxxxxxx
> wrote:
> > > From: Dinh Nguyen <Dinh.Nguyen@xxxxxxxxxxxxx>
> > >
> > > In preparation for submitting i.MX53 support, change mx51.h to
> > > mx5x.h so that mx5x.h can contain MX53 information as well.
> > Last time I found time to clean up the imx ports I worked hard that
> e.g.
> > mx27 machines only used MX27_ prefixed symbols, not the MX2x_ ones. (I
> > don't remember off-hand if I was done, so there might be a few users
> > left.)
> >
> > I'd prefer to just add an mx53.h instead.
>
> Perhaps this is a good time to ask the question - Why?
>
> mx53.h will duplicate (almost) everything in mx51.h. And any fixes made
> to
> mx51.h won't make it to mx53.h
>

MX53 shares about 90% of what is in mx51.h, so I thought it would make more sense for to share a single mx5x.h file. Also, we are planning to add another part, MX50 in the very near future. The way that I am planning for mx5x.h is something like this:

MX5_MMC_ADDR /*same address shared between both mx51 and mx53*/
MX51_IRAM_ADDR /*IRAM address for mx51*/
MX53_IRAM_ADDR /*IRAM address for mx53*/

Per Robert Schwebel's suggestion, I want to do small things at a time.

> Other sub-archs don't do this. e.g. omap uses one common header file and
> then
> a per-SoC file for the differences.
>
> > > Signed-off-by: Dinh Nguyen <Dinh.Nguyen@xxxxxxxxxxxxx>
> > > #ifdef CONFIG_ARCH_MX3
> > > diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-
> mxc/include/mach/mx5x.h
> > > similarity index 100%
> > > rename from arch/arm/plat-mxc/include/mach/mx51.h
> > > rename to arch/arm/plat-mxc/include/mach/mx5x.h
> > > --
> > > 1.6.0.4
> >
> > --
> > Pengutronix e.K. | Uwe Kleine-KÃnig
> |
> > Industrial Linux Solutions | http://www.pengutronix.de/
> |
>
> --
> ----------------------------------------------------------------------
> Amit Kucheria, Kernel Engineer || amit.kucheria@xxxxxxxxxxxxx
> ----------------------------------------------------------------------

Thanks,
Dinh
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—