2 * linux/arch/arm/mach-footbridge/cats-hw.c
6 * Copyright (C) 1998, 1999 Russell King, Phil Blundell
8 #include <linux/ioport.h>
9 #include <linux/kernel.h>
10 #include <linux/init.h>
13 #include <asm/mach-types.h>
15 #define CFG_PORT 0x370
16 #define INDEX_PORT (CFG_PORT)
17 #define DATA_PORT (CFG_PORT + 1)
19 static int __init
cats_hw_init(void)
21 if (machine_is_cats()) {
22 /* Set Aladdin to CONFIGURE mode */
26 /* Select logical device 3 */
27 outb(0x07, INDEX_PORT
);
28 outb(0x03, DATA_PORT
);
30 /* Set parallel port to DMA channel 3, ECP+EPP1.9,
32 outb(0x74, INDEX_PORT
);
33 outb(0x03, DATA_PORT
);
35 outb(0xf0, INDEX_PORT
);
36 outb(0x0f, DATA_PORT
);
38 outb(0xf1, INDEX_PORT
);
39 outb(0x07, DATA_PORT
);
41 /* Select logical device 4 */
42 outb(0x07, INDEX_PORT
);
43 outb(0x04, DATA_PORT
);
45 /* UART1 high speed mode */
46 outb(0xf0, INDEX_PORT
);
47 outb(0x02, DATA_PORT
);
49 /* Select logical device 5 */
50 outb(0x07, INDEX_PORT
);
51 outb(0x05, DATA_PORT
);
53 /* UART2 high speed mode */
54 outb(0xf0, INDEX_PORT
);
55 outb(0x02, DATA_PORT
);
57 /* Set Aladdin to RUN mode */
64 __initcall(cats_hw_init
);