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 
6 #include "pc87392.h"
7 
8 static void init(struct device *dev)
9 {
10  if (!dev->enabled)
11  return;
12 }
13 
14 static struct device_operations ops = {
16  .set_resources = pnp_set_resources,
17  .enable_resources = pnp_enable_resources,
18  .enable = pnp_enable,
19  .init = init,
20 };
21 
22 static struct pnp_info pnp_dev_info[] = {
23  { NULL, PC87392_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
24  { NULL, PC87392_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
26  0x07f8 },
27  { NULL, PC87392_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
28  { NULL, PC87392_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff8 },
29  { NULL, PC87392_WDT, PNP_IO0 | PNP_IRQ0, 0xfffc },
30 };
31 
32 static void enable_dev(struct device *dev)
33 {
35 }
36 
38  CHIP_NAME("NSC PC87392 Super I/O")
39  .enable_dev = enable_dev,
40 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define CHIP_NAME(X)
Definition: device.h:32
static void enable_dev(struct device *dev)
Definition: superio.c:32
static struct device_operations ops
Definition: superio.c:14
static struct pnp_info pnp_dev_info[]
Definition: superio.c:22
struct chip_operations superio_nsc_pc87392_ops
Definition: superio.c:37
static void init(struct device *dev)
Definition: superio.c:8
#define PC87392_WDT
Definition: pc87392.h:11
#define PC87392_GPIO
Definition: pc87392.h:10
#define PC87392_PP
Definition: pc87392.h:7
#define PC87392_SP1
Definition: pc87392.h:9
#define PC87392_FDC
Definition: pc87392.h:6
#define PC87392_SP2
Definition: pc87392.h:8
#define PNP_DRQ0
Definition: pnp.h:49
#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
Definition: device.h:107
unsigned int enabled
Definition: device.h:122
Definition: pnp.h:37