coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
superio.c File Reference
#include <arch/io.h>
#include <commonlib/bsd/helpers.h>
#include <device/device.h>
#include <device/pnp.h>
#include <superio/conf_mode.h>
#include <console/console.h>
#include <pc80/keyboard.h>
#include <stdint.h>
#include "sch5545.h"
Include dependency graph for superio.c:

Go to the source code of this file.

Functions

int sch5545_get_gpio (uint8_t sio_port, uint8_t gpio)
 
static void sch5545_init (struct device *dev)
 
static void sch5545_set_iobase (struct device *dev, u8 index, u16 iobase)
 
static void sch5545_set_irq (struct device *dev, u8 index, u8 irq)
 
static void sch5545_set_drq (struct device *dev, u8 index, u8 drq)
 
static void sch5545_set_resource (struct device *dev, struct resource *resource)
 
static void sch5545_set_resources (struct device *dev)
 
static void enable_dev (struct device *dev)
 

Variables

static struct device_operations ops
 
static struct pnp_info pnp_dev_info []
 
struct chip_operations superio_smsc_sch5545_ops
 

Function Documentation

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 300 of file superio.c.

References ARRAY_SIZE, ops, pnp_dev_info, and pnp_enable_devices().

Here is the call graph for this function:

◆ sch5545_get_gpio()

int sch5545_get_gpio ( uint8_t  sio_port,
uint8_t  gpio 
)

◆ sch5545_init()

◆ sch5545_set_drq()

static void sch5545_set_drq ( struct device dev,
u8  index,
u8  drq 
)
static

Definition at line 191 of file superio.c.

References BIOS_ERR, dev_find_slot_pnp(), dev_path(), pnp_path::device, device::path, device_path::pnp, pnp_set_logical_device(), pnp_write_config(), pnp_path::port, printk, SCH5545_DRQ_BASE, and SCH5545_LDN_LPC.

Referenced by sch5545_set_resource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sch5545_set_iobase()

◆ sch5545_set_irq()

static void sch5545_set_irq ( struct device dev,
u8  index,
u8  irq 
)
static

Definition at line 141 of file superio.c.

References BIOS_ERR, dev_find_slot_pnp(), dev_path(), pnp_path::device, device::path, device_path::pnp, PNP_IDX_MSC0, pnp_set_logical_device(), pnp_write_config(), pnp_path::port, printk, SCH5545_IRQ_BASE, SCH5545_LDN_EMI, SCH5545_LDN_KBC, SCH5545_LDN_LPC, and SCH5545_LDN_RR.

Referenced by sch5545_set_resource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sch5545_set_resource()

◆ sch5545_set_resources()

static void sch5545_set_resources ( struct device dev)
static

Definition at line 264 of file superio.c.

Variable Documentation

◆ ops

struct device_operations ops
static
Initial value:
= {
.read_resources = pnp_read_resources,
.set_resources = sch5545_set_resources,
.enable_resources = pnp_enable_resources,
.enable = pnp_alt_enable,
.init = sch5545_init,
.ops_pnp_mode = &pnp_conf_mode_55_aa,
}
const struct pnp_mode_ops pnp_conf_mode_55_aa
Definition: conf_mode.c:175
void pnp_read_resources(struct device *dev)
Definition: pnp_device.c:114
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 sch5545_set_resources(struct device *dev)
Definition: superio.c:264
static void sch5545_init(struct device *dev)
Definition: superio.c:59

Definition at line 264 of file superio.c.

Referenced by enable_dev().

◆ pnp_dev_info

struct pnp_info pnp_dev_info[]
static
Initial value:
= {
PNP_MSC2 | PNP_MSC3 | PNP_MSC4 | PNP_MSC5, 0x0ff8, },
{ NULL, SCH5545_LDN_LPC, PNP_IO0, 0x0ffe },
}
#define PNP_MSC1
Definition: pnp.h:53
#define PNP_MSC3
Definition: pnp.h:55
#define PNP_IRQ1
Definition: pnp.h:48
#define PNP_DRQ0
Definition: pnp.h:49
#define PNP_IO0
Definition: pnp.h:42
#define PNP_IRQ0
Definition: pnp.h:47
#define PNP_MSC0
Definition: pnp.h:52
#define PNP_MSC2
Definition: pnp.h:54
#define PNP_MSC4
Definition: pnp.h:56
#define PNP_MSC5
Definition: pnp.h:57
#define SCH5545_LDN_UART2
Definition: sch5545.h:19
#define SCH5545_LDN_LPC
Definition: sch5545.h:22
#define SCH5545_LDN_FDC
Definition: sch5545.h:21
#define SCH5545_LDN_KBC
Definition: sch5545.h:17
#define SCH5545_LDN_PP
Definition: sch5545.h:23
#define SCH5545_LDN_EMI
Definition: sch5545.h:16
#define SCH5545_LDN_UART1
Definition: sch5545.h:18
#define SCH5545_LDN_RR
Definition: sch5545.h:20
#define NULL
Definition: stddef.h:19

Definition at line 264 of file superio.c.

Referenced by enable_dev().

◆ superio_smsc_sch5545_ops

struct chip_operations superio_smsc_sch5545_ops
Initial value:
= {
.enable_dev = enable_dev,
}
static void enable_dev(struct device *dev)
Definition: superio.c:300

Definition at line 300 of file superio.c.