1 // SPDX-License-Identifier: GPL-2.0
3 * linux/arch/arm/mach-footbridge/cats-hw.c
7 * Copyright (C) 1998, 1999 Russell King, Phil Blundell
9 #include <linux/ioport.h>
10 #include <linux/kernel.h>
11 #include <linux/init.h>
12 #include <linux/screen_info.h>
14 #include <linux/spinlock.h>
16 #include <asm/hardware/dec21285.h>
17 #include <asm/mach-types.h>
18 #include <asm/setup.h>
20 #include <asm/mach/arch.h>
24 #define CFG_PORT 0x370
25 #define INDEX_PORT (CFG_PORT)
26 #define DATA_PORT (CFG_PORT + 1)
28 static int __init
cats_hw_init(void)
30 if (machine_is_cats()) {
31 /* Set Aladdin to CONFIGURE mode */
35 /* Select logical device 3 */
36 outb(0x07, INDEX_PORT
);
37 outb(0x03, DATA_PORT
);
39 /* Set parallel port to DMA channel 3, ECP+EPP1.9,
41 outb(0x74, INDEX_PORT
);
42 outb(0x03, DATA_PORT
);
44 outb(0xf0, INDEX_PORT
);
45 outb(0x0f, DATA_PORT
);
47 outb(0xf1, INDEX_PORT
);
48 outb(0x07, DATA_PORT
);
50 /* Select logical device 4 */
51 outb(0x07, INDEX_PORT
);
52 outb(0x04, DATA_PORT
);
54 /* UART1 high speed mode */
55 outb(0xf0, INDEX_PORT
);
56 outb(0x02, DATA_PORT
);
58 /* Select logical device 5 */
59 outb(0x07, INDEX_PORT
);
60 outb(0x05, DATA_PORT
);
62 /* UART2 high speed mode */
63 outb(0xf0, INDEX_PORT
);
64 outb(0x02, DATA_PORT
);
66 /* Set Aladdin to RUN mode */
73 __initcall(cats_hw_init
);
76 * CATS uses soft-reboot by default, since
77 * hard reboots fail on early boards.
80 fixup_cats(struct tag
*tags
, char **cmdline
)
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;
89 MACHINE_START(CATS
, "Chalice-CATS")
90 /* Maintainer: Philip Blundell */
92 .reboot_mode
= REBOOT_SOFT
,
94 .map_io
= footbridge_map_io
,
95 .init_irq
= footbridge_init_irq
,
96 .init_time
= isa_timer_init
,
97 .restart
= footbridge_restart
,