All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@codeaurora.org>
To: David Brown <davidb@codeaurora.org>,
	Daniel Walker <dwalker@fifo99.com>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] msm: Remove chip-ifdefs for GPIO io mappings
Date: Wed, 18 May 2011 14:50:48 -0700	[thread overview]
Message-ID: <1305755453-31112-3-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1305755453-31112-1-git-send-email-davidb@codeaurora.org>

The two GPIO controllers are always mapped to the same virtual address
across all MSM devices.  Instead of selecting this at compile time,
determine the physical address at runtime, eliminating yet something
else preventing multiple MSM targets from being compiled into the same
kernel.

Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/include/mach/msm_iomap-7x00.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap-8x50.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap.h      |    2 ++
 arch/arm/mach-msm/io.c                          |   12 ++++++------
 5 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index d6540e1..04bca83 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -54,13 +54,11 @@
 #define MSM7X00_DMOV_PHYS     0xA9700000
 #define MSM7X00_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xA9200000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define MSM7X00_GPIO1_PHYS        0xA9200000
+#define MSM7X00_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xA9300000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define MSM7X00_GPIO2_PHYS        0xA9300000
+#define MSM7X00_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xA8600000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
index 23912e5..7357ed6 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
@@ -45,13 +45,11 @@
 #define MSM7X30_DMOV_PHYS     0xAC400000
 #define MSM7X30_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xAC001000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define MSM7X30_GPIO1_PHYS        0xAC001000
+#define MSM7X30_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xAC101000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define MSM7X30_GPIO2_PHYS        0xAC101000
+#define MSM7X30_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xAB800000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
index fc36b82..38f37ed 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
@@ -45,13 +45,11 @@
 #define QSD8X50_DMOV_PHYS     0xA9700000
 #define QSD8X50_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xA9000000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define QSD8X50_GPIO1_PHYS        0xA9000000
+#define QSD8X50_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xA9100000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define QSD8X50_GPIO2_PHYS        0xA9100000
+#define QSD8X50_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xA8600000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index c98c759..3c4ef35 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -61,5 +61,7 @@
 #define MSM_QGIC_CPU_BASE	IOMEM(0xF0001000)
 #define MSM_TMR_BASE		IOMEM(0xF0200000)
 #define MSM_TMR0_BASE		IOMEM(0xF0201000)
+#define MSM_GPIO1_BASE		IOMEM(0xE0003000)
+#define MSM_GPIO2_BASE		IOMEM(0xE0004000)
 
 #endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 1c86cda..067653a 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -42,8 +42,8 @@
 static struct map_desc msm_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, MSM7X00),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, MSM7X00),
+	MSM_CHIP_DEVICE(GPIO2, MSM7X00),
 	MSM_DEVICE(CLK_CTL),
 #ifdef CONFIG_MSM_DEBUG_UART
 	MSM_DEVICE(DEBUG_UART),
@@ -74,8 +74,8 @@ void __init msm_map_common_io(void)
 static struct map_desc qsd8x50_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, QSD8X50),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, QSD8X50),
+	MSM_CHIP_DEVICE(GPIO2, QSD8X50),
 	MSM_DEVICE(CLK_CTL),
 	MSM_DEVICE(SIRC),
 	MSM_DEVICE(SCPLL),
@@ -132,8 +132,8 @@ void __init msm_map_msm8960_io(void)
 static struct map_desc msm7x30_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, MSM7X30),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, MSM7X30),
+	MSM_CHIP_DEVICE(GPIO2, MSM7X30),
 	MSM_DEVICE(CLK_CTL),
 	MSM_DEVICE(CLK_CTL_SH2),
 	MSM_DEVICE(AD5),
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

WARNING: multiple messages have this Message-ID (diff)
From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] msm: Remove chip-ifdefs for GPIO io mappings
Date: Wed, 18 May 2011 14:50:48 -0700	[thread overview]
Message-ID: <1305755453-31112-3-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1305755453-31112-1-git-send-email-davidb@codeaurora.org>

The two GPIO controllers are always mapped to the same virtual address
across all MSM devices.  Instead of selecting this at compile time,
determine the physical address at runtime, eliminating yet something
else preventing multiple MSM targets from being compiled into the same
kernel.

