coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <device/mmio.h>
#include <boot/coreboot_tables.h>
#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <edid.h>
#include <gpio.h>
#include <soc/display.h>
#include <soc/grf.h>
#include <soc/soc.h>
#include <soc/pmu.h>
#include <soc/clock.h>
#include <soc/rk808.h>
#include <soc/spi.h>
#include <soc/i2c.h>
#include <symbols.h>
#include "board.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Functions

static void configure_usb (void)
 
static void configure_sdmmc (void)
 
static void configure_emmc (void)
 
static void configure_codec (void)
 
static void configure_vop (void)
 
static void mainboard_init (struct device *dev)
 
static void mainboard_enable (struct device *dev)
 
void lb_board (struct lb_header *header)
 
void mainboard_power_on_backlight (void)
 

Variables

struct chip_operations mainboard_ops
 

Function Documentation

◆ configure_codec()

static void configure_codec ( void  )
static

Definition at line 52 of file mainboard.c.

References i2c_init(), rk3288_grf_regs::io_vsel, rk3288_grf_regs::iomux_i2c2, IOMUX_I2C2, rk3288_grf_regs::iomux_i2s, IOMUX_I2S, rk3288_grf_regs::iomux_i2sclk, IOMUX_I2SCLK, KHz, rk3288_grf, rk808_configure_ldo(), RK_SETBITS, rkclk_configure_i2s(), and write32().

Referenced by mainboard_init().

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

◆ configure_emmc()

static void configure_emmc ( void  )
static

Definition at line 43 of file mainboard.c.

References GPIO, gpio_output(), rk3288_grf_regs::iomux_emmccmd, IOMUX_EMMCCMD, rk3288_grf_regs::iomux_emmcdata, IOMUX_EMMCDATA, rk3288_grf_regs::iomux_emmcpwren, IOMUX_EMMCPWREN, rk3288_grf, and write32().

Referenced by mainboard_init().

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

◆ configure_sdmmc()

static void configure_sdmmc ( void  )
static

Definition at line 29 of file mainboard.c.

References GPIO, gpio_input(), rk3288_grf_regs::iomux_sdmmc0, IOMUX_SDMMC0, rk3288_grf, rk808_configure_ldo(), RK_CLRBITS, rk3288_grf_regs::soc_con0, and write32().

Referenced by mainboard_init().

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

◆ configure_usb()

static void configure_usb ( void  )
static

Definition at line 22 of file mainboard.c.

References GPIO, and gpio_output().

Referenced by mainboard_init().

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

◆ configure_vop()

static void configure_vop ( void  )
static

Definition at line 67 of file mainboard.c.

References GPIO, gpio_input_pulldown(), gpio_output(), rk3288_grf_regs::io_vsel, rk3288_grf_regs::iomux_edp_hotplug, IOMUX_EDP_HOTPLUG, rk3288_grf_regs::iomux_lcdc, IOMUX_LCDC, rk3288_grf, rk808_configure_ldo(), rk808_configure_switch(), RK_SETBITS, and write32().

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 104 of file mainboard.c.

References dma, dma_coherent(), header, lb_new_record(), 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 95 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 84 of file mainboard.c.

References configure_codec(), configure_emmc(), configure_sdmmc(), configure_usb(), configure_vop(), gpio_output(), and GPIO_RESET.

Referenced by mainboard_enable().

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

◆ mainboard_power_on_backlight()

void mainboard_power_on_backlight ( void  )

Definition at line 115 of file mainboard.c.

References GPIO, GPIO_BACKLIGHT, gpio_output(), and mdelay().

Here is the call 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:95

Definition at line 95 of file mainboard.c.