coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
superio.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <superio/conf_mode.h>
6 #include <pc80/keyboard.h>
7 
8 #include "w83977tf.h"
9 
10 static void w83977tf_init(struct device *dev)
11 {
12 
13  if (!dev->enabled)
14  return;
15 
16  switch (dev->path.pnp.device) {
17  case W83977TF_KBC:
19  break;
20  }
21 }
22 
23 static struct device_operations ops = {
25  .set_resources = pnp_set_resources,
26  .enable_resources = pnp_enable_resources,
27  .enable = pnp_enable,
28  .init = w83977tf_init,
29  .ops_pnp_mode = &pnp_conf_mode_8787_aa,
30 };
31 
32 static struct pnp_info pnp_dev_info[] = {
33  { NULL, W83977TF_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
34  { NULL, W83977TF_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
35  { NULL, W83977TF_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
36  { NULL, W83977TF_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8, },
38  0x07ff, 0x07ff, },
39 #if CONFIG(W83977TF_HAVE_SEPARATE_IR_DEVICE)
40  { NULL, W83977TF_CIR, PNP_IO0 | PNP_IRQ0, 0x07f8, },
41 #endif
43  0x07ff, 0x07fe, },
45 };
46 
47 static void enable_dev(struct device *dev)
48 {
50 }
51 
53  CHIP_NAME("Winbond W83977TF Super I/O")
54  .enable_dev = enable_dev,
55 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
const struct pnp_mode_ops pnp_conf_mode_8787_aa
Definition: conf_mode.c:202
#define CHIP_NAME(X)
Definition: device.h:32
uint8_t pc_keyboard_init(uint8_t probe_aux)
Definition: keyboard.c:229
#define NO_AUX_DEVICE
Definition: keyboard.h:6
#define PNP_IRQ1
Definition: pnp.h:48
#define PNP_DRQ0
Definition: pnp.h:49
#define PNP_IO1
Definition: pnp.h:43
#define PNP_IO0
Definition: pnp.h:42
#define PNP_IRQ0
Definition: pnp.h:47
void pnp_enable(struct device *dev)
Definition: pnp_device.c:181
void pnp_read_resources(struct device *dev)
Definition: pnp_device.c:114
void pnp_enable_devices(struct device *base_dev, struct device_operations *ops, unsigned int functions, struct pnp_info *info)
Definition: pnp_device.c:371
void pnp_set_resources(struct device *dev)
Definition: pnp_device.c:157
void pnp_enable_resources(struct device *dev)
Definition: pnp_device.c:173
#define NULL
Definition: stddef.h:19
void(* read_resources)(struct device *dev)
Definition: device.h:39
struct pnp_path pnp
Definition: path.h:117
Definition: device.h:107
struct device_path path
Definition: device.h:115
unsigned int enabled
Definition: device.h:122
Definition: pnp.h:37
unsigned int device
Definition: path.h:59
#define W83977TF_ACPI
Definition: w83977tf.h:15
#define W83977TF_CIR
Definition: w83977tf.h:11
#define W83977TF_SP2
Definition: w83977tf.h:9
#define W83977TF_FDC
Definition: w83977tf.h:6
#define W83977TF_SP1
Definition: w83977tf.h:8
#define W83977TF_GAME_MIDI_GPIO1
Definition: w83977tf.h:12
#define W83977TF_KBC
Definition: w83977tf.h:10
#define W83977TF_PP
Definition: w83977tf.h:7
static void enable_dev(struct device *dev)
Definition: superio.c:47
static struct device_operations ops
Definition: superio.c:23
static struct pnp_info pnp_dev_info[]
Definition: superio.c:32
static void w83977tf_init(struct device *dev)
Definition: superio.c:10
struct chip_operations superio_winbond_w83977tf_ops
Definition: superio.c:52