linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: imx: change mx51.h into mx5x.h
@ 2010-10-19 21:57 Dinh.Nguyen at freescale.com
  2010-10-20  9:01 ` Uwe Kleine-König
  0 siblings, 1 reply; 7+ messages in thread
From: Dinh.Nguyen at freescale.com @ 2010-10-19 21:57 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dinh Nguyen <Dinh.Nguyen@freescale.com>

In preparation for submitting i.MX53 support, change mx51.h to
mx5x.h so that mx5x.h can contain MX53 information as well.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
---
 arch/arm/mach-mx5/devices-imx51.h                 |    2 +-
 arch/arm/plat-mxc/include/mach/debug-macro.S      |    2 +-
 arch/arm/plat-mxc/include/mach/hardware.h         |    2 +-
 arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} |    0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} (100%)

diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
index 5cc910e..f6abe2d 100644
--- a/arch/arm/mach-mx5/devices-imx51.h
+++ b/arch/arm/mach-mx5/devices-imx51.h
@@ -6,7 +6,7 @@
  * the terms of the GNU General Public License version 2 as published by the
  * Free Software Foundation.
  */
-#include <mach/mx51.h>
+#include <mach/mx5x.h>
 #include <mach/devices-common.h>
 
 extern const struct imx_fec_data imx51_fec_data __initconst;
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index 2560640..ac8a2bf 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -49,7 +49,7 @@
 #ifdef UART_PADDR
 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
 #endif
-#include <mach/mx51.h>
+#include <mach/mx5x.h>
 #define UART_PADDR	MX51_UART1_BASE_ADDR
 #define UART_VADDR	MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
 #endif
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index ebadf4a..5a7395a 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -28,7 +28,7 @@
 	 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
 
 #ifdef CONFIG_ARCH_MX5
-#include <mach/mx51.h>
+#include <mach/mx5x.h>
 #endif
 
 #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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-19 21:57 [PATCH] ARM: imx: change mx51.h into mx5x.h Dinh.Nguyen at freescale.com
@ 2010-10-20  9:01 ` Uwe Kleine-König
  2010-10-20 11:35   ` Amit Kucheria
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2010-10-20  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Dinh,

On Tue, Oct 19, 2010 at 04:57:03PM -0500, Dinh.Nguyen at freescale.com wrote:
> From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> 
> 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.

> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> ---
>  arch/arm/mach-mx5/devices-imx51.h                 |    2 +-
>  arch/arm/plat-mxc/include/mach/debug-macro.S      |    2 +-
>  arch/arm/plat-mxc/include/mach/hardware.h         |    2 +-
>  arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} |    0
BTW, this is wrong, at least the header guard needs updating when you
rename the file.

>  4 files changed, 3 insertions(+), 3 deletions(-)
>  rename arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} (100%)
> 
> diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
> index 5cc910e..f6abe2d 100644
> --- a/arch/arm/mach-mx5/devices-imx51.h
> +++ b/arch/arm/mach-mx5/devices-imx51.h
> @@ -6,7 +6,7 @@
>   * the terms of the GNU General Public License version 2 as published by the
>   * Free Software Foundation.
>   */
> -#include <mach/mx51.h>
> +#include <mach/mx5x.h>
>  #include <mach/devices-common.h>
>  
>  extern const struct imx_fec_data imx51_fec_data __initconst;
> diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
> index 2560640..ac8a2bf 100644
> --- a/arch/arm/plat-mxc/include/mach/debug-macro.S
> +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
> @@ -49,7 +49,7 @@
>  #ifdef UART_PADDR
>  #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
>  #endif
> -#include <mach/mx51.h>
> +#include <mach/mx5x.h>
>  #define UART_PADDR	MX51_UART1_BASE_ADDR
>  #define UART_VADDR	MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
>  #endif
> diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
> index ebadf4a..5a7395a 100644
> --- a/arch/arm/plat-mxc/include/mach/hardware.h
> +++ b/arch/arm/plat-mxc/include/mach/hardware.h
> @@ -28,7 +28,7 @@
>  	 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
>  
>  #ifdef CONFIG_ARCH_MX5
> -#include <mach/mx51.h>
> +#include <mach/mx5x.h>
>  #endif
>  
>  #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/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-20  9:01 ` Uwe Kleine-König
@ 2010-10-20 11:35   ` Amit Kucheria
  2010-10-20 13:03     ` Nguyen Dinh-R00091
  2010-10-20 13:09     ` Uwe Kleine-König
  0 siblings, 2 replies; 7+ messages in thread
From: Amit Kucheria @ 2010-10-20 11:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 10 Oct 20, Uwe Kleine-K?nig wrote:
> Hello Dinh,
> 
> On Tue, Oct 19, 2010 at 04:57:03PM -0500, Dinh.Nguyen at freescale.com wrote:
> > From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> > 
> > 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

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@freescale.com>
> > ---
> >  arch/arm/mach-mx5/devices-imx51.h                 |    2 +-
> >  arch/arm/plat-mxc/include/mach/debug-macro.S      |    2 +-
> >  arch/arm/plat-mxc/include/mach/hardware.h         |    2 +-
> >  arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} |    0
> BTW, this is wrong, at least the header guard needs updating when you
> rename the file.
> 
> >  4 files changed, 3 insertions(+), 3 deletions(-)
> >  rename arch/arm/plat-mxc/include/mach/{mx51.h => mx5x.h} (100%)
> > 
> > diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h
> > index 5cc910e..f6abe2d 100644
> > --- a/arch/arm/mach-mx5/devices-imx51.h
> > +++ b/arch/arm/mach-mx5/devices-imx51.h
> > @@ -6,7 +6,7 @@
> >   * the terms of the GNU General Public License version 2 as published by the
> >   * Free Software Foundation.
> >   */
> > -#include <mach/mx51.h>
> > +#include <mach/mx5x.h>
> >  #include <mach/devices-common.h>
> >  
> >  extern const struct imx_fec_data imx51_fec_data __initconst;
> > diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
> > index 2560640..ac8a2bf 100644
> > --- a/arch/arm/plat-mxc/include/mach/debug-macro.S
> > +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
> > @@ -49,7 +49,7 @@
> >  #ifdef UART_PADDR
> >  #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
> >  #endif
> > -#include <mach/mx51.h>
> > +#include <mach/mx5x.h>
> >  #define UART_PADDR	MX51_UART1_BASE_ADDR
> >  #define UART_VADDR	MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR)
> >  #endif
> > diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
> > index ebadf4a..5a7395a 100644
> > --- a/arch/arm/plat-mxc/include/mach/hardware.h
> > +++ b/arch/arm/plat-mxc/include/mach/hardware.h
> > @@ -28,7 +28,7 @@
> >  	 (addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0))
> >  
> >  #ifdef CONFIG_ARCH_MX5
> > -#include <mach/mx51.h>
> > +#include <mach/mx5x.h>
> >  #endif
> >  
> >  #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 at canonical.com
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-20 11:35   ` Amit Kucheria
@ 2010-10-20 13:03     ` Nguyen Dinh-R00091
  2010-10-20 13:09     ` Uwe Kleine-König
  1 sibling, 0 replies; 7+ messages in thread
