diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-sa1100/jornada720.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 9c363bfcf310..89af0c831e8f 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/mtd/mtd.h> | ||
12 | #include <linux/mtd/partitions.h> | ||
11 | 13 | ||
12 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
13 | #include <asm/hardware/sa1111.h> | 15 | #include <asm/hardware/sa1111.h> |
@@ -16,6 +18,7 @@ | |||
16 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
17 | 19 | ||
18 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/flash.h> | ||
19 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
20 | #include <asm/mach/serial_sa1100.h> | 23 | #include <asm/mach/serial_sa1100.h> |
21 | 24 | ||
@@ -108,6 +111,66 @@ static void __init jornada720_map_io(void) | |||
108 | sa1100_register_uart(1, 1); | 111 | sa1100_register_uart(1, 1); |
109 | } | 112 | } |
110 | 113 | ||
114 | static struct mtd_partition jornada720_partitions[] = { | ||
115 | { | ||
116 | .name = "JORNADA720 boot firmware", | ||
117 | .size = 0x00040000, | ||
118 | .offset = 0, | ||
119 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
120 | }, { | ||
121 | .name = "JORNADA720 kernel", | ||
122 | .size = 0x000c0000, | ||
123 | .offset = 0x00040000, | ||
124 | }, { | ||
125 | .name = "JORNADA720 params", | ||
126 | .size = 0x00040000, | ||
127 | .offset = 0x00100000, | ||
128 | }, { | ||
129 | .name = "JORNADA720 initrd", | ||
130 | .size = 0x00100000, | ||
131 | .offset = 0x00140000, | ||
132 | }, { | ||
133 | .name = "JORNADA720 root cramfs", | ||
134 | .size = 0x00300000, | ||
135 | .offset = 0x00240000, | ||
136 | }, { | ||
137 | .name = "JORNADA720 usr cramfs", | ||
138 | .size = 0x00800000, | ||
139 | .offset = 0x00540000, | ||
140 | }, { | ||
141 | .name = "JORNADA720 usr local", | ||
142 | .size = 0, /* will expand to the end of the flash */ | ||
143 | .offset = 0x00d00000, | ||
144 | } | ||
145 | }; | ||
146 | |||
147 | static void jornada720_set_vpp(int vpp) | ||
148 | { | ||
149 | if (vpp) | ||
150 | PPSR |= 0x80; | ||
151 | else | ||
152 | PPSR &= ~0x80; | ||
153 | PPDR |= 0x80; | ||
154 | } | ||
155 | |||
156 | static struct flash_platform_data jornada720_flash_data = { | ||
157 | .map_name = "cfi_probe", | ||
158 | .set_vpp = jornada720_set_vpp, | ||
159 | .parts = jornada720_partitions, | ||
160 | .nr_parts = ARRAY_SIZE(jornada720_partitions), | ||
161 | }; | ||
162 | |||
163 | static struct resource jornada720_flash_resource = { | ||
164 | .start = SA1100_CS0_PHYS, | ||
165 | .end = SA1100_CS0_PHYS + SZ_32M - 1, | ||
166 | .flags = IORESOURCE_MEM, | ||
167 | }; | ||
168 | |||
169 | static void __init jornada720_mach_init(void) | ||
170 | { | ||
171 | sa11x0_set_flash_data(&jornada720_flash_data, &jornada720_flash_resource, 1); | ||
172 | } | ||
173 | |||
111 | MACHINE_START(JORNADA720, "HP Jornada 720") | 174 | MACHINE_START(JORNADA720, "HP Jornada 720") |
112 | /* Maintainer: Michael Gernoth <michael@gernoth.net> */ | 175 | /* Maintainer: Michael Gernoth <michael@gernoth.net> */ |
113 | .phys_ram = 0xc0000000, | 176 | .phys_ram = 0xc0000000, |
@@ -117,4 +180,5 @@ MACHINE_START(JORNADA720, "HP Jornada 720") | |||
117 | .map_io = jornada720_map_io, | 180 | .map_io = jornada720_map_io, |
118 | .init_irq = sa1100_init_irq, | 181 | .init_irq = sa1100_init_irq, |
119 | .timer = &sa1100_timer, | 182 | .timer = &sa1100_timer, |
183 | .init_machine = jornada720_mach_init, | ||
120 | MACHINE_END | 184 | MACHINE_END |