Skip to contentSkip to conversation

omap: Remove DEBUGFS dependency for mux name checking

PATCH Superseded Ranjith Lohithakshan 2 participants 3 messages Feb 17, 2010

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap: Remove DEBUGFS dependency for mux name checking

The check for a valid mux name should be performed regardless of whether DEBUGFS is enabled or not.

This fixes the issue currently seen with boards not booting up if DEBUGFS is not enabled in defconfig.

---
 arch/arm/mach-omap2/mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/mux.c +1 -1
index 986077f..1a6ff8f 100644
@@ -969,7 +969,7 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
 		}
 #endif
 
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
+#ifdef CONFIG_OMAP_MUX
 		if (!superset->muxnames || !superset->muxnames[0]) {
 			superset++;
 			continue;
Signature · 1 line
1.6.2.4
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lohithakshan, Ranjith
Sent: Wednesday, February 17, 2010 11:48 AM
To: [email protected]
Cc: [email protected]; Lohithakshan, Ranjith
Subject: [PATCH] omap: Remove DEBUGFS dependency for mux name checking

The check for a valid mux name should be performed regardless of whether
DEBUGFS is enabled or not.

Quoted 8 lines

This fixes the issue currently seen with boards not booting up if DEBUGFS is not enabled in defconfig.

---
 arch/arm/mach-omap2/mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Ranjith,

For better readability, I suggest the following:

arch/arm/mach-omap2/mux.c +5 -7
index 19001dd..7c0c4ad 100644
@@ -960,16 +960,14 @@ static void __init omap_mux_init_list(struct omap_mux *sup
        while (superset->reg_offset !=  OMAP_MUX_TERMINATOR) {
                struct omap_mux *entry;
 
-#ifndef CONFIG_OMAP_MUX
-               /* Skip pins that are not muxed as GPIO by bootloader */
-               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
+#ifdef CONFIG_OMAP_MUX
+               if (!superset->muxnames || !superset->muxnames[0]) {
                        superset++;
                        continue;
                }
-#endif
-
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
-               if (!superset->muxnames || !superset->muxnames[0]) {
+#else
+               /* Skip pins that are not muxed as GPIO by bootloader */
+               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
                        superset++;
                        continue;
                }

Best regards,
Sanjeev

Quoted 23 lines
arch/arm/mach-omap2/mux.c +1 -1
index 986077f..1a6ff8f 100644
@@ -969,7 +969,7 @@ static void __init 
 omap_mux_init_list(struct omap_mux *superset)
 		}
 #endif
 
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
+#ifdef CONFIG_OMAP_MUX
 		if (!superset->muxnames || !superset->muxnames[0]) {
 			superset++;

continue;

Signature · 7 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe 
linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

Sanjeev,

Quoted 41 lines · Sanjeev
Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lohithakshan, Ranjith
Sent: Wednesday, February 17, 2010 11:48 AM
To: [email protected]
Cc: [email protected]; Lohithakshan, Ranjith
Subject: [PATCH] omap: Remove DEBUGFS dependency for mux name checking

The check for a valid mux name should be performed regardless of whether
DEBUGFS is enabled or not.

Quoted 8 lines

This fixes the issue currently seen with boards not booting up if DEBUGFS is not enabled in defconfig.

---
 arch/arm/mach-omap2/mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Ranjith,

For better readability, I suggest the following:

arch/arm/mach-omap2/mux.c +2 -3
index 19001dd..7c0c4ad 100644
@@ -960,16 +960,14 @@ static void __init omap_mux_init_list(struct omap_mux *sup
        while (superset->reg_offset !=  OMAP_MUX_TERMINATOR) {
                struct omap_mux *entry;
 
-#ifndef CONFIG_OMAP_MUX
-               /* Skip pins that are not muxed as GPIO by bootloader */
-               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
+#ifdef CONFIG_OMAP_MUX
+               if (!superset->muxnames || !superset->muxnames[0]) {
                        superset++;
                        continue;

arch/arm/mach-omap2/mux.c static void __init omap_mux_init_list(struct omap_mux *sup · line 972

Quoted 10 lines
arch/arm/mach-omap2/mux.c +3 -4
                }
-#endif
-
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
-               if (!superset->muxnames || !superset->muxnames[0]) {
+#else
+               /* Skip pins that are not muxed as GPIO by bootloader */
+               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
                        superset++;
                        continue;

Sounds good. I will issue an updated patch shortly.

- Ranjith

Quoted 26 lines
arch/arm/mach-omap2/mux.c +0 -0
 Best regards,

Sanjeev

Quoted 22 lines
arch/arm/mach-omap2/mux.c +1 -1
index 986077f..1a6ff8f 100644
@@ -969,7 +969,7 @@ static void __init 
 omap_mux_init_list(struct omap_mux *superset)
 		}
 #endif
 
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
+#ifdef CONFIG_OMAP_MUX
 		if (!superset->muxnames || !superset->muxnames[0]) {
 			superset++;

continue;

Signature · 7 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe 
linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html