From: Nguyen Dinh-R00091 @ 2010-10-20 13:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Uwe,

> -----Original Message-----
> From: Amit Kucheria [mailto:amit.kucheria at canonical.com]
> Sent: Wednesday, October 20, 2010 6:36 AM
> To: Uwe Kleine-K?nig
> Cc: Nguyen Dinh-R00091; linux-kernel at vger.kernel.org;
> linux at arm.linux.org.uk; s.hauer at pengutronix.de;
> grant.likely at secretlab.ca; linux-arm-kernel at lists.infradead.org;
> daniel at caiaq.de; Zhang Lily-R58066; valentin.longchamp at epfl.ch
> 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 at freescale.com
> wrote:
> > > From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> > >
> > > 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@freescale.com>
> > >  #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 at canonical.com
> ----------------------------------------------------------------------

Thanks,
Dinh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-20 11:35   ` Amit Kucheria
  2010-10-20 13:03     ` Nguyen Dinh-R00091
@ 2010-10-20 13:09     ` Uwe Kleine-König
  2010-10-20 13:15       ` Nguyen Dinh-R00091
  1 sibling, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2010-10-20 13:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Amit,

On Wed, Oct 20, 2010 at 02:35:50PM +0300, Amit Kucheria wrote:
> On 10 Oct 20, Uwe Kleine-K?nig wrote:
> > Hello Dinh,
> > 
> > On Tue, Oct 19, 2010 at 04:57:03PM -0500, Dinh.Nguyen at freescale.com wrote:
> > > From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> > > 
> > > 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
Yep, that's the pro side of having a single header file for both mx51
and mx53.  On the negative side we have:

 - When changing mx5x.h you always have to check (now) two reference
   manuals, later maybe more.
 - When Freescale decides to create a (say) mx56 that is totally
   different, you can be happy not to have constants starting with MX5X.
   (This happened to the MX2X constants when Freescale created mx25, not
   to mention mx23 and mx28.)

