Skip to contentSkip to conversation

S5PV310: Define the OneNAND platform and interrupt definition

PATCH New Kyungmin Park 2 participants 3 messages Jul 28, 2010

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

PATCH 1/1 S5PV310: Define the OneNAND platform and interrupt definition

From: Kyungmin Park <[email protected]>

s5pc210(aka S5PV310) has same OneNAND controller as s5pc110.

It's against the Kukjin's latest s5pv310 tree.

---
 arch/arm/mach-s5pv310/include/mach/irqs.h |    2 ++
 arch/arm/plat-s5p/dev-onenand.c           |   19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
arch/arm/mach-s5pv310/include/mach/irqs.h +2 -0
index 56885ca..f7fb2b8 100644
@@ -66,6 +66,8 @@
 
 #define IRQ_IIC			COMBINER_IRQ(27, 0)
 
+#define IRQ_ONENAND_AUDI	COMBINER_IRQ(34, 0)
+
 /* Set the default NR_IRQS */
 #define NR_IRQS			COMBINER_IRQ(MAX_COMBINER_NR, 0)
 
arch/arm/plat-s5p/dev-onenand.c +18 -1
index 00facbe..8d191c5 100644
@@ -29,11 +29,17 @@ static struct resource s5pc110_onenand_resources[] = {
 	},
 	[1] = {
 		.start	= S5PC110_PA_ONENAND_DMA,
-		.end	= S5PC110_PA_ONENAND_DMA + SZ_2K - 1,
+		.end	= S5PC110_PA_ONENAND_DMA + SZ_8K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
+	[2] = {
+		.start	= IRQ_ONENAND_AUDI,
+		.end	= IRQ_ONENAND_AUDI,
+		.flags	= IORESOURCE_IRQ,
+	},
 };
 
+#ifdef CONFIG_ARCH_S5PV210
 struct platform_device s5pc110_device_onenand = {
 	.name		= "s5pc110-onenand",
 	.id		= -1,
@@ -50,3 +56,14 @@ void s5pc110_onenand_set_platdata(struct onenand_platform_data *pdata)
 		printk(KERN_ERR "%s: no memory for platform data\n", __func__);
 	s5pc110_device_onenand.dev.platform_data = pd;
 }
+#endif
+
+#ifdef CONFIG_ARCH_S5PV310
+/* Note that S5PC210(aka S5PV310) has same OneNAND controller as s5pc110 */
+struct platform_device s5pc210_device_onenand = {
+	.name		= "s5pc110-onenand",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(s5pc110_onenand_resources),
+	.resource	= s5pc110_onenand_resources,
+};
+#endif
Signature · 1 line
1.5.3.3
#1 lore raw

PATCH 1/1 S5PV310: Define the OneNAND platform and interrupt definition

Quoted 9 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

s5pc210(aka S5PV310) has same OneNAND controller as s5pc110.

It's against the Kukjin's latest s5pv310 tree.

---

Hmm...as I said to MyungJoo just now, it would be helpful if you could make patchset not each patch.
Because your 3 OneNAND patches are for support S5PC210 OneNAND...and there are some dependencies each other.

Review

Quoted 20 lines
 arch/arm/mach-s5pv310/include/mach/irqs.h |    2 ++
 arch/arm/plat-s5p/dev-onenand.c           |   19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pv310/include/mach/irqs.h +0 -0

s5pv310/include/mach/irqs.h
index 56885ca..f7fb2b8 100644

arch/arm/mach-s5pv310/include/mach/irqs.h +2 -0
@@ -66,6 +66,8 @@
 
 #define IRQ_IIC			COMBINER_IRQ(27, 0)
 
+#define IRQ_ONENAND_AUDI	COMBINER_IRQ(34, 0)
+
 /* Set the default NR_IRQS */
 #define NR_IRQS
 	COMBINER_IRQ(MAX_COMBINER_NR, 0)
(quoted diff) +0 -0

b/arch/arm/plat-s5p/dev-onenand.c

Quoted 4 lines

index 00facbe..8d191c5 100644

arch/arm/plat-s5p/dev-onenand.c static struct resource s5pc110_onenand_resources[] = { · line 37

Quoted 10 lines
arch/arm/plat-s5p/dev-onenand.c +4 -1
@@ -29,11 +29,17 @@ static struct resource s5pc110_onenand_resources[] = {
 	},
 	[1] = {
 		.start	= S5PC110_PA_ONENAND_DMA,
-		.end	= S5PC110_PA_ONENAND_DMA + SZ_2K - 1,
+		.end	= S5PC110_PA_ONENAND_DMA + SZ_8K - 1,
 		.flags	= IORESOURCE_MEM,
 	},
+	[2] = {
+		.start	= IRQ_ONENAND_AUDI,
+		.end	= IRQ_ONENAND_AUDI,

Hmm...according to your first patch, always compile this file in plat-s5p... But other S5P SoCs don't have IRQ_ONENAND_AUDI definition...:-(

Please make sure your patch doesn't any problem before submitting.

Quoted 9 lines
arch/arm/plat-s5p/dev-onenand.c +3 -0
+		.flags	= IORESOURCE_IRQ,
+	},
 };
 
+#ifdef CONFIG_ARCH_S5PV210
 struct platform_device s5pc110_device_onenand = {
 	.name		= "s5pc110-onenand",
 	.id		= -1,

arch/arm/plat-s5p/dev-onenand.c void s5pc110_onenand_set_platdata(struct

Quoted 9 lines
arch/arm/plat-s5p/dev-onenand.c +4 -0
@@ -50,3 +56,14 @@ void s5pc110_onenand_set_platdata(struct
 onenand_platform_data *pdata)
 		printk(KERN_ERR "%s: no memory for platform data\n",
 __func__);
 	s5pc110_device_onenand.dev.platform_data = pd;
 }
+#endif
+
+#ifdef CONFIG_ARCH_S5PV310
+/* Note that S5PC210(aka S5PV310) has same OneNAND controller as s5pc110

*/

So...why did you separate s5pc110_device_onenand and s5pc210_device_onenand...
I think just s5p_device_onenand is enough..

arch/arm/plat-s5p/dev-onenand.c void s5pc110_onenand_set_platdata(struct onenand_platform_data *pdata)

Quoted 8 lines
arch/arm/plat-s5p/dev-onenand.c +7 -1
+struct platform_device s5pc210_device_onenand = {
+	.name		= "s5pc110-onenand",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(s5pc110_onenand_resources),
+	.resource	= s5pc110_onenand_resources,
+};
+#endif
--

Hmm...I wonder that should be separated S5PC110(S5PV210) and S5PC210(S5PV310)

Thanks.

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

#2 lore raw

PATCH 1/1 S5PV310: Define the OneNAND platform and interrupt definition

Quoted 8 lines · Kukjin Kim
Quoted 7 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

s5pc210(aka S5PV310) has same OneNAND controller as s5pc110.

It's against the Kukjin's latest s5pv310 tree.

Quoted 7 lines
Quoted 2 lines

---

Hmm...as I said to MyungJoo just now, it would be helpful if you could make patchset not each patch.
Because your 3 OneNAND patches are for support S5PC210 OneNAND...and there are some dependencies each other.

No Problem, I recognized it after sent, you can find a patch build only on s5pc110 and s5pc210.

Quoted 31 lines
Quoted 20 lines

?arch/arm/mach-s5pv310/include/mach/irqs.h | ? ?2 ++ ?arch/arm/plat-s5p/dev-onenand.c ? ? ? ? ? | ? 19 ++++++++++++++++++- ?2 files changed, 20 insertions(+), 1 deletions(-)

arch/arm/mach- renamed from arch/arm/mach-s5pv310/include/mach/irqs.h +0 -0

s5pv310/include/mach/irqs.h
index 56885ca..f7fb2b8 100644

arch/arm/mach-s5pv310/include/mach/irqs.h +2 -0
@@ -66,6 +66,8 @@
 
 ?#define IRQ_IIC ? ? ? ? ? ? ? ? ? ? ?COMBINER_IRQ(27, 0)
 
+#define IRQ_ONENAND_AUDI ? ? COMBINER_IRQ(34, 0)
+

?/* Set the default NR_IRQS */
?#define NR_IRQS
? ? ? COMBINER_IRQ(MAX_COMBINER_NR, 0)

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/plat-s5p/dev-onenand.c

Quoted 9 lines

index 00facbe..8d191c5 100644

arch/arm/plat-s5p/dev-onenand.c +1 -1
@@ -29,11 +29,17 @@ static struct resource s5pc110_onenand_resources[] = {
 ? ? ? },
 ? ? ? [1] = {
 ? ? ? ? ? ? ? .start ?= S5PC110_PA_ONENAND_DMA,
- ? ? ? ? ? ? .end ? ?= S5PC110_PA_ONENAND_DMA + SZ_2K - 1,
+ ? ? ? ? ? ? .end ? ?= S5PC110_PA_ONENAND_DMA + SZ_8K - 1,
Quoted 8 lines

arch/arm/plat-s5p/dev-onenand.c static struct resource s5pc110_onenand_resources[] = { · line 37

Quoted 5 lines
arch/arm/plat-s5p/dev-onenand.c +3 -0
 ? ? ? ? ? ? ? .flags ?= IORESOURCE_MEM,
 ? ? ? },
+ ? ? [2] = {
+ ? ? ? ? ? ? .start ?= IRQ_ONENAND_AUDI,
+ ? ? ? ? ? ? .end ? ?= IRQ_ONENAND_AUDI,

Hmm...according to your first patch, always compile this file in plat-s5p... But other S5P SoCs don't have IRQ_ONENAND_AUDI definition...:-(

I will be build only on s5pc110 & s5pc210.

Quoted 23 lines

Please make sure your patch doesn't any problem before submitting.

Quoted 14 lines
arch/arm/plat-s5p/dev-onenand.c +3 -0
+ ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ,
+ ? ? },
 ?};
 
+#ifdef CONFIG_ARCH_S5PV210
 ?struct platform_device s5pc110_device_onenand = {
 ? ? ? .name ? ? ? ? ? = "s5pc110-onenand",
 ? ? ? .id ? ? ? ? ? ? = -1,
@@ -50,3 +56,14 @@ void s5pc110_onenand_set_platdata(struct
 onenand_platform_data *pdata)
 ? ? ? ? ? ? ? printk(KERN_ERR "%s: no memory for platform data\n",
 __func__);

? ? ? s5pc110_device_onenand.dev.platform_data = pd; ?}

arch/arm/plat-s5p/dev-onenand.c void s5pc110_onenand_set_platdata(struct onenand_platform_data *pdata)

Quoted 4 lines
arch/arm/plat-s5p/dev-onenand.c +4 -0
+#endif
+
+#ifdef CONFIG_ARCH_S5PV310
+/* Note that S5PC210(aka S5PV310) has same OneNAND controller as s5pc110

*/

Quoted 3 lines

So...why did you separate s5pc110_device_onenand and s5pc210_device_onenand...
I think just s5p_device_onenand is enough..

But other s5p cpu don't have it. e.g., s5p6440, s5p6410, s5pc100.

Quoted 22 lines

arch/arm/plat-s5p/dev-onenand.c

Quoted 9 lines
arch/arm/plat-s5p/dev-onenand.c +7 -1
+struct platform_device s5pc210_device_onenand = {
+ ? ? .name ? ? ? ? ? = "s5pc110-onenand",
+ ? ? .id ? ? ? ? ? ? = -1,
+ ? ? .num_resources ?= ARRAY_SIZE(s5pc110_onenand_resources),
+ ? ? .resource ? ? ? = s5pc110_onenand_resources,
+};
+#endif
--

Hmm...I wonder that should be separated S5PC110(S5PV210) and S5PC210(S5PV310)

Thanks.

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