Signed-off-by: David Brown <davidb@codeaurora.org>
---
 arch/arm/mach-msm/include/mach/msm_iomap-7x00.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap-7x30.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap-8x50.h |   10 ++++------
 arch/arm/mach-msm/include/mach/msm_iomap.h      |    2 ++
 arch/arm/mach-msm/io.c                          |   12 ++++++------
 5 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index d6540e1..04bca83 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -54,13 +54,11 @@
 #define MSM7X00_DMOV_PHYS     0xA9700000
 #define MSM7X00_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xA9200000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define MSM7X00_GPIO1_PHYS        0xA9200000
+#define MSM7X00_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xA9300000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define MSM7X00_GPIO2_PHYS        0xA9300000
+#define MSM7X00_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xA8600000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
index 23912e5..7357ed6 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
@@ -45,13 +45,11 @@
 #define MSM7X30_DMOV_PHYS     0xAC400000
 #define MSM7X30_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xAC001000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define MSM7X30_GPIO1_PHYS        0xAC001000
+#define MSM7X30_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xAC101000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define MSM7X30_GPIO2_PHYS        0xAC101000
+#define MSM7X30_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xAB800000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
index fc36b82..38f37ed 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
@@ -45,13 +45,11 @@
 #define QSD8X50_DMOV_PHYS     0xA9700000
 #define QSD8X50_DMOV_SIZE     SZ_4K
 
-#define MSM_GPIO1_BASE        IOMEM(0xE0003000)
-#define MSM_GPIO1_PHYS        0xA9000000
-#define MSM_GPIO1_SIZE        SZ_4K
+#define QSD8X50_GPIO1_PHYS        0xA9000000
+#define QSD8X50_GPIO1_SIZE        SZ_4K
 
-#define MSM_GPIO2_BASE        IOMEM(0xE0004000)
-#define MSM_GPIO2_PHYS        0xA9100000
-#define MSM_GPIO2_SIZE        SZ_4K
+#define QSD8X50_GPIO2_PHYS        0xA9100000
+#define QSD8X50_GPIO2_SIZE        SZ_4K
 
 #define MSM_CLK_CTL_BASE      IOMEM(0xE0005000)
 #define MSM_CLK_CTL_PHYS      0xA8600000
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index c98c759..3c4ef35 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -61,5 +61,7 @@
 #define MSM_QGIC_CPU_BASE	IOMEM(0xF0001000)
 #define MSM_TMR_BASE		IOMEM(0xF0200000)
 #define MSM_TMR0_BASE		IOMEM(0xF0201000)
+#define MSM_GPIO1_BASE		IOMEM(0xE0003000)
+#define MSM_GPIO2_BASE		IOMEM(0xE0004000)
 
 #endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 1c86cda..067653a 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -42,8 +42,8 @@
 static struct map_desc msm_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, MSM7X00),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, MSM7X00),
+	MSM_CHIP_DEVICE(GPIO2, MSM7X00),
 	MSM_DEVICE(CLK_CTL),
 #ifdef CONFIG_MSM_DEBUG_UART
 	MSM_DEVICE(DEBUG_UART),
@@ -74,8 +74,8 @@ void __init msm_map_common_io(void)
 static struct map_desc qsd8x50_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, QSD8X50),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, QSD8X50),
+	MSM_CHIP_DEVICE(GPIO2, QSD8X50),
 	MSM_DEVICE(CLK_CTL),
 	MSM_DEVICE(SIRC),
 	MSM_DEVICE(SCPLL),
