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 <pc80/keyboard.h>
6 
7 #include "wpcm450.h"
8 
9 static void init(struct device *dev)
10 {
11 
12  if (!dev->enabled)
13  return;
14 
15  switch (dev->path.pnp.device) {
16  case WPCM450_KBCK:
18  break;
19  }
20 }
21 
22 static struct device_operations ops = {
24  .set_resources = pnp_set_resources,
25  .enable_resources = pnp_enable_resources,
26  .enable = pnp_enable,
27  .init = init,
28 };
29 
30 static struct pnp_info pnp_dev_info[] = {
32  0x07f8, },
33  { NULL, WPCM450_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
34  { NULL, WPCM450_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
35 };
36 
37 static void enable_dev(struct device *dev)
38 {
40 }
41 
43  CHIP_NAME("Nuvoton WPCM450 Super I/O")
44  .enable_dev = enable_dev,
45 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#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
static void enable_dev(struct device *dev)
Definition: superio.c:37
struct chip_operations superio_nuvoton_wpcm450_ops
Definition: superio.c:42
static struct device_operations ops
Definition: superio.c:22
static struct pnp_info pnp_dev_info[]
Definition: superio.c:30
static void init(struct device *dev)
Definition: superio.c:9
#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
#define PNP_DRQ1
Definition: pnp.h:50
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 WPCM450_SP1
Definition: wpcm450.h:7
#define WPCM450_SP2
Definition: wpcm450.h:6
#define WPCM450_KBCK
Definition: wpcm450.h:8