diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-05 05:35:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-05 05:35:33 -0500 |
commit | 0719dc341389882cc834ed18fc9b7fc6006b2b85 (patch) | |
tree | 794480ac62c07ea8cc4e69c2cb3d2b83bb7f36b7 /arch/arm/mach-mmp | |
parent | e28edb723e64200554194da17617ee6e82de6690 (diff) | |
parent | 677f4f64e4b2336682f0e15c69b206ade6f6b131 (diff) |
Merge branch 'devel-stable' into devel
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 39 | ||||
-rw-r--r-- | arch/arm/mach-mmp/clock.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mmp/clock.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/irqs.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/pxa168.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/include/mach/pxa910.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-mmp/pxa910.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mmp/ttc_dkb.c | 87 |
9 files changed, 168 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 4562452d4074..a2d307ec0420 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/smc91x.h> | 15 | #include <linux/smc91x.h> |
16 | #include <linux/mtd/mtd.h> | ||
17 | #include <linux/mtd/partitions.h> | ||
18 | #include <linux/mtd/nand.h> | ||
16 | 19 | ||
17 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
@@ -85,12 +88,48 @@ static struct platform_device smc91x_device = { | |||
85 | .resource = smc91x_resources, | 88 | .resource = smc91x_resources, |
86 | }; | 89 | }; |
87 | 90 | ||
91 | static struct mtd_partition aspenite_nand_partitions[] = { | ||
92 | { | ||
93 | .name = "bootloader", | ||
94 | .offset = 0, | ||
95 | .size = SZ_1M, | ||
96 | .mask_flags = MTD_WRITEABLE, | ||
97 | }, { | ||
98 | .name = "reserved", | ||
99 | .offset = MTDPART_OFS_APPEND, | ||
100 | .size = SZ_128K, | ||
101 | .mask_flags = MTD_WRITEABLE, | ||
102 | }, { | ||
103 | .name = "reserved", | ||
104 | .offset = MTDPART_OFS_APPEND, | ||
105 | .size = SZ_8M, | ||
106 | .mask_flags = MTD_WRITEABLE, | ||
107 | }, { | ||
108 | .name = "kernel", | ||
109 | .offset = MTDPART_OFS_APPEND, | ||
110 | .size = (SZ_2M + SZ_1M), | ||
111 | .mask_flags = 0, | ||
112 | }, { | ||
113 | .name = "filesystem", | ||
114 | .offset = MTDPART_OFS_APPEND, | ||
115 | .size = SZ_48M, | ||
116 | .mask_flags = 0, | ||
117 | } | ||
118 | }; | ||
119 | |||
120 | static struct pxa3xx_nand_platform_data aspenite_nand_info = { | ||
121 | .enable_arbiter = 1, | ||
122 | .parts = aspenite_nand_partitions, | ||
123 | .nr_parts = ARRAY_SIZE(aspenite_nand_partitions), | ||
124 | }; | ||
125 | |||
88 | static void __init common_init(void) | 126 | static void __init common_init(void) |
89 | { | 127 | { |
90 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); | 128 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); |
91 | 129 | ||
92 | /* on-chip devices */ | 130 | /* on-chip devices */ |
93 | pxa168_add_uart(1); | 131 | pxa168_add_uart(1); |
132 | pxa168_add_nand(&aspenite_nand_info); | ||
94 | 133 | ||
95 | /* off-chip devices */ | 134 | /* off-chip devices */ |
96 | platform_device_register(&smc91x_device); | 135 | platform_device_register(&smc91x_device); |
diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c index 2d9cc5a7122f..2a46ed5cc2a2 100644 --- a/arch/arm/mach-mmp/clock.c +++ b/arch/arm/mach-mmp/clock.c | |||
@@ -34,6 +34,21 @@ struct clkops apbc_clk_ops = { | |||
34 | .disable = apbc_clk_disable, | 34 | .disable = apbc_clk_disable, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static void apmu_clk_enable(struct clk *clk) | ||
38 | { | ||
39 | __raw_writel(clk->enable_val, clk->clk_rst); | ||
40 | } | ||
41 | |||
42 | static void apmu_clk_disable(struct clk *clk) | ||
43 | { | ||
44 | __raw_writel(0, clk->clk_rst); | ||
45 | } | ||
46 | |||
47 | struct clkops apmu_clk_ops = { | ||
48 | .enable = apmu_clk_enable, | ||
49 | .disable = apmu_clk_disable, | ||
50 | }; | ||
51 | |||
37 | static DEFINE_SPINLOCK(clocks_lock); | 52 | static DEFINE_SPINLOCK(clocks_lock); |
38 | 53 | ||
39 | int clk_enable(struct clk *clk) | 54 | int clk_enable(struct clk *clk) |
diff --git a/arch/arm/mach-mmp/clock.h b/arch/arm/mach-mmp/clock.h index ed967e78e6a8..eefffbe683b0 100644 --- a/arch/arm/mach-mmp/clock.h +++ b/arch/arm/mach-mmp/clock.h | |||
@@ -25,6 +25,7 @@ struct clk { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern struct clkops apbc_clk_ops; | 27 | extern struct clkops apbc_clk_ops; |
28 | extern struct clkops apmu_clk_ops; | ||
28 | 29 | ||
29 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ | 30 | #define APBC_CLK(_name, _reg, _fnclksel, _rate) \ |
30 | struct clk clk_##_name = { \ | 31 | struct clk clk_##_name = { \ |
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h index 16295cfd5e29..d68871b0f28c 100644 --- a/arch/arm/mach-mmp/include/mach/irqs.h +++ b/arch/arm/mach-mmp/include/mach/irqs.h | |||
@@ -31,7 +31,9 @@ | |||
31 | #define IRQ_PXA168_DDR_INT 26 | 31 | #define IRQ_PXA168_DDR_INT 26 |
32 | #define IRQ_PXA168_UART1 27 | 32 | #define IRQ_PXA168_UART1 27 |
33 | #define IRQ_PXA168_UART2 28 | 33 | #define IRQ_PXA168_UART2 28 |
34 | #define IRQ_PXA168_UART3 29 | ||
34 | #define IRQ_PXA168_WDT 35 | 35 | #define IRQ_PXA168_WDT 35 |
36 | #define IRQ_PXA168_MAIN_PMU 36 | ||
35 | #define IRQ_PXA168_FRQ_CHANGE 38 | 37 | #define IRQ_PXA168_FRQ_CHANGE 38 |
36 | #define IRQ_PXA168_SDH1 39 | 38 | #define IRQ_PXA168_SDH1 39 |
37 | #define IRQ_PXA168_SDH2 40 | 39 | #define IRQ_PXA168_SDH2 40 |
@@ -46,7 +48,7 @@ | |||
46 | #define IRQ_PXA168_USB2 51 | 48 | #define IRQ_PXA168_USB2 51 |
47 | #define IRQ_PXA168_AC97 57 | 49 | #define IRQ_PXA168_AC97 57 |
48 | #define IRQ_PXA168_TWSI1 58 | 50 | #define IRQ_PXA168_TWSI1 58 |
49 | #define IRQ_PXA168_PMU 60 | 51 | #define IRQ_PXA168_AP_PMU 60 |
50 | #define IRQ_PXA168_SM_INT 63 | 52 | #define IRQ_PXA168_SM_INT 63 |
51 | 53 | ||
52 | /* | 54 | /* |
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h index 6bf1f0eefcd1..3ad612cbdf09 100644 --- a/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/arch/arm/mach-mmp/include/mach/pxa168.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/i2c.h> | 4 | #include <linux/i2c.h> |
5 | #include <mach/devices.h> | 5 | #include <mach/devices.h> |
6 | #include <plat/i2c.h> | 6 | #include <plat/i2c.h> |
7 | #include <plat/pxa3xx_nand.h> | ||
7 | 8 | ||
8 | extern struct pxa_device_desc pxa168_device_uart1; | 9 | extern struct pxa_device_desc pxa168_device_uart1; |
9 | extern struct pxa_device_desc pxa168_device_uart2; | 10 | extern struct pxa_device_desc pxa168_device_uart2; |
@@ -13,6 +14,7 @@ extern struct pxa_device_desc pxa168_device_pwm1; | |||
13 | extern struct pxa_device_desc pxa168_device_pwm2; | 14 | extern struct pxa_device_desc pxa168_device_pwm2; |
14 | extern struct pxa_device_desc pxa168_device_pwm3; | 15 | extern struct pxa_device_desc pxa168_device_pwm3; |
15 | extern struct pxa_device_desc pxa168_device_pwm4; | 16 | extern struct pxa_device_desc pxa168_device_pwm4; |
17 | extern struct pxa_device_desc pxa168_device_nand; | ||
16 | 18 | ||
17 | static inline int pxa168_add_uart(int id) | 19 | static inline int pxa168_add_uart(int id) |
18 | { | 20 | { |
@@ -64,4 +66,9 @@ static inline int pxa168_add_pwm(int id) | |||
64 | 66 | ||
65 | return pxa_register_device(d, NULL, 0); | 67 | return pxa_register_device(d, NULL, 0); |
66 | } | 68 | } |
69 | |||
70 | static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info) | ||
71 | { | ||
72 | return pxa_register_device(&pxa168_device_nand, info, sizeof(*info)); | ||
73 | } | ||
67 | #endif /* __ASM_MACH_PXA168_H */ | 74 | #endif /* __ASM_MACH_PXA168_H */ |
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h index 6ae1ed7a0a9f..4f0b4ec6f5d0 100644 --- a/arch/arm/mach-mmp/include/mach/pxa910.h +++ b/arch/arm/mach-mmp/include/mach/pxa910.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/i2c.h> | 4 | #include <linux/i2c.h> |
5 | #include <mach/devices.h> | 5 | #include <mach/devices.h> |
6 | #include <plat/i2c.h> | 6 | #include <plat/i2c.h> |
7 | #include <plat/pxa3xx_nand.h> | ||
7 | 8 | ||
8 | extern struct pxa_device_desc pxa910_device_uart1; | 9 | extern struct pxa_device_desc pxa910_device_uart1; |
9 | extern struct pxa_device_desc pxa910_device_uart2; | 10 | extern struct pxa_device_desc pxa910_device_uart2; |
@@ -13,6 +14,7 @@ extern struct pxa_device_desc pxa910_device_pwm1; | |||
13 | extern struct pxa_device_desc pxa910_device_pwm2; | 14 | extern struct pxa_device_desc pxa910_device_pwm2; |
14 | extern struct pxa_device_desc pxa910_device_pwm3; | 15 | extern struct pxa_device_desc pxa910_device_pwm3; |
15 | extern struct pxa_device_desc pxa910_device_pwm4; | 16 | extern struct pxa_device_desc pxa910_device_pwm4; |
17 | extern struct pxa_device_desc pxa910_device_nand; | ||
16 | 18 | ||
17 | static inline int pxa910_add_uart(int id) | 19 | static inline int pxa910_add_uart(int id) |
18 | { | 20 | { |
@@ -64,4 +66,9 @@ static inline int pxa910_add_pwm(int id) | |||
64 | 66 | ||
65 | return pxa_register_device(d, NULL, 0); | 67 | return pxa_register_device(d, NULL, 0); |
66 | } | 68 | } |
69 | |||
70 | static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info) | ||
71 | { | ||
72 | return pxa_register_device(&pxa910_device_nand, info, sizeof(*info)); | ||
73 | } | ||
67 | #endif /* __ASM_MACH_PXA910_H */ | 74 | #endif /* __ASM_MACH_PXA910_H */ |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 71b1ae338753..37dbdde17fac 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <mach/addr-map.h> | 19 | #include <mach/addr-map.h> |
20 | #include <mach/cputype.h> | 20 | #include <mach/cputype.h> |
21 | #include <mach/regs-apbc.h> | 21 | #include <mach/regs-apbc.h> |
22 | #include <mach/regs-apmu.h> | ||
22 | #include <mach/irqs.h> | 23 | #include <mach/irqs.h> |
23 | #include <mach/gpio.h> | 24 | #include <mach/gpio.h> |
24 | #include <mach/dma.h> | 25 | #include <mach/dma.h> |
@@ -72,6 +73,8 @@ static APBC_CLK(pwm2, PXA168_PWM2, 1, 13000000); | |||
72 | static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000); | 73 | static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000); |
73 | static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000); | 74 | static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000); |
74 | 75 | ||
76 | static APMU_CLK(nand, NAND, 0x01db, 208000000); | ||
77 | |||
75 | /* device and clock bindings */ | 78 | /* device and clock bindings */ |
76 | static struct clk_lookup pxa168_clkregs[] = { | 79 | static struct clk_lookup pxa168_clkregs[] = { |
77 | INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), | 80 | INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), |
@@ -82,6 +85,7 @@ static struct clk_lookup pxa168_clkregs[] = { | |||
82 | INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL), | 85 | INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL), |
83 | INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL), | 86 | INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL), |
84 | INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL), | 87 | INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL), |
88 | INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), | ||
85 | }; | 89 | }; |
86 | 90 | ||
87 | static int __init pxa168_init(void) | 91 | static int __init pxa168_init(void) |
@@ -127,3 +131,4 @@ PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10); | |||
127 | PXA168_DEVICE(pwm2, "pxa168-pwm", 1, NONE, 0xd401a400, 0x10); | 131 | PXA168_DEVICE(pwm2, "pxa168-pwm", 1, NONE, 0xd401a400, 0x10); |
128 | PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10); | 132 | PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10); |
129 | PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10); | 133 | PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10); |
134 | PXA168_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99); | ||
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c index 5882ca6b49fb..d4049508a4df 100644 --- a/arch/arm/mach-mmp/pxa910.c +++ b/arch/arm/mach-mmp/pxa910.c | |||
@@ -110,6 +110,8 @@ static APBC_CLK(pwm2, PXA910_PWM2, 1, 13000000); | |||
110 | static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000); | 110 | static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000); |
111 | static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000); | 111 | static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000); |
112 | 112 | ||
113 | static APMU_CLK(nand, NAND, 0x01db, 208000000); | ||
114 | |||
113 | /* device and clock bindings */ | 115 | /* device and clock bindings */ |
114 | static struct clk_lookup pxa910_clkregs[] = { | 116 | static struct clk_lookup pxa910_clkregs[] = { |
115 | INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), | 117 | INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), |
@@ -120,6 +122,7 @@ static struct clk_lookup pxa910_clkregs[] = { | |||
120 | INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL), | 122 | INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL), |
121 | INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL), | 123 | INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL), |
122 | INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL), | 124 | INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL), |
125 | INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL), | ||
123 | }; | 126 | }; |
124 | 127 | ||
125 | static int __init pxa910_init(void) | 128 | static int __init pxa910_init(void) |
@@ -174,3 +177,4 @@ PXA910_DEVICE(pwm1, "pxa910-pwm", 0, NONE, 0xd401a000, 0x10); | |||
174 | PXA910_DEVICE(pwm2, "pxa910-pwm", 1, NONE, 0xd401a400, 0x10); | 177 | PXA910_DEVICE(pwm2, "pxa910-pwm", 1, NONE, 0xd401a400, 0x10); |
175 | PXA910_DEVICE(pwm3, "pxa910-pwm", 2, NONE, 0xd401a800, 0x10); | 178 | PXA910_DEVICE(pwm3, "pxa910-pwm", 2, NONE, 0xd401a800, 0x10); |
176 | PXA910_DEVICE(pwm4, "pxa910-pwm", 3, NONE, 0xd401ac00, 0x10); | 179 | PXA910_DEVICE(pwm4, "pxa910-pwm", 3, NONE, 0xd401ac00, 0x10); |
180 | PXA910_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99); | ||
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 08cfef6c92a2..8f49b2b12608 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c | |||
@@ -11,9 +11,13 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/mtd.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/mtd/onenand.h> | ||
14 | 17 | ||
15 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
16 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/flash.h> | ||
17 | #include <mach/addr-map.h> | 21 | #include <mach/addr-map.h> |
18 | #include <mach/mfp-pxa910.h> | 22 | #include <mach/mfp-pxa910.h> |
19 | #include <mach/pxa910.h> | 23 | #include <mach/pxa910.h> |
@@ -26,6 +30,86 @@ static unsigned long ttc_dkb_pin_config[] __initdata = { | |||
26 | /* UART2 */ | 30 | /* UART2 */ |
27 | GPIO47_UART2_RXD, | 31 | GPIO47_UART2_RXD, |
28 | GPIO48_UART2_TXD, | 32 | GPIO48_UART2_TXD, |
33 | |||
34 | /* DFI */ | ||
35 | DF_IO0_ND_IO0, | ||
36 | DF_IO1_ND_IO1, | ||
37 | DF_IO2_ND_IO2, | ||
38 | DF_IO3_ND_IO3, | ||
39 | DF_IO4_ND_IO4, | ||
40 | DF_IO5_ND_IO5, | ||
41 | DF_IO6_ND_IO6, | ||
42 | DF_IO7_ND_IO7, | ||
43 | DF_IO8_ND_IO8, | ||
44 | DF_IO9_ND_IO9, | ||
45 | DF_IO10_ND_IO10, | ||
46 | DF_IO11_ND_IO11, | ||
47 | DF_IO12_ND_IO12, | ||
48 | DF_IO13_ND_IO13, | ||
49 | DF_IO14_ND_IO14, | ||
50 | DF_IO15_ND_IO15, | ||
51 | DF_nCS0_SM_nCS2_nCS0, | ||
52 | DF_ALE_SM_WEn_ND_ALE, | ||
53 | DF_CLE_SM_OEn_ND_CLE, | ||
54 | DF_WEn_DF_WEn, | ||
55 | DF_REn_DF_REn, | ||
56 | DF_RDY0_DF_RDY0, | ||
57 | }; | ||
58 | |||
59 | static struct mtd_partition ttc_dkb_onenand_partitions[] = { | ||
60 | { | ||
61 | .name = "bootloader", | ||
62 | .offset = 0, | ||
63 | .size = SZ_1M, | ||
64 | .mask_flags = MTD_WRITEABLE, | ||
65 | }, { | ||
66 | .name = "reserved", | ||
67 | .offset = MTDPART_OFS_APPEND, | ||
68 | .size = SZ_128K, | ||
69 | .mask_flags = MTD_WRITEABLE, | ||
70 | }, { | ||
71 | .name = "reserved", | ||
72 | .offset = MTDPART_OFS_APPEND, | ||
73 | .size = SZ_8M, | ||
74 | .mask_flags = MTD_WRITEABLE, | ||
75 | }, { | ||
76 | .name = "kernel", | ||
77 | .offset = MTDPART_OFS_APPEND, | ||
78 | .size = (SZ_2M + SZ_1M), | ||
79 | .mask_flags = 0, | ||
80 | }, { | ||
81 | .name = "filesystem", | ||
82 | .offset = MTDPART_OFS_APPEND, | ||
83 | .size = SZ_48M, | ||
84 | .mask_flags = 0, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct onenand_platform_data ttc_dkb_onenand_info = { | ||
89 | .parts = ttc_dkb_onenand_partitions, | ||
90 | .nr_parts = ARRAY_SIZE(ttc_dkb_onenand_partitions), | ||
91 | }; | ||
92 | |||
93 | static struct resource ttc_dkb_resource_onenand[] = { | ||
94 | [0] = { | ||
95 | .start = SMC_CS0_PHYS_BASE, | ||
96 | .end = SMC_CS0_PHYS_BASE + SZ_1M, | ||
97 | .flags = IORESOURCE_MEM, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static struct platform_device ttc_dkb_device_onenand = { | ||
102 | .name = "onenand-flash", | ||
103 | .id = -1, | ||
104 | .resource = ttc_dkb_resource_onenand, | ||
105 | .num_resources = ARRAY_SIZE(ttc_dkb_resource_onenand), | ||
106 | .dev = { | ||
107 | .platform_data = &ttc_dkb_onenand_info, | ||
108 | }, | ||
109 | }; | ||
110 | |||
111 | static struct platform_device *ttc_dkb_devices[] = { | ||
112 | &ttc_dkb_device_onenand, | ||
29 | }; | 113 | }; |
30 | 114 | ||
31 | static void __init ttc_dkb_init(void) | 115 | static void __init ttc_dkb_init(void) |
@@ -34,6 +118,9 @@ static void __init ttc_dkb_init(void) | |||
34 | 118 | ||
35 | /* on-chip devices */ | 119 | /* on-chip devices */ |
36 | pxa910_add_uart(1); | 120 | pxa910_add_uart(1); |
121 | |||
122 | /* off-chip devices */ | ||
123 | platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); | ||
37 | } | 124 | } |
38 | 125 | ||
39 | MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") | 126 | MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") |