1
2
3
4
5
6
7
8#include <linux/ioport.h>
9#include <linux/kernel.h>
10#include <linux/init.h>
11#include <linux/screen_info.h>
12#include <linux/io.h>
13#include <linux/spinlock.h>
14
15#include <asm/hardware/dec21285.h>
16#include <asm/mach-types.h>
17#include <asm/setup.h>
18
19#include <asm/mach/arch.h>
20
21#include "common.h"
22
23#define CFG_PORT 0x370
24#define INDEX_PORT (CFG_PORT)
25#define DATA_PORT (CFG_PORT + 1)
26
27static int __init cats_hw_init(void)
28{
29 if (machine_is_cats()) {
30
31 outb(0x51, CFG_PORT);
32 outb(0x23, CFG_PORT);
33
34
35 outb(0x07, INDEX_PORT);
36 outb(0x03, DATA_PORT);
37
38
39
40 outb(0x74, INDEX_PORT);
41 outb(0x03, DATA_PORT);
42
43 outb(0xf0, INDEX_PORT);
44 outb(0x0f, DATA_PORT);
45
46 outb(0xf1, INDEX_PORT);
47 outb(0x07, DATA_PORT);
48
49
50 outb(0x07, INDEX_PORT);
51 outb(0x04, DATA_PORT);
52
53
54 outb(0xf0, INDEX_PORT);
55 outb(0x02, DATA_PORT);
56
57
58 outb(0x07, INDEX_PORT);
59 outb(0x05, DATA_PORT);
60
61
62 outb(0xf0, INDEX_PORT);
63 outb(0x02, DATA_PORT);
64
65
66 outb(0xbb, CFG_PORT);
67 }
68
69 return 0;
70}
71
72__initcall(cats_hw_init);
73
74
75
76
77
78static void __init
79fixup_cats(struct machine_desc *desc, struct tag *tags,
80 char **cmdline, struct meminfo *mi)
81{
82 screen_info.orig_video_lines = 25;
83 screen_info.orig_video_points = 16;
84 screen_info.orig_y = 24;
85}
86
87MACHINE_START(CATS, "Chalice-CATS")
88
89 .phys_io = DC21285_ARMCSR_BASE,
90 .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc,
91 .boot_params = 0x00000100,
92 .soft_reboot = 1,
93 .fixup = fixup_cats,
94 .map_io = footbridge_map_io,
95 .init_irq = footbridge_init_irq,
96 .timer = &isa_timer,
97MACHINE_END
98