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-only */
2 
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
6 
7 #include "sio10n268.h"
8 
9 static void init(struct device *dev)
10 {
11  if (!dev->enabled)
12  return;
13 
14  switch (dev->path.pnp.device) {
15  case SIO10N268_FDC: /* TODO. */
16  break;
17  case SIO10N268_PP: /* TODO. */
18  break;
19  case SIO10N268_KBDC:
20  /* TODO: This is still hardcoded. */
22  break;
23  // [..] The rest: TODO
24  }
25 }
26 
27 static struct device_operations ops = {
29  .set_resources = pnp_set_resources,
30  .enable_resources = pnp_enable_resources,
31  .enable = pnp_enable,
32  .init = init,
33 };
34 
35 /* TODO: FDC, PP, AUX. */
36 static struct pnp_info pnp_dev_info[] = {
37  { NULL, SIO10N268_KBDC, PNP_IO0 | PNP_IO1, 0x07f8, 0x07f8, },
38 };
39 
40 static void enable_dev(struct device *dev)
41 {
43 }
44 
46  CHIP_NAME("SMSC SIO10N268 Super I/O")
47  .enable_dev = enable_dev,
48 };
#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
#define PNP_IO1
Definition: pnp.h:43
#define PNP_IO0
Definition: pnp.h:42
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 SIO10N268_PP
Definition: sio10n268.h:9
#define SIO10N268_FDC
Definition: sio10n268.h:8
#define SIO10N268_KBDC
Definition: sio10n268.h:10
static void enable_dev(struct device *dev)
Definition: superio.c:40
static struct device_operations ops
Definition: superio.c:27
static struct pnp_info pnp_dev_info[]
Definition: superio.c:36
struct chip_operations superio_smsc_sio10n268_ops
Definition: superio.c:45
static void init(struct device *dev)
Definition: superio.c:9
#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