0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/ioport.h>
0010 #include <linux/kernel.h>
0011 #include <linux/init.h>
0012 #include <linux/screen_info.h>
0013 #include <linux/io.h>
0014 #include <linux/spinlock.h>
0015
0016 #include <asm/hardware/dec21285.h>
0017 #include <asm/mach-types.h>
0018 #include <asm/setup.h>
0019
0020 #include <asm/mach/arch.h>
0021
0022 #include "common.h"
0023
0024 #define CFG_PORT 0x370
0025 #define INDEX_PORT (CFG_PORT)
0026 #define DATA_PORT (CFG_PORT + 1)
0027
0028 static int __init cats_hw_init(void)
0029 {
0030 if (machine_is_cats()) {
0031
0032 outb(0x51, CFG_PORT);
0033 outb(0x23, CFG_PORT);
0034
0035
0036 outb(0x07, INDEX_PORT);
0037 outb(0x03, DATA_PORT);
0038
0039
0040
0041 outb(0x74, INDEX_PORT);
0042 outb(0x03, DATA_PORT);
0043
0044 outb(0xf0, INDEX_PORT);
0045 outb(0x0f, DATA_PORT);
0046
0047 outb(0xf1, INDEX_PORT);
0048 outb(0x07, DATA_PORT);
0049
0050
0051 outb(0x07, INDEX_PORT);
0052 outb(0x04, DATA_PORT);
0053
0054
0055 outb(0xf0, INDEX_PORT);
0056 outb(0x02, DATA_PORT);
0057
0058
0059 outb(0x07, INDEX_PORT);
0060 outb(0x05, DATA_PORT);
0061
0062
0063 outb(0xf0, INDEX_PORT);
0064 outb(0x02, DATA_PORT);
0065
0066
0067 outb(0xbb, CFG_PORT);
0068 }
0069
0070 return 0;
0071 }
0072
0073 __initcall(cats_hw_init);
0074
0075
0076
0077
0078
0079 static void __init
0080 fixup_cats(struct tag *tags, char **cmdline)
0081 {
0082 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
0083 screen_info.orig_video_lines = 25;
0084 screen_info.orig_video_points = 16;
0085 screen_info.orig_y = 24;
0086 #endif
0087 }
0088
0089 MACHINE_START(CATS, "Chalice-CATS")
0090
0091 .atag_offset = 0x100,
0092 .reboot_mode = REBOOT_SOFT,
0093 .fixup = fixup_cats,
0094 .map_io = footbridge_map_io,
0095 .init_irq = footbridge_init_irq,
0096 .init_time = isa_timer_init,
0097 .restart = footbridge_restart,
0098 MACHINE_END