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 #include <superio/conf_mode.h>
7 
8 #include "it8712f.h"
9 
10 static void it8712f_init(struct device *dev)
11 {
12 
13  if (!dev->enabled)
14  return;
15 
16  switch (dev->path.pnp.device) {
17  case IT8712F_FDC: /* TODO. */
18  break;
19  case IT8712F_PP: /* TODO. */
20  break;
21  case IT8712F_EC: /* TODO. */
22  break;
23  case IT8712F_KBCK:
26  break;
27  case IT8712F_KBCM: /* TODO. */
28  break;
29  case IT8712F_MIDI: /* TODO. */
30  break;
31  case IT8712F_GAME: /* TODO. */
32  break;
33  case IT8712F_IR: /* TODO. */
34  break;
35  }
36 }
37 
38 static struct device_operations ops = {
40  .set_resources = pnp_set_resources,
41  .enable_resources = pnp_enable_resources,
42  .enable = pnp_alt_enable,
43  .init = it8712f_init,
44  .ops_pnp_mode = &pnp_conf_mode_870155_aa,
45 };
46 
47 static struct pnp_info pnp_dev_info[] = {
48  { NULL, IT8712F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ff8, },
49  { NULL, IT8712F_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
50  { NULL, IT8712F_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
51  { NULL, IT8712F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x0ffc, },
52  { NULL, IT8712F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0ff8, 0x0ff8, },
53  { NULL, IT8712F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x0fff, 0x0fff, },
54  { NULL, IT8712F_KBCM, PNP_IRQ0, },
56  0x0fff, 0x0ff8, 0x0ff8, },
57  { NULL, IT8712F_MIDI, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
58  { NULL, IT8712F_GAME, PNP_IO0, 0x0fff, },
59  { NULL, IT8712F_IR, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
60 };
61 
62 static void enable_dev(struct device *dev)
63 {
65 }
66 
68  CHIP_NAME("ITE IT8712F Super I/O")
69  .enable_dev = enable_dev,
70 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
const struct pnp_mode_ops pnp_conf_mode_870155_aa
Definition: conf_mode.c:229
#define CHIP_NAME(X)
Definition: device.h:32
#define IT8712F_SP2
Definition: it8712f.h:10
#define IT8712F_SP1
Definition: it8712f.h:9
#define IT8712F_IR
Definition: it8712f.h:18
#define IT8712F_MIDI
Definition: it8712f.h:16
#define IT8712F_GAME
Definition: it8712f.h:17
#define IT8712F_PP
Definition: it8712f.h:11
#define IT8712F_KBCM
Definition: it8712f.h:14
#define IT8712F_KBCK
Definition: it8712f.h:13
#define IT8712F_EC
Definition: it8712f.h:12
#define IT8712F_GPIO
Definition: it8712f.h:15
#define IT8712F_FDC
Definition: it8712f.h:8
static void enable_dev(struct device *dev)
Definition: superio.c:62
static struct device_operations ops
Definition: superio.c:38
struct chip_operations superio_ite_it8712f_ops
Definition: superio.c:67
static struct pnp_info pnp_dev_info[]
Definition: superio.c:47
static void it8712f_init(struct device *dev)
Definition: superio.c:10
void set_kbc_ps2_mode(void)
Definition: keyboard.c:351
uint8_t pc_keyboard_init(uint8_t probe_aux)
Definition: keyboard.c:229
#define NO_AUX_DEVICE
Definition: keyboard.h:6
#define PNP_DRQ0
Definition: pnp.h:49
#define PNP_IO1
Definition: pnp.h:43
#define PNP_IO2
Definition: pnp.h:44
#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
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