coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
edid.c File Reference
#include <device/mmio.h>
#include <console/console.h>
#include <delay.h>
#include "i915_reg.h"
#include "edid.h"
Include dependency graph for edid.c:

Go to the source code of this file.

Macros

#define GMBUS0_ADDR   (mmio + 4 * 0)
 
#define GMBUS1_ADDR   (mmio + 4 * 1)
 
#define GMBUS2_ADDR   (mmio + 4 * 2)
 
#define GMBUS3_ADDR   (mmio + 4 * 3)
 
#define GMBUS5_ADDR   (mmio + 4 * 8)
 
#define AT24_ADDR   0x50 /* EDID EEPROM */
 

Functions

static void wait_rdy (u8 *mmio)
 
static void intel_gmbus_stop_bus (u8 *mmio, u8 bus)
 
void intel_gmbus_stop (u8 *mmio)
 
void intel_gmbus_read_edid (u8 *mmio, u8 bus, u8 slave, u8 *edid, u32 edid_size)
 

Macro Definition Documentation

◆ AT24_ADDR

#define AT24_ADDR   0x50 /* EDID EEPROM */

Definition at line 14 of file edid.c.

◆ GMBUS0_ADDR

#define GMBUS0_ADDR   (mmio + 4 * 0)

Definition at line 9 of file edid.c.

◆ GMBUS1_ADDR

#define GMBUS1_ADDR   (mmio + 4 * 1)

Definition at line 10 of file edid.c.

◆ GMBUS2_ADDR

#define GMBUS2_ADDR   (mmio + 4 * 2)

Definition at line 11 of file edid.c.

◆ GMBUS3_ADDR

#define GMBUS3_ADDR   (mmio + 4 * 3)

Definition at line 12 of file edid.c.

◆ GMBUS5_ADDR

#define GMBUS5_ADDR   (mmio + 4 * 8)

Definition at line 13 of file edid.c.

Function Documentation

◆ intel_gmbus_read_edid()

void intel_gmbus_read_edid ( u8 mmio,
u8  bus,
u8  slave,
u8 edid,
u32  edid_size 
)

Definition at line 54 of file edid.c.

References BIOS_SPEW, GMBUS0_ADDR, GMBUS1_ADDR, GMBUS2_ADDR, GMBUS3_ADDR, GMBUS5_ADDR, GMBUS_BYTE_COUNT_SHIFT, GMBUS_CYCLE_INDEX, GMBUS_CYCLE_STOP, GMBUS_CYCLE_WAIT, GMBUS_INUSE, GMBUS_SLAVE_READ, GMBUS_SLAVE_WRITE, GMBUS_SW_RDY, printk, read32(), slave, wait_rdy(), and write32().

Referenced by gma_func0_init(), intel_gma_init_lvds(), and probe_edid().

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

◆ intel_gmbus_stop()

void intel_gmbus_stop ( u8 mmio)

Definition at line 48 of file edid.c.

References intel_gmbus_stop_bus().

Referenced by gma_func0_init(), and probe_edid().

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

◆ intel_gmbus_stop_bus()

static void intel_gmbus_stop_bus ( u8 mmio,
u8  bus 
)
static

Definition at line 27 of file edid.c.

References AT24_ADDR, GMBUS0_ADDR, GMBUS1_ADDR, GMBUS2_ADDR, GMBUS5_ADDR, GMBUS_BYTE_COUNT_SHIFT, GMBUS_CYCLE_INDEX, GMBUS_CYCLE_STOP, GMBUS_CYCLE_WAIT, GMBUS_INUSE, GMBUS_SLAVE_READ, GMBUS_SLAVE_WRITE, GMBUS_SW_CLR_INT, GMBUS_SW_RDY, wait_rdy(), and write32().

Referenced by intel_gmbus_stop().

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

◆ wait_rdy()

static void wait_rdy ( u8 mmio)
static

Definition at line 16 of file edid.c.

References GMBUS2_ADDR, GMBUS_HW_RDY, read32(), and udelay().

Referenced by intel_gmbus_read_edid(), and intel_gmbus_stop_bus().

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