I admit that *now* it would be easier to just rename mx51.h to mx5x.h,
but for the long run keeping mx51.h is better, I'm sure.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-20 13:09     ` Uwe Kleine-König
@ 2010-10-20 13:15       ` Nguyen Dinh-R00091
  2010-10-20 13:25         ` Uwe Kleine-König
  0 siblings, 1 reply; 7+ messages in thread
From: Nguyen Dinh-R00091 @ 2010-10-20 13:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Uwe,

>-----Original Message-----
>From: Uwe Kleine-K?nig [mailto:u.kleine-koenig at pengutronix.de]
>Sent: Wednesday, October 20, 2010 8:09 AM
>To: Nguyen Dinh-R00091; linux-kernel at vger.kernel.org; linux at arm.linux.org.uk; s.hauer at pengutronix.de;
>grant.likely at secretlab.ca; linux-arm-kernel at lists.infradead.org; daniel at caiaq.de; Zhang Lily-R58066;
>valentin.longchamp at epfl.ch
>Subject: Re: [PATCH] ARM: imx: change mx51.h into mx5x.h
>
>Hello Amit,
>
>On Wed, Oct 20, 2010 at 02:35:50PM +0300, Amit Kucheria wrote:
>> On 10 Oct 20, Uwe Kleine-K?nig wrote:
>> > Hello Dinh,
>> >
>> > On Tue, Oct 19, 2010 at 04:57:03PM -0500, Dinh.Nguyen at freescale.com wrote:
>> > > From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
>> > >
>> > > 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
>Yep, that's the pro side of having a single header file for both mx51
>and mx53.  On the negative side we have:
>
> - When changing mx5x.h you always have to check (now) two reference
>   manuals, later maybe more.
> - When Freescale decides to create a (say) mx56 that is totally
>   different, you can be happy not to have constants starting with MX5X.
>   (This happened to the MX2X constants when Freescale created mx25, not
>   to mention mx23 and mx28.)
>
>I admit that *now* it would be easier to just rename mx51.h to mx5x.h,
>but for the long run keeping mx51.h is better, I'm sure.
>
>Best regards
>Uwe

I guess I should also ask this question now. I was planning to add support for mx53 kernel that will be binary compatible with mx51. I'm guessing that you are not in support of that idea?

>
>--
>Pengutronix e.K.                           | Uwe Kleine-K?nig            |
>Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Thanks,
Dinh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ARM: imx: change mx51.h into mx5x.h
  2010-10-20 13:15       ` Nguyen Dinh-R00091
@ 2010-10-20 13:25         ` Uwe Kleine-König
  0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2010-10-20 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Wed, Oct 20, 2010 at 06:15:53AM -0700, Nguyen Dinh-R00091 wrote:
> I guess I should also ask this question now. I was planning to add
> support for mx53 kernel that will be binary compatible with mx51. I'm
> guessing that you are not in support of that idea?
With "binary compatible" you mean you want to build a kernel that runs
on both, mx51 and mx53 machines?  Yes, I definitly want that, that's one
of the main reasons to do that consolidation.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-20 13:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 21:57 [PATCH] ARM: imx: change mx51.h into mx5x.h Dinh.Nguyen at freescale.com
2010-10-20  9:01 ` Uwe Kleine-König
2010-10-20 11:35   ` Amit Kucheria
2010-10-20 13:03     ` Nguyen Dinh-R00091
2010-10-20 13:09     ` Uwe Kleine-König
2010-10-20 13:15       ` Nguyen Dinh-R00091
2010-10-20 13:25         ` Uwe Kleine-König

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).