Commit 53ee7700351cc3ef06b71f8c31b1d21398888048
Committed by
Olof Johansson
1 parent
96754a1f86
ARM: clps711x: Rename board files to match functionality
Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Olof Johansson <olof@lixom.net>
Showing 13 changed files with 874 additions and 874 deletions Side-by-side Diff
- arch/arm/mach-clps711x/Makefile
- arch/arm/mach-clps711x/autcpu12.c
- arch/arm/mach-clps711x/board-autcpu12.c
- arch/arm/mach-clps711x/board-cdb89712.c
- arch/arm/mach-clps711x/board-clep7312.c
- arch/arm/mach-clps711x/board-edb7211.c
- arch/arm/mach-clps711x/board-fortunet.c
- arch/arm/mach-clps711x/board-p720t.c
- arch/arm/mach-clps711x/cdb89712.c
- arch/arm/mach-clps711x/clep7312.c
- arch/arm/mach-clps711x/edb7211.c
- arch/arm/mach-clps711x/fortunet.c
- arch/arm/mach-clps711x/p720t.c
arch/arm/mach-clps711x/Makefile
... | ... | @@ -9,10 +9,10 @@ |
9 | 9 | obj-n := |
10 | 10 | obj- := |
11 | 11 | |
12 | -obj-$(CONFIG_ARCH_AUTCPU12) += autcpu12.o | |
13 | -obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o | |
14 | -obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o | |
15 | -obj-$(CONFIG_ARCH_EDB7211) += edb7211.o | |
16 | -obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o | |
17 | -obj-$(CONFIG_ARCH_P720T) += p720t.o | |
12 | +obj-$(CONFIG_ARCH_AUTCPU12) += board-autcpu12.o | |
13 | +obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o | |
14 | +obj-$(CONFIG_ARCH_CLEP7312) += board-clep7312.o | |
15 | +obj-$(CONFIG_ARCH_EDB7211) += board-edb7211.o | |
16 | +obj-$(CONFIG_ARCH_FORTUNET) += board-fortunet.o | |
17 | +obj-$(CONFIG_ARCH_P720T) += board-p720t.o |
arch/arm/mach-clps711x/autcpu12.c
1 | -/* | |
2 | - * linux/arch/arm/mach-clps711x/autcpu12.c | |
3 | - * | |
4 | - * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | |
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 as published by | |
8 | - * the Free Software Foundation; either version 2 of the License, or | |
9 | - * (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | - */ | |
20 | -#include <linux/kernel.h> | |
21 | -#include <linux/init.h> | |
22 | -#include <linux/types.h> | |
23 | -#include <linux/string.h> | |
24 | -#include <linux/mm.h> | |
25 | -#include <linux/io.h> | |
26 | -#include <linux/gpio.h> | |
27 | -#include <linux/ioport.h> | |
28 | -#include <linux/interrupt.h> | |
29 | -#include <linux/mtd/partitions.h> | |
30 | -#include <linux/mtd/nand-gpio.h> | |
31 | -#include <linux/platform_device.h> | |
32 | -#include <linux/basic_mmio_gpio.h> | |
33 | - | |
34 | -#include <mach/hardware.h> | |
35 | -#include <asm/sizes.h> | |
36 | -#include <asm/setup.h> | |
37 | -#include <asm/mach-types.h> | |
38 | -#include <asm/mach/arch.h> | |
39 | -#include <asm/pgtable.h> | |
40 | -#include <asm/page.h> | |
41 | - | |
42 | -#include <asm/mach/map.h> | |
43 | -#include <mach/autcpu12.h> | |
44 | - | |
45 | -#include "common.h" | |
46 | - | |
47 | -#define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
48 | -#define AUTCPU12_CS8900_IRQ (IRQ_EINT3) | |
49 | - | |
50 | -#define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) | |
51 | -#define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) | |
52 | - | |
53 | -#define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) | |
54 | -#define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ | |
55 | -#define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) | |
56 | -#define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) | |
57 | -#define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) | |
58 | - | |
59 | -static struct resource autcpu12_cs8900_resource[] __initdata = { | |
60 | - DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), | |
61 | - DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), | |
62 | -}; | |
63 | - | |
64 | -static struct resource autcpu12_nvram_resource[] __initdata = { | |
65 | - DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | |
66 | -}; | |
67 | - | |
68 | -static struct platform_device autcpu12_nvram_pdev __initdata = { | |
69 | - .name = "autcpu12_nvram", | |
70 | - .id = -1, | |
71 | - .resource = autcpu12_nvram_resource, | |
72 | - .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | |
73 | -}; | |
74 | - | |
75 | -static struct resource autcpu12_nand_resource[] __initdata = { | |
76 | - DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16), | |
77 | -}; | |
78 | - | |
79 | -static struct mtd_partition autcpu12_nand_parts[] __initdata = { | |
80 | - { | |
81 | - .name = "Flash partition 1", | |
82 | - .offset = 0, | |
83 | - .size = SZ_8M, | |
84 | - }, | |
85 | - { | |
86 | - .name = "Flash partition 2", | |
87 | - .offset = MTDPART_OFS_APPEND, | |
88 | - .size = MTDPART_SIZ_FULL, | |
89 | - }, | |
90 | -}; | |
91 | - | |
92 | -static void __init autcpu12_adjust_parts(struct gpio_nand_platdata *pdata, | |
93 | - size_t sz) | |
94 | -{ | |
95 | - switch (sz) { | |
96 | - case SZ_16M: | |
97 | - case SZ_32M: | |
98 | - break; | |
99 | - case SZ_64M: | |
100 | - case SZ_128M: | |
101 | - pdata->parts[0].size = SZ_16M; | |
102 | - break; | |
103 | - default: | |
104 | - pr_warn("Unsupported SmartMedia device size %u\n", sz); | |
105 | - break; | |
106 | - } | |
107 | -} | |
108 | - | |
109 | -static struct gpio_nand_platdata autcpu12_nand_pdata __initdata = { | |
110 | - .gpio_rdy = AUTCPU12_SMC_RDY, | |
111 | - .gpio_nce = AUTCPU12_SMC_NCE, | |
112 | - .gpio_ale = AUTCPU12_SMC_ALE, | |
113 | - .gpio_cle = AUTCPU12_SMC_CLE, | |
114 | - .gpio_nwp = -1, | |
115 | - .chip_delay = 20, | |
116 | - .parts = autcpu12_nand_parts, | |
117 | - .num_parts = ARRAY_SIZE(autcpu12_nand_parts), | |
118 | - .adjust_parts = autcpu12_adjust_parts, | |
119 | -}; | |
120 | - | |
121 | -static struct platform_device autcpu12_nand_pdev __initdata = { | |
122 | - .name = "gpio-nand", | |
123 | - .id = -1, | |
124 | - .resource = autcpu12_nand_resource, | |
125 | - .num_resources = ARRAY_SIZE(autcpu12_nand_resource), | |
126 | - .dev = { | |
127 | - .platform_data = &autcpu12_nand_pdata, | |
128 | - }, | |
129 | -}; | |
130 | - | |
131 | -static struct resource autcpu12_mmgpio_resource[] __initdata = { | |
132 | - DEFINE_RES_MEM_NAMED(AUTCPU12_SMC_SEL_BASE, SZ_1, "dat"), | |
133 | -}; | |
134 | - | |
135 | -static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = { | |
136 | - .base = AUTCPU12_MMGPIO_BASE, | |
137 | - .ngpio = 8, | |
138 | -}; | |
139 | - | |
140 | -static struct platform_device autcpu12_mmgpio_pdev __initdata = { | |
141 | - .name = "basic-mmio-gpio", | |
142 | - .id = -1, | |
143 | - .resource = autcpu12_mmgpio_resource, | |
144 | - .num_resources = ARRAY_SIZE(autcpu12_mmgpio_resource), | |
145 | - .dev = { | |
146 | - .platform_data = &autcpu12_mmgpio_pdata, | |
147 | - }, | |
148 | -}; | |
149 | - | |
150 | -static void __init autcpu12_init(void) | |
151 | -{ | |
152 | - platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
153 | - platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, | |
154 | - ARRAY_SIZE(autcpu12_cs8900_resource)); | |
155 | - platform_device_register(&autcpu12_mmgpio_pdev); | |
156 | - platform_device_register(&autcpu12_nvram_pdev); | |
157 | -} | |
158 | - | |
159 | -static void __init autcpu12_init_late(void) | |
160 | -{ | |
161 | - if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { | |
162 | - /* We are need both drivers to handle NAND */ | |
163 | - platform_device_register(&autcpu12_nand_pdev); | |
164 | - } | |
165 | -} | |
166 | - | |
167 | -MACHINE_START(AUTCPU12, "autronix autcpu12") | |
168 | - /* Maintainer: Thomas Gleixner */ | |
169 | - .atag_offset = 0x20000, | |
170 | - .nr_irqs = CLPS711X_NR_IRQS, | |
171 | - .map_io = clps711x_map_io, | |
172 | - .init_irq = clps711x_init_irq, | |
173 | - .timer = &clps711x_timer, | |
174 | - .init_machine = autcpu12_init, | |
175 | - .init_late = autcpu12_init_late, | |
176 | - .handle_irq = clps711x_handle_irq, | |
177 | - .restart = clps711x_restart, | |
178 | -MACHINE_END |
arch/arm/mach-clps711x/board-autcpu12.c
1 | +/* | |
2 | + * linux/arch/arm/mach-clps711x/autcpu12.c | |
3 | + * | |
4 | + * (c) 2001 Thomas Gleixner, autronix automation <gleixner@autronix.de> | |
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 as published by | |
8 | + * the Free Software Foundation; either version 2 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | + */ | |
20 | +#include <linux/kernel.h> | |
21 | +#include <linux/init.h> | |
22 | +#include <linux/types.h> | |
23 | +#include <linux/string.h> | |
24 | +#include <linux/mm.h> | |
25 | +#include <linux/io.h> | |
26 | +#include <linux/gpio.h> | |
27 | +#include <linux/ioport.h> | |
28 | +#include <linux/interrupt.h> | |
29 | +#include <linux/mtd/partitions.h> | |
30 | +#include <linux/mtd/nand-gpio.h> | |
31 | +#include <linux/platform_device.h> | |
32 | +#include <linux/basic_mmio_gpio.h> | |
33 | + | |
34 | +#include <mach/hardware.h> | |
35 | +#include <asm/sizes.h> | |
36 | +#include <asm/setup.h> | |
37 | +#include <asm/mach-types.h> | |
38 | +#include <asm/mach/arch.h> | |
39 | +#include <asm/pgtable.h> | |
40 | +#include <asm/page.h> | |
41 | + | |
42 | +#include <asm/mach/map.h> | |
43 | +#include <mach/autcpu12.h> | |
44 | + | |
45 | +#include "common.h" | |
46 | + | |
47 | +#define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
48 | +#define AUTCPU12_CS8900_IRQ (IRQ_EINT3) | |
49 | + | |
50 | +#define AUTCPU12_SMC_BASE (CS1_PHYS_BASE + 0x06000000) | |
51 | +#define AUTCPU12_SMC_SEL_BASE (AUTCPU12_SMC_BASE + 0x10) | |
52 | + | |
53 | +#define AUTCPU12_MMGPIO_BASE (CLPS711X_NR_GPIO) | |
54 | +#define AUTCPU12_SMC_NCE (AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */ | |
55 | +#define AUTCPU12_SMC_RDY CLPS711X_GPIO(1, 2) | |
56 | +#define AUTCPU12_SMC_ALE CLPS711X_GPIO(1, 3) | |
57 | +#define AUTCPU12_SMC_CLE CLPS711X_GPIO(1, 3) | |
58 | + | |
59 | +static struct resource autcpu12_cs8900_resource[] __initdata = { | |
60 | + DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), | |
61 | + DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), | |
62 | +}; | |
63 | + | |
64 | +static struct resource autcpu12_nvram_resource[] __initdata = { | |
65 | + DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), | |
66 | +}; | |
67 | + | |
68 | +static struct platform_device autcpu12_nvram_pdev __initdata = { | |
69 | + .name = "autcpu12_nvram", | |
70 | + .id = -1, | |
71 | + .resource = autcpu12_nvram_resource, | |
72 | + .num_resources = ARRAY_SIZE(autcpu12_nvram_resource), | |
73 | +}; | |
74 | + | |
75 | +static struct resource autcpu12_nand_resource[] __initdata = { | |
76 | + DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16), | |
77 | +}; | |
78 | + | |
79 | +static struct mtd_partition autcpu12_nand_parts[] __initdata = { | |
80 | + { | |
81 | + .name = "Flash partition 1", | |
82 | + .offset = 0, | |
83 | + .size = SZ_8M, | |
84 | + }, | |
85 | + { | |
86 | + .name = "Flash partition 2", | |
87 | + .offset = MTDPART_OFS_APPEND, | |
88 | + .size = MTDPART_SIZ_FULL, | |
89 | + }, | |
90 | +}; | |
91 | + | |
92 | +static void __init autcpu12_adjust_parts(struct gpio_nand_platdata *pdata, | |
93 | + size_t sz) | |
94 | +{ | |
95 | + switch (sz) { | |
96 | + case SZ_16M: | |
97 | + case SZ_32M: | |
98 | + break; | |
99 | + case SZ_64M: | |
100 | + case SZ_128M: | |
101 | + pdata->parts[0].size = SZ_16M; | |
102 | + break; | |
103 | + default: | |
104 | + pr_warn("Unsupported SmartMedia device size %u\n", sz); | |
105 | + break; | |
106 | + } | |
107 | +} | |
108 | + | |
109 | +static struct gpio_nand_platdata autcpu12_nand_pdata __initdata = { | |
110 | + .gpio_rdy = AUTCPU12_SMC_RDY, | |
111 | + .gpio_nce = AUTCPU12_SMC_NCE, | |
112 | + .gpio_ale = AUTCPU12_SMC_ALE, | |
113 | + .gpio_cle = AUTCPU12_SMC_CLE, | |
114 | + .gpio_nwp = -1, | |
115 | + .chip_delay = 20, | |
116 | + .parts = autcpu12_nand_parts, | |
117 | + .num_parts = ARRAY_SIZE(autcpu12_nand_parts), | |
118 | + .adjust_parts = autcpu12_adjust_parts, | |
119 | +}; | |
120 | + | |
121 | +static struct platform_device autcpu12_nand_pdev __initdata = { | |
122 | + .name = "gpio-nand", | |
123 | + .id = -1, | |
124 | + .resource = autcpu12_nand_resource, | |
125 | + .num_resources = ARRAY_SIZE(autcpu12_nand_resource), | |
126 | + .dev = { | |
127 | + .platform_data = &autcpu12_nand_pdata, | |
128 | + }, | |
129 | +}; | |
130 | + | |
131 | +static struct resource autcpu12_mmgpio_resource[] __initdata = { | |
132 | + DEFINE_RES_MEM_NAMED(AUTCPU12_SMC_SEL_BASE, SZ_1, "dat"), | |
133 | +}; | |
134 | + | |
135 | +static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = { | |
136 | + .base = AUTCPU12_MMGPIO_BASE, | |
137 | + .ngpio = 8, | |
138 | +}; | |
139 | + | |
140 | +static struct platform_device autcpu12_mmgpio_pdev __initdata = { | |
141 | + .name = "basic-mmio-gpio", | |
142 | + .id = -1, | |
143 | + .resource = autcpu12_mmgpio_resource, | |
144 | + .num_resources = ARRAY_SIZE(autcpu12_mmgpio_resource), | |
145 | + .dev = { | |
146 | + .platform_data = &autcpu12_mmgpio_pdata, | |
147 | + }, | |
148 | +}; | |
149 | + | |
150 | +static void __init autcpu12_init(void) | |
151 | +{ | |
152 | + platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
153 | + platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, | |
154 | + ARRAY_SIZE(autcpu12_cs8900_resource)); | |
155 | + platform_device_register(&autcpu12_mmgpio_pdev); | |
156 | + platform_device_register(&autcpu12_nvram_pdev); | |
157 | +} | |
158 | + | |
159 | +static void __init autcpu12_init_late(void) | |
160 | +{ | |
161 | + if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) { | |
162 | + /* We are need both drivers to handle NAND */ | |
163 | + platform_device_register(&autcpu12_nand_pdev); | |
164 | + } | |
165 | +} | |
166 | + | |
167 | +MACHINE_START(AUTCPU12, "autronix autcpu12") | |
168 | + /* Maintainer: Thomas Gleixner */ | |
169 | + .atag_offset = 0x20000, | |
170 | + .nr_irqs = CLPS711X_NR_IRQS, | |
171 | + .map_io = clps711x_map_io, | |
172 | + .init_irq = clps711x_init_irq, | |
173 | + .timer = &clps711x_timer, | |
174 | + .init_machine = autcpu12_init, | |
175 | + .init_late = autcpu12_init_late, | |
176 | + .handle_irq = clps711x_handle_irq, | |
177 | + .restart = clps711x_restart, | |
178 | +MACHINE_END |
arch/arm/mach-clps711x/board-cdb89712.c
1 | +/* | |
2 | + * linux/arch/arm/mach-clps711x/cdb89712.c | |
3 | + * | |
4 | + * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | |
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 as published by | |
8 | + * the Free Software Foundation; either version 2 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | + */ | |
20 | +#include <linux/kernel.h> | |
21 | +#include <linux/init.h> | |
22 | +#include <linux/types.h> | |
23 | +#include <linux/string.h> | |
24 | +#include <linux/mm.h> | |
25 | +#include <linux/io.h> | |
26 | +#include <linux/interrupt.h> | |
27 | +#include <linux/platform_device.h> | |
28 | + | |
29 | +#include <linux/mtd/physmap.h> | |
30 | +#include <linux/mtd/plat-ram.h> | |
31 | +#include <linux/mtd/partitions.h> | |
32 | + | |
33 | +#include <mach/hardware.h> | |
34 | +#include <asm/pgtable.h> | |
35 | +#include <asm/page.h> | |
36 | +#include <asm/setup.h> | |
37 | +#include <asm/mach-types.h> | |
38 | +#include <asm/mach/arch.h> | |
39 | +#include <asm/mach/map.h> | |
40 | + | |
41 | +#include "common.h" | |
42 | + | |
43 | +#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
44 | +#define CDB89712_CS8900_IRQ (IRQ_EINT3) | |
45 | + | |
46 | +static struct resource cdb89712_cs8900_resource[] __initdata = { | |
47 | + DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K), | |
48 | + DEFINE_RES_IRQ(CDB89712_CS8900_IRQ), | |
49 | +}; | |
50 | + | |
51 | +static struct mtd_partition cdb89712_flash_partitions[] __initdata = { | |
52 | + { | |
53 | + .name = "Flash", | |
54 | + .offset = 0, | |
55 | + .size = MTDPART_SIZ_FULL, | |
56 | + }, | |
57 | +}; | |
58 | + | |
59 | +static struct physmap_flash_data cdb89712_flash_pdata __initdata = { | |
60 | + .width = 4, | |
61 | + .probe_type = "map_rom", | |
62 | + .parts = cdb89712_flash_partitions, | |
63 | + .nr_parts = ARRAY_SIZE(cdb89712_flash_partitions), | |
64 | +}; | |
65 | + | |
66 | +static struct resource cdb89712_flash_resources[] __initdata = { | |
67 | + DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M), | |
68 | +}; | |
69 | + | |
70 | +static struct platform_device cdb89712_flash_pdev __initdata = { | |
71 | + .name = "physmap-flash", | |
72 | + .id = 0, | |
73 | + .resource = cdb89712_flash_resources, | |
74 | + .num_resources = ARRAY_SIZE(cdb89712_flash_resources), | |
75 | + .dev = { | |
76 | + .platform_data = &cdb89712_flash_pdata, | |
77 | + }, | |
78 | +}; | |
79 | + | |
80 | +static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = { | |
81 | + { | |
82 | + .name = "BootROM", | |
83 | + .offset = 0, | |
84 | + .size = MTDPART_SIZ_FULL, | |
85 | + }, | |
86 | +}; | |
87 | + | |
88 | +static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = { | |
89 | + .width = 4, | |
90 | + .probe_type = "map_rom", | |
91 | + .parts = cdb89712_bootrom_partitions, | |
92 | + .nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions), | |
93 | +}; | |
94 | + | |
95 | +static struct resource cdb89712_bootrom_resources[] __initdata = { | |
96 | + DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM | | |
97 | + IORESOURCE_CACHEABLE | IORESOURCE_READONLY), | |
98 | +}; | |
99 | + | |
100 | +static struct platform_device cdb89712_bootrom_pdev __initdata = { | |
101 | + .name = "physmap-flash", | |
102 | + .id = 1, | |
103 | + .resource = cdb89712_bootrom_resources, | |
104 | + .num_resources = ARRAY_SIZE(cdb89712_bootrom_resources), | |
105 | + .dev = { | |
106 | + .platform_data = &cdb89712_bootrom_pdata, | |
107 | + }, | |
108 | +}; | |
109 | + | |
110 | +static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = { | |
111 | + .bankwidth = 4, | |
112 | +}; | |
113 | + | |
114 | +static struct resource cdb89712_sram_resources[] __initdata = { | |
115 | + DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE), | |
116 | +}; | |
117 | + | |
118 | +static struct platform_device cdb89712_sram_pdev __initdata = { | |
119 | + .name = "mtd-ram", | |
120 | + .id = 0, | |
121 | + .resource = cdb89712_sram_resources, | |
122 | + .num_resources = ARRAY_SIZE(cdb89712_sram_resources), | |
123 | + .dev = { | |
124 | + .platform_data = &cdb89712_sram_pdata, | |
125 | + }, | |
126 | +}; | |
127 | + | |
128 | +static void __init cdb89712_init(void) | |
129 | +{ | |
130 | + platform_device_register(&cdb89712_flash_pdev); | |
131 | + platform_device_register(&cdb89712_bootrom_pdev); | |
132 | + platform_device_register(&cdb89712_sram_pdev); | |
133 | + platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource, | |
134 | + ARRAY_SIZE(cdb89712_cs8900_resource)); | |
135 | +} | |
136 | + | |
137 | +MACHINE_START(CDB89712, "Cirrus-CDB89712") | |
138 | + /* Maintainer: Ray Lehtiniemi */ | |
139 | + .atag_offset = 0x100, | |
140 | + .nr_irqs = CLPS711X_NR_IRQS, | |
141 | + .map_io = clps711x_map_io, | |
142 | + .init_irq = clps711x_init_irq, | |
143 | + .timer = &clps711x_timer, | |
144 | + .init_machine = cdb89712_init, | |
145 | + .handle_irq = clps711x_handle_irq, | |
146 | + .restart = clps711x_restart, | |
147 | +MACHINE_END |
arch/arm/mach-clps711x/board-clep7312.c
1 | +/* | |
2 | + * linux/arch/arm/mach-clps711x/clep7312.c | |
3 | + * | |
4 | + * This program is free software; you can redistribute it and/or modify | |
5 | + * it under the terms of the GNU General Public License as published by | |
6 | + * the Free Software Foundation; either version 2 of the License, or | |
7 | + * (at your option) any later version. | |
8 | + * | |
9 | + * This program is distributed in the hope that it will be useful, | |
10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | + * GNU General Public License for more details. | |
13 | + * | |
14 | + * You should have received a copy of the GNU General Public License | |
15 | + * along with this program; if not, write to the Free Software | |
16 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 | + */ | |
18 | +#include <linux/init.h> | |
19 | +#include <linux/types.h> | |
20 | +#include <linux/string.h> | |
21 | + | |
22 | +#include <asm/setup.h> | |
23 | +#include <asm/mach-types.h> | |
24 | +#include <asm/mach/arch.h> | |
25 | + | |
26 | +#include "common.h" | |
27 | + | |
28 | +static void __init | |
29 | +fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) | |
30 | +{ | |
31 | + mi->nr_banks=1; | |
32 | + mi->bank[0].start = 0xc0000000; | |
33 | + mi->bank[0].size = 0x01000000; | |
34 | +} | |
35 | + | |
36 | +MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") | |
37 | + /* Maintainer: Nobody */ | |
38 | + .atag_offset = 0x0100, | |
39 | + .nr_irqs = CLPS711X_NR_IRQS, | |
40 | + .fixup = fixup_clep7312, | |
41 | + .map_io = clps711x_map_io, | |
42 | + .init_irq = clps711x_init_irq, | |
43 | + .timer = &clps711x_timer, | |
44 | + .handle_irq = clps711x_handle_irq, | |
45 | + .restart = clps711x_restart, | |
46 | +MACHINE_END |
arch/arm/mach-clps711x/board-edb7211.c
1 | +/* | |
2 | + * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | |
3 | + * | |
4 | + * This program is free software; you can redistribute it and/or modify | |
5 | + * it under the terms of the GNU General Public License as published by | |
6 | + * the Free Software Foundation; either version 2 of the License, or | |
7 | + * (at your option) any later version. | |
8 | + */ | |
9 | + | |
10 | +#include <linux/init.h> | |
11 | +#include <linux/gpio.h> | |
12 | +#include <linux/delay.h> | |
13 | +#include <linux/memblock.h> | |
14 | +#include <linux/types.h> | |
15 | +#include <linux/interrupt.h> | |
16 | +#include <linux/backlight.h> | |
17 | +#include <linux/platform_device.h> | |
18 | + | |
19 | +#include <linux/mtd/physmap.h> | |
20 | +#include <linux/mtd/partitions.h> | |
21 | + | |
22 | +#include <asm/setup.h> | |
23 | +#include <asm/mach/map.h> | |
24 | +#include <asm/mach/arch.h> | |
25 | +#include <asm/mach-types.h> | |
26 | + | |
27 | +#include <video/platform_lcd.h> | |
28 | + | |
29 | +#include <mach/hardware.h> | |
30 | + | |
31 | +#include "common.h" | |
32 | + | |
33 | +#define VIDEORAM_SIZE SZ_128K | |
34 | + | |
35 | +#define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) | |
36 | +#define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | |
37 | +#define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | |
38 | + | |
39 | +#define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) | |
40 | +#define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) | |
41 | +#define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
42 | +#define EDB7211_CS8900_IRQ (IRQ_EINT3) | |
43 | + | |
44 | +static struct resource edb7211_cs8900_resource[] __initdata = { | |
45 | + DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), | |
46 | + DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), | |
47 | +}; | |
48 | + | |
49 | +static struct mtd_partition edb7211_flash_partitions[] __initdata = { | |
50 | + { | |
51 | + .name = "Flash", | |
52 | + .offset = 0, | |
53 | + .size = MTDPART_SIZ_FULL, | |
54 | + }, | |
55 | +}; | |
56 | + | |
57 | +static struct physmap_flash_data edb7211_flash_pdata __initdata = { | |
58 | + .width = 4, | |
59 | + .parts = edb7211_flash_partitions, | |
60 | + .nr_parts = ARRAY_SIZE(edb7211_flash_partitions), | |
61 | +}; | |
62 | + | |
63 | +static struct resource edb7211_flash_resources[] __initdata = { | |
64 | + DEFINE_RES_MEM(EDB7211_FLASH0_BASE, SZ_8M), | |
65 | + DEFINE_RES_MEM(EDB7211_FLASH1_BASE, SZ_8M), | |
66 | +}; | |
67 | + | |
68 | +static struct platform_device edb7211_flash_pdev __initdata = { | |
69 | + .name = "physmap-flash", | |
70 | + .id = 0, | |
71 | + .resource = edb7211_flash_resources, | |
72 | + .num_resources = ARRAY_SIZE(edb7211_flash_resources), | |
73 | + .dev = { | |
74 | + .platform_data = &edb7211_flash_pdata, | |
75 | + }, | |
76 | +}; | |
77 | + | |
78 | +static void edb7211_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | |
79 | +{ | |
80 | + if (power) { | |
81 | + gpio_set_value(EDB7211_LCDEN, 1); | |
82 | + udelay(100); | |
83 | + gpio_set_value(EDB7211_LCD_DC_DC_EN, 1); | |
84 | + } else { | |
85 | + gpio_set_value(EDB7211_LCD_DC_DC_EN, 0); | |
86 | + udelay(100); | |
87 | + gpio_set_value(EDB7211_LCDEN, 0); | |
88 | + } | |
89 | +} | |
90 | + | |
91 | +static struct plat_lcd_data edb7211_lcd_power_pdata = { | |
92 | + .set_power = edb7211_lcd_power_set, | |
93 | +}; | |
94 | + | |
95 | +static void edb7211_lcd_backlight_set_intensity(int intensity) | |
96 | +{ | |
97 | + gpio_set_value(EDB7211_LCDBL, intensity); | |
98 | +} | |
99 | + | |
100 | +static struct generic_bl_info edb7211_lcd_backlight_pdata = { | |
101 | + .name = "lcd-backlight.0", | |
102 | + .default_intensity = 0x01, | |
103 | + .max_intensity = 0x01, | |
104 | + .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | |
105 | +}; | |
106 | + | |
107 | +static struct gpio edb7211_gpios[] __initconst = { | |
108 | + { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | |
109 | + { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | |
110 | + { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | |
111 | +}; | |
112 | + | |
113 | +static struct map_desc edb7211_io_desc[] __initdata = { | |
114 | + { /* Memory-mapped extra keyboard row */ | |
115 | + .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), | |
116 | + .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | |
117 | + .length = SZ_1M, | |
118 | + .type = MT_DEVICE, | |
119 | + }, | |
120 | +}; | |
121 | + | |
122 | +void __init edb7211_map_io(void) | |
123 | +{ | |
124 | + clps711x_map_io(); | |
125 | + iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | |
126 | +} | |
127 | + | |
128 | +/* Reserve screen memory region at the start of main system memory. */ | |
129 | +static void __init edb7211_reserve(void) | |
130 | +{ | |
131 | + memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE); | |
132 | +} | |
133 | + | |
134 | +static void __init | |
135 | +fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | |
136 | +{ | |
137 | + /* | |
138 | + * Bank start addresses are not present in the information | |
139 | + * passed in from the boot loader. We could potentially | |
140 | + * detect them, but instead we hard-code them. | |
141 | + * | |
142 | + * Banks sizes _are_ present in the param block, but we're | |
143 | + * not using that information yet. | |
144 | + */ | |
145 | + mi->bank[0].start = 0xc0000000; | |
146 | + mi->bank[0].size = SZ_8M; | |
147 | + mi->bank[1].start = 0xc1000000; | |
148 | + mi->bank[1].size = SZ_8M; | |
149 | + mi->nr_banks = 2; | |
150 | +} | |
151 | + | |
152 | +static void __init edb7211_init(void) | |
153 | +{ | |
154 | + gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); | |
155 | + | |
156 | + platform_device_register(&edb7211_flash_pdev); | |
157 | + platform_device_register_data(&platform_bus, "platform-lcd", 0, | |
158 | + &edb7211_lcd_power_pdata, | |
159 | + sizeof(edb7211_lcd_power_pdata)); | |
160 | + platform_device_register_data(&platform_bus, "generic-bl", 0, | |
161 | + &edb7211_lcd_backlight_pdata, | |
162 | + sizeof(edb7211_lcd_backlight_pdata)); | |
163 | + platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
164 | + platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | |
165 | + ARRAY_SIZE(edb7211_cs8900_resource)); | |
166 | +} | |
167 | + | |
168 | +MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | |
169 | + /* Maintainer: Jon McClintock */ | |
170 | + .atag_offset = VIDEORAM_SIZE + 0x100, | |
171 | + .nr_irqs = CLPS711X_NR_IRQS, | |
172 | + .fixup = fixup_edb7211, | |
173 | + .reserve = edb7211_reserve, | |
174 | + .map_io = edb7211_map_io, | |
175 | + .init_irq = clps711x_init_irq, | |
176 | + .timer = &clps711x_timer, | |
177 | + .init_machine = edb7211_init, | |
178 | + .handle_irq = clps711x_handle_irq, | |
179 | + .restart = clps711x_restart, | |
180 | +MACHINE_END |
arch/arm/mach-clps711x/board-fortunet.c
1 | +/* | |
2 | + * linux/arch/arm/mach-clps711x/fortunet.c | |
3 | + * | |
4 | + * Derived from linux/arch/arm/mach-integrator/arch.c | |
5 | + * | |
6 | + * Copyright (C) 2000 Deep Blue Solutions Ltd | |
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 as published by | |
10 | + * the Free Software Foundation; either version 2 of the License, or | |
11 | + * (at your option) any later version. | |
12 | + * | |
13 | + * This program is distributed in the hope that it will be useful, | |
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + * GNU General Public License for more details. | |
17 | + * | |
18 | + * You should have received a copy of the GNU General Public License | |
19 | + * along with this program; if not, write to the Free Software | |
20 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | + */ | |
22 | +#include <linux/types.h> | |
23 | +#include <linux/init.h> | |
24 | +#include <linux/initrd.h> | |
25 | + | |
26 | +#include <mach/hardware.h> | |
27 | +#include <asm/setup.h> | |
28 | +#include <asm/mach-types.h> | |
29 | + | |
30 | +#include <asm/mach/arch.h> | |
31 | + | |
32 | +#include <asm/memory.h> | |
33 | + | |
34 | +#include "common.h" | |
35 | + | |
36 | +struct meminfo memmap = { | |
37 | + .nr_banks = 1, | |
38 | + .bank = { | |
39 | + { | |
40 | + .start = 0xC0000000, | |
41 | + .size = 0x01000000, | |
42 | + }, | |
43 | + }, | |
44 | +}; | |
45 | + | |
46 | +typedef struct tag_IMAGE_PARAMS | |
47 | +{ | |
48 | + int ramdisk_ok; | |
49 | + int ramdisk_address; | |
50 | + int ramdisk_size; | |
51 | + int ram_size; | |
52 | + int extra_param_type; | |
53 | + int extra_param_ptr; | |
54 | + int command_line; | |
55 | +} IMAGE_PARAMS; | |
56 | + | |
57 | +#define IMAGE_PARAMS_PHYS 0xC01F0000 | |
58 | + | |
59 | +static void __init | |
60 | +fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) | |
61 | +{ | |
62 | + IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); | |
63 | + *cmdline = phys_to_virt(ip->command_line); | |
64 | +#ifdef CONFIG_BLK_DEV_INITRD | |
65 | + if(ip->ramdisk_ok) | |
66 | + { | |
67 | + initrd_start = __phys_to_virt(ip->ramdisk_address); | |
68 | + initrd_end = initrd_start + ip->ramdisk_size; | |
69 | + } | |
70 | +#endif | |
71 | + memmap.bank[0].size = ip->ram_size; | |
72 | + *mi = memmap; | |
73 | +} | |
74 | + | |
75 | +MACHINE_START(FORTUNET, "ARM-FortuNet") | |
76 | + /* Maintainer: FortuNet Inc. */ | |
77 | + .nr_irqs = CLPS711X_NR_IRQS, | |
78 | + .fixup = fortunet_fixup, | |
79 | + .map_io = clps711x_map_io, | |
80 | + .init_irq = clps711x_init_irq, | |
81 | + .timer = &clps711x_timer, | |
82 | + .handle_irq = clps711x_handle_irq, | |
83 | + .restart = clps711x_restart, | |
84 | +MACHINE_END |
arch/arm/mach-clps711x/board-p720t.c
1 | +/* | |
2 | + * linux/arch/arm/mach-clps711x/p720t.c | |
3 | + * | |
4 | + * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | |
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 as published by | |
8 | + * the Free Software Foundation; either version 2 of the License, or | |
9 | + * (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | + */ | |
20 | +#include <linux/kernel.h> | |
21 | +#include <linux/init.h> | |
22 | +#include <linux/types.h> | |
23 | +#include <linux/string.h> | |
24 | +#include <linux/mm.h> | |
25 | +#include <linux/io.h> | |
26 | +#include <linux/slab.h> | |
27 | +#include <linux/leds.h> | |
28 | +#include <linux/sizes.h> | |
29 | +#include <linux/backlight.h> | |
30 | +#include <linux/platform_device.h> | |
31 | +#include <linux/mtd/partitions.h> | |
32 | +#include <linux/mtd/nand-gpio.h> | |
33 | + | |
34 | +#include <mach/hardware.h> | |
35 | +#include <asm/pgtable.h> | |
36 | +#include <asm/page.h> | |
37 | +#include <asm/setup.h> | |
38 | +#include <asm/mach-types.h> | |
39 | +#include <asm/mach/arch.h> | |
40 | +#include <asm/mach/map.h> | |
41 | +#include <mach/syspld.h> | |
42 | + | |
43 | +#include <video/platform_lcd.h> | |
44 | + | |
45 | +#include "common.h" | |
46 | + | |
47 | +#define P720T_USERLED CLPS711X_GPIO(3, 0) | |
48 | +#define P720T_NAND_CLE CLPS711X_GPIO(4, 0) | |
49 | +#define P720T_NAND_ALE CLPS711X_GPIO(4, 1) | |
50 | +#define P720T_NAND_NCE CLPS711X_GPIO(4, 2) | |
51 | + | |
52 | +#define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE) | |
53 | + | |
54 | +static struct resource p720t_nand_resource[] __initdata = { | |
55 | + DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4), | |
56 | +}; | |
57 | + | |
58 | +static struct mtd_partition p720t_nand_parts[] __initdata = { | |
59 | + { | |
60 | + .name = "Flash partition 1", | |
61 | + .offset = 0, | |
62 | + .size = SZ_2M, | |
63 | + }, | |
64 | + { | |
65 | + .name = "Flash partition 2", | |
66 | + .offset = MTDPART_OFS_APPEND, | |
67 | + .size = MTDPART_SIZ_FULL, | |
68 | + }, | |
69 | +}; | |
70 | + | |
71 | +static struct gpio_nand_platdata p720t_nand_pdata __initdata = { | |
72 | + .gpio_rdy = -1, | |
73 | + .gpio_nce = P720T_NAND_NCE, | |
74 | + .gpio_ale = P720T_NAND_ALE, | |
75 | + .gpio_cle = P720T_NAND_CLE, | |
76 | + .gpio_nwp = -1, | |
77 | + .chip_delay = 15, | |
78 | + .parts = p720t_nand_parts, | |
79 | + .num_parts = ARRAY_SIZE(p720t_nand_parts), | |
80 | +}; | |
81 | + | |
82 | +static struct platform_device p720t_nand_pdev __initdata = { | |
83 | + .name = "gpio-nand", | |
84 | + .id = -1, | |
85 | + .resource = p720t_nand_resource, | |
86 | + .num_resources = ARRAY_SIZE(p720t_nand_resource), | |
87 | + .dev = { | |
88 | + .platform_data = &p720t_nand_pdata, | |
89 | + }, | |
90 | +}; | |
91 | + | |
92 | +static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | |
93 | +{ | |
94 | + if (power) { | |
95 | + PLD_LCDEN = PLD_LCDEN_EN; | |
96 | + PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; | |
97 | + } else { | |
98 | + PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); | |
99 | + PLD_LCDEN = 0; | |
100 | + } | |
101 | +} | |
102 | + | |
103 | +static struct plat_lcd_data p720t_lcd_power_pdata = { | |
104 | + .set_power = p720t_lcd_power_set, | |
105 | +}; | |
106 | + | |
107 | +static void p720t_lcd_backlight_set_intensity(int intensity) | |
108 | +{ | |
109 | + if (intensity) | |
110 | + PLD_PWR |= PLD_S3_ON; | |
111 | + else | |
112 | + PLD_PWR = 0; | |
113 | +} | |
114 | + | |
115 | +static struct generic_bl_info p720t_lcd_backlight_pdata = { | |
116 | + .name = "lcd-backlight.0", | |
117 | + .default_intensity = 0x01, | |
118 | + .max_intensity = 0x01, | |
119 | + .set_bl_intensity = p720t_lcd_backlight_set_intensity, | |
120 | +}; | |
121 | + | |
122 | +/* | |
123 | + * Map the P720T system PLD. It occupies two address spaces: | |
124 | + * 0x10000000 and 0x10400000. We map both regions as one. | |
125 | + */ | |
126 | +static struct map_desc p720t_io_desc[] __initdata = { | |
127 | + { | |
128 | + .virtual = SYSPLD_VIRT_BASE, | |
129 | + .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | |
130 | + .length = SZ_8M, | |
131 | + .type = MT_DEVICE, | |
132 | + }, | |
133 | +}; | |
134 | + | |
135 | +static void __init | |
136 | +fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | |
137 | +{ | |
138 | + /* | |
139 | + * Our bootloader doesn't setup any tags (yet). | |
140 | + */ | |
141 | + if (tag->hdr.tag != ATAG_CORE) { | |
142 | + tag->hdr.tag = ATAG_CORE; | |
143 | + tag->hdr.size = tag_size(tag_core); | |
144 | + tag->u.core.flags = 0; | |
145 | + tag->u.core.pagesize = PAGE_SIZE; | |
146 | + tag->u.core.rootdev = 0x0100; | |
147 | + | |
148 | + tag = tag_next(tag); | |
149 | + tag->hdr.tag = ATAG_MEM; | |
150 | + tag->hdr.size = tag_size(tag_mem32); | |
151 | + tag->u.mem.size = 4096; | |
152 | + tag->u.mem.start = PHYS_OFFSET; | |
153 | + | |
154 | + tag = tag_next(tag); | |
155 | + tag->hdr.tag = ATAG_NONE; | |
156 | + tag->hdr.size = 0; | |
157 | + } | |
158 | +} | |
159 | + | |
160 | +static void __init p720t_map_io(void) | |
161 | +{ | |
162 | + clps711x_map_io(); | |
163 | + iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | |
164 | +} | |
165 | + | |
166 | +static void __init p720t_init_early(void) | |
167 | +{ | |
168 | + /* | |
169 | + * Power down as much as possible in case we don't | |
170 | + * have the drivers loaded. | |
171 | + */ | |
172 | + PLD_LCDEN = 0; | |
173 | + PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | |
174 | + | |
175 | + PLD_KBD = 0; | |
176 | + PLD_IO = 0; | |
177 | + PLD_IRDA = 0; | |
178 | + PLD_CODEC = 0; | |
179 | + PLD_TCH = 0; | |
180 | + PLD_SPI = 0; | |
181 | + if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | |
182 | + PLD_COM2 = 0; | |
183 | + PLD_COM1 = 0; | |
184 | + } | |
185 | +} | |
186 | + | |
187 | +static struct gpio_led p720t_gpio_leds[] = { | |
188 | + { | |
189 | + .name = "User LED", | |
190 | + .default_trigger = "heartbeat", | |
191 | + .gpio = P720T_USERLED, | |
192 | + }, | |
193 | +}; | |
194 | + | |
195 | +static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = { | |
196 | + .leds = p720t_gpio_leds, | |
197 | + .num_leds = ARRAY_SIZE(p720t_gpio_leds), | |
198 | +}; | |
199 | + | |
200 | +static void __init p720t_init(void) | |
201 | +{ | |
202 | + platform_device_register(&p720t_nand_pdev); | |
203 | + platform_device_register_data(&platform_bus, "platform-lcd", 0, | |
204 | + &p720t_lcd_power_pdata, | |
205 | + sizeof(p720t_lcd_power_pdata)); | |
206 | + platform_device_register_data(&platform_bus, "generic-bl", 0, | |
207 | + &p720t_lcd_backlight_pdata, | |
208 | + sizeof(p720t_lcd_backlight_pdata)); | |
209 | + platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
210 | +} | |
211 | + | |
212 | +static void __init p720t_init_late(void) | |
213 | +{ | |
214 | + platform_device_register_data(&platform_bus, "leds-gpio", 0, | |
215 | + &p720t_gpio_led_pdata, | |
216 | + sizeof(p720t_gpio_led_pdata)); | |
217 | +} | |
218 | + | |
219 | +MACHINE_START(P720T, "ARM-Prospector720T") | |
220 | + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | |
221 | + .atag_offset = 0x100, | |
222 | + .nr_irqs = CLPS711X_NR_IRQS, | |
223 | + .fixup = fixup_p720t, | |
224 | + .map_io = p720t_map_io, | |
225 | + .init_early = p720t_init_early, | |
226 | + .init_irq = clps711x_init_irq, | |
227 | + .timer = &clps711x_timer, | |
228 | + .init_machine = p720t_init, | |
229 | + .init_late = p720t_init_late, | |
230 | + .handle_irq = clps711x_handle_irq, | |
231 | + .restart = clps711x_restart, | |
232 | +MACHINE_END |
arch/arm/mach-clps711x/cdb89712.c
1 | -/* | |
2 | - * linux/arch/arm/mach-clps711x/cdb89712.c | |
3 | - * | |
4 | - * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | |
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 as published by | |
8 | - * the Free Software Foundation; either version 2 of the License, or | |
9 | - * (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | - */ | |
20 | -#include <linux/kernel.h> | |
21 | -#include <linux/init.h> | |
22 | -#include <linux/types.h> | |
23 | -#include <linux/string.h> | |
24 | -#include <linux/mm.h> | |
25 | -#include <linux/io.h> | |
26 | -#include <linux/interrupt.h> | |
27 | -#include <linux/platform_device.h> | |
28 | - | |
29 | -#include <linux/mtd/physmap.h> | |
30 | -#include <linux/mtd/plat-ram.h> | |
31 | -#include <linux/mtd/partitions.h> | |
32 | - | |
33 | -#include <mach/hardware.h> | |
34 | -#include <asm/pgtable.h> | |
35 | -#include <asm/page.h> | |
36 | -#include <asm/setup.h> | |
37 | -#include <asm/mach-types.h> | |
38 | -#include <asm/mach/arch.h> | |
39 | -#include <asm/mach/map.h> | |
40 | - | |
41 | -#include "common.h" | |
42 | - | |
43 | -#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
44 | -#define CDB89712_CS8900_IRQ (IRQ_EINT3) | |
45 | - | |
46 | -static struct resource cdb89712_cs8900_resource[] __initdata = { | |
47 | - DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K), | |
48 | - DEFINE_RES_IRQ(CDB89712_CS8900_IRQ), | |
49 | -}; | |
50 | - | |
51 | -static struct mtd_partition cdb89712_flash_partitions[] __initdata = { | |
52 | - { | |
53 | - .name = "Flash", | |
54 | - .offset = 0, | |
55 | - .size = MTDPART_SIZ_FULL, | |
56 | - }, | |
57 | -}; | |
58 | - | |
59 | -static struct physmap_flash_data cdb89712_flash_pdata __initdata = { | |
60 | - .width = 4, | |
61 | - .probe_type = "map_rom", | |
62 | - .parts = cdb89712_flash_partitions, | |
63 | - .nr_parts = ARRAY_SIZE(cdb89712_flash_partitions), | |
64 | -}; | |
65 | - | |
66 | -static struct resource cdb89712_flash_resources[] __initdata = { | |
67 | - DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M), | |
68 | -}; | |
69 | - | |
70 | -static struct platform_device cdb89712_flash_pdev __initdata = { | |
71 | - .name = "physmap-flash", | |
72 | - .id = 0, | |
73 | - .resource = cdb89712_flash_resources, | |
74 | - .num_resources = ARRAY_SIZE(cdb89712_flash_resources), | |
75 | - .dev = { | |
76 | - .platform_data = &cdb89712_flash_pdata, | |
77 | - }, | |
78 | -}; | |
79 | - | |
80 | -static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = { | |
81 | - { | |
82 | - .name = "BootROM", | |
83 | - .offset = 0, | |
84 | - .size = MTDPART_SIZ_FULL, | |
85 | - }, | |
86 | -}; | |
87 | - | |
88 | -static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = { | |
89 | - .width = 4, | |
90 | - .probe_type = "map_rom", | |
91 | - .parts = cdb89712_bootrom_partitions, | |
92 | - .nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions), | |
93 | -}; | |
94 | - | |
95 | -static struct resource cdb89712_bootrom_resources[] __initdata = { | |
96 | - DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM | | |
97 | - IORESOURCE_CACHEABLE | IORESOURCE_READONLY), | |
98 | -}; | |
99 | - | |
100 | -static struct platform_device cdb89712_bootrom_pdev __initdata = { | |
101 | - .name = "physmap-flash", | |
102 | - .id = 1, | |
103 | - .resource = cdb89712_bootrom_resources, | |
104 | - .num_resources = ARRAY_SIZE(cdb89712_bootrom_resources), | |
105 | - .dev = { | |
106 | - .platform_data = &cdb89712_bootrom_pdata, | |
107 | - }, | |
108 | -}; | |
109 | - | |
110 | -static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = { | |
111 | - .bankwidth = 4, | |
112 | -}; | |
113 | - | |
114 | -static struct resource cdb89712_sram_resources[] __initdata = { | |
115 | - DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE), | |
116 | -}; | |
117 | - | |
118 | -static struct platform_device cdb89712_sram_pdev __initdata = { | |
119 | - .name = "mtd-ram", | |
120 | - .id = 0, | |
121 | - .resource = cdb89712_sram_resources, | |
122 | - .num_resources = ARRAY_SIZE(cdb89712_sram_resources), | |
123 | - .dev = { | |
124 | - .platform_data = &cdb89712_sram_pdata, | |
125 | - }, | |
126 | -}; | |
127 | - | |
128 | -static void __init cdb89712_init(void) | |
129 | -{ | |
130 | - platform_device_register(&cdb89712_flash_pdev); | |
131 | - platform_device_register(&cdb89712_bootrom_pdev); | |
132 | - platform_device_register(&cdb89712_sram_pdev); | |
133 | - platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource, | |
134 | - ARRAY_SIZE(cdb89712_cs8900_resource)); | |
135 | -} | |
136 | - | |
137 | -MACHINE_START(CDB89712, "Cirrus-CDB89712") | |
138 | - /* Maintainer: Ray Lehtiniemi */ | |
139 | - .atag_offset = 0x100, | |
140 | - .nr_irqs = CLPS711X_NR_IRQS, | |
141 | - .map_io = clps711x_map_io, | |
142 | - .init_irq = clps711x_init_irq, | |
143 | - .timer = &clps711x_timer, | |
144 | - .init_machine = cdb89712_init, | |
145 | - .handle_irq = clps711x_handle_irq, | |
146 | - .restart = clps711x_restart, | |
147 | -MACHINE_END |
arch/arm/mach-clps711x/clep7312.c
1 | -/* | |
2 | - * linux/arch/arm/mach-clps711x/clep7312.c | |
3 | - * | |
4 | - * This program is free software; you can redistribute it and/or modify | |
5 | - * it under the terms of the GNU General Public License as published by | |
6 | - * the Free Software Foundation; either version 2 of the License, or | |
7 | - * (at your option) any later version. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, | |
10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | - * GNU General Public License for more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License | |
15 | - * along with this program; if not, write to the Free Software | |
16 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 | - */ | |
18 | -#include <linux/init.h> | |
19 | -#include <linux/types.h> | |
20 | -#include <linux/string.h> | |
21 | - | |
22 | -#include <asm/setup.h> | |
23 | -#include <asm/mach-types.h> | |
24 | -#include <asm/mach/arch.h> | |
25 | - | |
26 | -#include "common.h" | |
27 | - | |
28 | -static void __init | |
29 | -fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) | |
30 | -{ | |
31 | - mi->nr_banks=1; | |
32 | - mi->bank[0].start = 0xc0000000; | |
33 | - mi->bank[0].size = 0x01000000; | |
34 | -} | |
35 | - | |
36 | -MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") | |
37 | - /* Maintainer: Nobody */ | |
38 | - .atag_offset = 0x0100, | |
39 | - .nr_irqs = CLPS711X_NR_IRQS, | |
40 | - .fixup = fixup_clep7312, | |
41 | - .map_io = clps711x_map_io, | |
42 | - .init_irq = clps711x_init_irq, | |
43 | - .timer = &clps711x_timer, | |
44 | - .handle_irq = clps711x_handle_irq, | |
45 | - .restart = clps711x_restart, | |
46 | -MACHINE_END |
arch/arm/mach-clps711x/edb7211.c
1 | -/* | |
2 | - * Copyright (C) 2000, 2001 Blue Mug, Inc. All Rights Reserved. | |
3 | - * | |
4 | - * This program is free software; you can redistribute it and/or modify | |
5 | - * it under the terms of the GNU General Public License as published by | |
6 | - * the Free Software Foundation; either version 2 of the License, or | |
7 | - * (at your option) any later version. | |
8 | - */ | |
9 | - | |
10 | -#include <linux/init.h> | |
11 | -#include <linux/gpio.h> | |
12 | -#include <linux/delay.h> | |
13 | -#include <linux/memblock.h> | |
14 | -#include <linux/types.h> | |
15 | -#include <linux/interrupt.h> | |
16 | -#include <linux/backlight.h> | |
17 | -#include <linux/platform_device.h> | |
18 | - | |
19 | -#include <linux/mtd/physmap.h> | |
20 | -#include <linux/mtd/partitions.h> | |
21 | - | |
22 | -#include <asm/setup.h> | |
23 | -#include <asm/mach/map.h> | |
24 | -#include <asm/mach/arch.h> | |
25 | -#include <asm/mach-types.h> | |
26 | - | |
27 | -#include <video/platform_lcd.h> | |
28 | - | |
29 | -#include <mach/hardware.h> | |
30 | - | |
31 | -#include "common.h" | |
32 | - | |
33 | -#define VIDEORAM_SIZE SZ_128K | |
34 | - | |
35 | -#define EDB7211_LCD_DC_DC_EN CLPS711X_GPIO(3, 1) | |
36 | -#define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | |
37 | -#define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | |
38 | - | |
39 | -#define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) | |
40 | -#define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) | |
41 | -#define EDB7211_CS8900_BASE (CS2_PHYS_BASE + 0x300) | |
42 | -#define EDB7211_CS8900_IRQ (IRQ_EINT3) | |
43 | - | |
44 | -static struct resource edb7211_cs8900_resource[] __initdata = { | |
45 | - DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), | |
46 | - DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), | |
47 | -}; | |
48 | - | |
49 | -static struct mtd_partition edb7211_flash_partitions[] __initdata = { | |
50 | - { | |
51 | - .name = "Flash", | |
52 | - .offset = 0, | |
53 | - .size = MTDPART_SIZ_FULL, | |
54 | - }, | |
55 | -}; | |
56 | - | |
57 | -static struct physmap_flash_data edb7211_flash_pdata __initdata = { | |
58 | - .width = 4, | |
59 | - .parts = edb7211_flash_partitions, | |
60 | - .nr_parts = ARRAY_SIZE(edb7211_flash_partitions), | |
61 | -}; | |
62 | - | |
63 | -static struct resource edb7211_flash_resources[] __initdata = { | |
64 | - DEFINE_RES_MEM(EDB7211_FLASH0_BASE, SZ_8M), | |
65 | - DEFINE_RES_MEM(EDB7211_FLASH1_BASE, SZ_8M), | |
66 | -}; | |
67 | - | |
68 | -static struct platform_device edb7211_flash_pdev __initdata = { | |
69 | - .name = "physmap-flash", | |
70 | - .id = 0, | |
71 | - .resource = edb7211_flash_resources, | |
72 | - .num_resources = ARRAY_SIZE(edb7211_flash_resources), | |
73 | - .dev = { | |
74 | - .platform_data = &edb7211_flash_pdata, | |
75 | - }, | |
76 | -}; | |
77 | - | |
78 | -static void edb7211_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | |
79 | -{ | |
80 | - if (power) { | |
81 | - gpio_set_value(EDB7211_LCDEN, 1); | |
82 | - udelay(100); | |
83 | - gpio_set_value(EDB7211_LCD_DC_DC_EN, 1); | |
84 | - } else { | |
85 | - gpio_set_value(EDB7211_LCD_DC_DC_EN, 0); | |
86 | - udelay(100); | |
87 | - gpio_set_value(EDB7211_LCDEN, 0); | |
88 | - } | |
89 | -} | |
90 | - | |
91 | -static struct plat_lcd_data edb7211_lcd_power_pdata = { | |
92 | - .set_power = edb7211_lcd_power_set, | |
93 | -}; | |
94 | - | |
95 | -static void edb7211_lcd_backlight_set_intensity(int intensity) | |
96 | -{ | |
97 | - gpio_set_value(EDB7211_LCDBL, intensity); | |
98 | -} | |
99 | - | |
100 | -static struct generic_bl_info edb7211_lcd_backlight_pdata = { | |
101 | - .name = "lcd-backlight.0", | |
102 | - .default_intensity = 0x01, | |
103 | - .max_intensity = 0x01, | |
104 | - .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | |
105 | -}; | |
106 | - | |
107 | -static struct gpio edb7211_gpios[] __initconst = { | |
108 | - { EDB7211_LCD_DC_DC_EN, GPIOF_OUT_INIT_LOW, "LCD DC-DC" }, | |
109 | - { EDB7211_LCDEN, GPIOF_OUT_INIT_LOW, "LCD POWER" }, | |
110 | - { EDB7211_LCDBL, GPIOF_OUT_INIT_LOW, "LCD BACKLIGHT" }, | |
111 | -}; | |
112 | - | |
113 | -static struct map_desc edb7211_io_desc[] __initdata = { | |
114 | - { /* Memory-mapped extra keyboard row */ | |
115 | - .virtual = IO_ADDRESS(EP7211_PHYS_EXTKBD), | |
116 | - .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), | |
117 | - .length = SZ_1M, | |
118 | - .type = MT_DEVICE, | |
119 | - }, | |
120 | -}; | |
121 | - | |
122 | -void __init edb7211_map_io(void) | |
123 | -{ | |
124 | - clps711x_map_io(); | |
125 | - iotable_init(edb7211_io_desc, ARRAY_SIZE(edb7211_io_desc)); | |
126 | -} | |
127 | - | |
128 | -/* Reserve screen memory region at the start of main system memory. */ | |
129 | -static void __init edb7211_reserve(void) | |
130 | -{ | |
131 | - memblock_reserve(PHYS_OFFSET, VIDEORAM_SIZE); | |
132 | -} | |
133 | - | |
134 | -static void __init | |
135 | -fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) | |
136 | -{ | |
137 | - /* | |
138 | - * Bank start addresses are not present in the information | |
139 | - * passed in from the boot loader. We could potentially | |
140 | - * detect them, but instead we hard-code them. | |
141 | - * | |
142 | - * Banks sizes _are_ present in the param block, but we're | |
143 | - * not using that information yet. | |
144 | - */ | |
145 | - mi->bank[0].start = 0xc0000000; | |
146 | - mi->bank[0].size = SZ_8M; | |
147 | - mi->bank[1].start = 0xc1000000; | |
148 | - mi->bank[1].size = SZ_8M; | |
149 | - mi->nr_banks = 2; | |
150 | -} | |
151 | - | |
152 | -static void __init edb7211_init(void) | |
153 | -{ | |
154 | - gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios)); | |
155 | - | |
156 | - platform_device_register(&edb7211_flash_pdev); | |
157 | - platform_device_register_data(&platform_bus, "platform-lcd", 0, | |
158 | - &edb7211_lcd_power_pdata, | |
159 | - sizeof(edb7211_lcd_power_pdata)); | |
160 | - platform_device_register_data(&platform_bus, "generic-bl", 0, | |
161 | - &edb7211_lcd_backlight_pdata, | |
162 | - sizeof(edb7211_lcd_backlight_pdata)); | |
163 | - platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
164 | - platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | |
165 | - ARRAY_SIZE(edb7211_cs8900_resource)); | |
166 | -} | |
167 | - | |
168 | -MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | |
169 | - /* Maintainer: Jon McClintock */ | |
170 | - .atag_offset = VIDEORAM_SIZE + 0x100, | |
171 | - .nr_irqs = CLPS711X_NR_IRQS, | |
172 | - .fixup = fixup_edb7211, | |
173 | - .reserve = edb7211_reserve, | |
174 | - .map_io = edb7211_map_io, | |
175 | - .init_irq = clps711x_init_irq, | |
176 | - .timer = &clps711x_timer, | |
177 | - .init_machine = edb7211_init, | |
178 | - .handle_irq = clps711x_handle_irq, | |
179 | - .restart = clps711x_restart, | |
180 | -MACHINE_END |
arch/arm/mach-clps711x/fortunet.c
1 | -/* | |
2 | - * linux/arch/arm/mach-clps711x/fortunet.c | |
3 | - * | |
4 | - * Derived from linux/arch/arm/mach-integrator/arch.c | |
5 | - * | |
6 | - * Copyright (C) 2000 Deep Blue Solutions Ltd | |
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 as published by | |
10 | - * the Free Software Foundation; either version 2 of the License, or | |
11 | - * (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | - */ | |
22 | -#include <linux/types.h> | |
23 | -#include <linux/init.h> | |
24 | -#include <linux/initrd.h> | |
25 | - | |
26 | -#include <mach/hardware.h> | |
27 | -#include <asm/setup.h> | |
28 | -#include <asm/mach-types.h> | |
29 | - | |
30 | -#include <asm/mach/arch.h> | |
31 | - | |
32 | -#include <asm/memory.h> | |
33 | - | |
34 | -#include "common.h" | |
35 | - | |
36 | -struct meminfo memmap = { | |
37 | - .nr_banks = 1, | |
38 | - .bank = { | |
39 | - { | |
40 | - .start = 0xC0000000, | |
41 | - .size = 0x01000000, | |
42 | - }, | |
43 | - }, | |
44 | -}; | |
45 | - | |
46 | -typedef struct tag_IMAGE_PARAMS | |
47 | -{ | |
48 | - int ramdisk_ok; | |
49 | - int ramdisk_address; | |
50 | - int ramdisk_size; | |
51 | - int ram_size; | |
52 | - int extra_param_type; | |
53 | - int extra_param_ptr; | |
54 | - int command_line; | |
55 | -} IMAGE_PARAMS; | |
56 | - | |
57 | -#define IMAGE_PARAMS_PHYS 0xC01F0000 | |
58 | - | |
59 | -static void __init | |
60 | -fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) | |
61 | -{ | |
62 | - IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); | |
63 | - *cmdline = phys_to_virt(ip->command_line); | |
64 | -#ifdef CONFIG_BLK_DEV_INITRD | |
65 | - if(ip->ramdisk_ok) | |
66 | - { | |
67 | - initrd_start = __phys_to_virt(ip->ramdisk_address); | |
68 | - initrd_end = initrd_start + ip->ramdisk_size; | |
69 | - } | |
70 | -#endif | |
71 | - memmap.bank[0].size = ip->ram_size; | |
72 | - *mi = memmap; | |
73 | -} | |
74 | - | |
75 | -MACHINE_START(FORTUNET, "ARM-FortuNet") | |
76 | - /* Maintainer: FortuNet Inc. */ | |
77 | - .nr_irqs = CLPS711X_NR_IRQS, | |
78 | - .fixup = fortunet_fixup, | |
79 | - .map_io = clps711x_map_io, | |
80 | - .init_irq = clps711x_init_irq, | |
81 | - .timer = &clps711x_timer, | |
82 | - .handle_irq = clps711x_handle_irq, | |
83 | - .restart = clps711x_restart, | |
84 | -MACHINE_END |
arch/arm/mach-clps711x/p720t.c
1 | -/* | |
2 | - * linux/arch/arm/mach-clps711x/p720t.c | |
3 | - * | |
4 | - * Copyright (C) 2000-2001 Deep Blue Solutions Ltd | |
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 as published by | |
8 | - * the Free Software Foundation; either version 2 of the License, or | |
9 | - * (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | - */ | |
20 | -#include <linux/kernel.h> | |
21 | -#include <linux/init.h> | |
22 | -#include <linux/types.h> | |
23 | -#include <linux/string.h> | |
24 | -#include <linux/mm.h> | |
25 | -#include <linux/io.h> | |
26 | -#include <linux/slab.h> | |
27 | -#include <linux/leds.h> | |
28 | -#include <linux/sizes.h> | |
29 | -#include <linux/backlight.h> | |
30 | -#include <linux/platform_device.h> | |
31 | -#include <linux/mtd/partitions.h> | |
32 | -#include <linux/mtd/nand-gpio.h> | |
33 | - | |
34 | -#include <mach/hardware.h> | |
35 | -#include <asm/pgtable.h> | |
36 | -#include <asm/page.h> | |
37 | -#include <asm/setup.h> | |
38 | -#include <asm/mach-types.h> | |
39 | -#include <asm/mach/arch.h> | |
40 | -#include <asm/mach/map.h> | |
41 | -#include <mach/syspld.h> | |
42 | - | |
43 | -#include <video/platform_lcd.h> | |
44 | - | |
45 | -#include "common.h" | |
46 | - | |
47 | -#define P720T_USERLED CLPS711X_GPIO(3, 0) | |
48 | -#define P720T_NAND_CLE CLPS711X_GPIO(4, 0) | |
49 | -#define P720T_NAND_ALE CLPS711X_GPIO(4, 1) | |
50 | -#define P720T_NAND_NCE CLPS711X_GPIO(4, 2) | |
51 | - | |
52 | -#define P720T_NAND_BASE (CLPS711X_SDRAM1_BASE) | |
53 | - | |
54 | -static struct resource p720t_nand_resource[] __initdata = { | |
55 | - DEFINE_RES_MEM(P720T_NAND_BASE, SZ_4), | |
56 | -}; | |
57 | - | |
58 | -static struct mtd_partition p720t_nand_parts[] __initdata = { | |
59 | - { | |
60 | - .name = "Flash partition 1", | |
61 | - .offset = 0, | |
62 | - .size = SZ_2M, | |
63 | - }, | |
64 | - { | |
65 | - .name = "Flash partition 2", | |
66 | - .offset = MTDPART_OFS_APPEND, | |
67 | - .size = MTDPART_SIZ_FULL, | |
68 | - }, | |
69 | -}; | |
70 | - | |
71 | -static struct gpio_nand_platdata p720t_nand_pdata __initdata = { | |
72 | - .gpio_rdy = -1, | |
73 | - .gpio_nce = P720T_NAND_NCE, | |
74 | - .gpio_ale = P720T_NAND_ALE, | |
75 | - .gpio_cle = P720T_NAND_CLE, | |
76 | - .gpio_nwp = -1, | |
77 | - .chip_delay = 15, | |
78 | - .parts = p720t_nand_parts, | |
79 | - .num_parts = ARRAY_SIZE(p720t_nand_parts), | |
80 | -}; | |
81 | - | |
82 | -static struct platform_device p720t_nand_pdev __initdata = { | |
83 | - .name = "gpio-nand", | |
84 | - .id = -1, | |
85 | - .resource = p720t_nand_resource, | |
86 | - .num_resources = ARRAY_SIZE(p720t_nand_resource), | |
87 | - .dev = { | |
88 | - .platform_data = &p720t_nand_pdata, | |
89 | - }, | |
90 | -}; | |
91 | - | |
92 | -static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) | |
93 | -{ | |
94 | - if (power) { | |
95 | - PLD_LCDEN = PLD_LCDEN_EN; | |
96 | - PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; | |
97 | - } else { | |
98 | - PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); | |
99 | - PLD_LCDEN = 0; | |
100 | - } | |
101 | -} | |
102 | - | |
103 | -static struct plat_lcd_data p720t_lcd_power_pdata = { | |
104 | - .set_power = p720t_lcd_power_set, | |
105 | -}; | |
106 | - | |
107 | -static void p720t_lcd_backlight_set_intensity(int intensity) | |
108 | -{ | |
109 | - if (intensity) | |
110 | - PLD_PWR |= PLD_S3_ON; | |
111 | - else | |
112 | - PLD_PWR = 0; | |
113 | -} | |
114 | - | |
115 | -static struct generic_bl_info p720t_lcd_backlight_pdata = { | |
116 | - .name = "lcd-backlight.0", | |
117 | - .default_intensity = 0x01, | |
118 | - .max_intensity = 0x01, | |
119 | - .set_bl_intensity = p720t_lcd_backlight_set_intensity, | |
120 | -}; | |
121 | - | |
122 | -/* | |
123 | - * Map the P720T system PLD. It occupies two address spaces: | |
124 | - * 0x10000000 and 0x10400000. We map both regions as one. | |
125 | - */ | |
126 | -static struct map_desc p720t_io_desc[] __initdata = { | |
127 | - { | |
128 | - .virtual = SYSPLD_VIRT_BASE, | |
129 | - .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | |
130 | - .length = SZ_8M, | |
131 | - .type = MT_DEVICE, | |
132 | - }, | |
133 | -}; | |
134 | - | |
135 | -static void __init | |
136 | -fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) | |
137 | -{ | |
138 | - /* | |
139 | - * Our bootloader doesn't setup any tags (yet). | |
140 | - */ | |
141 | - if (tag->hdr.tag != ATAG_CORE) { | |
142 | - tag->hdr.tag = ATAG_CORE; | |
143 | - tag->hdr.size = tag_size(tag_core); | |
144 | - tag->u.core.flags = 0; | |
145 | - tag->u.core.pagesize = PAGE_SIZE; | |
146 | - tag->u.core.rootdev = 0x0100; | |
147 | - | |
148 | - tag = tag_next(tag); | |
149 | - tag->hdr.tag = ATAG_MEM; | |
150 | - tag->hdr.size = tag_size(tag_mem32); | |
151 | - tag->u.mem.size = 4096; | |
152 | - tag->u.mem.start = PHYS_OFFSET; | |
153 | - | |
154 | - tag = tag_next(tag); | |
155 | - tag->hdr.tag = ATAG_NONE; | |
156 | - tag->hdr.size = 0; | |
157 | - } | |
158 | -} | |
159 | - | |
160 | -static void __init p720t_map_io(void) | |
161 | -{ | |
162 | - clps711x_map_io(); | |
163 | - iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc)); | |
164 | -} | |
165 | - | |
166 | -static void __init p720t_init_early(void) | |
167 | -{ | |
168 | - /* | |
169 | - * Power down as much as possible in case we don't | |
170 | - * have the drivers loaded. | |
171 | - */ | |
172 | - PLD_LCDEN = 0; | |
173 | - PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON); | |
174 | - | |
175 | - PLD_KBD = 0; | |
176 | - PLD_IO = 0; | |
177 | - PLD_IRDA = 0; | |
178 | - PLD_CODEC = 0; | |
179 | - PLD_TCH = 0; | |
180 | - PLD_SPI = 0; | |
181 | - if (!IS_ENABLED(CONFIG_DEBUG_LL)) { | |
182 | - PLD_COM2 = 0; | |
183 | - PLD_COM1 = 0; | |
184 | - } | |
185 | -} | |
186 | - | |
187 | -static struct gpio_led p720t_gpio_leds[] = { | |
188 | - { | |
189 | - .name = "User LED", | |
190 | - .default_trigger = "heartbeat", | |
191 | - .gpio = P720T_USERLED, | |
192 | - }, | |
193 | -}; | |
194 | - | |
195 | -static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = { | |
196 | - .leds = p720t_gpio_leds, | |
197 | - .num_leds = ARRAY_SIZE(p720t_gpio_leds), | |
198 | -}; | |
199 | - | |
200 | -static void __init p720t_init(void) | |
201 | -{ | |
202 | - platform_device_register(&p720t_nand_pdev); | |
203 | - platform_device_register_data(&platform_bus, "platform-lcd", 0, | |
204 | - &p720t_lcd_power_pdata, | |
205 | - sizeof(p720t_lcd_power_pdata)); | |
206 | - platform_device_register_data(&platform_bus, "generic-bl", 0, | |
207 | - &p720t_lcd_backlight_pdata, | |
208 | - sizeof(p720t_lcd_backlight_pdata)); | |
209 | - platform_device_register_simple("video-clps711x", 0, NULL, 0); | |
210 | -} | |
211 | - | |
212 | -static void __init p720t_init_late(void) | |
213 | -{ | |
214 | - platform_device_register_data(&platform_bus, "leds-gpio", 0, | |
215 | - &p720t_gpio_led_pdata, | |
216 | - sizeof(p720t_gpio_led_pdata)); | |
217 | -} | |
218 | - | |
219 | -MACHINE_START(P720T, "ARM-Prospector720T") | |
220 | - /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | |
221 | - .atag_offset = 0x100, | |
222 | - .nr_irqs = CLPS711X_NR_IRQS, | |
223 | - .fixup = fixup_p720t, | |
224 | - .map_io = p720t_map_io, | |
225 | - .init_early = p720t_init_early, | |
226 | - .init_irq = clps711x_init_irq, | |
227 | - .timer = &clps711x_timer, | |
228 | - .init_machine = p720t_init, | |
229 | - .init_late = p720t_init_late, | |
230 | - .handle_irq = clps711x_handle_irq, | |
231 | - .restart = clps711x_restart, | |
232 | -MACHINE_END |