aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/jornada720.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-sa1100/jornada720.c')
-rw-r--r--arch/arm/mach-sa1100/jornada720.c84
1 files changed, 80 insertions, 4 deletions
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 2f497112c96a..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
@@ -81,10 +84,22 @@ static int __init jornada720_init(void)
81arch_initcall(jornada720_init); 84arch_initcall(jornada720_init);
82 85
83static struct map_desc jornada720_io_desc[] __initdata = { 86static struct map_desc jornada720_io_desc[] __initdata = {
84 /* virtual physical length type */ 87 { /* Epson registers */
85 { 0xf0000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Epson registers */ 88 .virtual = 0xf0000000,
86 { 0xf1000000, 0x48200000, 0x00100000, MT_DEVICE }, /* Epson frame buffer */ 89 .pfn = __phys_to_pfn(0x48000000),
87 { 0xf4000000, 0x40000000, 0x00100000, MT_DEVICE } /* SA-1111 */ 90 .length = 0x00100000,
91 .type = MT_DEVICE
92 }, { /* Epson frame buffer */
93 .virtual = 0xf1000000,
94 .pfn = __phys_to_pfn(0x48200000),
95 .length = 0x00100000,
96 .type = MT_DEVICE
97 }, { /* SA-1111 */
98 .virtual = 0xf4000000,
99 .pfn = __phys_to_pfn(0x40000000),
100 .length = 0x00100000,
101 .type = MT_DEVICE
102 }
88}; 103};
89 104
90static void __init jornada720_map_io(void) 105static void __init jornada720_map_io(void)
@@ -96,6 +111,66 @@ static void __init jornada720_map_io(void)
96 sa1100_register_uart(1, 1); 111 sa1100_register_uart(1, 1);
97} 112}
98 113
114static 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
147static void jornada720_set_vpp(int vpp)
148{
149 if (vpp)
150 PPSR |= 0x80;
151 else
152 PPSR &= ~0x80;
153 PPDR |= 0x80;
154}
155
156static 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
163static struct resource jornada720_flash_resource = {
164 .start = SA1100_CS0_PHYS,
165 .end = SA1100_CS0_PHYS + SZ_32M - 1,
166 .flags = IORESOURCE_MEM,
167};
168
169static void __init jornada720_mach_init(void)
170{
171 sa11x0_set_flash_data(&jornada720_flash_data, &jornada720_flash_resource, 1);
172}
173
99MACHINE_START(JORNADA720, "HP Jornada 720") 174MACHINE_START(JORNADA720, "HP Jornada 720")
100 /* Maintainer: Michael Gernoth <michael@gernoth.net> */ 175 /* Maintainer: Michael Gernoth <michael@gernoth.net> */
101 .phys_ram = 0xc0000000, 176 .phys_ram = 0xc0000000,
@@ -105,4 +180,5 @@ MACHINE_START(JORNADA720, "HP Jornada 720")
105 .map_io = jornada720_map_io, 180 .map_io = jornada720_map_io,
106 .init_irq = sa1100_init_irq, 181 .init_irq = sa1100_init_irq,
107 .timer = &sa1100_timer, 182 .timer = &sa1100_timer,
183 .init_machine = jornada720_mach_init,
108MACHINE_END 184MACHINE_END