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 "f71859.h"
7 
8 static void f71859_init(struct device *dev)
9 {
10  if (!dev->enabled)
11  return;
12 
13  /* TODO: Might potentially need code for HWM or FDC etc. */
14 }
15 
16 static struct device_operations ops = {
18  .set_resources = pnp_set_resources,
19  .enable_resources = pnp_enable_resources,
20  .enable = pnp_alt_enable,
21  .init = f71859_init,
22  .ops_pnp_mode = &pnp_conf_mode_8787_aa,
23 };
24 
25 static struct pnp_info pnp_dev_info[] = {
26  /* TODO: Some of the 0x07f8 etc. values may not be correct. */
27  { NULL, F71859_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
28 };
29 
30 static void enable_dev(struct device *dev)
31 {
33 }
34 
36  CHIP_NAME("Fintek F71859 Super I/O")
37  .enable_dev = enable_dev
38 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
const struct pnp_mode_ops pnp_conf_mode_8787_aa
Definition: conf_mode.c:202
#define F71859_SP1
Definition: f71859.h:7
struct chip_operations superio_fintek_f71859_ops
Definition: superio.c:35
static void enable_dev(struct device *dev)
Definition: superio.c:30
static void f71859_init(struct device *dev)
Definition: superio.c:8
static struct device_operations ops
Definition: superio.c:16
static struct pnp_info pnp_dev_info[]
Definition: superio.c:25
#define CHIP_NAME(X)
Definition: device.h:32
#define PNP_IO0
Definition: pnp.h:42
#define PNP_IRQ0
Definition: pnp.h:47
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_alt_enable(struct device *dev)
Definition: pnp_device.c:191
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
Definition: device.h:107
unsigned int enabled
Definition: device.h:122
Definition: pnp.h:37