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 <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
#include <option.h>
#include <pc80/keyboard.h>
#include <superio/conf_mode.h>
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <superio/common/ssdt.h>
#include <stdlib.h>
#include "npcd378.h"
Include dependency graph for superio.c:

Go to the source code of this file.

Functions

uint8_t npcd378_hwm_read (const uint16_t iobase, const uint16_t reg)
 
void npcd378_hwm_write (const uint16_t iobase, const uint16_t reg, const uint8_t val)
 
void npcd378_hwm_write_start (const uint16_t iobase)
 
void npcd378_hwm_write_finished (const uint16_t iobase)
 
static void npcd378_init (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_nuvoton_npcd378_ops
 

Function Documentation

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 470 of file superio.c.

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

Here is the call graph for this function:

◆ npcd378_hwm_read()

uint8_t npcd378_hwm_read ( const uint16_t  iobase,
const uint16_t  reg 
)

Definition at line 17 of file superio.c.

References inb(), and outb().

Referenced by npcd378_hwm_write_finished(), and npcd378_hwm_write_start().

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

◆ npcd378_hwm_write()

void npcd378_hwm_write ( const uint16_t  iobase,
const uint16_t  reg,
const uint8_t  val 
)

Definition at line 28 of file superio.c.

References outb(), and val.

Referenced by npcd378_hwm_write_finished(), npcd378_hwm_write_start(), and npcd378_init().

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

◆ npcd378_hwm_write_finished()

void npcd378_hwm_write_finished ( const uint16_t  iobase)

Definition at line 43 of file superio.c.

References npcd378_hwm_read(), npcd378_hwm_write(), NPCD837_HWM_WRITE_LOCK_BIT, and NPCD837_HWM_WRITE_LOCK_CTRL.

Referenced by npcd378_init().

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

◆ npcd378_hwm_write_start()

void npcd378_hwm_write_start ( const uint16_t  iobase)

Definition at line 36 of file superio.c.

References npcd378_hwm_read(), npcd378_hwm_write(), NPCD837_HWM_WRITE_LOCK_BIT, and NPCD837_HWM_WRITE_LOCK_CTRL.

Referenced by npcd378_init().

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

◆ npcd378_init()

Variable Documentation

◆ ops

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

Definition at line 50 of file superio.c.

Referenced by enable_dev().

◆ pnp_dev_info

struct pnp_info pnp_dev_info[]
static
Initial value:
= {
{ NULL, NPCD378_SP1, PNP_IO0|PNP_IRQ0, 0x0ff8, },
{ NULL, NPCD378_SP2, PNP_IO0|PNP_IRQ0, 0x0ff8, },
0x0ff8, 0x0ff0},
{ NULL, NPCD378_AUX, PNP_IRQ0, 0x0fff, 0x0fff, },
0x0fff, 0x0fff, },
0x0ff0, 0x0ff0},
{ NULL, NPCD378_SUSPEND, PNP_IO0, 0x0fe0 },
PNP_MSC4, 0x0fe0},
}
#define NPCD378_PP
Definition: npcd378.h:54
#define NPCD378_I2C
Definition: npcd378.h:64
#define NPCD378_FDC
Definition: npcd378.h:53
#define NPCD378_SP2
Definition: npcd378.h:56
#define NPCD378_GPIO_PP_OD
Definition: npcd378.h:63
#define NPCD378_HWM
Definition: npcd378.h:62
#define NPCD378_SUSPEND
Definition: npcd378.h:65
#define NPCD378_KBC
Definition: npcd378.h:59
#define NPCD378_PWR
Definition: npcd378.h:57
#define NPCD378_GPIOA
Definition: npcd378.h:66
#define NPCD378_WDT1
Definition: npcd378.h:61
#define NPCD378_AUX
Definition: npcd378.h:58
#define NPCD378_SP1
Definition: npcd378.h:55
#define PNP_MSC1
Definition: pnp.h:53
#define PNP_MSCD
Definition: pnp.h:65
#define PNP_MSC3
Definition: pnp.h:55
#define PNP_MSC7
Definition: pnp.h:59
#define PNP_MSCE
Definition: pnp.h:66
#define PNP_MSC9
Definition: pnp.h:61
#define PNP_MSC6
Definition: pnp.h:58
#define PNP_DRQ0
Definition: pnp.h:49
#define PNP_MSCB
Definition: pnp.h:63
#define PNP_IO1
Definition: pnp.h:43
#define PNP_MSC8
Definition: pnp.h:60
#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_MSCC
Definition: pnp.h:64
#define PNP_MSC4
Definition: pnp.h:56
#define PNP_MSC5
Definition: pnp.h:57
#define PNP_MSCA
Definition: pnp.h:62
#define NULL
Definition: stddef.h:19

Definition at line 50 of file superio.c.

Referenced by enable_dev().

◆ superio_nuvoton_npcd378_ops

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

Definition at line 470 of file superio.c.