Linux 2.6.13-rc4
[linux-2.6/next.git] / arch / sh / boards / se / 770x / setup.c
blob2bed46fb607ddff63a1e9a5c250682ea915e54d0
1 /* $Id: setup.c,v 1.1.2.4 2002/03/02 21:57:07 lethal Exp $
3 * linux/arch/sh/boards/se/770x/setup.c
5 * Copyright (C) 2000 Kazumoto Kojima
7 * Hitachi SolutionEngine Support.
9 */
11 #include <linux/config.h>
12 #include <linux/init.h>
13 #include <linux/irq.h>
15 #include <linux/hdreg.h>
16 #include <linux/ide.h>
17 #include <asm/io.h>
18 #include <asm/se/se.h>
19 #include <asm/se/smc37c93x.h>
22 * Configure the Super I/O chip
24 static void __init smsc_config(int index, int data)
26 outb_p(index, INDEX_PORT);
27 outb_p(data, DATA_PORT);
30 static void __init init_smsc(void)
32 outb_p(CONFIG_ENTER, CONFIG_PORT);
33 outb_p(CONFIG_ENTER, CONFIG_PORT);
35 /* FDC */
36 smsc_config(CURRENT_LDN_INDEX, LDN_FDC);
37 smsc_config(ACTIVATE_INDEX, 0x01);
38 smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */
40 /* IDE1 */
41 smsc_config(CURRENT_LDN_INDEX, LDN_IDE1);
42 smsc_config(ACTIVATE_INDEX, 0x01);
43 smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */
45 /* AUXIO (GPIO): to use IDE1 */
46 smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO);
47 smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */
48 smsc_config(GPIO47_INDEX, 0x00); /* nIOWOP */
50 /* COM1 */
51 smsc_config(CURRENT_LDN_INDEX, LDN_COM1);
52 smsc_config(ACTIVATE_INDEX, 0x01);
53 smsc_config(IO_BASE_HI_INDEX, 0x03);
54 smsc_config(IO_BASE_LO_INDEX, 0xf8);
55 smsc_config(IRQ_SELECT_INDEX, 4); /* IRQ4 */
57 /* COM2 */
58 smsc_config(CURRENT_LDN_INDEX, LDN_COM2);
59 smsc_config(ACTIVATE_INDEX, 0x01);
60 smsc_config(IO_BASE_HI_INDEX, 0x02);
61 smsc_config(IO_BASE_LO_INDEX, 0xf8);
62 smsc_config(IRQ_SELECT_INDEX, 3); /* IRQ3 */
64 /* RTC */
65 smsc_config(CURRENT_LDN_INDEX, LDN_RTC);
66 smsc_config(ACTIVATE_INDEX, 0x01);
67 smsc_config(IRQ_SELECT_INDEX, 8); /* IRQ8 */
69 /* XXX: PARPORT, KBD, and MOUSE will come here... */
70 outb_p(CONFIG_EXIT, CONFIG_PORT);
73 const char *get_system_type(void)
75 return "SolutionEngine";
79 * Initialize the board
81 void __init platform_setup(void)
83 init_smsc();
84 /* XXX: RTC setting comes here */