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.
11 #include <linux/init.h>
12 #include <linux/irq.h>
14 #include <linux/hdreg.h>
15 #include <linux/ide.h>
17 #include <asm/se/se.h>
18 #include <asm/se/smc37c93x.h>
21 * Configure the Super I/O chip
23 static void __init smsc_config(int index, int data)
25 outb_p(index, INDEX_PORT);
26 outb_p(data, DATA_PORT);
29 static void __init init_smsc(void)
31 outb_p(CONFIG_ENTER, CONFIG_PORT);
32 outb_p(CONFIG_ENTER, CONFIG_PORT);
35 smsc_config(CURRENT_LDN_INDEX, LDN_FDC);
36 smsc_config(ACTIVATE_INDEX, 0x01);
37 smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */
40 smsc_config(CURRENT_LDN_INDEX, LDN_IDE1);
41 smsc_config(ACTIVATE_INDEX, 0x01);
42 smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */
44 /* AUXIO (GPIO): to use IDE1 */
45 smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO);
46 smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */
47 smsc_config(GPIO47_INDEX, 0x00); /* nIOWOP */
50 smsc_config(CURRENT_LDN_INDEX, LDN_COM1);
51 smsc_config(ACTIVATE_INDEX, 0x01);
52 smsc_config(IO_BASE_HI_INDEX, 0x03);
53 smsc_config(IO_BASE_LO_INDEX, 0xf8);
54 smsc_config(IRQ_SELECT_INDEX, 4); /* IRQ4 */
57 smsc_config(CURRENT_LDN_INDEX, LDN_COM2);
58 smsc_config(ACTIVATE_INDEX, 0x01);
59 smsc_config(IO_BASE_HI_INDEX, 0x02);
60 smsc_config(IO_BASE_LO_INDEX, 0xf8);
61 smsc_config(IRQ_SELECT_INDEX, 3); /* IRQ3 */
64 smsc_config(CURRENT_LDN_INDEX, LDN_RTC);
65 smsc_config(ACTIVATE_INDEX, 0x01);
66 smsc_config(IRQ_SELECT_INDEX, 8); /* IRQ8 */
68 /* XXX: PARPORT, KBD, and MOUSE will come here... */
69 outb_p(CONFIG_EXIT, CONFIG_PORT);
72 const char *get_system_type(void)
74 return "SolutionEngine";
78 * Initialize the board
80 void __init platform_setup(void)
83 /* XXX: RTC setting comes here */