coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_serial.c File Reference
#include <arch/io.h>
#include <device/pnp_ops.h>
#include <device/pnp.h>
#include <stdint.h>
#include "ite.h"
Include dependency graph for early_serial.c:

Go to the source code of this file.

Macros

#define ITE_CONFIG_REG_CC   0x02 /* Configure Control (write-only). */
 
#define ITE_CONFIG_REG_LDN   0x07 /* Logical Device Number. */
 
#define ITE_CONFIG_REG_CLOCKSEL   0x23 /* Clock Selection. */
 
#define ITE_CONFIG_REG_SWSUSP   0x24 /* Software Suspend, Flash I/F. */
 
#define ITE_CONFIG_REG_MFC   0x2a /* multi function pin */
 
#define ITE_CONFIG_REG_WATCHDOG   0x72 /* watchdog config */
 

Functions

static void ite_sio_write (pnp_devfn_t dev, u8 reg, u8 value)
 
void pnp_enter_conf_state (pnp_devfn_t dev)
 
void pnp_exit_conf_state (pnp_devfn_t dev)
 
void ite_reg_write (pnp_devfn_t dev, u8 reg, u8 value)
 
void ite_conf_clkin (pnp_devfn_t dev, u8 predivide)
 
void ite_enable_serial (pnp_devfn_t dev, u16 iobase)
 
void ite_enable_3vsbsw (pnp_devfn_t dev)
 
void ite_delay_pwrgd3 (pnp_devfn_t dev)
 
void ite_kill_watchdog (pnp_devfn_t dev)
 

Macro Definition Documentation

◆ ITE_CONFIG_REG_CC

#define ITE_CONFIG_REG_CC   0x02 /* Configure Control (write-only). */

Definition at line 10 of file early_serial.c.

◆ ITE_CONFIG_REG_CLOCKSEL

#define ITE_CONFIG_REG_CLOCKSEL   0x23 /* Clock Selection. */

Definition at line 12 of file early_serial.c.

◆ ITE_CONFIG_REG_LDN

#define ITE_CONFIG_REG_LDN   0x07 /* Logical Device Number. */

Definition at line 11 of file early_serial.c.

◆ ITE_CONFIG_REG_MFC

#define ITE_CONFIG_REG_MFC   0x2a /* multi function pin */

Definition at line 14 of file early_serial.c.

◆ ITE_CONFIG_REG_SWSUSP

#define ITE_CONFIG_REG_SWSUSP   0x24 /* Software Suspend, Flash I/F. */

Definition at line 13 of file early_serial.c.

◆ ITE_CONFIG_REG_WATCHDOG

#define ITE_CONFIG_REG_WATCHDOG   0x72 /* watchdog config */

Definition at line 15 of file early_serial.c.

Function Documentation

◆ ite_conf_clkin()

void ite_conf_clkin ( pnp_devfn_t  dev,
u8  predivide 
)

Definition at line 55 of file early_serial.c.

References ITE_CONFIG_REG_CLOCKSEL, and ite_reg_write().

Referenced by bootblock_mainboard_early_init().

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

◆ ite_delay_pwrgd3()

void ite_delay_pwrgd3 ( pnp_devfn_t  dev)

Definition at line 112 of file early_serial.c.

References ITE_CONFIG_REG_MFC, pnp_enter_conf_state(), pnp_exit_conf_state(), pnp_read_config(), pnp_set_logical_device(), and pnp_write_config().

Referenced by bootblock_mainboard_early_init().

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

◆ ite_enable_3vsbsw()

void ite_enable_3vsbsw ( pnp_devfn_t  dev)

Definition at line 85 of file early_serial.c.

References ITE_CONFIG_REG_MFC, pnp_enter_conf_state(), pnp_exit_conf_state(), pnp_read_config(), pnp_set_logical_device(), and pnp_write_config().

Referenced by bootblock_mainboard_early_init(), and superio_init_m().

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

◆ ite_enable_serial()

void ite_enable_serial ( pnp_devfn_t  dev,
u16  iobase 
)

Definition at line 61 of file early_serial.c.

References pnp_enter_conf_state(), pnp_exit_conf_state(), PNP_IDX_IO0, pnp_set_enable(), pnp_set_iobase(), and pnp_set_logical_device().

Referenced by bootblock_mainboard_early_init(), mainboard_after_memory_init(), mainboard_config_superio(), and superio_init_m().

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

◆ ite_kill_watchdog()

void ite_kill_watchdog ( pnp_devfn_t  dev)

Definition at line 129 of file early_serial.c.

References ITE_CONFIG_REG_WATCHDOG, ite_sio_write(), pnp_enter_conf_state(), and pnp_exit_conf_state().

Referenced by bootblock_mainboard_early_init(), mainboard_config_superio(), and superio_init_m().

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

◆ ite_reg_write()

void ite_reg_write ( pnp_devfn_t  dev,
u8  reg,
u8  value 
)

Definition at line 41 of file early_serial.c.

References ite_sio_write(), pnp_enter_conf_state(), pnp_exit_conf_state(), and value.

Referenced by bootblock_mainboard_early_init(), it8718f_disable_reboot(), ite_conf_clkin(), ite_evc_conf(), and ite_gpio_conf().

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

◆ ite_sio_write()

static void ite_sio_write ( pnp_devfn_t  dev,
u8  reg,
u8  value 
)
static

Definition at line 18 of file early_serial.c.

References pnp_set_logical_device(), pnp_write_config(), and value.

Referenced by ite_kill_watchdog(), ite_reg_write(), and pnp_exit_conf_state().

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

◆ pnp_enter_conf_state()

void pnp_enter_conf_state ( pnp_devfn_t  dev)

Definition at line 25 of file early_serial.c.

References outb().

Here is the call graph for this function:

◆ pnp_exit_conf_state()

void pnp_exit_conf_state ( pnp_devfn_t  dev)

Definition at line 36 of file early_serial.c.

References ITE_CONFIG_REG_CC, and ite_sio_write().

Here is the call graph for this function: