Skip to contentSkip to conversation

ARM: EXYNOS: add the definition for IRQ_DWMCI

PATCH In review Jaehoon Chung 3 participants 6 messages Apr 18, 2012 – Apr 25, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: EXYNOS: add the definition for IRQ_DWMCI

In dev-dwmci.c, IRQ_DWMCI is referenced.
But there is no defined anywhere.
This patch is added the missing definition for IRQ_DWMCI.

---
 arch/arm/mach-exynos/include/mach/irqs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
index 1161675..ed2295f 100644
@@ -201,6 +201,7 @@
 #define IRQ_HSMMC1			EXYNOS4_IRQ_HSMMC1
 #define IRQ_HSMMC2			EXYNOS4_IRQ_HSMMC2
 #define IRQ_HSMMC3			EXYNOS4_IRQ_HSMMC3
+#define IRQ_DWMCI			EXYNOS4_IRQ_DWMCI
 
 #define IRQ_MIPI_CSIS0			EXYNOS4_IRQ_MIPI_CSIS0
 
#1 lore raw
Quoted 15 lines · Jaehoon Chung

In dev-dwmci.c, IRQ_DWMCI is referenced.
But there is no defined anywhere.
This patch is added the missing definition for IRQ_DWMCI.

---
  arch/arm/mach-exynos/include/mach/irqs.h |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/include/mach/irqs.h +0 -0
index 1161675..ed2295f 100644

arch/arm/mach-exynos/include/mach/irqs.h line 204

Quoted 4 lines
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
@@ -201,6 +201,7 @@
  #define IRQ_HSMMC1			EXYNOS4_IRQ_HSMMC1
  #define IRQ_HSMMC2			EXYNOS4_IRQ_HSMMC2
  #define IRQ_HSMMC3			EXYNOS4_IRQ_HSMMC3
+#define IRQ_DWMCI			EXYNOS4_IRQ_DWMCI

Yeah, we need fix it but I have no idea need re-mapping. Just following can do it. If you're ok on following, let me pick this up.

---

arch/arm/mach-exynos/dev-dwmci.c +2 -10
index b025db4..c78daf2 100644
@@ -33,16 +31,8 @@ static int exynos4_dwmci_init(u32 slot_id, irq_handler_t handler, void *data)
 }
 
 static struct resource exynos4_dwmci_resource[] = {
-	[0] = {
-		.start	= EXYNOS4_PA_DWMCI,
-		.end	= EXYNOS4_PA_DWMCI + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_DWMCI,
-		.end	= IRQ_DWMCI,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = DEFINE_RES_MEM(EXYNOS4_PA_DWMCI, SZ_4K),
+	[1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_DWMCI),
 };
 
 static struct dw_mci_board exynos4_dwci_pdata = {
Signature · 7 lines
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
#2 lore raw
Quoted 11 lines · Kukjin Kim
Quoted 10 lines · Jaehoon Chung

In dev-dwmci.c, IRQ_DWMCI is referenced.
But there is no defined anywhere.
This patch is added the missing definition for IRQ_DWMCI.

---
  arch/arm/mach-exynos/include/mach/irqs.h |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 11 lines

arch/arm/mach-exynos/include/mach/irqs.h line 204

Quoted 9 lines
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
index 1161675..ed2295f 100644
@@ -201,6 +201,7 @@
  #define IRQ_HSMMC1            EXYNOS4_IRQ_HSMMC1
  #define IRQ_HSMMC2            EXYNOS4_IRQ_HSMMC2
  #define IRQ_HSMMC3            EXYNOS4_IRQ_HSMMC3
+#define IRQ_DWMCI            EXYNOS4_IRQ_DWMCI

Yeah, we need fix it but I have no idea need re-mapping. Just following can do it. If you're ok on following, let me pick this up.

If it's working, i don't care..I didn't see the DEFINE_RES_MEM/DEFINE_RES_IRQ. But if we can use them, it's more readable.

Thanks,
Jaehoon Chung

Quoted 25 lines

---

arch/arm/mach-exynos/dev-dwmci.c +2 -10
index b025db4..c78daf2 100644
@@ -33,16 +31,8 @@ static int exynos4_dwmci_init(u32 slot_id, irq_handler_t handler, void *data)
 }
 
 static struct resource exynos4_dwmci_resource[] = {
-    [0] = {
-        .start    = EXYNOS4_PA_DWMCI,
-        .end    = EXYNOS4_PA_DWMCI + SZ_4K - 1,
-        .flags    = IORESOURCE_MEM,
-    },
-    [1] = {
-        .start    = IRQ_DWMCI,
-        .end    = IRQ_DWMCI,
-        .flags    = IORESOURCE_IRQ,
-    }
+    [0] = DEFINE_RES_MEM(EXYNOS4_PA_DWMCI, SZ_4K),
+    [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_DWMCI),
 };
 
 static struct dw_mci_board exynos4_dwci_pdata = {
#3 lore raw

Jaehoon Chung wroteh:

Quoted 25 lines · Kukjin Kim
Quoted 12 lines
Quoted 10 lines · Jaehoon Chung

In dev-dwmci.c, IRQ_DWMCI is referenced.
But there is no defined anywhere.
This patch is added the missing definition for IRQ_DWMCI.

---
   arch/arm/mach-exynos/include/mach/irqs.h |    1 +
   1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 11 lines

arch/arm/mach-exynos/include/mach/irqs.h line 204

Quoted 9 lines
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
index 1161675..ed2295f 100644
@@ -201,6 +201,7 @@
   #define IRQ_HSMMC1            EXYNOS4_IRQ_HSMMC1
   #define IRQ_HSMMC2            EXYNOS4_IRQ_HSMMC2
   #define IRQ_HSMMC3            EXYNOS4_IRQ_HSMMC3
+#define IRQ_DWMCI            EXYNOS4_IRQ_DWMCI

Yeah, we need fix it but I have no idea need re-mapping. Just following can do it. If you're ok on following, let me pick this up.

Quoted 3 lines

If it's working, i don't care..I didn't see the DEFINE_RES_MEM/DEFINE_RES_IRQ. But if we can use them, it's more readable.

Yes, this should be working fine. And note, need inclusion of <linux/ioport.h> for DEFINE_RES_{MEM,IRQ}.

If any problems, please let me know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw

Should be EXYNOS4_IRQ_DWMCI instead of IRQ_DWMCI,
and use DEFINE_RES_{MEM,IRQ}.

---
 arch/arm/mach-exynos/dev-dwmci.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
arch/arm/mach-exynos/dev-dwmci.c +3 -10
index b025db4..7903501 100644
@@ -16,6 +16,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/ioport.h>
 #include <linux/mmc/dw_mmc.h>
 
 #include <plat/devs.h>
@@ -33,16 +34,8 @@ static int exynos4_dwmci_init(u32 slot_id, irq_handler_t handler, void *data)
 }
 
 static struct resource exynos4_dwmci_resource[] = {
-	[0] = {
-		.start	= EXYNOS4_PA_DWMCI,
-		.end	= EXYNOS4_PA_DWMCI + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_DWMCI,
-		.end	= IRQ_DWMCI,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = DEFINE_RES_MEM(EXYNOS4_PA_DWMCI, SZ_4K),
+	[1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_DWMCI),
 };
 
 static struct dw_mci_board exynos4_dwci_pdata = {
#5 lore raw
In reply to Kukjin Kim
Quoted 28 lines · Kukjin Kim

Jaehoon Chung wroteh:

Quoted 27 lines · Kukjin Kim
Quoted 25 lines
Quoted 16 lines · Jaehoon Chung

In dev-dwmci.c, IRQ_DWMCI is referenced.
But there is no defined anywhere.
This patch is added the missing definition for IRQ_DWMCI.

---
   arch/arm/mach-exynos/include/mach/irqs.h |    1 +
   1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/include/mach/irqs.h +0 -0
index 1161675..ed2295f 100644

arch/arm/mach-exynos/include/mach/irqs.h line 204

Quoted 4 lines
arch/arm/mach-exynos/include/mach/irqs.h +1 -0
@@ -201,6 +201,7 @@
   #define IRQ_HSMMC1            EXYNOS4_IRQ_HSMMC1
   #define IRQ_HSMMC2            EXYNOS4_IRQ_HSMMC2
   #define IRQ_HSMMC3            EXYNOS4_IRQ_HSMMC3
+#define IRQ_DWMCI            EXYNOS4_IRQ_DWMCI

Yeah, we need fix it but I have no idea need re-mapping. Just following can do it. If you're ok on following, let me pick this up.

Quoted 7 lines
Quoted 4 lines

If it's working, i don't care..I didn't see the
DEFINE_RES_MEM/DEFINE_RES_IRQ.
But if we can use them, it's more readable.

Yes, this should be working fine. And note, need inclusion of <linux/ioport.h> for DEFINE_RES_{MEM,IRQ}.

We should not require explicit inclusion of <linux/ioport.h> here. The definition of "struct resource {" and DEFINE_RES_{MEM,IRQ}" are in same ioport.h file. Hence if "struct resource {" is accessible here, "DEFINE_RES_{MEM,IRQ}" would also be accessible.

Quoted 14 lines

If any problems, please let me know.

Thanks.

Best regards,
Kgene.

Signature · 7 lines
Kukjin Kim <[email protected]>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
-- 
To unsubscribe from this list: send the line "unsubscribe
linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Tushar Behera