/* $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 #include #include #include #include #include #include #include /* * 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 */ }