coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
nuvoton.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <device/pnp.h>
#include <ec/acpi/ec.h>
#include <option.h>
#include <pc80/keyboard.h>
#include "ec.h"
#include "ecdefs.h"
Include dependency graph for nuvoton.c:

Go to the source code of this file.

Functions

uint16_t ec_get_version (void)
 
static uint8_t get_ec_value_from_option (const char *name, unsigned int fallback, const uint8_t *lut, size_t lut_size)
 
static uint16_t ec_get_chip_id (unsigned int port)
 
static void merlin_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 ec_starlabs_merlin_ops
 

Function Documentation

◆ ec_get_chip_id()

static uint16_t ec_get_chip_id ( unsigned int  port)
static

Definition at line 29 of file nuvoton.c.

References NUVOTON_CHIPID, and pnp_read_index().

Referenced by merlin_init().

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

◆ ec_get_version()

uint16_t ec_get_version ( void  )

Definition at line 13 of file nuvoton.c.

References ec_read(), ECRAM_MAJOR_VERSION, and ECRAM_MINOR_VERSION.

Referenced by smbios_ec_revision().

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

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 279 of file nuvoton.c.

◆ get_ec_value_from_option()

static uint8_t get_ec_value_from_option ( const char *  name,
unsigned int  fallback,
const uint8_t lut,
size_t  lut_size 
)
static

Definition at line 18 of file nuvoton.c.

References get_uint_option(), and name.

Referenced by merlin_init().

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

◆ merlin_init()

Variable Documentation

◆ ec_starlabs_merlin_ops

struct chip_operations ec_starlabs_merlin_ops
Initial value:
= {
.enable_dev = enable_dev
}
static void enable_dev(struct device *dev)
Definition: nuvoton.c:279

Definition at line 279 of file nuvoton.c.

◆ ops

struct device_operations ops
static
Initial value:
= {
.init = merlin_init,
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
}
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static void merlin_init(struct device *dev)
Definition: nuvoton.c:34

Definition at line 34 of file nuvoton.c.

◆ pnp_dev_info

struct pnp_info pnp_dev_info[]
static
Initial value:
= {
{ NULL, NUVOTON_MSWC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
{ NULL, NUVOTON_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
{ NULL, NUVOTON_SHM, PNP_IO0 | PNP_IRQ0, 0xfff0, },
{ NULL, NUVOTON_PM1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
0x07fc, 0xfff0, },
{ NULL, NUVOTON_PM3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
{ NULL, NUVOTON_PM4, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
}
#define NUVOTON_PM3
Definition: ec.h:41
#define NUVOTON_MSWC
Definition: ec.h:35
#define NUVOTON_PM4
Definition: ec.h:43
#define NUVOTON_KBCK
Definition: ec.h:37
#define NUVOTON_PM2
Definition: ec.h:40
#define NUVOTON_KBCM
Definition: ec.h:36
#define NUVOTON_SHM
Definition: ec.h:38
#define NUVOTON_PM1
Definition: ec.h:39
#define NUVOTON_ESHM
Definition: ec.h:42
#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
#define NULL
Definition: stddef.h:19

Definition at line 34 of file nuvoton.c.