Skip to contentSkip to conversation

sh: Rework sh7720 GPIO header usage

PATCH In review Magnus Damm 3 participants 7 messages Sep 29, 2008 – Sep 30, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: Rework sh7720 GPIO header usage

From: Magnus Damm <[email protected]>

This patch reworks the sh7720 gpio includes. Makes space for the generic GPIO code.

---

Compile tested with the magicpanelr2_defconfig.

 arch/sh/include/asm/gpio.h         |    8 --------
 arch/sh/include/asm/magicpanelr2.h |    2 +-
 drivers/serial/sh-sci.h            |    4 +++-
 3 files changed, 4 insertions(+), 10 deletions(-)
arch/sh/include/asm/gpio.h +0 -8
@@ -1,10 +1,6 @@
 /*
  *  include/asm-sh/gpio.h
  *
- *  Copyright (C) 2007 Markus Brunner, Mark Jonas
- *
- *  Addresses for the Pin Function Controller
- *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
@@ -12,8 +8,4 @@
 #ifndef __ASM_SH_GPIO_H
 #define __ASM_SH_GPIO_H
 
-#if defined(CONFIG_CPU_SH3)
-#include <cpu/gpio.h>
-#endif
-
 #endif /* __ASM_SH_GPIO_H */
arch/sh/include/asm/magicpanelr2.h +1 -1
@@ -13,7 +13,7 @@
 #ifndef __ASM_SH_MAGICPANELR2_H
 #define __ASM_SH_MAGICPANELR2_H
 
-#include <asm/gpio.h>
+#include <cpu-sh3/cpu/gpio.h>
 
 #define __IO_PREFIX mpr2
 #include <asm/io_generic.h>
drivers/serial/sh-sci.h +3 -1
@@ -1,7 +1,9 @@
 #include <linux/serial_core.h>
 #include <asm/io.h>
-#include <asm/gpio.h>
 
+#ifdef CONFIG_CPU_SH3
+#include <cpu-sh3/cpu/gpio.h>
+#endif
 #if defined(CONFIG_H83007) || defined(CONFIG_H83068)
 #include <asm/regs306x.h>
 #endif
#1 lore raw
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

This patch reworks the sh7720 gpio includes. Makes space for the generic GPIO code.

Quoted 9 lines

---

Compile tested with the magicpanelr2_defconfig.

 arch/sh/include/asm/gpio.h         |    8 --------
 arch/sh/include/asm/magicpanelr2.h |    2 +-
 drivers/serial/sh-sci.h            |    4 +++-
 3 files changed, 4 insertions(+), 10 deletions(-)

Churn in drivers/ for this kind of thing is pretty uninspiring. I'll just change the asm/gpio.h ifdef to reference cpu-sh3 explicitly instead. It will serve as a reminder that SH-3 still needs to be converted.

#2 lore raw
In reply to Magnus Damm
Quoted 11 lines · Paul Mundt
Quoted 10 lines · Magnus Damm

From: Magnus Damm <[email protected]>

This patch reworks the sh7720 gpio includes. Makes space for the generic GPIO code.

---

Compile tested with the magicpanelr2_defconfig.

Quoted 8 lines
Quoted 5 lines
 arch/sh/include/asm/gpio.h         |    8 --------
 arch/sh/include/asm/magicpanelr2.h |    2 +-
 drivers/serial/sh-sci.h            |    4 +++-
 3 files changed, 4 insertions(+), 10 deletions(-)

Churn in drivers/ for this kind of thing is pretty uninspiring. I'll just change the asm/gpio.h ifdef to reference cpu-sh3 explicitly instead. It will serve as a reminder that SH-3 still needs to be converted.

Actually, there's not even any point in that. There's no harm in having the ifdef as it is now remain in the file. Others were there first, so you'll have to live with it.

#3 lore raw
In reply to Magnus Damm

Magnus,

Quoted 14 lines
arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 renamed from arch/sh/include/asm/gpio.h +0 -4
@@ -1,10 +1,6 @@
 /*
 *  include/asm-sh/gpio.h
 *
- *  Copyright (C) 2007 Markus Brunner, Mark Jonas
- *
- *  Addresses for the Pin Function Controller
- *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.

arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 line 11

Quoted 8 lines
arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 renamed from arch/sh/include/asm/gpio.h +0 -4
@@ -12,8 +8,4 @@
 #ifndef __ASM_SH_GPIO_H
 #define __ASM_SH_GPIO_H
 
-#if defined(CONFIG_CPU_SH3)
-#include <cpu/gpio.h>
-#endif
-
 #endif /* __ASM_SH_GPIO_H */

This is most likely a stupid question but still:
Now that arch/sh/include/asm/gpio.h is completely empty from the compiler's POV, why wasn't simply deleted?

Mark

#4 lore raw
In reply to Magnus Damm
Quoted 19 lines · Mark Jonas

Magnus,

Quoted 17 lines
arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 renamed from arch/sh/include/asm/gpio.h +0 -4
@@ -1,10 +1,6 @@
 /*
 *  include/asm-sh/gpio.h
 *
- *  Copyright (C) 2007 Markus Brunner, Mark Jonas
- *
- *  Addresses for the Pin Function Controller
- *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
@@ -12,8 +8,4 @@
 #ifndef __ASM_SH_GPIO_H
 #define __ASM_SH_GPIO_H
 
Quoted 10 lines

arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 line 11

Quoted 5 lines
arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 renamed from arch/sh/include/asm/gpio.h +0 -4
-#if defined(CONFIG_CPU_SH3)
-#include <cpu/gpio.h>
-#endif
-
 #endif /* __ASM_SH_GPIO_H */

This is most likely a stupid question but still:
Now that arch/sh/include/asm/gpio.h is completely empty from the compiler's POV, why wasn't simply deleted?

It was just in this patch, the subsequent patches added back to it. Anyways, I've dropped that, and simply merged the subsequent patches around the ifdef. There isn't any breakage for your platform, but you may wish to look in to what it would take to get magicpanelr2 converted to the generic framework.

#5 lore raw
In reply to Magnus Damm
Quoted 7 lines · Paul Mundt
Quoted 6 lines · Mark Jonas

arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900

Quoted 2 lines
arch/sh/include/asm/gpio.h 2008-09-29 15:31:10.000000000 +0900 renamed from arch/sh/include/asm/gpio.h +0 -0

This is most likely a stupid question but still:
Now that arch/sh/include/asm/gpio.h is completely empty from the compiler's POV, why wasn't simply deleted?

Quoted 5 lines

It was just in this patch, the subsequent patches added back to it. Anyways, I've dropped that, and simply merged the subsequent patches around the ifdef. There isn't any breakage for your platform, but you may wish to look in to what it would take to get magicpanelr2 converted to the generic framework.

I've got the sh7720 specific cpu bits mostly done. Mark, do you have time to convert the board code?

/ magnus

#6 lore raw
In reply to Magnus Damm

Magnus,

Quoted 2 lines

I've got the sh7720 specific cpu bits mostly done. Mark, do you have time to convert the board code?

To be honest, no. My employer is currently not interested in investing in Linux and I'm overwhelmed with other projects. Sorry.

The good news is that I am still working on convincing my employer.

Mark