public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: imx: Correct the comments in time.c
@ 2015-04-29 21:40 Shenwei Wang
  2015-05-07 12:59 ` Shawn Guo
  0 siblings, 1 reply; 3+ messages in thread
From: Shenwei Wang @ 2015-04-29 21:40 UTC (permalink / raw)
  To: linux-arm-kernel

The comments were corrected as the following to reflect
the real situation of Freescale MXC timer IP block.
There are totally 4 version of the timer on Freescale i.MX SoCs.

Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
---
 arch/arm/mach-imx/time.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index acb1ff5..b1698e1 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -38,9 +38,11 @@
 #include "hardware.h"
 
 /*
- * There are 2 versions of the timer hardware on Freescale MXC hardware.
- * Version 1: MX1/MXL, MX21, MX27.
- * Version 2: MX25, MX31, MX35, MX37, MX51
+ * There are 4 versions of the timer hardware on Freescale MXC hardware.
+ * Version 0: MX1/MXL
+ * Version 1: MX21, MX27.
+ * Version 2: MX25, MX31, MX35, MX37, MX51, MX6Q(rev1.0)
+ * Version 3: MX6DL, MX6SX, MX6Q(rev1.1+)
  */
 
 /* defines common for all i.MX */
-- 
1.9.1

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

* [PATCH 1/1] ARM: imx: Correct the comments in time.c
  2015-04-29 21:40 [PATCH 1/1] ARM: imx: Correct the comments in time.c Shenwei Wang
@ 2015-05-07 12:59 ` Shawn Guo
  2015-05-07 15:04   ` Shenwei Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Guo @ 2015-05-07 12:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 29, 2015 at 04:40:27PM -0500, Shenwei Wang wrote:
> The comments were corrected as the following to reflect
> the real situation of Freescale MXC timer IP block.
> There are totally 4 version of the timer on Freescale i.MX SoCs.
> 
> Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
> ---
>  arch/arm/mach-imx/time.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
> index acb1ff5..b1698e1 100644
> --- a/arch/arm/mach-imx/time.c
> +++ b/arch/arm/mach-imx/time.c
> @@ -38,9 +38,11 @@
>  #include "hardware.h"
>  
>  /*
> - * There are 2 versions of the timer hardware on Freescale MXC hardware.
> - * Version 1: MX1/MXL, MX21, MX27.
> - * Version 2: MX25, MX31, MX35, MX37, MX51
> + * There are 4 versions of the timer hardware on Freescale MXC hardware.
> + * Version 0: MX1/MXL
> + * Version 1: MX21, MX27.
> + * Version 2: MX25, MX31, MX35, MX37, MX51, MX6Q(rev1.0)
> + * Version 3: MX6DL, MX6SX, MX6Q(rev1.1+)

This is the problem with version numbers.  Version numbers defined by
software are too arbitrary and could conflict with the ones defined by
IP design (i.e. IPUv3) some day.  Just for example, if some day GPTv2
IP comes with some significant design changes, "v2" will becomes a
source of confusion between software and hardware.  It's even worse if
we already defined fsl,gpt-v2 as the device tree compatible.  That's why
we can only use the version number defined by hardware in device tree
binding.  If no hardware version is given, the best bet would be use SoC
name in the bindings to specify the particular programming model of the
IP block.

I applied patch to drop the version numbers as below.

diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index acb1ff577cda..ab5ee1c445f3 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -38,9 +38,11 @@
 #include "hardware.h"
 
 /*
- * There are 2 versions of the timer hardware on Freescale MXC hardware.
- * Version 1: MX1/MXL, MX21, MX27.
- * Version 2: MX25, MX31, MX35, MX37, MX51
+ * There are 4 versions of the timer hardware on Freescale MXC hardware.
+ *  - MX1/MXL
+ *  - MX21, MX27.
+ *  - MX25, MX31, MX35, MX37, MX51, MX6Q(rev1.0)
+ *  - MX6DL, MX6SX, MX6Q(rev1.1+)
  */
 
 /* defines common for all i.MX */

Shawn

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

* [PATCH 1/1] ARM: imx: Correct the comments in time.c
  2015-05-07 12:59 ` Shawn Guo
@ 2015-05-07 15:04   ` Shenwei Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Shenwei Wang @ 2015-05-07 15:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

Thank you for your time. 
Your changes are fine. It seems there is no perfect solution for this kind of issue.

Regards,
Shenwei

> -----Original Message-----
> From: Shawn Guo [mailto:shawn.guo at linaro.org]
> Sent: 2015?5?7? 7:59
> To: Wang Shenwei-B38339
> Cc: linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/1] ARM: imx: Correct the comments in time.c
> 
> On Wed, Apr 29, 2015 at 04:40:27PM -0500, Shenwei Wang wrote:
> > The comments were corrected as the following to reflect the real
> > situation of Freescale MXC timer IP block.
> > There are totally 4 version of the timer on Freescale i.MX SoCs.
> >
> > Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
> > ---
> >  arch/arm/mach-imx/time.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index
> > acb1ff5..b1698e1 100644
> > --- a/arch/arm/mach-imx/time.c
> > +++ b/arch/arm/mach-imx/time.c
> > @@ -38,9 +38,11 @@
> >  #include "hardware.h"
> >
> >  /*
> > - * There are 2 versions of the timer hardware on Freescale MXC hardware.
> > - * Version 1: MX1/MXL, MX21, MX27.
> > - * Version 2: MX25, MX31, MX35, MX37, MX51
> > + * There are 4 versions of the timer hardware on Freescale MXC hardware.
> > + * Version 0: MX1/MXL
> > + * Version 1: MX21, MX27.
> > + * Version 2: MX25, MX31, MX35, MX37, MX51, MX6Q(rev1.0)
> > + * Version 3: MX6DL, MX6SX, MX6Q(rev1.1+)
> 
> This is the problem with version numbers.  Version numbers defined by software
> are too arbitrary and could conflict with the ones defined by IP design (i.e. IPUv3)
> some day.  Just for example, if some day GPTv2 IP comes with some significant
> design changes, "v2" will becomes a source of confusion between software and
> hardware.  It's even worse if we already defined fsl,gpt-v2 as the device tree
> compatible.  That's why we can only use the version number defined by
> hardware in device tree binding.  If no hardware version is given, the best bet
> would be use SoC name in the bindings to specify the particular programming
> model of the IP block.
> 
> I applied patch to drop the version numbers as below.
> 
> diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index
> acb1ff577cda..ab5ee1c445f3 100644
> --- a/arch/arm/mach-imx/time.c
> +++ b/arch/arm/mach-imx/time.c
> @@ -38,9 +38,11 @@
>  #include "hardware.h"
> 
>  /*
> - * There are 2 versions of the timer hardware on Freescale MXC hardware.
> - * Version 1: MX1/MXL, MX21, MX27.
> - * Version 2: MX25, MX31, MX35, MX37, MX51
> + * There are 4 versions of the timer hardware on Freescale MXC hardware.
> + *  - MX1/MXL
> + *  - MX21, MX27.
> + *  - MX25, MX31, MX35, MX37, MX51, MX6Q(rev1.0)
> + *  - MX6DL, MX6SX, MX6Q(rev1.1+)
>   */
> 
>  /* defines common for all i.MX */
> 
> Shawn

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

end of thread, other threads:[~2015-05-07 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 21:40 [PATCH 1/1] ARM: imx: Correct the comments in time.c Shenwei Wang
2015-05-07 12:59 ` Shawn Guo
2015-05-07 15:04   ` Shenwei Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox