coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bh720.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <device/mmio.h>
#include <device/path.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include "chip.h"
#include "bh720.h"
Include dependency graph for bh720.c:

Go to the source code of this file.

Functions

static u32 bh720_read_pcr (u32 sdbar, u32 addr)
 
static void bh720_write_pcr (u32 sdbar, u32 addr, u32 data)
 
static void bh720_rmw_pcr (u32 sdbar, u32 addr, u32 clear, u32 set)
 
static void bh720_program_hs200_mode (struct device *dev)
 
static void bh720_init (struct device *dev)
 

Variables

static struct device_operations bh720_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver bayhub_bh720 __pci_driver
 
struct chip_operations drivers_generic_bayhub_ops
 

Function Documentation

◆ bh720_init()

◆ bh720_program_hs200_mode()

static void bh720_program_hs200_mode ( struct device dev)
static

Definition at line 35 of file bh720.c.

References BH720_MEM_ACCESS_EN, BH720_PCR_CSR, BH720_PCR_CSR_EMMC_MODE_SEL, BH720_PCR_DrvStrength_PLL, BH720_PCR_EMMC_SETTING, BH720_PCR_EMMC_SETTING_1_8V, bh720_rmw_pcr(), bh720_write_pcr(), PCI_BASE_ADDRESS_1, pci_read_config32(), and write32().

Referenced by bh720_init().

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

◆ bh720_read_pcr()

static u32 bh720_read_pcr ( u32  sdbar,
u32  addr 
)
static

Definition at line 15 of file bh720.c.

References addr, BH720_MEM_RW_ADR, BH720_MEM_RW_DATA, BH720_MEM_RW_READ, read32(), and write32().

Referenced by bh720_rmw_pcr().

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

◆ bh720_rmw_pcr()

static void bh720_rmw_pcr ( u32  sdbar,
u32  addr,
u32  clear,
u32  set 
)
static

Definition at line 27 of file bh720.c.

References addr, bh720_read_pcr(), and bh720_write_pcr().

Referenced by bh720_program_hs200_mode().

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

◆ bh720_write_pcr()

static void bh720_write_pcr ( u32  sdbar,
u32  addr,
u32  data 
)
static

Definition at line 21 of file bh720.c.

References addr, BH720_MEM_RW_ADR, BH720_MEM_RW_DATA, BH720_MEM_RW_WRITE, and write32().

Referenced by bh720_program_hs200_mode(), and bh720_rmw_pcr().

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

Variable Documentation

◆ __pci_driver

const struct pci_driver bayhub_bh720 __pci_driver
static
Initial value:
= {
.ops = &bh720_ops,
.vendor = PCI_VID_O2,
.devices = pci_device_ids,
}
static struct device_operations bh720_ops
Definition: bh720.c:102
static const unsigned short pci_device_ids[]
Definition: bh720.c:110
#define PCI_VID_O2
Definition: pci_ids.h:1772

Definition at line 110 of file bh720.c.

◆ bh720_ops

struct device_operations bh720_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.ops_pci = &pci_dev_ops_pci,
.init = bh720_init,
}
static void bh720_init(struct device *dev)
Definition: bh720.c:57
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691

Definition at line 57 of file bh720.c.

◆ drivers_generic_bayhub_ops

struct chip_operations drivers_generic_bayhub_ops
Initial value:
= {
}

Definition at line 110 of file bh720.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0
}
#define PCI_DID_O2_BH720
Definition: pci_ids.h:1777

Definition at line 110 of file bh720.c.