2 * arch/arm/mach-ep93xx/ts72xx.c
3 * Technologic Systems TS72xx SBC support.
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
13 #include <linux/config.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
17 #include <linux/sched.h>
18 #include <linux/interrupt.h>
19 #include <linux/mtd/physmap.h>
21 #include <asm/hardware.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
26 static struct map_desc ts72xx_io_desc
[] __initdata
= {
28 .virtual = TS72XX_MODEL_VIRT_BASE
,
29 .pfn
= __phys_to_pfn(TS72XX_MODEL_PHYS_BASE
),
30 .length
= TS72XX_MODEL_SIZE
,
33 .virtual = TS72XX_OPTIONS_VIRT_BASE
,
34 .pfn
= __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE
),
35 .length
= TS72XX_OPTIONS_SIZE
,
38 .virtual = TS72XX_OPTIONS2_VIRT_BASE
,
39 .pfn
= __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE
),
40 .length
= TS72XX_OPTIONS2_SIZE
,
45 static struct map_desc ts72xx_nand_io_desc
[] __initdata
= {
47 .virtual = TS72XX_NAND_DATA_VIRT_BASE
,
48 .pfn
= __phys_to_pfn(TS72XX_NAND1_DATA_PHYS_BASE
),
49 .length
= TS72XX_NAND_DATA_SIZE
,
52 .virtual = TS72XX_NAND_CONTROL_VIRT_BASE
,
53 .pfn
= __phys_to_pfn(TS72XX_NAND1_CONTROL_PHYS_BASE
),
54 .length
= TS72XX_NAND_CONTROL_SIZE
,
57 .virtual = TS72XX_NAND_BUSY_VIRT_BASE
,
58 .pfn
= __phys_to_pfn(TS72XX_NAND1_BUSY_PHYS_BASE
),
59 .length
= TS72XX_NAND_BUSY_SIZE
,
64 static struct map_desc ts72xx_alternate_nand_io_desc
[] __initdata
= {
66 .virtual = TS72XX_NAND_DATA_VIRT_BASE
,
67 .pfn
= __phys_to_pfn(TS72XX_NAND2_DATA_PHYS_BASE
),
68 .length
= TS72XX_NAND_DATA_SIZE
,
71 .virtual = TS72XX_NAND_CONTROL_VIRT_BASE
,
72 .pfn
= __phys_to_pfn(TS72XX_NAND2_CONTROL_PHYS_BASE
),
73 .length
= TS72XX_NAND_CONTROL_SIZE
,
76 .virtual = TS72XX_NAND_BUSY_VIRT_BASE
,
77 .pfn
= __phys_to_pfn(TS72XX_NAND2_BUSY_PHYS_BASE
),
78 .length
= TS72XX_NAND_BUSY_SIZE
,
83 static void __init
ts72xx_map_io(void)
86 iotable_init(ts72xx_io_desc
, ARRAY_SIZE(ts72xx_io_desc
));
89 * The TS-7200 has NOR flash, the other models have NAND flash.
91 if (!board_is_ts7200()) {
92 if (is_ts9420_installed()) {
93 iotable_init(ts72xx_alternate_nand_io_desc
,
94 ARRAY_SIZE(ts72xx_alternate_nand_io_desc
));
96 iotable_init(ts72xx_nand_io_desc
,
97 ARRAY_SIZE(ts72xx_nand_io_desc
));
102 static void __init
ts72xx_init_machine(void)
104 ep93xx_init_devices();
105 if (board_is_ts7200())
106 physmap_configure(TS72XX_NOR_PHYS_BASE
, 0x01000000, 1, NULL
);
109 MACHINE_START(TS72XX
, "Technologic Systems TS-72xx SBC")
110 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
111 .phys_io
= EP93XX_APB_PHYS_BASE
,
112 .io_pg_offst
= ((EP93XX_APB_VIRT_BASE
) >> 18) & 0xfffc,
113 .boot_params
= 0x00000100,
114 .map_io
= ts72xx_map_io
,
115 .init_irq
= ep93xx_init_irq
,
116 .timer
= &ep93xx_timer
,
117 .init_machine
= ts72xx_init_machine
,