aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge/cats-hw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/arm/mach-footbridge/cats-hw.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/arm/mach-footbridge/cats-hw.c')
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
new file mode 100644
index 000000000000..d1ced86c379c
--- /dev/null
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -0,0 +1,95 @@
1/*
2 * linux/arch/arm/mach-footbridge/cats-hw.c
3 *
4 * CATS machine fixup
5 *
6 * Copyright (C) 1998, 1999 Russell King, Phil Blundell
7 */
8#include <linux/ioport.h>
9#include <linux/kernel.h>
10#include <linux/init.h>
11#include <linux/tty.h>
12
13#include <asm/hardware/dec21285.h>
14#include <asm/io.h>
15#include <asm/mach-types.h>
16#include <asm/setup.h>
17
18#include <asm/mach/arch.h>
19
20#include "common.h"
21
22#define CFG_PORT 0x370
23#define INDEX_PORT (CFG_PORT)
24#define DATA_PORT (CFG_PORT + 1)
25
26static int __init cats_hw_init(void)
27{
28 if (machine_is_cats()) {
29 /* Set Aladdin to CONFIGURE mode */
30 outb(0x51, CFG_PORT);
31 outb(0x23, CFG_PORT);
32
33 /* Select logical device 3 */
34 outb(0x07, INDEX_PORT);
35 outb(0x03, DATA_PORT);
36
37 /* Set parallel port to DMA channel 3, ECP+EPP1.9,
38 enable EPP timeout */
39 outb(0x74, INDEX_PORT);
40 outb(0x03, DATA_PORT);
41
42 outb(0xf0, INDEX_PORT);
43 outb(0x0f, DATA_PORT);
44
45 outb(0xf1, INDEX_PORT);
46 outb(0x07, DATA_PORT);
47
48 /* Select logical device 4 */
49 outb(0x07, INDEX_PORT);
50 outb(0x04, DATA_PORT);
51
52 /* UART1 high speed mode */
53 outb(0xf0, INDEX_PORT);
54 outb(0x02, DATA_PORT);
55
56 /* Select logical device 5 */
57 outb(0x07, INDEX_PORT);
58 outb(0x05, DATA_PORT);
59
60 /* UART2 high speed mode */
61 outb(0xf0, INDEX_PORT);
62 outb(0x02, DATA_PORT);
63
64 /* Set Aladdin to RUN mode */
65 outb(0xbb, CFG_PORT);
66 }
67
68 return 0;
69}
70
71__initcall(cats_hw_init);
72
73/*
74 * CATS uses soft-reboot by default, since
75 * hard reboots fail on early boards.
76 */
77static void __init
78fixup_cats(struct machine_desc *desc, struct tag *tags,
79 char **cmdline, struct meminfo *mi)
80{
81 ORIG_VIDEO_LINES = 25;
82 ORIG_VIDEO_POINTS = 16;
83 ORIG_Y = 24;
84}
85
86MACHINE_START(CATS, "Chalice-CATS")
87 MAINTAINER("Philip Blundell")
88 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
89 BOOT_PARAMS(0x00000100)
90 SOFT_REBOOT
91 FIXUP(fixup_cats)
92 MAPIO(footbridge_map_io)
93 INITIRQ(footbridge_init_irq)
94 .timer = &isa_timer,
95MACHINE_END