summaryrefslogtreecommitdiff
path: root/src/superio/fintek
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio/fintek')
-rw-r--r--src/superio/fintek/f71805f/superio.c19
-rw-r--r--src/superio/fintek/f71859/superio.c19
-rw-r--r--src/superio/fintek/f71863fg/superio.c19
-rw-r--r--src/superio/fintek/f71872/superio.c19
-rw-r--r--src/superio/fintek/f71889/superio.c19
-rw-r--r--src/superio/fintek/f81865f/superio.c19
6 files changed, 12 insertions, 102 deletions
diff --git a/src/superio/fintek/f71805f/superio.c b/src/superio/fintek/f71805f/superio.c
index 50c3355ce9..4a31606895 100644
--- a/src/superio/fintek/f71805f/superio.c
+++ b/src/superio/fintek/f71805f/superio.c
@@ -21,22 +21,12 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include <uart8250.h>
#include "f71805f.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f71805f_init(device_t dev)
{
if (!dev->enabled)
@@ -45,18 +35,13 @@ static void f71805f_init(device_t dev)
/* TODO: Might potentially need code for HWM or FDC etc. */
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f71805f_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {
diff --git a/src/superio/fintek/f71859/superio.c b/src/superio/fintek/f71859/superio.c
index 1e5b6ecd4d..2736c0b988 100644
--- a/src/superio/fintek/f71859/superio.c
+++ b/src/superio/fintek/f71859/superio.c
@@ -22,22 +22,12 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include <uart8250.h>
#include "f71859.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f71859_init(device_t dev)
{
if (!dev->enabled)
@@ -46,18 +36,13 @@ static void f71859_init(device_t dev)
/* TODO: Might potentially need code for HWM or FDC etc. */
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f71859_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {
diff --git a/src/superio/fintek/f71863fg/superio.c b/src/superio/fintek/f71863fg/superio.c
index 84a7ec1397..4159e6ddc6 100644
--- a/src/superio/fintek/f71863fg/superio.c
+++ b/src/superio/fintek/f71863fg/superio.c
@@ -21,23 +21,13 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include <uart8250.h>
#include "chip.h"
#include "f71863fg.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f71863fg_init(device_t dev)
{
struct superio_fintek_f71863fg_config *conf = dev->chip_info;
@@ -55,18 +45,13 @@ static void f71863fg_init(device_t dev)
}
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f71863fg_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {
diff --git a/src/superio/fintek/f71872/superio.c b/src/superio/fintek/f71872/superio.c
index 8db22a9f28..55a11b1b99 100644
--- a/src/superio/fintek/f71872/superio.c
+++ b/src/superio/fintek/f71872/superio.c
@@ -21,22 +21,12 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include "chip.h"
#include "f71872.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f71872_init(device_t dev)
{
struct superio_fintek_f71872_config *conf = dev->chip_info;
@@ -52,18 +42,13 @@ static void f71872_init(device_t dev)
}
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f71872_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {
diff --git a/src/superio/fintek/f71889/superio.c b/src/superio/fintek/f71889/superio.c
index 8de8ae82e3..450f9385c2 100644
--- a/src/superio/fintek/f71889/superio.c
+++ b/src/superio/fintek/f71889/superio.c
@@ -21,23 +21,13 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include <uart8250.h>
#include "chip.h"
#include "f71889.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f71889_init(device_t dev)
{
struct superio_fintek_f71889_config *conf = dev->chip_info;
@@ -53,18 +43,13 @@ static void f71889_init(device_t dev)
}
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f71889_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {
diff --git a/src/superio/fintek/f81865f/superio.c b/src/superio/fintek/f81865f/superio.c
index 050602c96a..85ac7ba1a2 100644
--- a/src/superio/fintek/f81865f/superio.c
+++ b/src/superio/fintek/f81865f/superio.c
@@ -21,22 +21,12 @@
#include <arch/io.h>
#include <device/device.h>
#include <device/pnp.h>
+#include <superio/conf_mode.h>
#include <console/console.h>
#include <stdlib.h>
#include "chip.h"
#include "f81865f.h"
-static void pnp_enter_conf_state(device_t dev)
-{
- outb(0x87, dev->path.pnp.port);
- outb(0x87, dev->path.pnp.port);
-}
-
-static void pnp_exit_conf_state(device_t dev)
-{
- outb(0xaa, dev->path.pnp.port);
-}
-
static void f81865f_init(device_t dev)
{
struct superio_fintek_f81865f_config *conf = dev->chip_info;
@@ -52,18 +42,13 @@ static void f81865f_init(device_t dev)
}
}
-static const struct pnp_mode_ops pnp_conf_mode_ops = {
- .enter_conf_mode = pnp_enter_conf_state,
- .exit_conf_mode = pnp_exit_conf_state,
-};
-
static struct device_operations ops = {
.read_resources = pnp_read_resources,
.set_resources = pnp_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = f81865f_init,
- .ops_pnp_mode = &pnp_conf_mode_ops,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
};
static struct pnp_info pnp_dev_info[] = {