coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gma.c File Reference
#include <arch/io.h>
#include <device/mmio.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <drivers/intel/gma/edid.h>
#include <drivers/intel/gma/i915.h>
#include <drivers/intel/gma/intel_bios.h>
#include <drivers/intel/gma/libgfxinit.h>
#include <pc80/vga.h>
#include <drivers/intel/gma/opregion.h>
#include <types.h>
#include "chip.h"
#include "ironlake.h"
Include dependency graph for gma.c:

Go to the source code of this file.

Macros

#define GTT_RETRY   1000
 

Functions

u32 map_oprom_vendev (u32 vendev)
 
u32 gtt_read (u32 reg)
 
void gtt_write (u32 reg, u32 data)
 
int gtt_poll (u32 reg, u32 mask, u32 value)
 
static void gma_pm_init_post_vbios (struct device *dev)
 
static void gma_enable_swsci (void)
 
static void gma_func0_init (struct device *dev)
 
static void gma_read_resources (struct device *dev)
 
static void gma_generate_ssdt (const struct device *device)
 

Variables

static struct resourcegtt_res = NULL
 
static struct device_operations gma_func0_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver gma __pci_driver
 

Macro Definition Documentation

◆ GTT_RETRY

#define GTT_RETRY   1000

Definition at line 48 of file gma.c.

Function Documentation

◆ gma_enable_swsci()

static void gma_enable_swsci ( void  )
static

Definition at line 118 of file gma.c.

References DEFAULT_PMBASE, DMISCI_STS, GPE0_EN, GPE0_STS, inw(), outl(), outw(), TCO1_STS, TCOSCI_EN, and TCOSCI_STS.

Referenced by gma_func0_init().

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

◆ gma_func0_init()

◆ gma_generate_ssdt()

static void gma_generate_ssdt ( const struct device device)
static

Definition at line 186 of file gma.c.

◆ gma_pm_init_post_vbios()

◆ gma_read_resources()

static void gma_read_resources ( struct device dev)
static

◆ gtt_poll()

int gtt_poll ( u32  reg,
u32  mask,
u32  value 
)

Definition at line 49 of file gma.c.

References BIOS_ERR, gtt_read(), GTT_RETRY, mask, printk, udelay(), and value.

Here is the call graph for this function:

◆ gtt_read()

u32 gtt_read ( u32  reg)

Definition at line 38 of file gma.c.

References gtt_res, read32(), and res2mmio().

Here is the call graph for this function:

◆ gtt_write()

void gtt_write ( u32  reg,
u32  data 
)

Definition at line 43 of file gma.c.

References gtt_res, res2mmio(), and write32().

Here is the call graph for this function:

◆ map_oprom_vendev()

u32 map_oprom_vendev ( u32  vendev)

Definition at line 27 of file gma.c.

Variable Documentation

◆ __pci_driver

const struct pci_driver gma __pci_driver
static
Initial value:
= {
.ops = &gma_func0_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
static const unsigned short pci_device_ids[]
Definition: gma.c:202
static struct device_operations gma_func0_ops
Definition: gma.c:193
#define PCI_VID_INTEL
Definition: pci_ids.h:2157

Definition at line 202 of file gma.c.

◆ gma_func0_ops

struct device_operations gma_func0_ops
static
Initial value:
= {
.read_resources = gma_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
.ops_pci = &pci_dev_ops_pci,
}
static void gma_func0_init(struct device *dev)
Definition: gma.c:136
static void gma_read_resources(struct device *dev)
Definition: gma.c:167
static void gma_generate_ssdt(const struct device *device)
Definition: gma.c:186
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
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 186 of file gma.c.

◆ gtt_res

struct resource* gtt_res = NULL
static

Definition at line 36 of file gma.c.

Referenced by gma_func0_init(), gtt_read(), and gtt_write().

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0x0046, 0x0102, 0x0106, 0x010a, 0x0112,
0x0116, 0x0122, 0x0126, 0x0156,
0x0166,
0
}

Definition at line 202 of file gma.c.