[SerialICE] [commit] r98 - in trunk/SerialICE: . mainboard
repository service
svn at coresystems.de
Fri Jul 2 16:31:49 CEST 2010
Author: stepan
Date: Fri Jul 2 16:31:49 2010
New Revision: 98
URL: http://www.serialice.com/trac/serialice/changeset/98
Log:
Support for the HP DL165 G6 mainboard.
Signed-off-by: Arne Georg Gleditsch <arne.gleditsch at numascale.com>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Added:
trunk/SerialICE/mainboard/hp_dl165_g6.c
Modified:
trunk/SerialICE/Kconfig
trunk/SerialICE/chipset.c
Modified: trunk/SerialICE/Kconfig
==============================================================================
--- trunk/SerialICE/Kconfig Wed Mar 17 01:44:53 2010 (r97)
+++ trunk/SerialICE/Kconfig Fri Jul 2 16:31:49 2010 (r98)
@@ -67,6 +67,9 @@
bool "Tyan S2912"
select MCP55_ROMSTRAP
+config BOARD_HP_DL165_G6
+ bool "HP DL165 G6"
+
endchoice
config BOARD_INIT
@@ -83,6 +86,7 @@
default "asrock_939a785gmh.c" if BOARD_ASROCK_939A785GMH
default "televideo_tc7010.c" if BOARD_TELEVIDEO_TC7010
default "tyan_s2912.c" if BOARD_TYAN_S2912
+ default "hp_dl165_g6.c" if BOARD_HP_DL165_G6
choice
prompt "Target communication"
Modified: trunk/SerialICE/chipset.c
==============================================================================
--- trunk/SerialICE/chipset.c Wed Mar 17 01:44:53 2010 (r97)
+++ trunk/SerialICE/chipset.c Fri Jul 2 16:31:49 2010 (r98)
@@ -64,6 +64,12 @@
pnp_write_register(port, 0x61, iobase & 0xff);
}
+static inline void pnp_set_iobase1(u16 port, u16 iobase)
+{
+ pnp_write_register(port, 0x62, (iobase >> 8) & 0xff);
+ pnp_write_register(port, 0x63, iobase & 0xff);
+}
+
static inline void pnp_set_irq0(u16 port, u8 irq)
{
pnp_write_register(port, 0x70, irq);
Added: trunk/SerialICE/mainboard/hp_dl165_g6.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/SerialICE/mainboard/hp_dl165_g6.c Fri Jul 2 16:31:49 2010 (r98)
@@ -0,0 +1,60 @@
+/*
+ * SerialICE
+ *
+ * Copyright (C) 2009 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2010 Arne Georg Gleditsch <arne.gleditsch at numascale.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+const char boardname[33]="HP DL165 G6 ";
+
+#define SCH4307_CONFIG_PORT 0x162e
+#define SUPERIO_CONFIG_PORT 0x2e
+#define SUPERIO_SP1 2
+
+static void superio_init(void)
+{
+ int i;
+
+ pnp_enter_ext_func_mode_alt(SCH4307_CONFIG_PORT);
+ pnp_set_logical_device(SCH4307_CONFIG_PORT, 6); /* CMOS/RTC */
+ pnp_set_iobase0(SCH4307_CONFIG_PORT, 0x70);
+ pnp_set_iobase1(SCH4307_CONFIG_PORT, 0x72);
+ pnp_set_enable(SCH4307_CONFIG_PORT, 3);
+
+ pnp_set_logical_device(SCH4307_CONFIG_PORT, 3); /* Debug */
+ pnp_set_iobase0(SCH4307_CONFIG_PORT, 0x80);
+ pnp_set_enable(SCH4307_CONFIG_PORT, 1);
+
+ pnp_set_logical_device(SCH4307_CONFIG_PORT, 0xa);
+ pnp_set_iobase0(SCH4307_CONFIG_PORT, 0x600);
+ pnp_set_enable(SCH4307_CONFIG_PORT, 1);
+ pnp_exit_ext_func_mode(SCH4307_CONFIG_PORT);
+
+ /* Enable the serial port. */
+ outb(0x5a, SUPERIO_CONFIG_PORT);
+ pnp_set_logical_device(SUPERIO_CONFIG_PORT, SUPERIO_SP1); /* COM1 */
+ pnp_set_enable(SUPERIO_CONFIG_PORT, 0);
+ pnp_set_iobase0(SUPERIO_CONFIG_PORT, 0x3f8);
+ pnp_set_irq0(SUPERIO_CONFIG_PORT, 4);
+ pnp_set_enable(SUPERIO_CONFIG_PORT, 1);
+ outb(0xa5, SUPERIO_CONFIG_PORT);
+}
+
+static void chipset_init(void)
+{
+ superio_init();
+}
More information about the SerialICE
mailing list