All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <4E60C174.50604@ti.com>

diff --git a/a/1.txt b/N1/1.txt
index bbd19a0..69d2874 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -52,122 +52,3 @@ Thanks,
 Benoit
 
 ---
->From a8edcd113b6fa38620dae11bcbb55daa84dfb07c Mon Sep 17 00:00:00 2001
-From: Benoit Cousson <b-cousson@ti.com>
-Date: Mon, 22 Aug 2011 11:10:38 +0200
-Subject: [PATCH] OMAP2+: Add a common method to init globals using DT compatible
-
-Thanks to the DT root node compatible information, we can extract
-the compatible SoC and use it to select the proper globals.
-Create a common omap2_set_globals API that can be used by every
-OMAP2+ platforms.
-
-Signed-off-by: Benoit Cousson <b-cousson@ti.com>
-Cc: Tony Lindgren <tony@atomide.com>
----
- arch/arm/mach-omap2/common.c             |   73 ++++++++++++++++++++++++++++++
- arch/arm/plat-omap/include/plat/common.h |    1 +
- 2 files changed, 74 insertions(+), 0 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
-index 3f20cbb..ee5a225 100644
---- a/arch/arm/mach-omap2/common.c
-+++ b/arch/arm/mach-omap2/common.c
-@@ -16,6 +16,7 @@
- #include <linux/init.h>
- #include <linux/clk.h>
- #include <linux/io.h>
-+#include <linux/of_fdt.h>
- 
- #include <plat/common.h>
- #include <plat/board.h>
-@@ -140,3 +141,75 @@ void __init omap2_set_globals_443x(void)
- }
- #endif
- 
-+#ifdef CONFIG_OF
-+/*
-+ * DT method to get the proper globals configuration
-+ */
-+static const struct of_device_id omap_soc_match[] = {
-+#if defined(CONFIG_ARCH_OMAP4)
-+        {
-+                .compatible = "ti,omap4",
-+                .data = &omap4_globals,
-+        },
-+#endif
-+#if defined(CONFIG_ARCH_OMAP3)
-+        {
-+                .compatible = "ti,omap3",
-+                .data = &omap3_globals,
-+        },
-+#endif
-+#if defined(CONFIG_SOC_OMAP2430)
-+        {
-+                .compatible = "ti,omap2430",
-+                .data = &omap243x_globals,
-+        },
-+#endif
-+#if defined(CONFIG_SOC_OMAP2420)
-+        {
-+                .compatible = "ti,omap2420",
-+                .data = &omap242x_globals,
-+        },
-+#endif
-+	{},
-+};
-+
-+/* Helper to find the proper of_device_id from a FDT */
-+static __init const struct of_device_id *_fdt_match_node(
-+					const struct of_device_id *matches,
-+					int fdt_node)
-+{
-+	unsigned int score = 0;
-+
-+	if (!matches)
-+		return NULL;
-+
-+	while (matches->compatible[0]) {
-+		score = of_flat_dt_is_compatible(fdt_node, matches->compatible);
-+		if (score > 0)
-+			return matches;
-+		matches++;
-+	}
-+	return NULL;
-+}
-+
-+void __init omap2_set_globals(void)
-+{
-+        unsigned long fdt_root;
-+	const struct of_device_id *match;
-+
-+	/* the DT is still flat at map_io time... */
-+        fdt_root = of_get_flat_dt_root();
-+	match = _fdt_match_node(omap_soc_match, fdt_root);
-+	if (!match) {
-+		pr_err("%s(): Cannot initialize the platform globals data\n",
-+		       __func__);
-+	}
-+
-+	pr_info("%s(): %s\n", __func__, match->compatible);
-+
-+	omap2_set_globals_tap(match->data);
-+	omap2_set_globals_sdrc(match->data);
-+	omap2_set_globals_control(match->data);
-+	omap2_set_globals_prcm(match->data);
-+}
-+#endif
-diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
-index 4564cc6..fb79269 100644
---- a/arch/arm/plat-omap/include/plat/common.h
-+++ b/arch/arm/plat-omap/include/plat/common.h
-@@ -67,6 +67,7 @@ void omap2_set_globals_243x(void);
- void omap2_set_globals_3xxx(void);
- void omap2_set_globals_443x(void);
- void omap2_set_globals_ti816x(void);
-+void omap2_set_globals(void);
- 
- /* These get called from omap2_set_globals_xxxx(), do not call these */
- void omap2_set_globals_tap(struct omap_globals *);
--- 
-1.7.0.4
diff --git a/a/content_digest b/N1/content_digest
index fe1c281..369235d 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -3,16 +3,10 @@
  "ref\020110902080944.GP3548@atomide.com\0"
  "ref\04E609800.9090402@ti.com\0"
  "ref\020110902104330.GR3548@atomide.com\0"
