Advertisement
Guest User

Untitled

a guest
Aug 18th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.81 KB | None | 0 0
  1. /*
  2.  * SerialICE
  3.  *
  4.  * Copyright (C) 2006 Uwe Hermann <uwe@hermann-uwe.de>
  5.  * Copyright (C) 2009 Rudolf Marek <r.marek@assembler.cz>
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; version 2 of the License.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  19.  */
  20.  
  21. const char boardname[33]="ASUS M2V-MX SE                  ";
  22.  
  23. #define SUPERIO_CONFIG_PORT     0x2e
  24.  
  25. static void superio_init(void)
  26. {
  27.     pnp_enter_ext_func_mode_ite(SUPERIO_CONFIG_PORT);
  28.  
  29.     /* Disable the watchdog. */
  30.     pnp_set_logical_device(SUPERIO_CONFIG_PORT, 7);
  31.     pnp_write_register(SUPERIO_CONFIG_PORT, 0x72, 0x00);
  32.  
  33.     /* Enable the serial port. */
  34.     pnp_set_logical_device(SUPERIO_CONFIG_PORT, 1); /* COM1 */
  35.     pnp_set_enable(SUPERIO_CONFIG_PORT, 0);
  36.     pnp_set_iobase0(SUPERIO_CONFIG_PORT, 0x3f8);
  37.     pnp_set_irq0(SUPERIO_CONFIG_PORT, 4);
  38.     pnp_set_enable(SUPERIO_CONFIG_PORT, 1);
  39.  
  40.     pnp_exit_ext_func_mode_ite(SUPERIO_CONFIG_PORT);
  41. }
  42.  
  43. static void chipset_init(void)
  44. {
  45.     superio_init();
  46.  
  47.     __asm__ __volatile__("\
  48.     jmp skip\n\
  49.     .align 128\n\
  50.     .global via_romstrap\n\
  51.     via_romstrap:\n\
  52.     .long 0x504400AA, 0x61970FC2    //;200M\n\
  53.     .long 0x504400AA, 0x61970FC2    //;400M\n\
  54.     .long 0x504400AA, 0x61970FC2    //;600M\n\
  55.     .long 0x504400AA, 0x61970FC2    //;800M\n\
  56.     .long 0x504400AA, 0x61970FC2    //;1000M\n\
  57.     skip:\n");
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement