All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] update omap3 features bitmap and API to generic names
@ 2010-05-10 19:55 ` Venkatraman S
  0 siblings, 0 replies; 10+ messages in thread
From: Venkatraman S @ 2010-05-10 19:55 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel
  Cc: Venkatraman S, Nishant Menon, Tony Lindgren,
	Madhusudhan Chikkature

	OMAP3 features bitmap is used a method to check
for SoC specific features. This patch renames the global variables
and the accessor functions to use a generic name from omap3_* to
omap_*

Signed-off-by: Venkatraman S <svenkatr@ti.com>
CC: Nishant Menon <nm@ti.com>
CC: Tony Lindgren <tony@atomide.com>
CC: Madhusudhan Chikkature <madhu.cr@ti.com>
---
 * Resent to CC Madhu

 arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
 arch/arm/mach-omap2/id.c              |   18 ++++++++--------
 arch/arm/plat-omap/include/plat/cpu.h |   34 ++++++++++++++++----------------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 9cba556..afa481d 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
 			cpu_clkflg |= CK_3430ES2;
 		}
 	}
-	if (omap3_has_192mhz_clk())
+	if (omap_has_192mhz_clk())
 		omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
 
 	if (cpu_is_omap3630()) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37b8a1a..a095b87 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -28,7 +28,7 @@
 static struct omap_chip_id omap_chip;
 static unsigned int omap_revision;
 
-u32 omap3_features;
+u32 omap_features;
 
 unsigned int omap_rev(void)
 {
@@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
 #define OMAP3_CHECK_FEATURE(status,feat)				\
 	if (((status & OMAP3_ ##feat## _MASK) 				\
 		>> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { 	\
-		omap3_features |= OMAP3_HAS_ ##feat;			\
+		omap_features |= OMAP_HAS_ ##feat;			\
 	}
 
 void __init omap3_check_features(void)
 {
 	u32 status;
 
-	omap3_features = 0;
+	omap_features = 0;
 
 	status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
 
@@ -178,7 +178,7 @@ void __init omap3_check_features(void)
 	OMAP3_CHECK_FEATURE(status, NEON);
 	OMAP3_CHECK_FEATURE(status, ISP);
 	if (cpu_is_omap3630())
-		omap3_features |= OMAP3_HAS_192MHZ_CLK;
+		omap_features |= OMAP_HAS_192MHZ_CLK;
 
 	/*
 	 * TODO: Get additional info (where applicable)
@@ -294,7 +294,7 @@ void __init omap4_check_revision(void)
 }
 
 #define OMAP3_SHOW_FEATURE(feat)		\
-	if (omap3_has_ ##feat())		\
+	if (omap_has_ ##feat())		\
 		printk(#feat" ");
 
 void __init omap3_cpuinfo(void)
@@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
 		/*
 		 * AM35xx devices
 		 */
-		if (omap3_has_sgx()) {
+		if (omap_has_sgx()) {
 			omap_revision = OMAP3517_REV(rev);
 			strcpy(cpu_name, "AM3517");
 		} else {
 			/* Already set in omap3_check_revision() */
 			strcpy(cpu_name, "AM3505");
 		}
-	} else if (omap3_has_iva() && omap3_has_sgx()) {
+	} else if (omap_has_iva() && omap_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		strcpy(cpu_name, "OMAP3430/3530");
-	} else if (omap3_has_iva()) {
+	} else if (omap_has_iva()) {
 		omap_revision = OMAP3525_REV(rev);
 		strcpy(cpu_name, "OMAP3525");
-	} else if (omap3_has_sgx()) {
+	} else if (omap_has_sgx()) {
 		omap_revision = OMAP3515_REV(rev);
 		strcpy(cpu_name, "OMAP3515");
 	} else {
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 7514174..80dc8e0 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
 
 /*
- * Runtime detection of OMAP3 features
+ * Runtime detection of OMAP features
  */
-extern u32 omap3_features;
+extern u32 omap_features;
 
-#define OMAP3_HAS_L2CACHE		BIT(0)
-#define OMAP3_HAS_IVA			BIT(1)
-#define OMAP3_HAS_SGX			BIT(2)
-#define OMAP3_HAS_NEON			BIT(3)
-#define OMAP3_HAS_ISP			BIT(4)
-#define OMAP3_HAS_192MHZ_CLK		BIT(5)
+#define OMAP_HAS_L2CACHE		BIT(0)
+#define OMAP_HAS_IVA			BIT(1)
+#define OMAP_HAS_SGX			BIT(2)
+#define OMAP_HAS_NEON			BIT(3)
+#define OMAP_HAS_ISP			BIT(4)
+#define OMAP_HAS_192MHZ_CLK		BIT(5)
 
-#define OMAP3_HAS_FEATURE(feat,flag)			\
-static inline unsigned int omap3_has_ ##feat(void)	\
+#define OMAP_HAS_FEATURE(feat, flag)			\
+static inline unsigned int omap_has_ ##feat(void)	\
 {							\
-	return (omap3_features & OMAP3_HAS_ ##flag);	\
+	return (omap_features & OMAP_HAS_ ##flag);	\
 }							\
 
-OMAP3_HAS_FEATURE(l2cache, L2CACHE)
-OMAP3_HAS_FEATURE(sgx, SGX)
-OMAP3_HAS_FEATURE(iva, IVA)
-OMAP3_HAS_FEATURE(neon, NEON)
-OMAP3_HAS_FEATURE(isp, ISP)
-OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
+OMAP_HAS_FEATURE(l2cache, L2CACHE)
+OMAP_HAS_FEATURE(sgx, SGX)
+OMAP_HAS_FEATURE(iva, IVA)
+OMAP_HAS_FEATURE(neon, NEON)
+OMAP_HAS_FEATURE(isp, ISP)
+OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
 
 #endif
-- 
1.6.3.3


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

* [PATCH RESEND] update omap3 features bitmap and API to generic names
@ 2010-05-10 19:55 ` Venkatraman S
  0 siblings, 0 replies; 10+ messages in thread
From: Venkatraman S @ 2010-05-10 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

	OMAP3 features bitmap is used a method to check
for SoC specific features. This patch renames the global variables
and the accessor functions to use a generic name from omap3_* to
omap_*

Signed-off-by: Venkatraman S <svenkatr@ti.com>
CC: Nishant Menon <nm@ti.com>
CC: Tony Lindgren <tony@atomide.com>
CC: Madhusudhan Chikkature <madhu.cr@ti.com>
---
 * Resent to CC Madhu

 arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
 arch/arm/mach-omap2/id.c              |   18 ++++++++--------
 arch/arm/plat-omap/include/plat/cpu.h |   34 ++++++++++++++++----------------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 9cba556..afa481d 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
 			cpu_clkflg |= CK_3430ES2;
 		}
 	}