- "From\0Cousson, Benoit <b-cousson@ti.com>\0"
- "Subject\0Re: [PATCH 6/7] OMAP3: board-dt: Add generic board file for DT support\0"
+ "From\0b-cousson@ti.com (Cousson, Benoit)\0"
+ "Subject\0[PATCH 6/7] OMAP3: board-dt: Add generic board file for DT support\0"
  "Date\0Fri, 2 Sep 2011 13:43:48 +0200\0"
- "To\0Tony Lindgren <tony@atomide.com>\0"
- "Cc\0grant.likely@secretlab.ca <grant.likely@secretlab.ca>"
-  linux-omap@vger.kernel.org <linux-omap@vger.kernel.org>
-  devicetree-discuss@lists.ozlabs.org <devicetree-discuss@lists.ozlabs.org>
-  linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>
-  G
- " Manjunath Kondaiah <manjugk@ti.com>\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
  "b\0"
  "On 9/2/2011 12:43 PM, Tony Lindgren wrote:\n"
@@ -68,125 +62,6 @@
  "Thanks,\n"
  "Benoit\n"
  "\n"
- "---\n"
- ">From a8edcd113b6fa38620dae11bcbb55daa84dfb07c Mon Sep 17 00:00:00 2001\n"
- "From: Benoit Cousson <b-cousson@ti.com>\n"
- "Date: Mon, 22 Aug 2011 11:10:38 +0200\n"
- "Subject: [PATCH] OMAP2+: Add a common method to init globals using DT compatible\n"
- "\n"
- "Thanks to the DT root node compatible information, we can extract\n"
- "the compatible SoC and use it to select the proper globals.\n"
- "Create a common omap2_set_globals API that can be used by every\n"
- "OMAP2+ platforms.\n"
- "\n"
- "Signed-off-by: Benoit Cousson <b-cousson@ti.com>\n"
- "Cc: Tony Lindgren <tony@atomide.com>\n"
- "---\n"
- " arch/arm/mach-omap2/common.c             |   73 ++++++++++++++++++++++++++++++\n"
- " arch/arm/plat-omap/include/plat/common.h |    1 +\n"
- " 2 files changed, 74 insertions(+), 0 deletions(-)\n"
- "\n"
- "diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c\n"
- "index 3f20cbb..ee5a225 100644\n"
- "--- a/arch/arm/mach-omap2/common.c\n"
- "+++ b/arch/arm/mach-omap2/common.c\n"
- "@@ -16,6 +16,7 @@\n"
- " #include <linux/init.h>\n"
- " #include <linux/clk.h>\n"
- " #include <linux/io.h>\n"
- "+#include <linux/of_fdt.h>\n"
- " \n"
- " #include <plat/common.h>\n"
- " #include <plat/board.h>\n"
- "@@ -140,3 +141,75 @@ void __init omap2_set_globals_443x(void)\n"
- " }\n"
- " #endif\n"
- " \n"
- "+#ifdef CONFIG_OF\n"
- "+/*\n"
- "+ * DT method to get the proper globals configuration\n"
- "+ */\n"
- "+static const struct of_device_id omap_soc_match[] = {\n"
- "+#if defined(CONFIG_ARCH_OMAP4)\n"
- "+        {\n"
- "+                .compatible = \"ti,omap4\",\n"
- "+                .data = &omap4_globals,\n"
- "+        },\n"
- "+#endif\n"
- "+#if defined(CONFIG_ARCH_OMAP3)\n"
- "+        {\n"
- "+                .compatible = \"ti,omap3\",\n"
- "+                .data = &omap3_globals,\n"
- "+        },\n"
- "+#endif\n"
- "+#if defined(CONFIG_SOC_OMAP2430)\n"
- "+        {\n"
- "+                .compatible = \"ti,omap2430\",\n"
- "+                .data = &omap243x_globals,\n"
- "+        },\n"
- "+#endif\n"
- "+#if defined(CONFIG_SOC_OMAP2420)\n"
- "+        {\n"
- "+                .compatible = \"ti,omap2420\",\n"
- "+                .data = &omap242x_globals,\n"
- "+        },\n"
- "+#endif\n"
- "+\t{},\n"
- "+};\n"
- "+\n"
- "+/* Helper to find the proper of_device_id from a FDT */\n"
- "+static __init const struct of_device_id *_fdt_match_node(\n"
- "+\t\t\t\t\tconst struct of_device_id *matches,\n"
- "+\t\t\t\t\tint fdt_node)\n"
- "+{\n"
- "+\tunsigned int score = 0;\n"
- "+\n"
- "+\tif (!matches)\n"
- "+\t\treturn NULL;\n"
- "+\n"
- "+\twhile (matches->compatible[0]) {\n"
- "+\t\tscore = of_flat_dt_is_compatible(fdt_node, matches->compatible);\n"
- "+\t\tif (score > 0)\n"
- "+\t\t\treturn matches;\n"
- "+\t\tmatches++;\n"
- "+\t}\n"
- "+\treturn NULL;\n"
- "+}\n"
- "+\n"
- "+void __init omap2_set_globals(void)\n"
- "+{\n"
- "+        unsigned long fdt_root;\n"
- "+\tconst struct of_device_id *match;\n"
- "+\n"
- "+\t/* the DT is still flat at map_io time... */\n"
- "+        fdt_root = of_get_flat_dt_root();\n"
- "+\tmatch = _fdt_match_node(omap_soc_match, fdt_root);\n"
- "+\tif (!match) {\n"
- "+\t\tpr_err(\"%s(): Cannot initialize the platform globals data\\n\",\n"
- "+\t\t       __func__);\n"
- "+\t}\n"
- "+\n"
- "+\tpr_info(\"%s(): %s\\n\", __func__, match->compatible);\n"
- "+\n"
- "+\tomap2_set_globals_tap(match->data);\n"
- "+\tomap2_set_globals_sdrc(match->data);\n"
- "+\tomap2_set_globals_control(match->data);\n"
- "+\tomap2_set_globals_prcm(match->data);\n"
- "+}\n"
- "+#endif\n"
- "diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h\n"
- "index 4564cc6..fb79269 100644\n"
- "--- a/arch/arm/plat-omap/include/plat/common.h\n"
- "+++ b/arch/arm/plat-omap/include/plat/common.h\n"
- "@@ -67,6 +67,7 @@ void omap2_set_globals_243x(void);\n"
- " void omap2_set_globals_3xxx(void);\n"
- " void omap2_set_globals_443x(void);\n"
- " void omap2_set_globals_ti816x(void);\n"
- "+void omap2_set_globals(void);\n"
- " \n"
- " /* These get called from omap2_set_globals_xxxx(), do not call these */\n"
- " void omap2_set_globals_tap(struct omap_globals *);\n"
- "-- \n"
- 1.7.0.4
+ ---
 
-3054a1840126579b31ba545faed40de27d0e5318018a5e4ce50980edd58f56ed
+14865448d2294932a34e832158aad3218f770582d29b82b390cbca44657a31ce

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.