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/config.h>
12 #include <linux/init.h>
13 #include <linux/irq.h>
15 #include <linux/hdreg.h>
16 #include <linux/ide.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
);
36 smsc_config(CURRENT_LDN_INDEX
, LDN_FDC
);
37 smsc_config(ACTIVATE_INDEX
, 0x01);
38 smsc_config(IRQ_SELECT_INDEX
, 6); /* IRQ6 */
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 */
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 */
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 */
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)
84 /* XXX: RTC setting comes here */