coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
dock.c File Reference
#include <device/device.h>
#include <arch/io.h>
#include <delay.h>
#include "dock.h"
#include <superio/nsc/pc87384/pc87384.h>
#include "ec/acpi/ec.h"
#include "ec/lenovo/pmh7/pmh7.h"
#include <southbridge/intel/i82801gx/i82801gx.h>
Include dependency graph for dock.c:

Go to the source code of this file.

Macros

#define DLPC_CONTROL   0x164c
 

Functions

static void dlpc_write_register (int reg, int value)
 
static u8 dlpc_read_register (int reg)
 
static void dock_write_register (int reg, int value)
 
static u8 dock_read_register (int reg)
 
static void dlpc_gpio_set_mode (int port, int mode)
 
static void dock_gpio_set_mode (int port, int mode, int irq)
 
static void dlpc_gpio_init (void)
 
int dlpc_init (void)
 
static int dock_superio_init (void)
 
int dock_connect (void)
 
void dock_disconnect (void)
 
int dock_present (void)
 
int legacy_io_present (void)
 
void legacy_io_init (void)
 

Macro Definition Documentation

◆ DLPC_CONTROL

#define DLPC_CONTROL   0x164c

Definition at line 12 of file dock.c.

Function Documentation

◆ dlpc_gpio_init()

static void dlpc_gpio_init ( void  )
static

Definition at line 51 of file dock.c.

References dlpc_gpio_set_mode(), and dlpc_write_register().

Referenced by dlpc_init().

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

◆ dlpc_gpio_set_mode()

static void dlpc_gpio_set_mode ( int  port,
int  mode 
)
static

Definition at line 38 of file dock.c.

References dlpc_write_register().

Referenced by dlpc_gpio_init().

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

◆ dlpc_init()

int dlpc_init ( void  )

Definition at line 72 of file dock.c.

References DLPC_CONTROL, dlpc_gpio_init(), dlpc_read_register(), dlpc_write_register(), outb(), and udelay().

Referenced by bootblock_mainboard_early_init().

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

◆ dlpc_read_register()

static u8 dlpc_read_register ( int  reg)
static

Definition at line 20 of file dock.c.

References inb(), and outb().

Referenced by dlpc_init().

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

◆ dlpc_write_register()

static void dlpc_write_register ( int  reg,
int  value 
)
static

Definition at line 14 of file dock.c.

References outb(), and value.

Referenced by dlpc_gpio_init(), dlpc_gpio_set_mode(), dlpc_init(), and dock_connect().

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

◆ dock_connect()

int dock_connect ( void  )

Definition at line 165 of file dock.c.

References DLPC_CONTROL, dlpc_write_register(), dock_superio_init(), inb(), outb(), and udelay().

Here is the call graph for this function:

◆ dock_disconnect()

void dock_disconnect ( void  )

Definition at line 193 of file dock.c.

References DLPC_CONTROL, and outb().

Here is the call graph for this function:

◆ dock_gpio_set_mode()

static void dock_gpio_set_mode ( int  port,
int  mode,
int  irq 
)
static

Definition at line 44 of file dock.c.

References dock_write_register().

Referenced by dock_superio_init().

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

◆ dock_present()

int dock_present ( void  )

Definition at line 201 of file dock.c.

References pmh7_register_read().

Here is the call graph for this function:

◆ dock_read_register()

static u8 dock_read_register ( int  reg)
static

Definition at line 32 of file dock.c.

References inb(), and outb().

Referenced by dock_superio_init().

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

◆ dock_superio_init()

static int dock_superio_init ( void  )
static

Definition at line 99 of file dock.c.

References dock_gpio_set_mode(), dock_read_register(), dock_write_register(), outb(), PC87384_GPIO, PC87384_GPIO_PIN_DEBOUNCE, PC87384_GPIO_PIN_OE, PC87384_GPIO_PIN_PULLUP, PC87384_GPIO_PIN_TYPE_PUSH_PULL, PC87384_SP1, and udelay().

Referenced by dock_connect(), and legacy_io_init().

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

◆ dock_write_register()

static void dock_write_register ( int  reg,
int  value 
)
static

Definition at line 26 of file dock.c.

References outb(), and value.

Referenced by dock_gpio_set_mode(), and dock_superio_init().

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

◆ legacy_io_init()

void legacy_io_init ( void  )

Definition at line 211 of file dock.c.

References dock_superio_init(), pmh7_ultrabay_power_enable(), and udelay().

Referenced by bootblock_mainboard_early_init().

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

◆ legacy_io_present()

int legacy_io_present ( void  )

Definition at line 206 of file dock.c.

References DEFAULT_GPIOBASE, and inb().

Referenced by bootblock_mainboard_early_init(), and mainboard_io_trap_handler().

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