mm: hugetlb: fix hugepage memory leak caused by wrong reserve count
[linux/fpc-iii.git] / arch / arm / mach-footbridge / cats-hw.c
blob8f05489671b7f315aa763f6cc9124eac2fd263fb
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/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>
15 #include <asm/hardware/dec21285.h>
16 #include <asm/mach-types.h>
17 #include <asm/setup.h>
19 #include <asm/mach/arch.h>
21 #include "common.h"
23 #define CFG_PORT 0x370
24 #define INDEX_PORT (CFG_PORT)
25 #define DATA_PORT (CFG_PORT + 1)
27 static int __init cats_hw_init(void)
29 if (machine_is_cats()) {
30 /* Set Aladdin to CONFIGURE mode */
31 outb(0x51, CFG_PORT);
32 outb(0x23, CFG_PORT);
34 /* Select logical device 3 */
35 outb(0x07, INDEX_PORT);
36 outb(0x03, DATA_PORT);
38 /* Set parallel port to DMA channel 3, ECP+EPP1.9,
39 enable EPP timeout */
40 outb(0x74, INDEX_PORT);
41 outb(0x03, DATA_PORT);
43 outb(0xf0, INDEX_PORT);
44 outb(0x0f, DATA_PORT);
46 outb(0xf1, INDEX_PORT);
47 outb(0x07, DATA_PORT);
49 /* Select logical device 4 */
50 outb(0x07, INDEX_PORT);
51 outb(0x04, DATA_PORT);
53 /* UART1 high speed mode */
54 outb(0xf0, INDEX_PORT);
55 outb(0x02, DATA_PORT);
57 /* Select logical device 5 */
58 outb(0x07, INDEX_PORT);
59 outb(0x05, DATA_PORT);
61 /* UART2 high speed mode */
62 outb(0xf0, INDEX_PORT);
63 outb(0x02, DATA_PORT);
65 /* Set Aladdin to RUN mode */
66 outb(0xbb, CFG_PORT);
69 return 0;
72 __initcall(cats_hw_init);
75 * CATS uses soft-reboot by default, since
76 * hard reboots fail on early boards.
78 static void __init
79 fixup_cats(struct tag *tags, char **cmdline)
81 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
82 screen_info.orig_video_lines = 25;
83 screen_info.orig_video_points = 16;
84 screen_info.orig_y = 24;
85 #endif
88 MACHINE_START(CATS, "Chalice-CATS")
89 /* Maintainer: Philip Blundell */
90 .atag_offset = 0x100,
91 .reboot_mode = REBOOT_SOFT,
92 .fixup = fixup_cats,
93 .map_io = footbridge_map_io,
94 .init_irq = footbridge_init_irq,
95 .init_time = isa_timer_init,
96 .restart = footbridge_restart,
97 MACHINE_END