aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 135508040907..bdb10c29ef18 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -11,6 +11,7 @@
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/mtd/physmap.h> 13#include <linux/mtd/physmap.h>
14#include <linux/mtd/onenand.h>
14#include <linux/delay.h> 15#include <linux/delay.h>
15#include <linux/clk.h> 16#include <linux/clk.h>
16#include <linux/gpio.h> 17#include <linux/gpio.h>
@@ -62,6 +63,21 @@ static struct platform_device kfr2r09_nor_flash_device = {
62 }, 63 },
63}; 64};
64 65
66static struct resource kfr2r09_nand_flash_resources[] = {
67 [0] = {
68 .name = "NAND Flash",
69 .start = 0x10000000,
70 .end = 0x1001ffff,
71 .flags = IORESOURCE_MEM,
72 }
73};
74
75static struct platform_device kfr2r09_nand_flash_device = {
76 .name = "onenand-flash",
77 .resource = kfr2r09_nand_flash_resources,
78 .num_resources = ARRAY_SIZE(kfr2r09_nand_flash_resources),
79};
80
65static struct sh_keysc_info kfr2r09_sh_keysc_info = { 81static struct sh_keysc_info kfr2r09_sh_keysc_info = {
66 .mode = SH_KEYSC_MODE_1, /* KEYOUT0->4, KEYIN0->4 */ 82 .mode = SH_KEYSC_MODE_1, /* KEYOUT0->4, KEYIN0->4 */
67 .scan_timing = 3, 83 .scan_timing = 3,
@@ -161,12 +177,15 @@ static struct platform_device kfr2r09_sh_lcdc_device = {
161 177
162static struct platform_device *kfr2r09_devices[] __initdata = { 178static struct platform_device *kfr2r09_devices[] __initdata = {
163 &kfr2r09_nor_flash_device, 179 &kfr2r09_nor_flash_device,
180 &kfr2r09_nand_flash_device,
164 &kfr2r09_sh_keysc_device, 181 &kfr2r09_sh_keysc_device,
165 &kfr2r09_sh_lcdc_device, 182 &kfr2r09_sh_lcdc_device,
166}; 183};
167 184
168#define BSC_CS0BCR 0xfec10004 185#define BSC_CS0BCR 0xfec10004
169#define BSC_CS0WCR 0xfec10024 186#define BSC_CS0WCR 0xfec10024
187#define BSC_CS4BCR 0xfec10010
188#define BSC_CS4WCR 0xfec10030
170 189
171static int __init kfr2r09_devices_setup(void) 190static int __init kfr2r09_devices_setup(void)
172{ 191{
@@ -178,6 +197,10 @@ static int __init kfr2r09_devices_setup(void)
178 ctrl_outl(0x36db0400, BSC_CS0BCR); 197 ctrl_outl(0x36db0400, BSC_CS0BCR);
179 ctrl_outl(0x00000500, BSC_CS0WCR); 198 ctrl_outl(0x00000500, BSC_CS0WCR);
180 199
200 /* setup NAND flash at CS4 */
201 ctrl_outl(0x36db0400, BSC_CS4BCR);
202 ctrl_outl(0x00000500, BSC_CS4WCR);
203
181 /* setup KEYSC pins */ 204 /* setup KEYSC pins */
182 gpio_request(GPIO_FN_KEYOUT0, NULL); 205 gpio_request(GPIO_FN_KEYOUT0, NULL);
183 gpio_request(GPIO_FN_KEYOUT1, NULL); 206 gpio_request(GPIO_FN_KEYOUT1, NULL);