@@ -132,8 +132,8 @@ void __init msm_map_msm8960_io(void)
 static struct map_desc msm7x30_io_desc[] __initdata = {
 	MSM_DEVICE(VIC),
 	MSM_CHIP_DEVICE(CSR, MSM7X30),
-	MSM_DEVICE(GPIO1),
-	MSM_DEVICE(GPIO2),
+	MSM_CHIP_DEVICE(GPIO1, MSM7X30),
+	MSM_CHIP_DEVICE(GPIO2, MSM7X30),
 	MSM_DEVICE(CLK_CTL),
 	MSM_DEVICE(CLK_CTL_SH2),
 	MSM_DEVICE(AD5),
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  parent reply	other threads:[~2011-05-18 21:50 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 21:50 [PATCH 0/7] Move Qualcomm gpio drivers into drivers dir David Brown
2011-05-18 21:50 ` David Brown
2011-05-18 21:50 ` David Brown
2011-05-18 21:50 ` [PATCH 1/7] msm: gpio: Remove unsupported devices David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50 ` David Brown [this message]
2011-05-18 21:50   ` [PATCH 2/7] msm: Remove chip-ifdefs for GPIO io mappings David Brown
2011-05-18 21:50 ` [PATCH 3/7] msm: gpio: Remove chip-specific register definitions David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50 ` [PATCH 4/7] msm: gpio: Remove ifdefs on gpio chip registers David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50 ` [PATCH 5/7] msm: gpiomux: Move public API to public header David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 22:44   ` H Hartley Sweeten
2011-05-18 22:44     ` H Hartley Sweeten
2011-05-18 22:44     ` H Hartley Sweeten
2011-05-18 23:06     ` David Brown
2011-05-18 23:06       ` David Brown
2011-05-18 23:06       ` David Brown
2011-05-18 21:50 ` [PATCH 6/7] gpio_msm: Move Qualcomm v6 MSM driver into drivers David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50 ` [PATCH 7/7] gpio_msm: Move Qualcomm MSM v2 gpio " David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 21:50   ` David Brown
2011-05-18 22:35   ` Stephen Boyd
2011-05-18 22:35     ` Stephen Boyd
2011-05-18 22:43     ` David Brown
2011-05-18 22:43       ` David Brown
2011-05-18 22:25 ` [PATCH 0/7] Move Qualcomm gpio drivers into drivers dir Linus Walleij
2011-05-18 22:25   ` Linus Walleij
2011-05-19 19:34 ` Nicolas Pitre
2011-05-19 19:34   ` Nicolas Pitre
2011-05-27  3:13 ` Grant Likely
2011-05-27  3:13   ` Grant Likely
2011-05-27 16:29   ` David Brown
2011-05-27 16:29     ` David Brown
2011-05-27 16:35     ` David Brown
2011-05-27 16:35       ` David Brown
2011-05-27 19:31       ` Nicolas Pitre
2011-05-27 19:31         ` Nicolas Pitre
2011-05-27 21:19         ` David Brown
2011-05-27 21:19           ` David Brown
2011-06-03 22:44 ` [PATCH v2 " David Brown
2011-06-03 22:44   ` David Brown
2011-06-03 22:44   ` David Brown
2011-06-03 22:44   ` [PATCH v2 1/7] msm: gpio: Remove unsupported devices David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44   ` [PATCH v2 2/7] msm: Remove chip-ifdefs for GPIO io mappings David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44   ` [PATCH v2 3/7] msm: gpio: Remove chip-specific register definitions David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44   ` [PATCH v2 4/7] msm: gpio: Remove ifdefs on gpio chip registers David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44   ` [PATCH v2 5/7] msm: gpiomux: Move public API to public header David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44   ` [PATCH v2 6/7] gpio_msm: Move Qualcomm v6 MSM driver into drivers David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44     ` David Brown
2011-06-04  6:44     ` Grant Likely
2011-06-04  6:44       ` Grant Likely
2011-06-03 22:44   ` [PATCH v2 7/7] gpio_msm: Move Qualcomm MSM v2 gpio " David Brown
2011-06-03 22:44     ` David Brown
2011-06-03 22:44     ` David Brown
2011-06-04  6:45     ` Grant Likely
2011-06-04  6:45       ` Grant Likely
2011-06-04  0:15   ` [PATCH v2 0/7] Move Qualcomm gpio drivers into drivers dir David Brown
2011-06-04  0:15     ` David Brown
2011-06-06 21:51 ` [PATCH v3 0/8] " David Brown
2011-06-06 21:51   ` David Brown
2011-06-06 21:51   ` David Brown
2011-06-06 21:51   ` [PATCH v3 1/8] msm: gpio: Remove unsupported devices David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 2/8] msm: Remove chip-ifdefs for GPIO io mappings David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 3/8] msm: gpio: Remove chip-specific register definitions David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 4/8] msm: gpio: Remove ifdefs on gpio chip registers David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 5/8] msm: gpiomux: Move public API to public header David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 6/8] msm: gpio: Fold register defs into C file David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 7/8] gpio_msm: Move Qualcomm v6 MSM driver into drivers David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51     ` David Brown
2011-06-06 21:51   ` [PATCH v3 8/8] gpio_msm: Move Qualcomm MSM v2 gpio " David Brown
2011-06-06 21:51     ` David Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305755453-31112-3-git-send-email-davidb@codeaurora.org \
    --to=davidb@codeaurora.org \
    --cc=bryanh@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.