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 <assert.h>
#include <device/pnp_ops.h>
#include "lpc47n227.h"
Include dependency graph for early_serial.c:

Go to the source code of this file.

Functions

void pnp_enter_conf_state (pnp_devfn_t dev)
 
void pnp_exit_conf_state (pnp_devfn_t dev)
 
static void lpc47n227_pnp_set_iobase (pnp_devfn_t dev, u16 iobase)
 Program the base I/O port for the specified logical device. More...
 
static void lpc47n227_pnp_set_enable (pnp_devfn_t dev, int enable)
 Enable or disable the specified logical device. More...
 
void lpc47n227_enable_serial (pnp_devfn_t dev, u16 iobase)
 Configure the base I/O port of the specified serial device and enable the serial device. More...
 

Function Documentation

◆ lpc47n227_enable_serial()

void lpc47n227_enable_serial ( pnp_devfn_t  dev,
u16  iobase 
)

Configure the base I/O port of the specified serial device and enable the serial device.

Parameters
devHigh 8 bits = Super I/O port, low 8 bits = logical device number.
iobaseProcessor I/O port address to assign to this serial device.

Definition at line 99 of file early_serial.c.

References lpc47n227_pnp_set_enable(), lpc47n227_pnp_set_iobase(), pnp_enter_conf_state(), and pnp_exit_conf_state().

Referenced by bootblock_mainboard_early_init().

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

◆ lpc47n227_pnp_set_enable()

static void lpc47n227_pnp_set_enable ( pnp_devfn_t  dev,
int  enable 
)
static

Enable or disable the specified logical device.

Technically, a full disable requires setting the device's base I/O port below 0x100. We don't do that here, because we don't have access to a data structure that specifies what the 'real' base port is (when asked to enable the device). Also the function is used only to disable the device while its true base port is programmed (see lpc47n227_enable_serial() below).

Parameters
devHigh 8 bits = Super I/O port, low 8 bits = logical device number.
enable0 to disable, anything else to enable.

Definition at line 64 of file early_serial.c.

References LPC47N227_PP, LPC47N227_SP1, LPC47N227_SP2, pnp_read_config(), and pnp_write_config().

Referenced by lpc47n227_enable_serial().

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

◆ lpc47n227_pnp_set_iobase()

static void lpc47n227_pnp_set_iobase ( pnp_devfn_t  dev,
u16  iobase 
)
static

Program the base I/O port for the specified logical device.

Parameters
devHigh 8 bits = Super I/O port, low 8 bits = logical device number.
iobaseBase I/O port for the logical device.

Definition at line 29 of file early_serial.c.

References LPC47N227_PP, LPC47N227_SP1, LPC47N227_SP2, and pnp_write_config().

Referenced by lpc47n227_enable_serial().

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 11 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 17 of file early_serial.c.

References outb().

Here is the call graph for this function: