2 * linux/arch/arm/mach-sa1100/jornada720.c
5 #include <linux/init.h>
6 #include <linux/kernel.h>
8 #include <linux/delay.h>
9 #include <linux/platform_device.h>
10 #include <linux/ioport.h>
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
14 #include <asm/hardware.h>
15 #include <asm/hardware/sa1111.h>
17 #include <asm/mach-types.h>
18 #include <asm/setup.h>
20 #include <asm/mach/arch.h>
21 #include <asm/mach/flash.h>
22 #include <asm/mach/map.h>
23 #include <asm/mach/serial_sa1100.h>
28 #define JORTUCR_VAL 0x20000400
30 static struct resource sa1111_resources[] = {
34 .flags = IORESOURCE_MEM,
39 .flags = IORESOURCE_IRQ,
43 static u64 sa1111_dmamask = 0xffffffffUL;
45 static struct platform_device sa1111_device = {
49 .dma_mask = &sa1111_dmamask,
50 .coherent_dma_mask = 0xffffffff,
52 .num_resources = ARRAY_SIZE(sa1111_resources),
53 .resource = sa1111_resources,
56 static struct platform_device *devices[] __initdata = {
60 static int __init jornada720_init(void)
64 if (machine_is_jornada720()) {
66 TUCR = JORTUCR_VAL; /* set the oscillator out to the SA-1101 */
75 /* LDD4 is speaker, LDD3 is microphone */
76 PPSR &= ~(PPC_LDD3 | PPC_LDD4);
77 PPDR |= PPC_LDD3 | PPC_LDD4;
79 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
84 arch_initcall(jornada720_init);
86 static struct map_desc jornada720_io_desc[] __initdata = {
87 { /* Epson registers */
88 .virtual = 0xf0000000,
89 .pfn = __phys_to_pfn(0x48000000),
92 }, { /* Epson frame buffer */
93 .virtual = 0xf1000000,
94 .pfn = __phys_to_pfn(0x48200000),
98 .virtual = 0xf4000000,
99 .pfn = __phys_to_pfn(0x40000000),
100 .length = 0x00100000,
105 static void __init jornada720_map_io(void)
108 iotable_init(jornada720_io_desc, ARRAY_SIZE(jornada720_io_desc));
110 sa1100_register_uart(0, 3);
111 sa1100_register_uart(1, 1);
114 static struct mtd_partition jornada720_partitions[] = {
116 .name = "JORNADA720 boot firmware",
119 .mask_flags = MTD_WRITEABLE, /* force read-only */
121 .name = "JORNADA720 kernel",
123 .offset = 0x00040000,
125 .name = "JORNADA720 params",
127 .offset = 0x00100000,
129 .name = "JORNADA720 initrd",
131 .offset = 0x00140000,
133 .name = "JORNADA720 root cramfs",
135 .offset = 0x00240000,
137 .name = "JORNADA720 usr cramfs",
139 .offset = 0x00540000,
141 .name = "JORNADA720 usr local",
142 .size = 0, /* will expand to the end of the flash */
143 .offset = 0x00d00000,
147 static void jornada720_set_vpp(int vpp)
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),
163 static struct resource jornada720_flash_resource = {
164 .start = SA1100_CS0_PHYS,
165 .end = SA1100_CS0_PHYS + SZ_32M - 1,
166 .flags = IORESOURCE_MEM,
169 static void __init jornada720_mach_init(void)
171 sa11x0_set_flash_data(&jornada720_flash_data, &jornada720_flash_resource, 1);
174 MACHINE_START(JORNADA720, "HP Jornada 720")
175 /* Maintainer: Michael Gernoth <michael@gernoth.net> */
176 .phys_ram = 0xc0000000,
177 .phys_io = 0x80000000,
178 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
179 .boot_params = 0xc0000100,
180 .map_io = jornada720_map_io,
181 .init_irq = sa1100_init_irq,
182 .timer = &sa1100_timer,
183 .init_machine = jornada720_mach_init,