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 /* RAM driver for the SMSC MEC1308 Super I/O chip */
4 
5 #include <device/device.h>
6 #include <device/pnp.h>
7 #include <superio/conf_mode.h>
8 #include <pc80/keyboard.h>
9 
10 #include "mec1308.h"
11 
12 static void mec1308_init(struct device *dev)
13 {
14 
15  if (!dev->enabled)
16  return;
17 
18  switch (dev->path.pnp.device) {
19  case MEC1308_KBC:
21  break;
22  }
23 }
24 
25 static struct device_operations ops = {
27  .set_resources = pnp_set_resources,
28  .enable_resources = pnp_enable_resources,
29  .enable = pnp_alt_enable,
30  .init = mec1308_init,
31  .ops_pnp_mode = &pnp_conf_mode_55_aa,
32 };
33 
34 static struct pnp_info pnp_dev_info[] = {
35  { NULL, MEC1308_PM1, PNP_IO0, 0x7ff },
36  { NULL, MEC1308_EC1, PNP_IO0, 0x7ff },
37  { NULL, MEC1308_EC2, PNP_IO0, 0x7ff },
38  { NULL, MEC1308_UART, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
39  { NULL, MEC1308_KBC, PNP_IRQ0, 0 /* IO Fixed at 0x60/0x64 */ },
40  { NULL, MEC1308_EC0, PNP_IO0, 0x7ff },
41  { NULL, MEC1308_MBX, PNP_IO0, 0x7ff },
42 };
43 
44 static void enable_dev(struct device *dev)
45 {
47 }
48 
50  CHIP_NAME("SMSC MEC1308 EC SuperIO Interface")
51  .enable_dev = enable_dev
52 };
#define ARRAY_SIZE(a)
Definition: helpers.h:12
const struct pnp_mode_ops pnp_conf_mode_55_aa
Definition: conf_mode.c:175
#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 MEC1308_EC2
Definition: mec1308.h:8
#define MEC1308_EC1
Definition: mec1308.h:7
#define MEC1308_UART
Definition: mec1308.h:9
#define MEC1308_EC0
Definition: mec1308.h:11
#define MEC1308_KBC
Definition: mec1308.h:10
#define MEC1308_PM1
Definition: mec1308.h:6
#define MEC1308_MBX
Definition: mec1308.h:12
#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
static void enable_dev(struct device *dev)
Definition: superio.c:44
static struct device_operations ops
Definition: superio.c:25
struct chip_operations superio_smsc_mec1308_ops
Definition: superio.c:49
static struct pnp_info pnp_dev_info[]
Definition: superio.c:34
static void mec1308_init(struct device *dev)
Definition: superio.c:12
#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