- pre3:
[davej-history.git] / arch / arm / mach-footbridge / cats-hw.c
blob160b0307fa9253bdaeba43347dc092d6ae4f0b72
1 /*
2 * linux/arch/arm/mach-footbridge/cats-hw.c
4 * CATS machine fixup
6 * Copyright (C) 1998, 1999 Russell King, Phil Blundell
7 */
8 #include <linux/sched.h>
9 #include <linux/ioport.h>
10 #include <linux/kernel.h>
11 #include <linux/init.h>
13 #include <asm/io.h>
14 #include <asm/mach-types.h>
16 #define CFG_PORT 0x370
17 #define INDEX_PORT (CFG_PORT)
18 #define DATA_PORT (CFG_PORT + 1)
20 static int __init cats_hw_init(void)
22 if (machine_is_cats()) {
23 /* Set Aladdin to CONFIGURE mode */
24 outb(0x51, CFG_PORT);
25 outb(0x23, CFG_PORT);
27 /* Select logical device 3 */
28 outb(0x07, INDEX_PORT);
29 outb(0x03, DATA_PORT);
31 /* Set parallel port to DMA channel 3, ECP+EPP1.9,
32 enable EPP timeout */
33 outb(0x74, INDEX_PORT);
34 outb(0x03, DATA_PORT);
36 outb(0xf0, INDEX_PORT);
37 outb(0x0f, DATA_PORT);
39 outb(0xf1, INDEX_PORT);
40 outb(0x07, DATA_PORT);
42 /* Select logical device 4 */
43 outb(0x07, INDEX_PORT);
44 outb(0x04, DATA_PORT);
46 /* UART1 high speed mode */
47 outb(0xf0, INDEX_PORT);
48 outb(0x02, DATA_PORT);
50 /* Select logical device 5 */
51 outb(0x07, INDEX_PORT);
52 outb(0x05, DATA_PORT);
54 /* UART2 high speed mode */
55 outb(0xf0, INDEX_PORT);
56 outb(0x02, DATA_PORT);
58 /* Set Aladdin to RUN mode */
59 outb(0xbb, CFG_PORT);
62 return 0;
65 __initcall(cats_hw_init);