All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window
@ 2010-08-06 17:21 Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 1/4] s3c: add support for mach-real6410 Darius Augulis
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Darius Augulis @ 2010-08-06 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

Several patches adding support for mach-real6410
and main platform devices. Please see inline patches
for detail description and changelogs.

---

Darius Augulis (4):
      s3c: add support for mach-real6410
      s3c: mach-real6410: add support for dm9000 ethernet
      s3c: mach-real6410: add sdhc device support
      s3c: mach-real6410: add nand support


 arch/arm/mach-s3c64xx/Kconfig         |   10 ++
 arch/arm/mach-s3c64xx/Makefile        |    1 
 arch/arm/mach-s3c64xx/mach-real6410.c |  193 +++++++++++++++++++++++++++++++++
 3 files changed, 204 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s3c64xx/mach-real6410.c

-- 
Signature

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/4] s3c: add support for mach-real6410
  2010-08-06 17:21 [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window Darius Augulis
@ 2010-08-06 17:22 ` Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 2/4] s3c: mach-real6410: add support for dm9000 ethernet Darius Augulis
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Darius Augulis @ 2010-08-06 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for CoreWind Real6410 board,
based on Samsung s3c6410 processor.

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
---

Changelog since v1:
 - Fixed errors reported by checkpatch.pl
 - Spaces in indentation replaced by TABs

 arch/arm/mach-s3c64xx/Kconfig         |    6 ++
 arch/arm/mach-s3c64xx/Makefile        |    1 
 arch/arm/mach-s3c64xx/mach-real6410.c |   86 +++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s3c64xx/mach-real6410.c

diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index f5a5972..0f9f2dd 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -88,6 +88,12 @@ config MACH_ANW6410
 	help
 	  Machine support for the A&W6410
 
+config MACH_REAL6410
+	bool "REAL6410"
+	select CPU_S3C6410
+	help
+	  Machine support for the CoreWind REAL6410
+
 config MACH_SMDK6410
 	bool "SMDK6410"
 	select CPU_S3C6410
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 9d10069..49dcd37 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -50,6 +50,7 @@ obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_MACH_ANW6410)	+= mach-anw6410.o
 obj-$(CONFIG_MACH_SMDK6400)	+= mach-smdk6400.o
 obj-$(CONFIG_MACH_SMDK6410)	+= mach-smdk6410.o
+obj-$(CONFIG_MACH_REAL6410)	+= mach-real6410.o
 obj-$(CONFIG_MACH_NCP)		+= mach-ncp.o
 obj-$(CONFIG_MACH_HMT)		+= mach-hmt.o
 obj-$(CONFIG_MACH_SMARTQ)	+= mach-smartq.o
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
new file mode 100644
index 0000000..937fe7d
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -0,0 +1,86 @@
+/* linux/arch/arm/mach-s3c64xx/mach-real6410.c
+ *
+ * Copyright 2010 Darius Augulis <augulis.darius@gmail.com>
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
+ *	http://armlinux.simtec.co.uk/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/init.h>
+#include <linux/serial_core.h>
+#include <linux/platform_device.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <mach/map.h>
+#include <mach/s3c6410.h>
+#include <plat/cpu.h>
+#include <plat/regs-serial.h>
+
+#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
+#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
+#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
+
+static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport	     = 0,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[1] = {
+		.hwport	     = 1,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[2] = {
+		.hwport	     = 2,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[3] = {
+		.hwport	     = 3,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+};
+
+static void __init real6410_map_io(void)
+{
+	s3c64xx_init_io(NULL, 0);
+	s3c24xx_init_clocks(12000000);
+	s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
+}
+
+static void __init real6410_machine_init(void)
+{
+}
+
+MACHINE_START(REAL6410, "REAL6410")
+	/* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
+	.phys_io	= S3C_PA_UART & 0xfff00000,
+	.io_pg_offst	= (((u32)S3C_VA_UART) >> 18) & 0xfffc,
+	.boot_params	= S3C64XX_PA_SDRAM + 0x100,
+
+	.init_irq	= s3c6410_init_irq,
+	.map_io		= real6410_map_io,
+	.init_machine	= real6410_machine_init,
+	.timer		= &s3c24xx_timer,
+MACHINE_END

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/4] s3c: mach-real6410: add support for dm9000 ethernet
  2010-08-06 17:21 [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 1/4] s3c: add support for mach-real6410 Darius Augulis
@ 2010-08-06 17:22 ` Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 3/4] s3c: mach-real6410: add sdhc device support Darius Augulis
  2010-08-06 17:23 ` [PATCH v2 4/4] s3c: mach-real6410: add nand support Darius Augulis
  3 siblings, 0 replies; 6+ messages in thread
From: Darius Augulis @ 2010-08-06 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for dm9000 etherbet chip to mach-real6410

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
---

Changelog since v1:
 - Fixed errors reported by checkpatch.pl
 - Spaces in indentation replaced by TABs

 arch/arm/mach-s3c64xx/mach-real6410.c |  103 +++++++++++++++++++++++++++------
 1 files changed, 83 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 937fe7d..d4d2190 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -17,6 +17,7 @@
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/dm9000.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <asm/mach-types.h>
@@ -24,6 +25,7 @@
 #include <asm/mach/map.h>
 #include <mach/map.h>
 #include <mach/s3c6410.h>
+#include <mach/regs-srom.h>
 #include <plat/cpu.h>
 #include <plat/regs-serial.h>
 
@@ -33,35 +35,73 @@
 
 static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = {
 	[0] = {
-		.hwport	     = 0,
-		.flags	     = 0,
-		.ucon	     = UCON,
-		.ulcon	     = ULCON,
-		.ufcon	     = UFCON,
+		.hwport	= 0,
+		.flags	= 0,
+		.ucon	= UCON,
+		.ulcon	= ULCON,
+		.ufcon	= UFCON,
 	},
 	[1] = {
-		.hwport	     = 1,
-		.flags	     = 0,
-		.ucon	     = UCON,
-		.ulcon	     = ULCON,
-		.ufcon	     = UFCON,
+		.hwport	= 1,
+		.flags	= 0,
+		.ucon	= UCON,
+		.ulcon	= ULCON,
+		.ufcon	= UFCON,
 	},
 	[2] = {
-		.hwport	     = 2,
-		.flags	     = 0,
-		.ucon	     = UCON,
-		.ulcon	     = ULCON,
-		.ufcon	     = UFCON,
+		.hwport	= 2,
+		.flags	= 0,
+		.ucon	= UCON,
+		.ulcon	= ULCON,
+		.ufcon	= UFCON,
 	},
 	[3] = {
-		.hwport	     = 3,
-		.flags	     = 0,
-		.ucon	     = UCON,
-		.ulcon	     = ULCON,
-		.ufcon	     = UFCON,
+		.hwport	= 3,
+		.flags	= 0,
+		.ucon	= UCON,
+		.ulcon	= ULCON,
+		.ufcon	= UFCON,
 	},
 };
 
+/* DM9000AEP 10/100 ethernet controller */
+
+static struct resource real6410_dm9k_resource[] = {
+	[0] = {
+		.start	= S3C64XX_PA_XM0CSN1,
+		.end	= S3C64XX_PA_XM0CSN1 + 1,
+		.flags	= IORESOURCE_MEM
+	},
+	[1] = {
+		.start	= S3C64XX_PA_XM0CSN1 + 4,
+		.end	= S3C64XX_PA_XM0CSN1 + 5,
+		.flags	= IORESOURCE_MEM
+	},
+	[2] = {
+		.start	= S3C_EINT(7),
+		.end	= S3C_EINT(7),
+		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+	}
+};
+
+static struct dm9000_plat_data real6410_dm9k_pdata = {
+	.flags		= (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM),
+};
+
+static struct platform_device real6410_device_eth = {
+	.name		= "dm9000",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(real6410_dm9k_resource),
+	.resource	= real6410_dm9k_resource,
+	.dev		= {
+		.platform_data	= &real6410_dm9k_pdata,
+	},
+};
+
+static struct platform_device *real6410_devices[] __initdata = {
+	&real6410_device_eth,
+};
+
 static void __init real6410_map_io(void)
 {
 	s3c64xx_init_io(NULL, 0);
@@ -71,6 +111,29 @@ static void __init real6410_map_io(void)
 
 static void __init real6410_machine_init(void)
 {
+	u32 cs1;
+
+	/* configure nCS1 width to 16 bits */
+
+	cs1 = __raw_readl(S3C64XX_SROM_BW) &
+		~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
+	cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
+		(1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
+		(1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
+			S3C64XX_SROM_BW__NCS1__SHIFT;
+	__raw_writel(cs1, S3C64XX_SROM_BW);
+
+	/* set timing for nCS1 suitable for ethernet chip */
+
+	__raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
+		(6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
+		(4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
+		(1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
+		(13 << S3C64XX_SROM_BCX__TACC__SHIFT) |
+		(4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
+		(0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);
+
+	platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices));
 }
 
 MACHINE_START(REAL6410, "REAL6410")

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/4] s3c: mach-real6410: add sdhc device support
  2010-08-06 17:21 [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 1/4] s3c: add support for mach-real6410 Darius Augulis
  2010-08-06 17:22 ` [PATCH v2 2/4] s3c: mach-real6410: add support for dm9000 ethernet Darius Augulis
@ 2010-08-06 17:22 ` Darius Augulis
  2010-08-06 17:23 ` [PATCH v2 4/4] s3c: mach-real6410: add nand support Darius Augulis
  3 siblings, 0 replies; 6+ messages in thread
From: Darius Augulis @ 2010-08-06 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for hsmmc0 and hsmmc1 devices support to mach-real6410

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
---

Changelog since v1:
 - Fixed errors reported by checkpatch.pl
 - Spaces in indentation replaced by TABs

 arch/arm/mach-s3c64xx/Kconfig         |    3 +++
 arch/arm/mach-s3c64xx/mach-real6410.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 0f9f2dd..f5c77e5 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -91,6 +91,9 @@ config MACH_ANW6410
 config MACH_REAL6410
 	bool "REAL6410"
 	select CPU_S3C6410
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C64XX_SETUP_SDHCI
 	help
 	  Machine support for the CoreWind REAL6410
 
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index d4d2190..bd52605 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -27,6 +27,7 @@
 #include <mach/s3c6410.h>
 #include <mach/regs-srom.h>
 #include <plat/cpu.h>
+#include <plat/devs.h>
 #include <plat/regs-serial.h>
 
 #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
@@ -100,6 +101,8 @@ static struct platform_device real6410_device_eth = {
 
 static struct platform_device *real6410_devices[] __initdata = {
 	&real6410_device_eth,
+	&s3c_device_hsmmc0,
+	&s3c_device_hsmmc1,
 };
 
 static void __init real6410_map_io(void)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] s3c: mach-real6410: add nand support
  2010-08-06 17:21 [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window Darius Augulis
                   ` (2 preceding siblings ...)
  2010-08-06 17:22 ` [PATCH v2 3/4] s3c: mach-real6410: add sdhc device support Darius Augulis
@ 2010-08-06 17:23 ` Darius Augulis
  2010-08-15 10:04   ` Darius Augulis
  3 siblings, 1 reply; 6+ messages in thread
From: Darius Augulis @ 2010-08-06 17:23 UTC (permalink / raw)
  To: linux-arm-kernel

Add nand device support and mtd partition table
for mach-real6410

Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
---

Changelog since v1:
 - Fixed errors reported by checkpatch.pl
 - Spaces in indentation replaced by TABs

 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |   41 +++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index f5c77e5..7ac93ce 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -93,6 +93,7 @@ config MACH_REAL6410
 	select CPU_S3C6410
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
+	select S3C_DEV_NAND
 	select S3C64XX_SETUP_SDHCI
 	help
 	  Machine support for the CoreWind REAL6410
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index bd52605..7eafb23 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -18,6 +18,8 @@
 #include <linux/list.h>
 #include <linux/init.h>
 #include <linux/dm9000.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <asm/mach-types.h>
@@ -28,6 +30,7 @@
 #include <mach/regs-srom.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
+#include <plat/nand.h>
 #include <plat/regs-serial.h>
 
 #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
@@ -99,10 +102,46 @@ static struct platform_device real6410_device_eth = {
 	},
 };
 
+static struct mtd_partition real6410_nand_part[] = {
+	[0] = {
+		.name	= "uboot",
+		.size	= SZ_1M,
+		.offset	= 0,
+	},
+	[1] = {
+		.name	= "kernel",
+		.size	= SZ_2M,
+		.offset	= SZ_1M,
+	},
+	[2] = {
+		.name	= "rootfs",
+		.size	= MTDPART_SIZ_FULL,
+		.offset	= SZ_1M + SZ_2M,
+	},
+};
+
+static struct s3c2410_nand_set real6410_nand_sets[] = {
+	[0] = {
+		.name		= "nand",
+		.nr_chips	= 1,
+		.nr_partitions	= ARRAY_SIZE(real6410_nand_part),
+		.partitions	= real6410_nand_part,
+	},
+};
+
+static struct s3c2410_platform_nand real6410_nand_info = {
+	.tacls		= 25,
+	.twrph0		= 55,
+	.twrph1		= 40,
+	.nr_sets	= ARRAY_SIZE(real6410_nand_sets),
+	.sets		= real6410_nand_sets,
+};
+
 static struct platform_device *real6410_devices[] __initdata = {
 	&real6410_device_eth,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc1,
+	&s3c_device_nand,
 };
 
 static void __init real6410_map_io(void)
@@ -116,6 +155,8 @@ static void __init real6410_machine_init(void)
 {
 	u32 cs1;
 
+	s3c_nand_set_platdata(&real6410_nand_info);
+
 	/* configure nCS1 width to 16 bits */
 
 	cs1 = __raw_readl(S3C64XX_SROM_BW) &

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] s3c: mach-real6410: add nand support
  2010-08-06 17:23 ` [PATCH v2 4/4] s3c: mach-real6410: add nand support Darius Augulis
@ 2010-08-15 10:04   ` Darius Augulis
  0 siblings, 0 replies; 6+ messages in thread
From: Darius Augulis @ 2010-08-15 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/06/2010 08:23 PM, Darius Augulis wrote:
> Add nand device support and mtd partition table
> for mach-real6410

Ben, I see other three patches are merged, how about this one?
There where no comments in mailing list, is it ready or not?

>
> Signed-off-by: Darius Augulis<augulis.darius@gmail.com>
> ---
>
> Changelog since v1:
>   - Fixed errors reported by checkpatch.pl
>   - Spaces in indentation replaced by TABs
>
>   arch/arm/mach-s3c64xx/Kconfig         |    1 +
>   arch/arm/mach-s3c64xx/mach-real6410.c |   41 +++++++++++++++++++++++++++++++++
>   2 files changed, 42 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
> index f5c77e5..7ac93ce 100644
> --- a/arch/arm/mach-s3c64xx/Kconfig
> +++ b/arch/arm/mach-s3c64xx/Kconfig
> @@ -93,6 +93,7 @@ config MACH_REAL6410
>   	select CPU_S3C6410
>   	select S3C_DEV_HSMMC
>   	select S3C_DEV_HSMMC1
> +	select S3C_DEV_NAND
>   	select S3C64XX_SETUP_SDHCI
>   	help
>   	  Machine support for the CoreWind REAL6410
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index bd52605..7eafb23 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -18,6 +18,8 @@
>   #include<linux/list.h>
>   #include<linux/init.h>
>   #include<linux/dm9000.h>
> +#include<linux/mtd/mtd.h>
> +#include<linux/mtd/partitions.h>
>   #include<linux/serial_core.h>
>   #include<linux/platform_device.h>
>   #include<asm/mach-types.h>
> @@ -28,6 +30,7 @@
>   #include<mach/regs-srom.h>
>   #include<plat/cpu.h>
>   #include<plat/devs.h>
> +#include<plat/nand.h>
>   #include<plat/regs-serial.h>
>
>   #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
> @@ -99,10 +102,46 @@ static struct platform_device real6410_device_eth = {
>   	},
>   };
>
> +static struct mtd_partition real6410_nand_part[] = {
> +	[0] = {
> +		.name	= "uboot",
> +		.size	= SZ_1M,
> +		.offset	= 0,
> +	},
> +	[1] = {
> +		.name	= "kernel",
> +		.size	= SZ_2M,
> +		.offset	= SZ_1M,
> +	},
> +	[2] = {
> +		.name	= "rootfs",
> +		.size	= MTDPART_SIZ_FULL,
> +		.offset	= SZ_1M + SZ_2M,
> +	},
> +};
> +
> +static struct s3c2410_nand_set real6410_nand_sets[] = {
> +	[0] = {
> +		.name		= "nand",
> +		.nr_chips	= 1,
> +		.nr_partitions	= ARRAY_SIZE(real6410_nand_part),
> +		.partitions	= real6410_nand_part,
> +	},
> +};
> +
> +static struct s3c2410_platform_nand real6410_nand_info = {
> +	.tacls		= 25,
> +	.twrph0		= 55,
> +	.twrph1		= 40,
> +	.nr_sets	= ARRAY_SIZE(real6410_nand_sets),
> +	.sets		= real6410_nand_sets,
> +};
> +
>   static struct platform_device *real6410_devices[] __initdata = {
>   	&real6410_device_eth,
>   	&s3c_device_hsmmc0,
>   	&s3c_device_hsmmc1,
> +	&s3c_device_nand,
>   };
>
>   static void __init real6410_map_io(void)
> @@ -116,6 +155,8 @@ static void __init real6410_machine_init(void)
>   {
>   	u32 cs1;
>
> +	s3c_nand_set_platdata(&real6410_nand_info);
> +
>   	/* configure nCS1 width to 16 bits */
>
>   	cs1 = __raw_readl(S3C64XX_SROM_BW)&

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-15 10:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-06 17:21 [PATCH v2 0/4] s3c: mach-real6410: patches for next merge window Darius Augulis
2010-08-06 17:22 ` [PATCH v2 1/4] s3c: add support for mach-real6410 Darius Augulis
2010-08-06 17:22 ` [PATCH v2 2/4] s3c: mach-real6410: add support for dm9000 ethernet Darius Augulis
2010-08-06 17:22 ` [PATCH v2 3/4] s3c: mach-real6410: add sdhc device support Darius Augulis
2010-08-06 17:23 ` [PATCH v2 4/4] s3c: mach-real6410: add nand support Darius Augulis
2010-08-15 10:04   ` Darius Augulis

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.