mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 03:17:48 +00:00
1da177e4c3
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
86 lines
1.9 KiB
C
86 lines
1.9 KiB
C
/* $Id: setup.c,v 1.1.2.4 2002/03/02 21:57:07 lethal Exp $
|
|
*
|
|
* linux/arch/sh/boards/se/770x/setup.c
|
|
*
|
|
* Copyright (C) 2000 Kazumoto Kojima
|
|
*
|
|
* Hitachi SolutionEngine Support.
|
|
*
|
|
*/
|
|
|
|
#include <linux/config.h>
|
|
#include <linux/init.h>
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/hdreg.h>
|
|
#include <linux/ide.h>
|
|
#include <asm/io.h>
|
|
#include <asm/se/se.h>
|
|
#include <asm/se/smc37c93x.h>
|
|
|
|
/*
|
|
* Configure the Super I/O chip
|
|
*/
|
|
static void __init smsc_config(int index, int data)
|
|
{
|
|
outb_p(index, INDEX_PORT);
|
|
outb_p(data, DATA_PORT);
|
|
}
|
|
|
|
static void __init init_smsc(void)
|
|
{
|
|
outb_p(CONFIG_ENTER, CONFIG_PORT);
|
|
outb_p(CONFIG_ENTER, CONFIG_PORT);
|
|
|
|
/* FDC */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_FDC);
|
|
smsc_config(ACTIVATE_INDEX, 0x01);
|
|
smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */
|
|
|
|
/* IDE1 */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_IDE1);
|
|
smsc_config(ACTIVATE_INDEX, 0x01);
|
|
smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */
|
|
|
|
/* AUXIO (GPIO): to use IDE1 */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO);
|
|
smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */
|
|
smsc_config(GPIO47_INDEX, 0x00); /* nIOWOP */
|
|
|
|
/* COM1 */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_COM1);
|
|
smsc_config(ACTIVATE_INDEX, 0x01);
|
|
smsc_config(IO_BASE_HI_INDEX, 0x03);
|
|
smsc_config(IO_BASE_LO_INDEX, 0xf8);
|
|
smsc_config(IRQ_SELECT_INDEX, 4); /* IRQ4 */
|
|
|
|
/* COM2 */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_COM2);
|
|
smsc_config(ACTIVATE_INDEX, 0x01);
|
|
smsc_config(IO_BASE_HI_INDEX, 0x02);
|
|
smsc_config(IO_BASE_LO_INDEX, 0xf8);
|
|
smsc_config(IRQ_SELECT_INDEX, 3); /* IRQ3 */
|
|
|
|
/* RTC */
|
|
smsc_config(CURRENT_LDN_INDEX, LDN_RTC);
|
|
smsc_config(ACTIVATE_INDEX, 0x01);
|
|
smsc_config(IRQ_SELECT_INDEX, 8); /* IRQ8 */
|
|
|
|
/* XXX: PARPORT, KBD, and MOUSE will come here... */
|
|
outb_p(CONFIG_EXIT, CONFIG_PORT);
|
|
}
|
|
|
|
const char *get_system_type(void)
|
|
{
|
|
return "SolutionEngine";
|
|
}
|
|
|
|
/*
|
|
* Initialize the board
|
|
*/
|
|
void __init platform_setup(void)
|
|
{
|
|
init_smsc();
|
|
/* XXX: RTC setting comes here */
|
|
}
|