Re: [PATCH 6/6] omap: move generic omap3 features to generic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/31/2010 09:46 PM, S, Venkatraman wrote:
I understand that you might not have all platforms to test with, but
let's not provide a
'generic feature api' without it being available for the supported platforms.
It's incomplete without it.
well.. if you did read 0/6
http://marc.info/?l=linux-omap&m=127458581708411&w=2
"Caveat: this series just introduces the framework by reorganizing
the existing data, it does not attempt to define what the features
for OMAP1,2,3,4 would be. As usual, comments are welcome.
"
:) anyways, these are how the three follow on patches will look like (sample omap1,2,4 patches are attached), feel free to ack them after testing - but this patch 6/6 needs to be done prior to the remaining being added - that is one more reason why i stopped where I did.

Feel free to modify to rectify my patches and post good ones, as you see, you will need to do 6/6 before doing anything further anyways..

Regards,
Nishanth Menon
>From a4f7d23139f8ccfc6b0e910017a759faa0d59578 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@xxxxxx>
Date: Mon, 31 May 2010 14:03:28 -0500
Subject: [PATCH 1/3] omap: id: introduce omap4 feature

introduce basic omap4 feature framework

Signed-off-by: Nishanth Menon <nm@xxxxxx>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap2/id.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 01555b6..e3f5994 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -267,6 +267,19 @@ static void __init omap3_check_revision(void)
 	}
 }
 
+static void __init omap4_check_features(void)
+{
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	if (cpu_is_omap4430())
+		omap_features |= OMAP_HAS_L2CACHE |
+			OMAP_HAS_IVA |
+			OMAP_HAS_SGX |
+			OMAP_HAS_NEON;
+}
+
 static void __init omap4_check_revision(void)
 {
 	u32 idcode;
@@ -382,6 +395,7 @@ void __init omap2_check_revision(void)
 		return;
 	} else if (cpu_is_omap44xx()) {
 		omap4_check_revision();
+		omap4_check_features();
 		return;
 	} else {
 		pr_err("OMAP revision unknown, please fix!\n");
-- 
1.6.3.3

>From 0e4c9df9870c29da19234a1f4be5227a289b6463 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@xxxxxx>
Date: Mon, 31 May 2010 14:10:31 -0500
Subject: [PATCH 2/3] omap: id: introduce omap24xx generic features

introduce generic features for omap2. omap2 uses mbx, not sgx, and
it still has a dsp, though not iva2 as omap3 uses..

Signed-off-by: Nishanth Menon <nm@xxxxxx>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap2/id.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f5994..fe634dd 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -102,6 +102,16 @@ static struct omap_id omap_ids[] __initdata = {
 static void __iomem *tap_base;
 static u16 tap_prod_id;
 
+static void __init omap24xx_check_features(void)
+{
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	omap_features |= OMAP_HAS_L2CACHE |
+		OMAP_HAS_IVA;
+}
+
 static void __init omap24xx_check_revision(void)
 {
 	int i, j;
@@ -388,6 +398,7 @@ void __init omap2_check_revision(void)
 	 */
 	if (cpu_is_omap24xx()) {
 		omap24xx_check_revision();
+		omap24xx_check_features();
 	} else if (cpu_is_omap34xx()) {
 		omap3_check_revision();
 		omap3_check_features();
-- 
1.6.3.3

>From c297e29bfd27c373af8d9bdc428f72cad2ef4e7a Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@xxxxxx>
Date: Mon, 31 May 2010 14:13:57 -0500
Subject: [PATCH 3/3] omap: id: add feature check for omap1

add a minimalist feature - l2cache for omap1.

Signed-off-by: Nishanth Menon <nm@xxxxxx>
---
CAVEAT: COMPLETELY UNTESTED!!!
 arch/arm/mach-omap1/id.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 91dbb71..b98a17f 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -200,5 +200,11 @@ void __init omap1_check_revision(void)
 	printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
 	       die_rev, omap_revision & 0xff, system_serial_low,
 	       system_serial_high);
+
+	/*
+	 * TODO: add a better check feature once we have
+	 * more decent feature check
+	 */
+	omap_features |= OMAP_HAS_L2CACHE;
 }
 
-- 
1.6.3.3


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux