diff options
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-mini6410.c | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index bbeb4cae4650..3bbd2045da55 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -105,6 +105,7 @@ config MACH_MINI6410 | |||
105 | select S3C_DEV_HSMMC1 | 105 | select S3C_DEV_HSMMC1 |
106 | select S3C64XX_SETUP_SDHCI | 106 | select S3C64XX_SETUP_SDHCI |
107 | select S3C_DEV_USB_HOST | 107 | select S3C_DEV_USB_HOST |
108 | select S3C_DEV_NAND | ||
108 | help | 109 | help |
109 | Machine support for the FriendlyARM MINI6410 | 110 | Machine support for the FriendlyARM MINI6410 |
110 | 111 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 397012564528..d079ecf23500 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/dm9000.h> | 20 | #include <linux/dm9000.h> |
21 | #include <linux/mtd/mtd.h> | ||
22 | #include <linux/mtd/partitions.h> | ||
21 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
22 | #include <linux/types.h> | 24 | #include <linux/types.h> |
23 | 25 | ||
@@ -32,6 +34,7 @@ | |||
32 | 34 | ||
33 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
34 | #include <plat/devs.h> | 36 | #include <plat/devs.h> |
37 | #include <plat/nand.h> | ||
35 | #include <plat/regs-serial.h> | 38 | #include <plat/regs-serial.h> |
36 | 39 | ||
37 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 40 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
@@ -103,11 +106,47 @@ static struct platform_device mini6410_device_eth = { | |||
103 | }, | 106 | }, |
104 | }; | 107 | }; |
105 | 108 | ||
109 | static struct mtd_partition mini6410_nand_part[] = { | ||
110 | [0] = { | ||
111 | .name = "uboot", | ||
112 | .size = SZ_1M, | ||
113 | .offset = 0, | ||
114 | }, | ||
115 | [1] = { | ||
116 | .name = "kernel", | ||
117 | .size = SZ_2M, | ||
118 | .offset = SZ_1M, | ||
119 | }, | ||
120 | [2] = { | ||
121 | .name = "rootfs", | ||
122 | .size = MTDPART_SIZ_FULL, | ||
123 | .offset = SZ_1M + SZ_2M, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | static struct s3c2410_nand_set mini6410_nand_sets[] = { | ||
128 | [0] = { | ||
129 | .name = "nand", | ||
130 | .nr_chips = 1, | ||
131 | .nr_partitions = ARRAY_SIZE(mini6410_nand_part), | ||
132 | .partitions = mini6410_nand_part, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static struct s3c2410_platform_nand mini6410_nand_info = { | ||
137 | .tacls = 25, | ||
138 | .twrph0 = 55, | ||
139 | .twrph1 = 40, | ||
140 | .nr_sets = ARRAY_SIZE(mini6410_nand_sets), | ||
141 | .sets = mini6410_nand_sets, | ||
142 | }; | ||
143 | |||
106 | static struct platform_device *mini6410_devices[] __initdata = { | 144 | static struct platform_device *mini6410_devices[] __initdata = { |
107 | &mini6410_device_eth, | 145 | &mini6410_device_eth, |
108 | &s3c_device_hsmmc0, | 146 | &s3c_device_hsmmc0, |
109 | &s3c_device_hsmmc1, | 147 | &s3c_device_hsmmc1, |
110 | &s3c_device_ohci, | 148 | &s3c_device_ohci, |
149 | &s3c_device_nand, | ||
111 | }; | 150 | }; |
112 | 151 | ||
113 | static void __init mini6410_map_io(void) | 152 | static void __init mini6410_map_io(void) |
@@ -121,6 +160,8 @@ static void __init mini6410_machine_init(void) | |||
121 | { | 160 | { |
122 | u32 cs1; | 161 | u32 cs1; |
123 | 162 | ||
163 | s3c_nand_set_platdata(&mini6410_nand_info); | ||
164 | |||
124 | /* configure nCS1 width to 16 bits */ | 165 | /* configure nCS1 width to 16 bits */ |
125 | 166 | ||
126 | cs1 = __raw_readl(S3C64XX_SROM_BW) & | 167 | cs1 = __raw_readl(S3C64XX_SROM_BW) & |