Author: rminnich
Date: 2007-06-27 22:09:47 +0200 (Wed, 27 Jun 2007)
New Revision: 380
Added:
LinuxBIOSv3/superio/winbond/w83627hf/dts
Removed:
LinuxBIOSv3/superio/winbond/w83627hf/chip.h
LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_init.c
Modified:
LinuxBIOSv3/superio/winbond/w83627hf/superio.c
LinuxBIOSv3/superio/winbond/w83627hf/w83627hf.h
LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_serial.c
Log:
Superio commits.
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Acked-by: Stefan Reinauer <stepan(a)coresystems.de>
Deleted: LinuxBIOSv3/superio/winbond/w83627hf/chip.h
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/chip.h 2007-06-27 20:02:43 UTC (rev 379)
+++ LinuxBIOSv3/superio/winbond/w83627hf/chip.h 2007-06-27 20:09:47 UTC (rev 380)
@@ -1,12 +0,0 @@
-#ifndef SUPERIO_WINBOND_W83627HF_CHIP_H
-#define SUPERIO_WINBOND_W83627HF_CHIP_H
-
-#include <keyboard.h>
-#include <uart8250.h>
-
-struct superio_winbond_w83627hf_config {
- int com1_baud, com2_baud;
- struct pc_keyboard keyboard;
-};
-
-#endif /* SUPERIO_WINBOND_W83627HF_CHIP_H */
Added: LinuxBIOSv3/superio/winbond/w83627hf/dts
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/dts (rev 0)
+++ LinuxBIOSv3/superio/winbond/w83627hf/dts 2007-06-27 20:09:47 UTC (rev 380)
@@ -0,0 +1,73 @@
+/*
+ * This file is part of the LinuxBIOS project.
+
+ * Copyright 2007 Ronald G. Minnich <rminnich(a)gmail.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
+ */
+ {
+ /* to override any of these, just put the over-ride in mainboard dts */
+ floppydev = "0x0";
+ floppyenable = "0";
+ floppyio = "0x3f0";
+ floppyirq = "0x60";
+ floppydrq = "0x02";
+
+ ppdev = "2";
+ ppenable = "0";
+ ppio = "0x378";
+ ppirq = "7";
+
+ com1dev = "2";
+ com1enable = "0";
+ com1io = "0x3f8";
+ com1irq = "4";
+
+ com2dev = "3";
+ com2enable = "0";
+ com2io = "0x2f8";
+ com2irq = "3";
+
+ kbdev = "5";
+ kbenable = "0";
+ kbio = "0x60";
+ kbio2 = "0x62";
+ kbirq = "1";
+ kbirq2 = "12";
+
+ cirdev = "6";
+ cirenable = "0";
+
+ gamedev = "7";
+ gameenable = "0";
+ gameio = "0x220";
+ gameio2 = "0x400";
+ gameirq = "9";
+
+ gpio2dev = "8";
+ gpio2enable = "0";
+
+ gpio3dev = "9";
+ gpio3enable = "0";
+
+ acpidev = "0xa";
+ acpienable = "0";
+
+ hwmdev = "0xb";
+ hwmenable = "0";
+ hwmio = "0x290";
+ hwmirq = "5";
+
+};
Modified: LinuxBIOSv3/superio/winbond/w83627hf/superio.c
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/superio.c 2007-06-27 20:02:43 UTC (rev 379)
+++ LinuxBIOSv3/superio/winbond/w83627hf/superio.c 2007-06-27 20:09:47 UTC (rev 380)
@@ -1,9 +1,24 @@
-/* Copyright 2000 AG Electronics Ltd.
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright 2000 AG Electronics Ltd.
* Copyright 2003-2004 Linux Networx
* Copyright 2004 Tyan
* By LYH change from PC87360
* Copyright 2007 coresystems GmbH
- * This code is distributed without warranty under the GPL v2 (see COPYING)
+ *
+ * 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.
+ *
+ * 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
*/
#include <io.h>
@@ -15,7 +30,7 @@
#include <uart8250.h>
#include <keyboard.h>
// #include <pc80/mc146818rtc.h>
-#include "chip.h"
+#include <statictree.h>
#include "w83627hf.h"
@@ -101,6 +116,7 @@
{
struct superio_winbond_w83627hf_config *conf;
struct resource *res0, *res1;
+ struct pc_keyboard keyboard;
#if 1
printk(BIOS_ERR, "dummy init XXXX\n");
@@ -125,7 +141,7 @@
case W83627HF_KBC:
res0 = find_resource(dev, PNP_IDX_IO0);
res1 = find_resource(dev, PNP_IDX_IO1);
- init_pc_keyboard(res0->base, res1->base, &conf->keyboard);
+ init_pc_keyboard(res0->base, res1->base, &keyboard);
break;
case W83627HF_HWM:
res0 = find_resource(dev, PNP_IDX_IO0);
Modified: LinuxBIOSv3/superio/winbond/w83627hf/w83627hf.h
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/w83627hf.h 2007-06-27 20:02:43 UTC (rev 379)
+++ LinuxBIOSv3/superio/winbond/w83627hf/w83627hf.h 2007-06-27 20:09:47 UTC (rev 380)
@@ -12,83 +12,4 @@
#define W83627HF_GPIO3 9
#define W83627HF_ACPI 10
#define W83627HF_HWM 11 /* Hardware Monitor */
-
-//#define W83627HF_GPIO_DEV PNP_DEV(0x2e, W83627HF_GPIO)
-//#define W83627HF_XBUS_DEV PNP_DEV(0x2e, W83627HF_XBUS)
-
-#define W83627HF_GPSEL 0xf0
-#define W83627HF_GPCFG1 0xf1
-#define W83627HF_GPEVR 0xf2
-#define W83627HF_GPCFG2 0xf3
-#define W83627HF_EXTCFG 0xf4
-#define W83627HF_IOEXT1A 0xf5
-#define W83627HF_IOEXT1B 0xf6
-#define W83627HF_IOEXT2A 0xf7
-#define W83627HF_IOEXT2B 0xf8
-
-#define W83627HF_GPDO_0 0x00
-#define W83627HF_GPDI_0 0x01
-#define W83627HF_GPDO_1 0x02
-#define W83627HF_GPDI_1 0x03
-#define W83627HF_GPEVEN_1 0x04
-#define W83627HF_GPEVST_1 0x05
-#define W83627HF_GPDO_2 0x06
-#define W83627HF_GPDI_2 0x07
-#define W83627HF_GPDO_3 0x08
-#define W83627HF_GPDI_3 0x09
-#define W83627HF_GPDO_4 0x0a
-#define W83627HF_GPDI_4 0x0b
-#define W83627HF_GPEVEN_4 0x0c
-#define W83627HF_GPEVST_4 0x0d
-#define W83627HF_GPDO_5 0x0e
-#define W83627HF_GPDI_5 0x0f
-#define W83627HF_GPDO_6 0x10
-#define W83627HF_GPDO_7A 0x11
-#define W83627HF_GPDO_7B 0x12
-#define W83627HF_GPDO_7C 0x13
-#define W83627HF_GPDO_7D 0x14
-#define W83627HF_GPDI_7A 0x15
-#define W83627HF_GPDI_7B 0x16
-#define W83627HF_GPDI_7C 0x17
-#define W83627HF_GPDI_7D 0x18
-
-#define W83627HF_XIOCNF 0xf0
-#define W83627HF_XIOBA1H 0xf1
-#define W83627HF_XIOBA1L 0xf2
-#define W83627HF_XIOSIZE1 0xf3
-#define W83627HF_XIOBA2H 0xf4
-#define W83627HF_XIOBA2L 0xf5
-#define W83627HF_XIOSIZE2 0xf6
-#define W83627HF_XMEMCNF1 0xf7
-#define W83627HF_XMEMCNF2 0xf8
-#define W83627HF_XMEMBAH 0xf9
-#define W83627HF_XMEMBAL 0xfa
-#define W83627HF_XMEMSIZE 0xfb
-#define W83627HF_XIRQMAP1 0xfc
-#define W83627HF_XIRQMAP2 0xfd
-#define W83627HF_XBIMM 0xfe
-#define W83627HF_XBBSL 0xff
-
-#define W83627HF_XBCNF 0x00
-#define W83627HF_XZCNF0 0x01
-#define W83627HF_XZCNF1 0x02
-#define W83627HF_XIRQC0 0x04
-#define W83627HF_XIRQC1 0x05
-#define W83627HF_XIRQC2 0x06
-#define W83627HF_XIMA0 0x08
-#define W83627HF_XIMA1 0x09
-#define W83627HF_XIMA2 0x0a
-#define W83627HF_XIMA3 0x0b
-#define W83627HF_XIMD 0x0c
-#define W83627HF_XZCNF2 0x0d
-#define W83627HF_XZCNF3 0x0e
-#define W83627HF_XZM0 0x0f
-#define W83627HF_XZM1 0x10
-#define W83627HF_XZM2 0x11
-#define W83627HF_XZM3 0x12
-#define W83627HF_HAP0 0x13
-#define W83627HF_HAP1 0x14
-#define W83627HF_XSCNF 0x15
-#define W83627HF_XWBCNF 0x16
-
#endif /* SUPERIO_WINBOND_W83627HF_W83627HF_H */
Deleted: LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_init.c
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_init.c 2007-06-27 20:02:43 UTC (rev 379)
+++ LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_init.c 2007-06-27 20:09:47 UTC (rev 380)
@@ -1,14 +0,0 @@
-#include "w83627hf.h"
-
-static void w83627hf_disable_dev(struct device *dev)
-{
- pnp_set_logical_device(dev);
- pnp_set_enable(dev, 0);
-}
-static void w83627hf_enable_dev(struct device *dev, unsigned iobase)
-{
- pnp_set_logical_device(dev);
- pnp_set_enable(dev, 0);
- pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
- pnp_set_enable(dev, 1);
-}
Modified: LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_serial.c
===================================================================
--- LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_serial.c 2007-06-27 20:02:43 UTC (rev 379)
+++ LinuxBIOSv3/superio/winbond/w83627hf/w83627hf_early_serial.c 2007-06-27 20:09:47 UTC (rev 380)
@@ -1,22 +1,36 @@
+/*
+ * This file is part of the LinuxBIOS project.
+ *
+ * Copyright 2000 AG Electronics Ltd.
+ * Copyright 2003-2004 Linux Networx
+ * Copyright 2004 Tyan
+ * By LYH change from PC87360
+ * Copyright 2007 coresystems GmbH
+ *
+ * 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
+ */
+#include <io.h>
+#include <device/pnp.h>
#include "w83627hf.h"
-static inline void pnp_enter_ext_func_mode(struct device *dev)
+void w83627hf_enable_serial(u8 dev, u8 serial, u16 iobase)
{
- unsigned port = dev>>8;
- outb(0x87, port);
- outb(0x87, port);
+ rawpnp_enter_ext_func_mode(dev);
+ rawpnp_set_logical_device(dev,serial);
+ rawpnp_set_enable(dev, 0);
+ rawpnp_set_iobase(dev, PNP_IDX_IO0, iobase);
+ rawpnp_set_enable(dev, 1);
+ rawpnp_exit_ext_func_mode(dev);
}
-static void pnp_exit_ext_func_mode(struct device *dev)
-{
- unsigned port = dev>>8;
- outb(0xaa, port);
-}
-static void w83627hf_enable_serial(struct device *dev, unsigned iobase)
-{
- pnp_enter_ext_func_mode(dev);
- pnp_set_logical_device(dev);
- pnp_set_enable(dev, 0);
- pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
- pnp_set_enable(dev, 1);
- pnp_exit_ext_func_mode(dev);
-}