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