diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 16:34:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 16:34:00 -0400 |
commit | 1810b6cb162e0c19e0ecbbacbcfd66f578f335ec (patch) | |
tree | 810494ca945483bf669a062d445d49d3bfb7d6a7 /arch/arm/mach-s3c2410/common-smdk.c | |
parent | ef7a4567dc542d8cc563755478464ea928fede41 (diff) | |
parent | 9b6553cd01ce3ea7a6a532f7b7e62e3535d6b102 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (27 commits)
[ARM] 3433/1: ARM: OMAP: 8/8 Update board files
[ARM] 3455/1: ARM: OMAP: 7/8 Misc updates, take 2
[ARM] 3454/1: ARM: OMAP: 6/8 Update framebuffer low-level init code, take 2
[ARM] 3430/1: ARM: OMAP: 5/8 Update PM
[ARM] 3429/1: ARM: OMAP: 4/8 Update GPIO
[ARM] 3428/1: ARM: OMAP: 3/8 Update pin multiplexing
[ARM] 3427/1: ARM: OMAP: 2/8 Update timers
[ARM] 3426/1: ARM: OMAP: 1/8 Update clock framework
[ARM] 3396/2: AT91RM9200 Platform devices update
[ARM] 3395/2: AT91RM9200 Dataflash Card vs MMC selection
[ARM] 3393/2: AT91RM9200 LED support
[ARM] 3453/1: Poodle: Correctly set the memory size
[ARM] 3446/1: i.MX: MMC/SD SDHC controller registration for i.MX/MX1 MX1ADS board
[ARM] 3444/1: i.MX: Scatter-gather DMA emulation for i.MX/MX1
[ARM] 3451/1: ep93xx: use the m48t86 rtc driver on the ts72xx platform
[ARM] 3450/1: ep93xx: use the ep93xx rtc driver
[ARM] 3452/1: [S3C2410] RX3715 - add nand information
[ARM] 3449/1: [S3C2410] Anubis - fix NAND timings
[ARM] 3448/1: [S3C2410] Settle delay when _enabling_ USB PLL
[ARM] 3442/1: [S3C2410] SMDK: NAND device setup
...
Diffstat (limited to 'arch/arm/mach-s3c2410/common-smdk.c')
-rw-r--r-- | arch/arm/mach-s3c2410/common-smdk.c | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/common-smdk.c b/arch/arm/mach-s3c2410/common-smdk.c new file mode 100644 index 000000000000..36b8291b5e03 --- /dev/null +++ b/arch/arm/mach-s3c2410/common-smdk.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/common-smdk.c | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Common code for SMDK2410 and SMDK2440 boards | ||
7 | * | ||
8 | * http://www.fluff.org/ben/smdk2440/ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/list.h> | ||
19 | #include <linux/timer.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | |||
23 | #include <linux/mtd/mtd.h> | ||
24 | #include <linux/mtd/nand.h> | ||
25 | #include <linux/mtd/nand_ecc.h> | ||
26 | #include <linux/mtd/partitions.h> | ||
27 | |||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <asm/mach/irq.h> | ||
31 | |||
32 | #include <asm/hardware.h> | ||
33 | #include <asm/io.h> | ||
34 | #include <asm/irq.h> | ||
35 | |||
36 | #include <asm/arch/regs-gpio.h> | ||
37 | |||
38 | #include <asm/arch/nand.h> | ||
39 | |||
40 | #include "devs.h" | ||
41 | #include "pm.h" | ||
42 | |||
43 | /* NAND parititon from 2.4.18-swl5 */ | ||
44 | |||
45 | static struct mtd_partition smdk_default_nand_part[] = { | ||
46 | [0] = { | ||
47 | .name = "Boot Agent", | ||
48 | .size = SZ_16K, | ||
49 | .offset = 0, | ||
50 | }, | ||
51 | [1] = { | ||
52 | .name = "S3C2410 flash parition 1", | ||
53 | .offset = 0, | ||
54 | .size = SZ_2M, | ||
55 | }, | ||
56 | [2] = { | ||
57 | .name = "S3C2410 flash partition 2", | ||
58 | .offset = SZ_4M, | ||
59 | .size = SZ_4M, | ||
60 | }, | ||
61 | [3] = { | ||
62 | .name = "S3C2410 flash partition 3", | ||
63 | .offset = SZ_8M, | ||
64 | .size = SZ_2M, | ||
65 | }, | ||
66 | [4] = { | ||
67 | .name = "S3C2410 flash partition 4", | ||
68 | .offset = SZ_1M * 10, | ||
69 | .size = SZ_4M, | ||
70 | }, | ||
71 | [5] = { | ||
72 | .name = "S3C2410 flash partition 5", | ||
73 | .offset = SZ_1M * 14, | ||
74 | .size = SZ_1M * 10, | ||
75 | }, | ||
76 | [6] = { | ||
77 | .name = "S3C2410 flash partition 6", | ||
78 | .offset = SZ_1M * 24, | ||
79 | .size = SZ_1M * 24, | ||
80 | }, | ||
81 | [7] = { | ||
82 | .name = "S3C2410 flash partition 7", | ||
83 | .offset = SZ_1M * 48, | ||
84 | .size = SZ_16M, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct s3c2410_nand_set smdk_nand_sets[] = { | ||
89 | [0] = { | ||
90 | .name = "NAND", | ||
91 | .nr_chips = 1, | ||
92 | .nr_partitions = ARRAY_SIZE(smdk_default_nand_part), | ||
93 | .partitions = smdk_default_nand_part, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | /* choose a set of timings which should suit most 512Mbit | ||
98 | * chips and beyond. | ||
99 | */ | ||
100 | |||
101 | static struct s3c2410_platform_nand smdk_nand_info = { | ||
102 | .tacls = 20, | ||
103 | .twrph0 = 60, | ||
104 | .twrph1 = 20, | ||
105 | .nr_sets = ARRAY_SIZE(smdk_nand_sets), | ||
106 | .sets = smdk_nand_sets, | ||
107 | }; | ||
108 | |||
109 | /* devices we initialise */ | ||
110 | |||
111 | static struct platform_device __initdata *smdk_devs[] = { | ||
112 | &s3c_device_nand, | ||
113 | }; | ||
114 | |||
115 | void __init smdk_machine_init(void) | ||
116 | { | ||
117 | /* Configure the LEDs (even if we have no LED support)*/ | ||
118 | |||
119 | s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP); | ||
120 | s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP); | ||
121 | s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP); | ||
122 | s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP); | ||
123 | |||
124 | s3c2410_gpio_setpin(S3C2410_GPF4, 1); | ||
125 | s3c2410_gpio_setpin(S3C2410_GPF5, 1); | ||
126 | s3c2410_gpio_setpin(S3C2410_GPF6, 1); | ||
127 | s3c2410_gpio_setpin(S3C2410_GPF7, 1); | ||
128 | |||
129 | s3c_device_nand.dev.platform_data = &smdk_nand_info; | ||
130 | |||
131 | platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs)); | ||
132 | |||
133 | s3c2410_pm_init(); | ||
134 | } | ||