diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-qt2410.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-vstms.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-anubis.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-at2440evb.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx3715.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/nand.h | 50 | ||||
-rw-r--r-- | arch/arm/plat-s3c/include/plat/regs-nand.h | 123 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/common-smdk.c | 2 |
11 files changed, 182 insertions, 9 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 8da05f9e7bb4..c04c24444e0d 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <mach/regs-mem.h> | 44 | #include <mach/regs-mem.h> |
45 | #include <mach/regs-lcd.h> | 45 | #include <mach/regs-lcd.h> |
46 | 46 | ||
47 | #include <asm/plat-s3c/nand.h> | 47 | #include <plat/nand.h> |
48 | #include <plat/iic.h> | 48 | #include <plat/iic.h> |
49 | #include <mach/fb.h> | 49 | #include <mach/fb.h> |
50 | 50 | ||
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index 661807e14e8a..315c27271f18 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <mach/leds-gpio.h> | 50 | #include <mach/leds-gpio.h> |
51 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
52 | #include <mach/fb.h> | 52 | #include <mach/fb.h> |
53 | #include <asm/plat-s3c/nand.h> | 53 | #include <plat/nand.h> |
54 | #include <asm/plat-s3c24xx/udc.h> | 54 | #include <asm/plat-s3c24xx/udc.h> |
55 | #include <mach/spi.h> | 55 | #include <mach/spi.h> |
56 | #include <mach/spi-gpio.h> | 56 | #include <mach/spi-gpio.h> |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 80208d37756d..c8d9a346b3bf 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/mach/irq.h> | 31 | #include <asm/mach/irq.h> |
32 | 32 | ||
33 | #include <plat/regs-serial.h> | 33 | #include <plat/regs-serial.h> |
34 | #include <asm/plat-s3c/nand.h> | 34 | #include <plat/nand.h> |
35 | #include <plat/iic.h> | 35 | #include <plat/iic.h> |
36 | 36 | ||
37 | #include <mach/regs-power.h> | 37 | #include <mach/regs-power.h> |
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c index 4cfa19ad9be0..da32a6cb17ae 100644 --- a/arch/arm/mach-s3c2412/mach-vstms.c +++ b/arch/arm/mach-s3c2412/mach-vstms.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <mach/idle.h> | 39 | #include <mach/idle.h> |
40 | #include <mach/fb.h> | 40 | #include <mach/fb.h> |
41 | 41 | ||
42 | #include <asm/plat-s3c/nand.h> | 42 | #include <plat/nand.h> |
43 | 43 | ||
44 | #include <plat/s3c2410.h> | 44 | #include <plat/s3c2410.h> |
45 | #include <plat/s3c2412.h> | 45 | #include <plat/s3c2412.h> |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index e2beca470484..334379bdfc6e 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <mach/regs-gpio.h> | 39 | #include <mach/regs-gpio.h> |
40 | #include <mach/regs-mem.h> | 40 | #include <mach/regs-mem.h> |
41 | #include <mach/regs-lcd.h> | 41 | #include <mach/regs-lcd.h> |
42 | #include <asm/plat-s3c/nand.h> | 42 | #include <plat/nand.h> |
43 | 43 | ||
44 | #include <linux/mtd/mtd.h> | 44 | #include <linux/mtd/mtd.h> |
45 | #include <linux/mtd/nand.h> | 45 | #include <linux/mtd/nand.h> |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index 66876c6f2f1c..07b42a0207d1 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <mach/regs-gpio.h> | 35 | #include <mach/regs-gpio.h> |
36 | #include <mach/regs-mem.h> | 36 | #include <mach/regs-mem.h> |
37 | #include <mach/regs-lcd.h> | 37 | #include <mach/regs-lcd.h> |
38 | #include <asm/plat-s3c/nand.h> | 38 | #include <plat/nand.h> |
39 | 39 | ||
40 | #include <linux/mtd/mtd.h> | 40 | #include <linux/mtd/mtd.h> |
41 | #include <linux/mtd/nand.h> | 41 | #include <linux/mtd/nand.h> |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 2361d606abc5..884a3c7ae75f 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <mach/regs-gpio.h> | 37 | #include <mach/regs-gpio.h> |
38 | #include <mach/regs-mem.h> | 38 | #include <mach/regs-mem.h> |
39 | #include <mach/regs-lcd.h> | 39 | #include <mach/regs-lcd.h> |
40 | #include <asm/plat-s3c/nand.h> | 40 | #include <plat/nand.h> |
41 | 41 | ||
42 | #include <linux/mtd/mtd.h> | 42 | #include <linux/mtd/mtd.h> |
43 | #include <linux/mtd/nand.h> | 43 | #include <linux/mtd/nand.h> |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 4d14c7cff892..fbd081de592f 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <mach/regs-lcd.h> | 42 | #include <mach/regs-lcd.h> |
43 | 43 | ||
44 | #include <mach/h1940.h> | 44 | #include <mach/h1940.h> |
45 | #include <asm/plat-s3c/nand.h> | 45 | #include <plat/nand.h> |
46 | #include <mach/fb.h> | 46 | #include <mach/fb.h> |
47 | 47 | ||
48 | #include <plat/clock.h> | 48 | #include <plat/clock.h> |
diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h new file mode 100644 index 000000000000..f4dcd14af059 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/nand.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/nand.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 - NAND device controller platfrom_device info | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /* struct s3c2410_nand_set | ||
14 | * | ||
15 | * define an set of one or more nand chips registered with an unique mtd | ||
16 | * | ||
17 | * nr_chips = number of chips in this set | ||
18 | * nr_partitions = number of partitions pointed to be partitoons (or zero) | ||
19 | * name = name of set (optional) | ||
20 | * nr_map = map for low-layer logical to physical chip numbers (option) | ||
21 | * partitions = mtd partition list | ||
22 | */ | ||
23 | |||
24 | struct s3c2410_nand_set { | ||
25 | unsigned int disable_ecc : 1; | ||
26 | |||
27 | int nr_chips; | ||
28 | int nr_partitions; | ||
29 | char *name; | ||
30 | int *nr_map; | ||
31 | struct mtd_partition *partitions; | ||
32 | struct nand_ecclayout *ecc_layout; | ||
33 | }; | ||
34 | |||
35 | struct s3c2410_platform_nand { | ||
36 | /* timing information for controller, all times in nanoseconds */ | ||
37 | |||
38 | int tacls; /* time for active CLE/ALE to nWE/nOE */ | ||
39 | int twrph0; /* active time for nWE/nOE */ | ||
40 | int twrph1; /* time for release CLE/ALE from nWE/nOE inactive */ | ||
41 | |||
42 | unsigned int ignore_unset_ecc : 1; | ||
43 | |||
44 | int nr_sets; | ||
45 | struct s3c2410_nand_set *sets; | ||
46 | |||
47 | void (*select_chip)(struct s3c2410_nand_set *, | ||
48 | int chip); | ||
49 | }; | ||
50 | |||
diff --git a/arch/arm/plat-s3c/include/plat/regs-nand.h b/arch/arm/plat-s3c/include/plat/regs-nand.h new file mode 100644 index 000000000000..b2caa4bca270 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/regs-nand.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/regs-nand.h | ||
2 | * | ||
3 | * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * S3C2410 NAND register definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARM_REGS_NAND | ||
14 | #define __ASM_ARM_REGS_NAND | ||
15 | |||
16 | |||
17 | #define S3C2410_NFREG(x) (x) | ||
18 | |||
19 | #define S3C2410_NFCONF S3C2410_NFREG(0x00) | ||
20 | #define S3C2410_NFCMD S3C2410_NFREG(0x04) | ||
21 | #define S3C2410_NFADDR S3C2410_NFREG(0x08) | ||
22 | #define S3C2410_NFDATA S3C2410_NFREG(0x0C) | ||
23 | #define S3C2410_NFSTAT S3C2410_NFREG(0x10) | ||
24 | #define S3C2410_NFECC S3C2410_NFREG(0x14) | ||
25 | |||
26 | #define S3C2440_NFCONT S3C2410_NFREG(0x04) | ||
27 | #define S3C2440_NFCMD S3C2410_NFREG(0x08) | ||
28 | #define S3C2440_NFADDR S3C2410_NFREG(0x0C) | ||
29 | #define S3C2440_NFDATA S3C2410_NFREG(0x10) | ||
30 | #define S3C2440_NFECCD0 S3C2410_NFREG(0x14) | ||
31 | #define S3C2440_NFECCD1 S3C2410_NFREG(0x18) | ||
32 | #define S3C2440_NFECCD S3C2410_NFREG(0x1C) | ||
33 | #define S3C2440_NFSTAT S3C2410_NFREG(0x20) | ||
34 | #define S3C2440_NFESTAT0 S3C2410_NFREG(0x24) | ||
35 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | ||
36 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | ||
37 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | ||
38 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) | ||
39 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | ||
40 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | ||
41 | |||
42 | #define S3C2412_NFSBLK S3C2410_NFREG(0x20) | ||
43 | #define S3C2412_NFEBLK S3C2410_NFREG(0x24) | ||
44 | #define S3C2412_NFSTAT S3C2410_NFREG(0x28) | ||
45 | #define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C) | ||
46 | #define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30) | ||
47 | #define S3C2412_NFMECC0 S3C2410_NFREG(0x34) | ||
48 | #define S3C2412_NFMECC1 S3C2410_NFREG(0x38) | ||
49 | #define S3C2412_NFSECC S3C2410_NFREG(0x3C) | ||
50 | |||
51 | #define S3C2410_NFCONF_EN (1<<15) | ||
52 | #define S3C2410_NFCONF_512BYTE (1<<14) | ||
53 | #define S3C2410_NFCONF_4STEP (1<<13) | ||
54 | #define S3C2410_NFCONF_INITECC (1<<12) | ||
55 | #define S3C2410_NFCONF_nFCE (1<<11) | ||
56 | #define S3C2410_NFCONF_TACLS(x) ((x)<<8) | ||
57 | #define S3C2410_NFCONF_TWRPH0(x) ((x)<<4) | ||
58 | #define S3C2410_NFCONF_TWRPH1(x) ((x)<<0) | ||
59 | |||
60 | #define S3C2410_NFSTAT_BUSY (1<<0) | ||
61 | |||
62 | #define S3C2440_NFCONF_BUSWIDTH_8 (0<<0) | ||
63 | #define S3C2440_NFCONF_BUSWIDTH_16 (1<<0) | ||
64 | #define S3C2440_NFCONF_ADVFLASH (1<<3) | ||
65 | #define S3C2440_NFCONF_TACLS(x) ((x)<<12) | ||
66 | #define S3C2440_NFCONF_TWRPH0(x) ((x)<<8) | ||
67 | #define S3C2440_NFCONF_TWRPH1(x) ((x)<<4) | ||
68 | |||
69 | #define S3C2440_NFCONT_LOCKTIGHT (1<<13) | ||
70 | #define S3C2440_NFCONT_SOFTLOCK (1<<12) | ||
71 | #define S3C2440_NFCONT_ILLEGALACC_EN (1<<10) | ||
72 | #define S3C2440_NFCONT_RNBINT_EN (1<<9) | ||
73 | #define S3C2440_NFCONT_RN_FALLING (1<<8) | ||
74 | #define S3C2440_NFCONT_SPARE_ECCLOCK (1<<6) | ||
75 | #define S3C2440_NFCONT_MAIN_ECCLOCK (1<<5) | ||
76 | #define S3C2440_NFCONT_INITECC (1<<4) | ||
77 | #define S3C2440_NFCONT_nFCE (1<<1) | ||
78 | #define S3C2440_NFCONT_ENABLE (1<<0) | ||
79 | |||
80 | #define S3C2440_NFSTAT_READY (1<<0) | ||
81 | #define S3C2440_NFSTAT_nCE (1<<1) | ||
82 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) | ||
83 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) | ||
84 | |||
85 | #define S3C2412_NFCONF_NANDBOOT (1<<31) | ||
86 | #define S3C2412_NFCONF_ECCCLKCON (1<<30) | ||
87 | #define S3C2412_NFCONF_ECC_MLC (1<<24) | ||
88 | #define S3C2412_NFCONF_TACLS_MASK (7<<12) /* 1 extra bit of Tacls */ | ||
89 | |||
90 | #define S3C2412_NFCONT_ECC4_DIRWR (1<<18) | ||
91 | #define S3C2412_NFCONT_LOCKTIGHT (1<<17) | ||
92 | #define S3C2412_NFCONT_SOFTLOCK (1<<16) | ||
93 | #define S3C2412_NFCONT_ECC4_ENCINT (1<<13) | ||
94 | #define S3C2412_NFCONT_ECC4_DECINT (1<<12) | ||
95 | #define S3C2412_NFCONT_MAIN_ECC_LOCK (1<<7) | ||
96 | #define S3C2412_NFCONT_INIT_MAIN_ECC (1<<5) | ||
97 | #define S3C2412_NFCONT_nFCE1 (1<<2) | ||
98 | #define S3C2412_NFCONT_nFCE0 (1<<1) | ||
99 | |||
100 | #define S3C2412_NFSTAT_ECC_ENCDONE (1<<7) | ||
101 | #define S3C2412_NFSTAT_ECC_DECDONE (1<<6) | ||
102 | #define S3C2412_NFSTAT_ILLEGAL_ACCESS (1<<5) | ||
103 | #define S3C2412_NFSTAT_RnB_CHANGE (1<<4) | ||
104 | #define S3C2412_NFSTAT_nFCE1 (1<<3) | ||
105 | #define S3C2412_NFSTAT_nFCE0 (1<<2) | ||
106 | #define S3C2412_NFSTAT_Res1 (1<<1) | ||
107 | #define S3C2412_NFSTAT_READY (1<<0) | ||
108 | |||
109 | #define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf) | ||
110 | #define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7) | ||
111 | #define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff) | ||
112 | #define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7) | ||
113 | #define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3) | ||
114 | #define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3) | ||
115 | #define S3C2412_NFECCERR_NONE (0) | ||
116 | #define S3C2412_NFECCERR_1BIT (1) | ||
117 | #define S3C2412_NFECCERR_MULTIBIT (2) | ||
118 | #define S3C2412_NFECCERR_ECCAREA (3) | ||
119 | |||
120 | |||
121 | |||
122 | #endif /* __ASM_ARM_REGS_NAND */ | ||
123 | |||
diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c index 3098736c65d9..3d4837021ac7 100644 --- a/arch/arm/plat-s3c24xx/common-smdk.c +++ b/arch/arm/plat-s3c24xx/common-smdk.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
39 | #include <mach/leds-gpio.h> | 39 | #include <mach/leds-gpio.h> |
40 | 40 | ||
41 | #include <asm/plat-s3c/nand.h> | 41 | #include <plat/nand.h> |
42 | 42 | ||
43 | #include <plat/common-smdk.h> | 43 | #include <plat/common-smdk.h> |
44 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |