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_def.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <drivers/intel/gma/i915_reg.h>
#include <drivers/intel/gma/intel_bios.h>
#include <drivers/intel/gma/i915.h>
#include <drivers/intel/gma/opregion.h>
#include <pc80/vga.h>
#include <pc80/vga_io.h>
#include <types.h>
#include "chip.h"
#include "pineview.h"
Include dependency graph for gma.c:

Go to the source code of this file.

Macros

#define GTTSIZE   (512 * 1024)
 
#define PGETBL2_CTL   0x20c4
 
#define PGETBL2_1MB   (1 << 8)
 
#define PGETBL_CTL   0x2020
 
#define PGETBL_1MB   (3 << 1)
 
#define PGETBL_512KB   0
 
#define PGETBL_ENABLED   0x1
 
#define ADPA_HOTPLUG_BITS
 

Functions

static int gtt_setup (u8 *mmiobase)
 
static void intel_gma_init (const struct northbridge_intel_pineview_config *info, struct device *vga, u8 *mmio, u8 *gtt, u32 physbase, u16 piobase)
 
static void gma_func0_init (struct device *dev)
 
static const char * gma_acpi_name (const struct device *dev)
 

Variables

static struct resourcegtt_res = NULL
 
static struct resourcemmio_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

◆ ADPA_HOTPLUG_BITS

#define ADPA_HOTPLUG_BITS
Value:
ADPA_CRT_HOTPLUG_WARMUP_10MS | \
ADPA_CRT_HOTPLUG_MONITOR_COLOR| \
ADPA_CRT_HOTPLUG_SAMPLE_4S | \
ADPA_CRT_HOTPLUG_VOLTAGE_50 | \
ADPA_CRT_HOTPLUG_VOLREF_325MV | \
ADPA_CRT_HOTPLUG_ENABLE)
#define ADPA_CRT_HOTPLUG_PERIOD_128
Definition: i915_reg.h:1277

Definition at line 33 of file gma.c.

◆ GTTSIZE

#define GTTSIZE   (512 * 1024)

Definition at line 23 of file gma.c.

◆ PGETBL2_1MB

#define PGETBL2_1MB   (1 << 8)

Definition at line 26 of file gma.c.

◆ PGETBL2_CTL

#define PGETBL2_CTL   0x20c4

Definition at line 25 of file gma.c.

◆ PGETBL_1MB

#define PGETBL_1MB   (3 << 1)

Definition at line 29 of file gma.c.

◆ PGETBL_512KB

#define PGETBL_512KB   0

Definition at line 30 of file gma.c.

◆ PGETBL_CTL

#define PGETBL_CTL   0x2020

Definition at line 28 of file gma.c.

◆ PGETBL_ENABLED

#define PGETBL_ENABLED   0x1

Definition at line 31 of file gma.c.

Function Documentation

◆ gma_acpi_name()

static const char* gma_acpi_name ( const struct device dev)
static

Definition at line 262 of file gma.c.

◆ gma_func0_init()

◆ gtt_setup()

static int gtt_setup ( u8 mmiobase)
static

Definition at line 44 of file gma.c.

References BGSM, BIOS_DEBUG, GFX_FLSH_CNTL, pci_read_config32(), pcidev_on_root(), PGETBL_512KB, PGETBL_CTL, printk, udelay(), and write32().

Referenced by intel_gma_init().

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

◆ intel_gma_init()

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:276
static struct device_operations gma_func0_ops
Definition: gma.c:267
#define PCI_VID_INTEL
Definition: pci_ids.h:2157

Definition at line 276 of file gma.c.

◆ gma_func0_ops

struct device_operations gma_func0_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = gma_func0_init,
.ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
}
static const char * gma_acpi_name(const struct device *dev)
Definition: gma.c:262
static void gma_func0_init(struct device *dev)
Definition: gma.c:220
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 262 of file gma.c.

◆ gtt_res

struct resource* gtt_res = NULL
static

Definition at line 41 of file gma.c.

Referenced by gma_func0_init().

◆ mmio_res

struct resource* mmio_res = NULL
static

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
=
{
0xa001, 0,
}

Definition at line 276 of file gma.c.