-	if (omap3_has_192mhz_clk())
+	if (omap_has_192mhz_clk())
 		omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
 
 	if (cpu_is_omap3630()) {
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 37b8a1a..a095b87 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -28,7 +28,7 @@
 static struct omap_chip_id omap_chip;
 static unsigned int omap_revision;
 
-u32 omap3_features;
+u32 omap_features;
 
 unsigned int omap_rev(void)
 {
@@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
 #define OMAP3_CHECK_FEATURE(status,feat)				\
 	if (((status & OMAP3_ ##feat## _MASK) 				\
 		>> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { 	\
-		omap3_features |= OMAP3_HAS_ ##feat;			\
+		omap_features |= OMAP_HAS_ ##feat;			\
 	}
 
 void __init omap3_check_features(void)
 {
 	u32 status;
 
-	omap3_features = 0;
+	omap_features = 0;
 
 	status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
 
@@ -178,7 +178,7 @@ void __init omap3_check_features(void)
 	OMAP3_CHECK_FEATURE(status, NEON);
 	OMAP3_CHECK_FEATURE(status, ISP);
 	if (cpu_is_omap3630())
-		omap3_features |= OMAP3_HAS_192MHZ_CLK;
+		omap_features |= OMAP_HAS_192MHZ_CLK;
 
 	/*
 	 * TODO: Get additional info (where applicable)
@@ -294,7 +294,7 @@ void __init omap4_check_revision(void)
 }
 
 #define OMAP3_SHOW_FEATURE(feat)		\
-	if (omap3_has_ ##feat())		\
+	if (omap_has_ ##feat())		\
 		printk(#feat" ");
 
 void __init omap3_cpuinfo(void)
@@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
 		/*
 		 * AM35xx devices
 		 */
-		if (omap3_has_sgx()) {
+		if (omap_has_sgx()) {
 			omap_revision = OMAP3517_REV(rev);
 			strcpy(cpu_name, "AM3517");
 		} else {
 			/* Already set in omap3_check_revision() */
 			strcpy(cpu_name, "AM3505");
 		}
-	} else if (omap3_has_iva() && omap3_has_sgx()) {
+	} else if (omap_has_iva() && omap_has_sgx()) {
 		/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
 		strcpy(cpu_name, "OMAP3430/3530");
-	} else if (omap3_has_iva()) {
+	} else if (omap_has_iva()) {
 		omap_revision = OMAP3525_REV(rev);
 		strcpy(cpu_name, "OMAP3525");
-	} else if (omap3_has_sgx()) {
+	} else if (omap_has_sgx()) {
 		omap_revision = OMAP3515_REV(rev);
 		strcpy(cpu_name, "OMAP3515");
 	} else {
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index 7514174..80dc8e0 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
 void omap2_check_revision(void);
 
 /*
- * Runtime detection of OMAP3 features
+ * Runtime detection of OMAP features
  */
-extern u32 omap3_features;
+extern u32 omap_features;
 
-#define OMAP3_HAS_L2CACHE		BIT(0)
-#define OMAP3_HAS_IVA			BIT(1)
-#define OMAP3_HAS_SGX			BIT(2)
-#define OMAP3_HAS_NEON			BIT(3)
-#define OMAP3_HAS_ISP			BIT(4)
-#define OMAP3_HAS_192MHZ_CLK		BIT(5)
+#define OMAP_HAS_L2CACHE		BIT(0)
+#define OMAP_HAS_IVA			BIT(1)
+#define OMAP_HAS_SGX			BIT(2)
+#define OMAP_HAS_NEON			BIT(3)
+#define OMAP_HAS_ISP			BIT(4)
+#define OMAP_HAS_192MHZ_CLK		BIT(5)
 
-#define OMAP3_HAS_FEATURE(feat,flag)			\
-static inline unsigned int omap3_has_ ##feat(void)	\
+#define OMAP_HAS_FEATURE(feat, flag)			\
+static inline unsigned int omap_has_ ##feat(void)	\
 {							\
-	return (omap3_features & OMAP3_HAS_ ##flag);	\
+	return (omap_features & OMAP_HAS_ ##flag);	\
 }							\
 
-OMAP3_HAS_FEATURE(l2cache, L2CACHE)
-OMAP3_HAS_FEATURE(sgx, SGX)
-OMAP3_HAS_FEATURE(iva, IVA)
-OMAP3_HAS_FEATURE(neon, NEON)
-OMAP3_HAS_FEATURE(isp, ISP)
-OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
+OMAP_HAS_FEATURE(l2cache, L2CACHE)
+OMAP_HAS_FEATURE(sgx, SGX)
+OMAP_HAS_FEATURE(iva, IVA)
+OMAP_HAS_FEATURE(neon, NEON)
+OMAP_HAS_FEATURE(isp, ISP)
+OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
 
 #endif
-- 
1.6.3.3

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

* Re: [PATCH RESEND] update omap3 features bitmap and API to generic names
  2010-05-10 19:55 ` Venkatraman S
@ 2010-05-10 23:32   ` Nishanth Menon
  -1 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2010-05-10 23:32 UTC (permalink / raw)
  To: Venkatraman S
  Cc: linux-omap, linux-arm-kernel, Tony Lindgren,
	Madhusudhan Chikkature

On Mon, May 10, 2010 at 2:55 PM, Venkatraman S <svenkatr@ti.com> wrote:
>        OMAP3 features bitmap is used a method to check
> for SoC specific features. This patch renames the global variables
> and the accessor functions to use a generic name from omap3_* to
> omap_*
>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> CC: Nishant Menon <nm@ti.com>
Just for the patchworks
NAK - discussed before - http://marc.info/?l=linux-omap&m=127349696800651&w=2

> CC: Tony Lindgren <tony@atomide.com>
> CC: Madhusudhan Chikkature <madhu.cr@ti.com>
> ---
>  * Resent to CC Madhu
>
>  arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
>  arch/arm/mach-omap2/id.c              |   18 ++++++++--------
>  arch/arm/plat-omap/include/plat/cpu.h |   34 ++++++++++++++++----------------
>  3 files changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
> index 9cba556..afa481d 100644
> --- a/arch/arm/mach-omap2/clock3xxx_data.c
> +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
>                        cpu_clkflg |= CK_3430ES2;
>                }
>        }
> -       if (omap3_has_192mhz_clk())
> +       if (omap_has_192mhz_clk())
>                omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
>
>        if (cpu_is_omap3630()) {
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 37b8a1a..a095b87 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -28,7 +28,7 @@
>  static struct omap_chip_id omap_chip;
>  static unsigned int omap_revision;
>
> -u32 omap3_features;
> +u32 omap_features;
>
>  unsigned int omap_rev(void)
>  {
> @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
>  #define OMAP3_CHECK_FEATURE(status,feat)                               \
>        if (((status & OMAP3_ ##feat## _MASK)                           \
>                >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) {   \
> -               omap3_features |= OMAP3_HAS_ ##feat;                    \
> +               omap_features |= OMAP_HAS_ ##feat;                      \
>        }
>
>  void __init omap3_check_features(void)
>  {
>        u32 status;
>
> -       omap3_features = 0;
> +       omap_features = 0;
>
>        status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
>
> @@ -178,7 +178,7 @@ void __init omap3_check_features(void)
>        OMAP3_CHECK_FEATURE(status, NEON);
>        OMAP3_CHECK_FEATURE(status, ISP);
>        if (cpu_is_omap3630())
> -               omap3_features |= OMAP3_HAS_192MHZ_CLK;
> +               omap_features |= OMAP_HAS_192MHZ_CLK;
>
>        /*
>         * TODO: Get additional info (where applicable)
> @@ -294,7 +294,7 @@ void __init omap4_check_revision(void)
>  }
>
>  #define OMAP3_SHOW_FEATURE(feat)               \
> -       if (omap3_has_ ##feat())                \
> +       if (omap_has_ ##feat())         \
>                printk(#feat" ");
>
>  void __init omap3_cpuinfo(void)
> @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
>                /*
>                 * AM35xx devices
>                 */
> -               if (omap3_has_sgx()) {
> +               if (omap_has_sgx()) {
>                        omap_revision = OMAP3517_REV(rev);
>                        strcpy(cpu_name, "AM3517");
>                } else {
>                        /* Already set in omap3_check_revision() */
>                        strcpy(cpu_name, "AM3505");
>                }
> -       } else if (omap3_has_iva() && omap3_has_sgx()) {
> +       } else if (omap_has_iva() && omap_has_sgx()) {
>                /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
>                strcpy(cpu_name, "OMAP3430/3530");
> -       } else if (omap3_has_iva()) {
> +       } else if (omap_has_iva()) {
>                omap_revision = OMAP3525_REV(rev);
>                strcpy(cpu_name, "OMAP3525");
> -       } else if (omap3_has_sgx()) {
> +       } else if (omap_has_sgx()) {
>                omap_revision = OMAP3515_REV(rev);
>                strcpy(cpu_name, "OMAP3515");
>        } else {
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 7514174..80dc8e0 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
>  void omap2_check_revision(void);
>
>  /*
> - * Runtime detection of OMAP3 features
> + * Runtime detection of OMAP features
>  */
> -extern u32 omap3_features;
> +extern u32 omap_features;
>
> -#define OMAP3_HAS_L2CACHE              BIT(0)
> -#define OMAP3_HAS_IVA                  BIT(1)
> -#define OMAP3_HAS_SGX                  BIT(2)
> -#define OMAP3_HAS_NEON                 BIT(3)
> -#define OMAP3_HAS_ISP                  BIT(4)
> -#define OMAP3_HAS_192MHZ_CLK           BIT(5)
> +#define OMAP_HAS_L2CACHE               BIT(0)
> +#define OMAP_HAS_IVA                   BIT(1)
> +#define OMAP_HAS_SGX                   BIT(2)
> +#define OMAP_HAS_NEON                  BIT(3)
> +#define OMAP_HAS_ISP                   BIT(4)
> +#define OMAP_HAS_192MHZ_CLK            BIT(5)
>
> -#define OMAP3_HAS_FEATURE(feat,flag)                   \
> -static inline unsigned int omap3_has_ ##feat(void)     \
> +#define OMAP_HAS_FEATURE(feat, flag)                   \
> +static inline unsigned int omap_has_ ##feat(void)      \
>  {                                                      \
> -       return (omap3_features & OMAP3_HAS_ ##flag);    \
> +       return (omap_features & OMAP_HAS_ ##flag);      \
>  }                                                      \
>
> -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
> -OMAP3_HAS_FEATURE(sgx, SGX)
> -OMAP3_HAS_FEATURE(iva, IVA)
> -OMAP3_HAS_FEATURE(neon, NEON)
> -OMAP3_HAS_FEATURE(isp, ISP)
> -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> +OMAP_HAS_FEATURE(l2cache, L2CACHE)
> +OMAP_HAS_FEATURE(sgx, SGX)
> +OMAP_HAS_FEATURE(iva, IVA)
> +OMAP_HAS_FEATURE(neon, NEON)
> +OMAP_HAS_FEATURE(isp, ISP)
> +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>
>  #endif
> --
> 1.6.3.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH RESEND] update omap3 features bitmap and API to generic names
@ 2010-05-10 23:32   ` Nishanth Menon
  0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2010-05-10 23:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 10, 2010 at 2:55 PM, Venkatraman S <svenkatr@ti.com> wrote:
> ? ? ? ?OMAP3 features bitmap is used a method to check
> for SoC specific features. This patch renames the global variables
> and the accessor functions to use a generic name from omap3_* to
> omap_*
>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> CC: Nishant Menon <nm@ti.com>
Just for the patchworks
NAK - discussed before - http://marc.info/?l=linux-omap&m=127349696800651&w=2

> CC: Tony Lindgren <tony@atomide.com>
> CC: Madhusudhan Chikkature <madhu.cr@ti.com>
> ---
> ?* Resent to CC Madhu
>
> ?arch/arm/mach-omap2/clock3xxx_data.c ?| ? ?2 +-
> ?arch/arm/mach-omap2/id.c ? ? ? ? ? ? ?| ? 18 ++++++++--------
> ?arch/arm/plat-omap/include/plat/cpu.h | ? 34 ++++++++++++++++----------------
> ?3 files changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
> index 9cba556..afa481d 100644
> --- a/arch/arm/mach-omap2/clock3xxx_data.c
> +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
> ? ? ? ? ? ? ? ? ? ? ? ?cpu_clkflg |= CK_3430ES2;
> ? ? ? ? ? ? ? ?}
> ? ? ? ?}
> - ? ? ? if (omap3_has_192mhz_clk())
> + ? ? ? if (omap_has_192mhz_clk())
> ? ? ? ? ? ? ? ?omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
>
> ? ? ? ?if (cpu_is_omap3630()) {
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 37b8a1a..a095b87 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -28,7 +28,7 @@
> ?static struct omap_chip_id omap_chip;
> ?static unsigned int omap_revision;
>
> -u32 omap3_features;
> +u32 omap_features;
>
> ?unsigned int omap_rev(void)
> ?{
> @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
> ?#define OMAP3_CHECK_FEATURE(status,feat) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ?if (((status & OMAP3_ ##feat## _MASK) ? ? ? ? ? ? ? ? ? ? ? ? ? \
> ? ? ? ? ? ? ? ?>> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { ? \
> - ? ? ? ? ? ? ? omap3_features |= OMAP3_HAS_ ##feat; ? ? ? ? ? ? ? ? ? ?\
> + ? ? ? ? ? ? ? omap_features |= OMAP_HAS_ ##feat; ? ? ? ? ? ? ? ? ? ? ?\
> ? ? ? ?}
>
> ?void __init omap3_check_features(void)
> ?{
> ? ? ? ?u32 status;
>
> - ? ? ? omap3_features = 0;
> + ? ? ? omap_features = 0;
>
> ? ? ? ?status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
>
> @@ -178,7 +178,7 @@ void __init omap3_check_features(void)
> ? ? ? ?OMAP3_CHECK_FEATURE(status, NEON);
> ? ? ? ?OMAP3_CHECK_FEATURE(status, ISP);
> ? ? ? ?if (cpu_is_omap3630())
> - ? ? ? ? ? ? ? omap3_features |= OMAP3_HAS_192MHZ_CLK;
> + ? ? ? ? ? ? ? omap_features |= OMAP_HAS_192MHZ_CLK;
>
> ? ? ? ?/*
> ? ? ? ? * TODO: Get additional info (where applicable)
> @@ -294,7 +294,7 @@ void __init omap4_check_revision(void)
> ?}
>
> ?#define OMAP3_SHOW_FEATURE(feat) ? ? ? ? ? ? ? \
> - ? ? ? if (omap3_has_ ##feat()) ? ? ? ? ? ? ? ?\
> + ? ? ? if (omap_has_ ##feat()) ? ? ? ? \
> ? ? ? ? ? ? ? ?printk(#feat" ");
>
> ?void __init omap3_cpuinfo(void)
> @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * AM35xx devices
> ? ? ? ? ? ? ? ? */
> - ? ? ? ? ? ? ? if (omap3_has_sgx()) {
> + ? ? ? ? ? ? ? if (omap_has_sgx()) {
> ? ? ? ? ? ? ? ? ? ? ? ?omap_revision = OMAP3517_REV(rev);
> ? ? ? ? ? ? ? ? ? ? ? ?strcpy(cpu_name, "AM3517");
> ? ? ? ? ? ? ? ?} else {
> ? ? ? ? ? ? ? ? ? ? ? ?/* Already set in omap3_check_revision() */
> ? ? ? ? ? ? ? ? ? ? ? ?strcpy(cpu_name, "AM3505");
> ? ? ? ? ? ? ? ?}
> - ? ? ? } else if (omap3_has_iva() && omap3_has_sgx()) {
> + ? ? ? } else if (omap_has_iva() && omap_has_sgx()) {
> ? ? ? ? ? ? ? ?/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
> ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3430/3530");
> - ? ? ? } else if (omap3_has_iva()) {
> + ? ? ? } else if (omap_has_iva()) {
> ? ? ? ? ? ? ? ?omap_revision = OMAP3525_REV(rev);
> ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3525");
> - ? ? ? } else if (omap3_has_sgx()) {
> + ? ? ? } else if (omap_has_sgx()) {
> ? ? ? ? ? ? ? ?omap_revision = OMAP3515_REV(rev);
> ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3515");
> ? ? ? ?} else {
> diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
> index 7514174..80dc8e0 100644
> --- a/arch/arm/plat-omap/include/plat/cpu.h
> +++ b/arch/arm/plat-omap/include/plat/cpu.h
> @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
> ?void omap2_check_revision(void);
>
> ?/*
> - * Runtime detection of OMAP3 features
> + * Runtime detection of OMAP features
> ?*/
> -extern u32 omap3_features;
> +extern u32 omap_features;
>
> -#define OMAP3_HAS_L2CACHE ? ? ? ? ? ? ?BIT(0)
> -#define OMAP3_HAS_IVA ? ? ? ? ? ? ? ? ?BIT(1)
> -#define OMAP3_HAS_SGX ? ? ? ? ? ? ? ? ?BIT(2)
> -#define OMAP3_HAS_NEON ? ? ? ? ? ? ? ? BIT(3)
> -#define OMAP3_HAS_ISP ? ? ? ? ? ? ? ? ?BIT(4)
> -#define OMAP3_HAS_192MHZ_CLK ? ? ? ? ? BIT(5)
> +#define OMAP_HAS_L2CACHE ? ? ? ? ? ? ? BIT(0)
> +#define OMAP_HAS_IVA ? ? ? ? ? ? ? ? ? BIT(1)
> +#define OMAP_HAS_SGX ? ? ? ? ? ? ? ? ? BIT(2)
> +#define OMAP_HAS_NEON ? ? ? ? ? ? ? ? ?BIT(3)
> +#define OMAP_HAS_ISP ? ? ? ? ? ? ? ? ? BIT(4)
> +#define OMAP_HAS_192MHZ_CLK ? ? ? ? ? ?BIT(5)
>
> -#define OMAP3_HAS_FEATURE(feat,flag) ? ? ? ? ? ? ? ? ? \
> -static inline unsigned int omap3_has_ ##feat(void) ? ? \
> +#define OMAP_HAS_FEATURE(feat, flag) ? ? ? ? ? ? ? ? ? \
> +static inline unsigned int omap_has_ ##feat(void) ? ? ?\
> ?{ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> - ? ? ? return (omap3_features & OMAP3_HAS_ ##flag); ? ?\
> + ? ? ? return (omap_features & OMAP_HAS_ ##flag); ? ? ?\
> ?} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
>
> -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
> -OMAP3_HAS_FEATURE(sgx, SGX)
> -OMAP3_HAS_FEATURE(iva, IVA)
> -OMAP3_HAS_FEATURE(neon, NEON)
> -OMAP3_HAS_FEATURE(isp, ISP)
> -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> +OMAP_HAS_FEATURE(l2cache, L2CACHE)
> +OMAP_HAS_FEATURE(sgx, SGX)
> +OMAP_HAS_FEATURE(iva, IVA)
> +OMAP_HAS_FEATURE(neon, NEON)
> +OMAP_HAS_FEATURE(isp, ISP)
> +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>
> ?#endif
> --
> 1.6.3.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

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

* RE: [PATCH RESEND] update omap3 features bitmap and API to generic names
  2010-05-10 23:32   ` Nishanth Menon
@ 2010-05-11  3:53     ` S, Venkatraman
  -1 siblings, 0 replies; 10+ messages in thread
From: S, Venkatraman @ 2010-05-11  3:53 UTC (permalink / raw)
  To: Menon, Nishanth
  Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Tony Lindgren, Chikkature Rajashekar, Madhusudhan

> -----Original Message-----
> From: menon.nishanth@gmail.com 
> [mailto:menon.nishanth@gmail.com] On Behalf Of Menon, Nishanth
> Sent: Tuesday, May 11, 2010 5:02 AM
> To: S, Venkatraman
> Cc: linux-omap@vger.kernel.org; 
> linux-arm-kernel@lists.infradead.org; Tony Lindgren; 
> Chikkature Rajashekar, Madhusudhan
> Subject: Re: [PATCH RESEND] update omap3 features bitmap and 
> API to generic names
> 
> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S 
> <svenkatr@ti.com> wrote:
> >        OMAP3 features bitmap is used a method to check for SoC 
> > specific features. This patch renames the global variables and the 
> > accessor functions to use a generic name from omap3_* to
> > omap_*
> >
> > Signed-off-by: Venkatraman S <svenkatr@ti.com>
> > CC: Nishant Menon <nm@ti.com>
> Just for the patchworks
> NAK - discussed before - 
> http://marc.info/?l=linux-omap&m=127349696800651&w=2

This patch doesn't have the descriptor load changes, and just the rename.
Did you take a look at it first?
 
> > CC: Tony Lindgren <tony@atomide.com>
> > CC: Madhusudhan Chikkature <madhu.cr@ti.com>
> > ---
> >  * Resent to CC Madhu
> >
> >  arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
> >  arch/arm/mach-omap2/id.c              |   18 ++++++++--------
> >  arch/arm/plat-omap/include/plat/cpu.h |   34 
> > ++++++++++++++++----------------
> >  3 files changed, 27 insertions(+), 27 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/clock3xxx_data.c 
> > b/arch/arm/mach-omap2/clock3xxx_data.c
> > index 9cba556..afa481d 100644
> > --- a/arch/arm/mach-omap2/clock3xxx_data.c
> > +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> > @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
> >                        cpu_clkflg |= CK_3430ES2;
> >                }
> >        }
> > -       if (omap3_has_192mhz_clk())
> > +       if (omap_has_192mhz_clk())
> >                omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
> >
> >        if (cpu_is_omap3630()) {
> > diff --git a/arch/arm/mach-omap2/id.c 
> b/arch/arm/mach-omap2/id.c index 
> > 37b8a1a..a095b87 100644
> > --- a/arch/arm/mach-omap2/id.c
> > +++ b/arch/arm/mach-omap2/id.c
> > @@ -28,7 +28,7 @@
> >  static struct omap_chip_id omap_chip;
> >  static unsigned int omap_revision;
> >
> > -u32 omap3_features;
> > +u32 omap_features;
> >
> >  unsigned int omap_rev(void)
> >  {
> > @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
> >  #define OMAP3_CHECK_FEATURE(status,feat)                   
>             
> > \
> >        if (((status & OMAP3_ ##feat## _MASK)                
>            
> > \
> >                >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## 
> _NONE) {   
> > \
> > -               omap3_features |= OMAP3_HAS_ ##feat;        
>             
> > \
> > +               omap_features |= OMAP_HAS_ ##feat;          
>             
> > + \
> >        }
> >
> >  void __init omap3_check_features(void)
> >  {
> >        u32 status;
> >
> > -       omap3_features = 0;
> > +       omap_features = 0;
> >
> >        status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
> >
> > @@ -178,7 +178,7 @@ void __init omap3_check_features(void)
> >        OMAP3_CHECK_FEATURE(status, NEON);
> >        OMAP3_CHECK_FEATURE(status, ISP);
> >        if (cpu_is_omap3630())
> > -               omap3_features |= OMAP3_HAS_192MHZ_CLK;
> > +               omap_features |= OMAP_HAS_192MHZ_CLK;
> >
> >        /*
> >         * TODO: Get additional info (where applicable) @@ -294,7 
> > +294,7 @@ void __init omap4_check_revision(void)
> >  }
> >
> >  #define OMAP3_SHOW_FEATURE(feat)               \
> > -       if (omap3_has_ ##feat())                \
> > +       if (omap_has_ ##feat())         \
> >                printk(#feat" ");
> >
> >  void __init omap3_cpuinfo(void)
> > @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
> >                /*
> >                 * AM35xx devices
> >                 */
> > -               if (omap3_has_sgx()) {
> > +               if (omap_has_sgx()) {
> >                        omap_revision = OMAP3517_REV(rev);
> >                        strcpy(cpu_name, "AM3517");
> >                } else {
> >                        /* Already set in omap3_check_revision() */
> >                        strcpy(cpu_name, "AM3505");
> >                }
> > -       } else if (omap3_has_iva() && omap3_has_sgx()) {
> > +       } else if (omap_has_iva() && omap_has_sgx()) {
> >                /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
> >                strcpy(cpu_name, "OMAP3430/3530");
> > -       } else if (omap3_has_iva()) {
> > +       } else if (omap_has_iva()) {
> >                omap_revision = OMAP3525_REV(rev);
> >                strcpy(cpu_name, "OMAP3525");
> > -       } else if (omap3_has_sgx()) {
> > +       } else if (omap_has_sgx()) {
> >                omap_revision = OMAP3515_REV(rev);
> >                strcpy(cpu_name, "OMAP3515");
> >        } else {
> > diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
> > b/arch/arm/plat-omap/include/plat/cpu.h
> > index 7514174..80dc8e0 100644
> > --- a/arch/arm/plat-omap/include/plat/cpu.h
> > +++ b/arch/arm/plat-omap/include/plat/cpu.h
> > @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
> >  void omap2_check_revision(void);
> >
> >  /*
> > - * Runtime detection of OMAP3 features
> > + * Runtime detection of OMAP features
> >  */
> > -extern u32 omap3_features;
> > +extern u32 omap_features;
> >
> > -#define OMAP3_HAS_L2CACHE              BIT(0) -#define 
> OMAP3_HAS_IVA                  
> > BIT(1) -#define OMAP3_HAS_SGX                  BIT(2) -#define 
> > OMAP3_HAS_NEON                 BIT(3) -#define 
> OMAP3_HAS_ISP                  
> > BIT(4) -#define OMAP3_HAS_192MHZ_CLK           BIT(5)
> > +#define OMAP_HAS_L2CACHE               BIT(0) #define 
> OMAP_HAS_IVA                   
> > +BIT(1) #define OMAP_HAS_SGX                   BIT(2) #define 
> > +OMAP_HAS_NEON                  BIT(3) #define OMAP_HAS_ISP 
>                   
> > +BIT(4) #define OMAP_HAS_192MHZ_CLK            BIT(5)
> >
> > -#define OMAP3_HAS_FEATURE(feat,flag)                   \ -static 
> > inline unsigned int omap3_has_ ##feat(void)     \
> > +#define OMAP_HAS_FEATURE(feat, flag)                   \ static 
> > +inline unsigned int omap_has_ ##feat(void)      \
> >  {                                                      \
> > -       return (omap3_features & OMAP3_HAS_ ##flag);    \
> > +       return (omap_features & OMAP_HAS_ ##flag);      \
> >  }                                                      \
> >
> > -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
> > -OMAP3_HAS_FEATURE(sgx, SGX)
> > -OMAP3_HAS_FEATURE(iva, IVA)
> > -OMAP3_HAS_FEATURE(neon, NEON)
> > -OMAP3_HAS_FEATURE(isp, ISP)
> > -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> > +OMAP_HAS_FEATURE(l2cache, L2CACHE)
> > +OMAP_HAS_FEATURE(sgx, SGX)
> > +OMAP_HAS_FEATURE(iva, IVA)
> > +OMAP_HAS_FEATURE(neon, NEON)
> > +OMAP_HAS_FEATURE(isp, ISP)
> > +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> >
> >  #endif
> > --
> > 1.6.3.3
> >
 --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH RESEND] update omap3 features bitmap and API to generic names
@ 2010-05-11  3:53     ` S, Venkatraman
  0 siblings, 0 replies; 10+ messages in thread
From: S, Venkatraman @ 2010-05-11  3:53 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: menon.nishanth at gmail.com 
> [mailto:menon.nishanth at gmail.com] On Behalf Of Menon, Nishanth
> Sent: Tuesday, May 11, 2010 5:02 AM
> To: S, Venkatraman
> Cc: linux-omap at vger.kernel.org; 
> linux-arm-kernel at lists.infradead.org; Tony Lindgren; 
> Chikkature Rajashekar, Madhusudhan
> Subject: Re: [PATCH RESEND] update omap3 features bitmap and 
> API to generic names
> 
> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S 
> <svenkatr@ti.com> wrote:
> > ? ? ? ?OMAP3 features bitmap is used a method to check for SoC 
> > specific features. This patch renames the global variables and the 
> > accessor functions to use a generic name from omap3_* to
> > omap_*
> >
> > Signed-off-by: Venkatraman S <svenkatr@ti.com>
> > CC: Nishant Menon <nm@ti.com>
> Just for the patchworks
> NAK - discussed before - 
> http://marc.info/?l=linux-omap&m=127349696800651&w=2

This patch doesn't have the descriptor load changes, and just the rename.
Did you take a look at it first?
 
> > CC: Tony Lindgren <tony@atomide.com>
> > CC: Madhusudhan Chikkature <madhu.cr@ti.com>
> > ---
> > ?* Resent to CC Madhu
> >
> > ?arch/arm/mach-omap2/clock3xxx_data.c ?| ? ?2 +-
> > ?arch/arm/mach-omap2/id.c ? ? ? ? ? ? ?| ? 18 ++++++++--------
> > ?arch/arm/plat-omap/include/plat/cpu.h | ? 34 
> > ++++++++++++++++----------------
> > ?3 files changed, 27 insertions(+), 27 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/clock3xxx_data.c 
> > b/arch/arm/mach-omap2/clock3xxx_data.c
> > index 9cba556..afa481d 100644
> > --- a/arch/arm/mach-omap2/clock3xxx_data.c
> > +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> > @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
> > ? ? ? ? ? ? ? ? ? ? ? ?cpu_clkflg |= CK_3430ES2;
> > ? ? ? ? ? ? ? ?}
> > ? ? ? ?}
> > - ? ? ? if (omap3_has_192mhz_clk())
> > + ? ? ? if (omap_has_192mhz_clk())
> > ? ? ? ? ? ? ? ?omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
> >
> > ? ? ? ?if (cpu_is_omap3630()) {
> > diff --git a/arch/arm/mach-omap2/id.c 
> b/arch/arm/mach-omap2/id.c index 
> > 37b8a1a..a095b87 100644
> > --- a/arch/arm/mach-omap2/id.c
> > +++ b/arch/arm/mach-omap2/id.c
> > @@ -28,7 +28,7 @@
> > ?static struct omap_chip_id omap_chip;
> > ?static unsigned int omap_revision;
> >
> > -u32 omap3_features;
> > +u32 omap_features;
> >
> > ?unsigned int omap_rev(void)
> > ?{
> > @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
> > ?#define OMAP3_CHECK_FEATURE(status,feat) ? ? ? ? ? ? ? ? ? 
> ? ? ? ? ? ? 
> > \
> > ? ? ? ?if (((status & OMAP3_ ##feat## _MASK) ? ? ? ? ? ? ? ?
>  ? ? ? ? ? 
> > \
> > ? ? ? ? ? ? ? ?>> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## 
> _NONE) { ? 
> > \
> > - ? ? ? ? ? ? ? omap3_features |= OMAP3_HAS_ ##feat; ? ? ? ?
>  ? ? ? ? ? ?
> > \
> > + ? ? ? ? ? ? ? omap_features |= OMAP_HAS_ ##feat; ? ? ? ? ?
>  ? ? ? ? ? ?
> > + \
> > ? ? ? ?}
> >
> > ?void __init omap3_check_features(void)
> > ?{
> > ? ? ? ?u32 status;
> >
> > - ? ? ? omap3_features = 0;
> > + ? ? ? omap_features = 0;
> >
> > ? ? ? ?status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
> >
> > @@ -178,7 +178,7 @@ void __init omap3_check_features(void)
> > ? ? ? ?OMAP3_CHECK_FEATURE(status, NEON);
> > ? ? ? ?OMAP3_CHECK_FEATURE(status, ISP);
> > ? ? ? ?if (cpu_is_omap3630())
> > - ? ? ? ? ? ? ? omap3_features |= OMAP3_HAS_192MHZ_CLK;
> > + ? ? ? ? ? ? ? omap_features |= OMAP_HAS_192MHZ_CLK;
> >
> > ? ? ? ?/*
> > ? ? ? ? * TODO: Get additional info (where applicable) @@ -294,7 
> > +294,7 @@ void __init omap4_check_revision(void)
> > ?}
> >
> > ?#define OMAP3_SHOW_FEATURE(feat) ? ? ? ? ? ? ? \
> > - ? ? ? if (omap3_has_ ##feat()) ? ? ? ? ? ? ? ?\
> > + ? ? ? if (omap_has_ ##feat()) ? ? ? ? \
> > ? ? ? ? ? ? ? ?printk(#feat" ");
> >
> > ?void __init omap3_cpuinfo(void)
> > @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
> > ? ? ? ? ? ? ? ?/*
> > ? ? ? ? ? ? ? ? * AM35xx devices
> > ? ? ? ? ? ? ? ? */
> > - ? ? ? ? ? ? ? if (omap3_has_sgx()) {
> > + ? ? ? ? ? ? ? if (omap_has_sgx()) {
> > ? ? ? ? ? ? ? ? ? ? ? ?omap_revision = OMAP3517_REV(rev);
> > ? ? ? ? ? ? ? ? ? ? ? ?strcpy(cpu_name, "AM3517");
> > ? ? ? ? ? ? ? ?} else {
> > ? ? ? ? ? ? ? ? ? ? ? ?/* Already set in omap3_check_revision() */
> > ? ? ? ? ? ? ? ? ? ? ? ?strcpy(cpu_name, "AM3505");
> > ? ? ? ? ? ? ? ?}
> > - ? ? ? } else if (omap3_has_iva() && omap3_has_sgx()) {
> > + ? ? ? } else if (omap_has_iva() && omap_has_sgx()) {
> > ? ? ? ? ? ? ? ?/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
> > ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3430/3530");
> > - ? ? ? } else if (omap3_has_iva()) {
> > + ? ? ? } else if (omap_has_iva()) {
> > ? ? ? ? ? ? ? ?omap_revision = OMAP3525_REV(rev);
> > ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3525");
> > - ? ? ? } else if (omap3_has_sgx()) {
> > + ? ? ? } else if (omap_has_sgx()) {
> > ? ? ? ? ? ? ? ?omap_revision = OMAP3515_REV(rev);
> > ? ? ? ? ? ? ? ?strcpy(cpu_name, "OMAP3515");
> > ? ? ? ?} else {
> > diff --git a/arch/arm/plat-omap/include/plat/cpu.h 
> > b/arch/arm/plat-omap/include/plat/cpu.h
> > index 7514174..80dc8e0 100644
> > --- a/arch/arm/plat-omap/include/plat/cpu.h
> > +++ b/arch/arm/plat-omap/include/plat/cpu.h
> > @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
> > ?void omap2_check_revision(void);
> >
> > ?/*
> > - * Runtime detection of OMAP3 features
> > + * Runtime detection of OMAP features
> > ?*/
> > -extern u32 omap3_features;
> > +extern u32 omap_features;
> >
> > -#define OMAP3_HAS_L2CACHE ? ? ? ? ? ? ?BIT(0) -#define 
> OMAP3_HAS_IVA ? ? ? ? ? ? ? ? ?
> > BIT(1) -#define OMAP3_HAS_SGX ? ? ? ? ? ? ? ? ?BIT(2) -#define 
> > OMAP3_HAS_NEON ? ? ? ? ? ? ? ? BIT(3) -#define 
> OMAP3_HAS_ISP ? ? ? ? ? ? ? ? ?
> > BIT(4) -#define OMAP3_HAS_192MHZ_CLK ? ? ? ? ? BIT(5)
> > +#define OMAP_HAS_L2CACHE ? ? ? ? ? ? ? BIT(0) #define 
> OMAP_HAS_IVA ? ? ? ? ? ? ? ? ? 
> > +BIT(1) #define OMAP_HAS_SGX ? ? ? ? ? ? ? ? ? BIT(2) #define 
> > +OMAP_HAS_NEON ? ? ? ? ? ? ? ? ?BIT(3) #define OMAP_HAS_ISP 
> ? ? ? ? ? ? ? ? ? 
> > +BIT(4) #define OMAP_HAS_192MHZ_CLK ? ? ? ? ? ?BIT(5)
> >
> > -#define OMAP3_HAS_FEATURE(feat,flag) ? ? ? ? ? ? ? ? ? \ -static 
> > inline unsigned int omap3_has_ ##feat(void) ? ? \
> > +#define OMAP_HAS_FEATURE(feat, flag) ? ? ? ? ? ? ? ? ? \ static 
> > +inline unsigned int omap_has_ ##feat(void) ? ? ?\
> > ?{ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> > - ? ? ? return (omap3_features & OMAP3_HAS_ ##flag); ? ?\
> > + ? ? ? return (omap_features & OMAP_HAS_ ##flag); ? ? ?\
> > ?} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
> >
> > -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
> > -OMAP3_HAS_FEATURE(sgx, SGX)
> > -OMAP3_HAS_FEATURE(iva, IVA)
> > -OMAP3_HAS_FEATURE(neon, NEON)
> > -OMAP3_HAS_FEATURE(isp, ISP)
> > -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> > +OMAP_HAS_FEATURE(l2cache, L2CACHE)
> > +OMAP_HAS_FEATURE(sgx, SGX)
> > +OMAP_HAS_FEATURE(iva, IVA)
> > +OMAP_HAS_FEATURE(neon, NEON)
> > +OMAP_HAS_FEATURE(isp, ISP)
> > +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
> >
> > ?#endif
> > --
> > 1.6.3.3
> >
 

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

* How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic  names)
  2010-05-11  3:53     ` S, Venkatraman
  (?)
@ 2010-05-11 12:06     ` Nishanth Menon
  2010-05-11 12:19       ` Venkatraman S
  -1 siblings, 1 reply; 10+ messages in thread
From: Nishanth Menon @ 2010-05-11 12:06 UTC (permalink / raw)
  To: S, Venkatraman
  Cc: Menon, Nishanth, linux-omap@vger.kernel.org, Tony Lindgren,
	Chikkature Rajashekar, Madhusudhan

-linux-arm

On 05/10/2010 10:53 PM, S, Venkatraman wrote:
>> -----Original Message-----
>> From: menon.nishanth@gmail.com
>> [mailto:menon.nishanth@gmail.com] On Behalf Of Menon, Nishanth
>> Sent: Tuesday, May 11, 2010 5:02 AM
>> To: S, Venkatraman
>> Cc: linux-omap@vger.kernel.org;
>> linux-arm-kernel@lists.infradead.org; Tony Lindgren;
>> Chikkature Rajashekar, Madhusudhan
>> Subject: Re: [PATCH RESEND] update omap3 features bitmap and
>> API to generic names
>>
>> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S
>> <svenkatr@ti.com>  wrote:
>>>         OMAP3 features bitmap is used a method to check for SoC
>>> specific features. This patch renames the global variables and the
>>> accessor functions to use a generic name from omap3_* to
>>> omap_*
>>>
>>> Signed-off-by: Venkatraman S<svenkatr@ti.com>
>>> CC: Nishant Menon<nm@ti.com>
>> Just for the patchworks
>> NAK - discussed before -
>> http://marc.info/?l=linux-omap&m=127349696800651&w=2
>
> This patch doesn't have the descriptor load changes, and just the rename.
> Did you take a look at it first?

Arrgh - my bad - there was no reference to previous discussions or 
anything in this patch, please do add references in diffstat section if 
you are refering to a previous discussed strategy to help the reviewers 
differentiate and understand you better.

overall this still opens up a question for me -> can we blindly replace 
omap3-features with omap features? how do we think of omap1,2,3,4 are 
handled consistently with a 32 bit field?

I agree on the need to have a omap independent field, but is 
omap3_features the one we need to modify OR should we be introducing a 
new field?

my vote goes for introducing a new field.

>
>>> CC: Tony Lindgren<tony@atomide.com>
>>> CC: Madhusudhan Chikkature<madhu.cr@ti.com>
>>> ---
>>>   * Resent to CC Madhu
>>>
>>>   arch/arm/mach-omap2/clock3xxx_data.c  |    2 +-
>>>   arch/arm/mach-omap2/id.c              |   18 ++++++++--------
>>>   arch/arm/plat-omap/include/plat/cpu.h |   34
>>> ++++++++++++++++----------------
>>>   3 files changed, 27 insertions(+), 27 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/clock3xxx_data.c
>>> b/arch/arm/mach-omap2/clock3xxx_data.c
>>> index 9cba556..afa481d 100644
>>> --- a/arch/arm/mach-omap2/clock3xxx_data.c
>>> +++ b/arch/arm/mach-omap2/clock3xxx_data.c
>>> @@ -3510,7 +3510,7 @@ int __init omap3xxx_clk_init(void)
>>>                         cpu_clkflg |= CK_3430ES2;
>>>                 }
>>>         }
>>> -       if (omap3_has_192mhz_clk())
>>> +       if (omap_has_192mhz_clk())
>>>                 omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
>>>
>>>         if (cpu_is_omap3630()) {
>>> diff --git a/arch/arm/mach-omap2/id.c
>> b/arch/arm/mach-omap2/id.c index
>>> 37b8a1a..a095b87 100644
>>> --- a/arch/arm/mach-omap2/id.c
>>> +++ b/arch/arm/mach-omap2/id.c
>>> @@ -28,7 +28,7 @@
>>>   static struct omap_chip_id omap_chip;
>>>   static unsigned int omap_revision;
>>>
>>> -u32 omap3_features;
>>> +u32 omap_features;
>>>
>>>   unsigned int omap_rev(void)
>>>   {
>>> @@ -161,14 +161,14 @@ void __init omap24xx_check_revision(void)
>>>   #define OMAP3_CHECK_FEATURE(status,feat)
>>
>>> \
>>>         if (((status&  OMAP3_ ##feat## _MASK)
>>
>>> \
>>>                 >>  OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat##
>> _NONE) {
>>> \
>>> -               omap3_features |= OMAP3_HAS_ ##feat;
>>
>>> \
>>> +               omap_features |= OMAP_HAS_ ##feat;
>>
>>> + \
>>>         }
>>>
>>>   void __init omap3_check_features(void)
>>>   {
>>>         u32 status;
>>>
>>> -       omap3_features = 0;
>>> +       omap_features = 0;
>>>
>>>         status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
>>>
>>> @@ -178,7 +178,7 @@ void __init omap3_check_features(void)
>>>         OMAP3_CHECK_FEATURE(status, NEON);
>>>         OMAP3_CHECK_FEATURE(status, ISP);
>>>         if (cpu_is_omap3630())
>>> -               omap3_features |= OMAP3_HAS_192MHZ_CLK;
>>> +               omap_features |= OMAP_HAS_192MHZ_CLK;
>>>
>>>         /*
>>>          * TODO: Get additional info (where applicable) @@ -294,7
>>> +294,7 @@ void __init omap4_check_revision(void)
>>>   }
>>>
>>>   #define OMAP3_SHOW_FEATURE(feat)               \
>>> -       if (omap3_has_ ##feat())                \
>>> +       if (omap_has_ ##feat())         \
>>>                 printk(#feat" ");
>>>
>>>   void __init omap3_cpuinfo(void)
>>> @@ -314,20 +314,20 @@ void __init omap3_cpuinfo(void)
>>>                 /*
>>>                  * AM35xx devices
>>>                  */
>>> -               if (omap3_has_sgx()) {
>>> +               if (omap_has_sgx()) {
>>>                         omap_revision = OMAP3517_REV(rev);
>>>                         strcpy(cpu_name, "AM3517");
>>>                 } else {
>>>                         /* Already set in omap3_check_revision() */
>>>                         strcpy(cpu_name, "AM3505");
>>>                 }
>>> -       } else if (omap3_has_iva()&&  omap3_has_sgx()) {
>>> +       } else if (omap_has_iva()&&  omap_has_sgx()) {
>>>                 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
>>>                 strcpy(cpu_name, "OMAP3430/3530");
>>> -       } else if (omap3_has_iva()) {
>>> +       } else if (omap_has_iva()) {
>>>                 omap_revision = OMAP3525_REV(rev);
>>>                 strcpy(cpu_name, "OMAP3525");
>>> -       } else if (omap3_has_sgx()) {
>>> +       } else if (omap_has_sgx()) {
>>>                 omap_revision = OMAP3515_REV(rev);
>>>                 strcpy(cpu_name, "OMAP3515");
>>>         } else {
>>> diff --git a/arch/arm/plat-omap/include/plat/cpu.h
>>> b/arch/arm/plat-omap/include/plat/cpu.h
>>> index 7514174..80dc8e0 100644
>>> --- a/arch/arm/plat-omap/include/plat/cpu.h
>>> +++ b/arch/arm/plat-omap/include/plat/cpu.h
>>> @@ -434,28 +434,28 @@ int omap_chip_is(struct omap_chip_id oci);
>>>   void omap2_check_revision(void);
>>>
>>>   /*
>>> - * Runtime detection of OMAP3 features
>>> + * Runtime detection of OMAP features
>>>   */
>>> -extern u32 omap3_features;
>>> +extern u32 omap_features;
>>>
>>> -#define OMAP3_HAS_L2CACHE              BIT(0) -#define
>> OMAP3_HAS_IVA
>>> BIT(1) -#define OMAP3_HAS_SGX                  BIT(2) -#define
>>> OMAP3_HAS_NEON                 BIT(3) -#define
>> OMAP3_HAS_ISP
>>> BIT(4) -#define OMAP3_HAS_192MHZ_CLK           BIT(5)
>>> +#define OMAP_HAS_L2CACHE               BIT(0) #define
>> OMAP_HAS_IVA
>>> +BIT(1) #define OMAP_HAS_SGX                   BIT(2) #define
>>> +OMAP_HAS_NEON                  BIT(3) #define OMAP_HAS_ISP
>>
>>> +BIT(4) #define OMAP_HAS_192MHZ_CLK            BIT(5)
>>>
>>> -#define OMAP3_HAS_FEATURE(feat,flag)                   \ -static
>>> inline unsigned int omap3_has_ ##feat(void)     \
>>> +#define OMAP_HAS_FEATURE(feat, flag)                   \ static
>>> +inline unsigned int omap_has_ ##feat(void)      \
>>>   {                                                      \
>>> -       return (omap3_features&  OMAP3_HAS_ ##flag);    \
>>> +       return (omap_features&  OMAP_HAS_ ##flag);      \
>>>   }                                                      \
>>>
>>> -OMAP3_HAS_FEATURE(l2cache, L2CACHE)
>>> -OMAP3_HAS_FEATURE(sgx, SGX)
>>> -OMAP3_HAS_FEATURE(iva, IVA)
>>> -OMAP3_HAS_FEATURE(neon, NEON)
>>> -OMAP3_HAS_FEATURE(isp, ISP)
>>> -OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>>> +OMAP_HAS_FEATURE(l2cache, L2CACHE)
>>> +OMAP_HAS_FEATURE(sgx, SGX)
>>> +OMAP_HAS_FEATURE(iva, IVA)
>>> +OMAP_HAS_FEATURE(neon, NEON)
>>> +OMAP_HAS_FEATURE(isp, ISP)
>>> +OMAP_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
>>>
>>>   #endif
>>> --
>>> 1.6.3.3
>>>
>   --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


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

* Re: How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic names)
  2010-05-11 12:06     ` How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic names) Nishanth Menon
@ 2010-05-11 12:19       ` Venkatraman S
  2010-05-11 13:43         ` Nishanth Menon
  0 siblings, 1 reply; 10+ messages in thread
From: Venkatraman S @ 2010-05-11 12:19 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Menon, Nishanth, linux-omap@vger.kernel.org, Tony Lindgren,
	Chikkature Rajashekar, Madhusudhan

 Nishanth Menon <menon.nishanth@gmail.com> wrote:
> -linux-arm
>
> On 05/10/2010 10:53 PM, S, Venkatraman wrote:
>>>
>>> -----Original Message-----
>>> From: menon.nishanth@gmail.com
>>> [mailto:menon.nishanth@gmail.com] On Behalf Of Menon, Nishanth
>>> Sent: Tuesday, May 11, 2010 5:02 AM
>>> To: S, Venkatraman
>>> Cc: linux-omap@vger.kernel.org;
>>> linux-arm-kernel@lists.infradead.org; Tony Lindgren;
>>> Chikkature Rajashekar, Madhusudhan
>>> Subject: Re: [PATCH RESEND] update omap3 features bitmap and
>>> API to generic names
>>>
>>> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S
>>> <svenkatr@ti.com>  wrote:
>>>>
>>>>        OMAP3 features bitmap is used a method to check for SoC
>>>> specific features. This patch renames the global variables and the
>>>> accessor functions to use a generic name from omap3_* to
>>>> omap_*
>>>>
>>>> Signed-off-by: Venkatraman S<svenkatr@ti.com>
>>>> CC: Nishant Menon<nm@ti.com>
>>>
>>> Just for the patchworks
>>> NAK - discussed before -
>>> http://marc.info/?l=linux-omap&m=127349696800651&w=2
>>
>> This patch doesn't have the descriptor load changes, and just the rename.
>> Did you take a look at it first?
>
> Arrgh - my bad - there was no reference to previous discussions or anything
> in this patch, please do add references in diffstat section if you are
> refering to a previous discussed strategy to help the reviewers
> differentiate and understand you better.
>
> overall this still opens up a question for me -> can we blindly replace
> omap3-features with omap features? how do we think of omap1,2,3,4 are
> handled consistently with a 32 bit field?
>
> I agree on the need to have a omap independent field, but is omap3_features
> the one we need to modify OR should we be introducing a new field?
>
> my vote goes for introducing a new field.
>

You are confusing the interface with implementation (or rather,
worrying about both of them simultaneously).

The interface has to be consistent and SoC independent, to the extent possible.
  So the macro changes are relevant and readable / extensible.

Regarding the variable name (implementation):-
   Given the minimal set that we have (5 -6 fields today, so there is
room for 25 more 'features" still), I don't think
we should over-engineer it now to accomodate all permutations and use
cases. It's not even found use
beyond 1 or 2 files. YAGNI ?

Regards,
Venkat.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic names)
  2010-05-11 12:19       ` Venkatraman S
@ 2010-05-11 13:43         ` Nishanth Menon
  2010-05-11 14:38           ` Venkatraman S
  0 siblings, 1 reply; 10+ messages in thread
From: Nishanth Menon @ 2010-05-11 13:43 UTC (permalink / raw)
  To: Venkatraman S
  Cc: Nishanth Menon, linux-omap@vger.kernel.org, Tony Lindgren,
	Chikkature Rajashekar, Madhusudhan

Venkatraman S had written, on 05/11/2010 07:19 AM, the following:
>  Nishanth Menon <menon.nishanth@gmail.com> wrote:
>> -linux-arm
>>
>> On 05/10/2010 10:53 PM, S, Venkatraman wrote:
>>>> -----Original Message-----
>>>> From: menon.nishanth@gmail.com
>>>> [mailto:menon.nishanth@gmail.com] On Behalf Of Menon, Nishanth
>>>> Sent: Tuesday, May 11, 2010 5:02 AM
>>>> To: S, Venkatraman
>>>> Cc: linux-omap@vger.kernel.org;
>>>> linux-arm-kernel@lists.infradead.org; Tony Lindgren;
>>>> Chikkature Rajashekar, Madhusudhan
>>>> Subject: Re: [PATCH RESEND] update omap3 features bitmap and
>>>> API to generic names
>>>>
>>>> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S
>>>> <svenkatr@ti.com>  wrote:
>>>>>        OMAP3 features bitmap is used a method to check for SoC
>>>>> specific features. This patch renames the global variables and the
>>>>> accessor functions to use a generic name from omap3_* to
>>>>> omap_*
>>>>>
>>>>> Signed-off-by: Venkatraman S<svenkatr@ti.com>
>>>>> CC: Nishant Menon<nm@ti.com>
>>>> Just for the patchworks
>>>> NAK - discussed before -
>>>> http://marc.info/?l=linux-omap&m=127349696800651&w=2
>>> This patch doesn't have the descriptor load changes, and just the rename.
>>> Did you take a look at it first?
>> Arrgh - my bad - there was no reference to previous discussions or anything
>> in this patch, please do add references in diffstat section if you are
>> refering to a previous discussed strategy to help the reviewers
>> differentiate and understand you better.
>>
>> overall this still opens up a question for me -> can we blindly replace
>> omap3-features with omap features? how do we think of omap1,2,3,4 are
>> handled consistently with a 32 bit field?
>>
>> I agree on the need to have a omap independent field, but is omap3_features
>> the one we need to modify OR should we be introducing a new field?
>>
>> my vote goes for introducing a new field.
>>
> 
> You are confusing the interface with implementation (or rather,
> worrying about both of them simultaneously).
> 
> The interface has to be consistent and SoC independent, to the extent possible.
>   So the macro changes are relevant and readable / extensible.
> 
> Regarding the variable name (implementation):-
>    Given the minimal set that we have (5 -6 fields today, so there is
> room for 25 more 'features" still), I don't think
> we should over-engineer it now to accomodate all permutations and use
> cases. It's not even found use
> beyond 1 or 2 files. YAGNI ?

huh? I dont understand you. lets see what we we are doing here:
a) we are causing an ABI breakage by moving omap3_feature to 
omap_feature (which by the way should also include changes to the macros 
as well..)
b) we have a real need to have a cross OMAP feature distinction to 
differentiate between generic omap feature and omap3/2/1/4 features.

This patch does not address the same in a consistent scalable way. NOTE: 
we are starting to introduce other OMAP4 features as well, SOC level 
feature distinction should ideally be handled by FEATURE framework - 
that is the reason it was introduced in the first place.

if your feel this is overengineering - well, I believe this is 
conceptual definition -> Specific OMAP[1234] *family* features Vs OMAP 
generic features.. two different things in my mind -> it does not matter 
if I have 32 bits in the original variable OR if I had 64bit.. i dont 
prefer to reuse a variable and mess up the conceptual distinction.


-- 
Regards,
Nishanth Menon

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

* Re: How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic names)
  2010-05-11 13:43         ` Nishanth Menon
@ 2010-05-11 14:38           ` Venkatraman S
  0 siblings, 0 replies; 10+ messages in thread
From: Venkatraman S @ 2010-05-11 14:38 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Nishanth Menon, linux-omap@vger.kernel.org, Tony Lindgren,
	Chikkature Rajashekar, Madhusudhan

On Tue, May 11, 2010 at 7:13 PM, Nishanth Menon <nm@ti.com> wrote:
> Venkatraman S had written, on 05/11/2010 07:19 AM, the following:
>>
>>  Nishanth Menon <menon.nishanth@gmail.com> wrote:
>>>
>>> -linux-arm
>>>
>>> On 05/10/2010 10:53 PM, S, Venkatraman wrote:
>>>>>
>>>>> -----Original Message-----
>>>>> From: menon.nishanth@gmail.com
>>>>> [mailto:menon.nishanth@gmail.com] On Behalf Of Menon, Nishanth
>>>>> Sent: Tuesday, May 11, 2010 5:02 AM
>>>>> To: S, Venkatraman
>>>>> Cc: linux-omap@vger.kernel.org;
>>>>> linux-arm-kernel@lists.infradead.org; Tony Lindgren;
>>>>> Chikkature Rajashekar, Madhusudhan
>>>>> Subject: Re: [PATCH RESEND] update omap3 features bitmap and
>>>>> API to generic names
>>>>>
>>>>> On Mon, May 10, 2010 at 2:55 PM, Venkatraman S
>>>>> <svenkatr@ti.com>  wrote:
>>>>>>
>>>>>>       OMAP3 features bitmap is used a method to check for SoC
>>>>>> specific features. This patch renames the global variables and the
>>>>>> accessor functions to use a generic name from omap3_* to
>>>>>> omap_*
>>>>>>
>>>>>> Signed-off-by: Venkatraman S<svenkatr@ti.com>
>>>>>> CC: Nishant Menon<nm@ti.com>
>>>>>
>>>>> Just for the patchworks
>>>>> NAK - discussed before -
>>>>> http://marc.info/?l=linux-omap&m=127349696800651&w=2
>>>>
>>>> This patch doesn't have the descriptor load changes, and just the
>>>> rename.
>>>> Did you take a look at it first?
>>>
>>> Arrgh - my bad - there was no reference to previous discussions or
>>> anything
>>> in this patch, please do add references in diffstat section if you are
>>> refering to a previous discussed strategy to help the reviewers
>>> differentiate and understand you better.
>>>
>>> overall this still opens up a question for me -> can we blindly replace
>>> omap3-features with omap features? how do we think of omap1,2,3,4 are
>>> handled consistently with a 32 bit field?
>>>
>>> I agree on the need to have a omap independent field, but is
>>> omap3_features
>>> the one we need to modify OR should we be introducing a new field?
>>>
>>> my vote goes for introducing a new field.
>>>
>>
>> You are confusing the interface with implementation (or rather,
>> worrying about both of them simultaneously).
>>
>> The interface has to be consistent and SoC independent, to the extent
>> possible.
>>  So the macro changes are relevant and readable / extensible.
>>
>> Regarding the variable name (implementation):-
>>   Given the minimal set that we have (5 -6 fields today, so there is
>> room for 25 more 'features" still), I don't think
>> we should over-engineer it now to accomodate all permutations and use
>> cases. It's not even found use
>> beyond 1 or 2 files. YAGNI ?
>
> huh? I dont understand you. lets see what we we are doing here:
> a) we are causing an ABI breakage by moving omap3_feature to omap_feature


The omap3_feature variable is not supposed to be used by modules
*querying* for the feature. They don't even have to know it's existence.
 That is what the macros/inline functions  omap_has_***() are for.

All the uses of omap3_has_** have been replaced by omap_has_** in this patch.
This is an ABI change (due to the previous interface tying it to OMAP3)
and *not* ABI breakage (All previous uses have been replaced)

> (which by the way should also include changes to the macros as well..)
    This is different. There could be different ways in which the
actual snooping
of whether a feature exists on not is implemented. For OMAP3, it is
looking up the control module.
(This, I have preserved). For other SoCs, it could be different, I
don't know how to
snoop them for. Your comments are welcome.

> b) we have a real need to have a cross OMAP feature distinction to
> differentiate between generic omap feature and omap3/2/1/4 features.
>
> This patch does not address the same in a consistent scalable way. NOTE: we
> are starting to introduce other OMAP4 features as well, SOC level feature
> distinction should ideally be handled by FEATURE framework - that is the
> reason it was introduced in the first place.

 I never claimed this patch to be a mother of all 'features
framework'. It was just
a name improvement to the bunch of macros that existed. Again,

a) it preserves the separtion of interface. We can have a full fledged tree
   of generic / OMAP[12345] specific features, but the interface need not
change.

>
> if your feel this is overengineering - well, I believe this is conceptual
> definition -> Specific OMAP[1234] *family* features Vs OMAP generic
> features.. two different things in my mind -> it does not matter if I have
> 32 bits in the original variable OR if I had 64bit.. i dont prefer to reuse
> a variable and mess up the conceptual distinction.
>

b) Are you simply saying that the existing features bitmap (all 6 of
them) are tied to OMAP3 ? For good ?
In that case, I really understand your comments and can change back
the variable name.

At the same time, it's not easy to classify what category a feature belongs to.
What could a single SoC specific feature today (SDMA descriptor
loading) could then become
a series (OMAP4, OMAP5 etc).  Or it could occur at disjoint intervals
(OMAP3 and OMAP5).
Even if it somehow could be boxed to a series, I think the interface
would then be tied to
that series, which would break future expansion.

So a *flat* structure of "uniquely named" features storage
is what we want, which eventually could flow over to an array of bitfields.

In other words, if the interface is defined as omapX_has_feature(), it is not
maintainable, for any X. It should always be omap_has_feature(), even
if it is found in a single SoC.

This is what I understand your intention in change of $SUBJECT.
If you have another proposal, please post it here and I can work with
you on that.

Regards,
Venkat.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2010-05-11 14:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 19:55 [PATCH RESEND] update omap3 features bitmap and API to generic names Venkatraman S
2010-05-10 19:55 ` Venkatraman S
2010-05-10 23:32 ` Nishanth Menon
2010-05-10 23:32   ` Nishanth Menon
2010-05-11  3:53   ` S, Venkatraman
2010-05-11  3:53     ` S, Venkatraman
2010-05-11 12:06     ` How to introduce omap_features (was Re: [PATCH RESEND] update omap3 features bitmap and API to generic names) Nishanth Menon
2010-05-11 12:19       ` Venkatraman S
2010-05-11 13:43         ` Nishanth Menon
2010-05-11 14:38           ` Venkatraman S

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.