coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <boardid.h>
#include <boot/coreboot_tables.h>
#include <delay.h>
#include <device/device.h>
#include <gpio.h>
#include <soc/clock.h>
#include <soc/soc_services.h>
#include <soc/usb.h>
#include <symbols.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include "mmu.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Macros

#define USB_ENABLE_GPIO   51
 
#define TPM_RESET_GPIO   22
 
#define SW_RESET_GPIO   26
 

Functions

static void setup_usb (void)
 
static void setup_tpm (void)
 
static void assert_sw_reset (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 
void lb_board (struct lb_header *header)
 

Variables

struct chip_operations mainboard_ops
 

Macro Definition Documentation

◆ SW_RESET_GPIO

#define SW_RESET_GPIO   26

Definition at line 48 of file mainboard.c.

◆ TPM_RESET_GPIO

#define TPM_RESET_GPIO   22

Definition at line 30 of file mainboard.c.

◆ USB_ENABLE_GPIO

#define USB_ENABLE_GPIO   51

Definition at line 16 of file mainboard.c.

Function Documentation

◆ assert_sw_reset()

static void assert_sw_reset ( void  )
static

Definition at line 49 of file mainboard.c.

References board_id(), BOARD_ID_PROTO_0, FUNC_SEL_GPIO, GPIO_4MA, GPIO_ENABLE, GPIO_PULL_UP, gpio_set(), gpio_tlmm_config_set(), and SW_RESET_GPIO.

Referenced by mainboard_init().

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

◆ lb_board()

void lb_board ( struct lb_header header)

Definition at line 101 of file mainboard.c.

References CONFIG, dma, dma_coherent(), header, lb_new_record(), lb_table_add_macs_from_vpd(), LB_TAG_DMA, and REGION_SIZE.

Here is the call graph for this function:

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 92 of file mainboard.c.

References device_operations::init, mainboard_init(), and device::ops.

Here is the call graph for this function:

◆ mainboard_init()

static void mainboard_init ( struct device dev)
static

Definition at line 65 of file mainboard.c.

References assert_sw_reset(), audio_clock_config(), board_nand_init(), CONFIG, dcache_mmu_disable(), DRAM_INITIALIZED, setup_mmu(), setup_tpm(), setup_usb(), start_rpm(), and start_tzbsp().

Referenced by mainboard_enable().

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

◆ setup_tpm()

static void setup_tpm ( void  )
static

Definition at line 31 of file mainboard.c.

References board_id(), BOARD_ID_PROTO_0, FUNC_SEL_GPIO, GPIO_4MA, GPIO_ENABLE, GPIO_PULL_UP, gpio_set(), gpio_tlmm_config_set(), TPM_RESET_GPIO, and udelay().

Referenced by mainboard_init().

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

◆ setup_usb()

static void setup_usb ( void  )
static

Definition at line 18 of file mainboard.c.

References FUNC_SEL_GPIO, GPIO_10MA, GPIO_ENABLE, GPIO_PULL_UP, gpio_set(), gpio_tlmm_config_set(), setup_usb_host1(), usb_clock_config(), and USB_ENABLE_GPIO.

Referenced by mainboard_init().

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

Variable Documentation

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.enable_dev = mainboard_enable,
}
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:92

Definition at line 92 of file mainboard.c.