![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <bootmode.h>
#include <device/mmio.h>
#include <delay.h>
#include <arch/io.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include <option.h>
#include <edid.h>
#include <drivers/intel/gma/edid.h>
#include <drivers/intel/gma/i915.h>
#include <drivers/intel/gma/opregion.h>
#include <string.h>
#include <pc80/vga.h>
#include <pc80/vga_io.h>
#include <commonlib/helpers.h>
#include <types.h>
#include <framebuffer_info.h>
#include "i945.h"
#include "chip.h"
Go to the source code of this file.
Macros | |
#define | GDRST 0xc0 |
#define | MSAC 0x62 /* Multi Size Aperture Control */ |
#define | LVDS_CLOCK_A_POWERUP_ALL (3 << 8) |
#define | LVDS_CLOCK_B_POWERUP_ALL (3 << 4) |
#define | LVDS_CLOCK_BOTH_POWERUP_ALL (3 << 2) |
#define | DPLLB_LVDS_P2_CLOCK_DIV_7 (1 << 24) /* i915 */ |
#define | DPLL_INTEGRATED_CRI_CLK_VLV (1 << 14) |
#define | PGETBL_CTL 0x2020 |
#define | PGETBL_ENABLED 0x00000001 |
#define | BASE_FREQUENCY 100000 |
#define | DEFAULT_BLC_PWM 180 |
Functions | |
static int | gtt_setup (u8 *mmiobase) |
static int | intel_gma_init_lvds (struct northbridge_intel_i945_config *conf, unsigned int pphysbase, unsigned int piobase, u8 *mmiobase, uintptr_t pgfx) |
static int | intel_gma_init_vga (struct northbridge_intel_i945_config *conf, unsigned int pphysbase, unsigned int piobase, u8 *mmiobase, uintptr_t pgfx) |
static int | probe_edid (u8 *mmiobase, u8 slave) |
static u32 | get_cdclk (struct device *const dev) |
static u32 | freq_to_blc_pwm_ctl (struct device *const dev, u16 pwm_freq) |
static void | panel_setup (u8 *mmiobase, struct device *const dev) |
static void | gma_ngi (struct device *const dev) |
static void | gma_func0_init (struct device *dev) |
static void | gma_func0_disable (struct device *dev) |
static void | gma_func1_init (struct device *dev) |
static void | gma_generate_ssdt (const struct device *device) |
static void | gma_func0_read_resources (struct device *dev) |
static const char * | gma_acpi_name (const struct device *dev) |
Variables | |
static struct device_operations | gma_func0_ops |
static struct device_operations | gma_func1_ops |
static const unsigned short | i945_gma_func0_ids [] |
static const unsigned short | i945_gma_func1_ids [] |
static const struct pci_driver i945_gma_func0_driver | __pci_driver |
Definition at line 579 of file gma.c.
References BLM_LEGACY_MODE, and get_cdclk().
Referenced by panel_setup().
Definition at line 563 of file gma.c.
References GC_DISPLAY_CLOCK_190_200_MHZ, GC_DISPLAY_CLOCK_333_320_MHZ, GC_DISPLAY_CLOCK_MASK, GC_LOW_FREQUENCY_ENABLE, GCFGC, and pci_read_config16().
Referenced by freq_to_blc_pwm_ctl(), and panel_setup().
|
static |
Definition at line 696 of file gma.c.
References DEVEN, DEVEN_D2F0, DEVEN_D2F1, device::enabled, GCFC, GGC, pci_and_config32(), pci_write_config16(), and pcidev_on_root().
Definition at line 660 of file gma.c.
References acpi_is_wakeup_s3(), BIOS_INFO, CONFIG, GDRST, GGC, gma_ngi(), intel_gma_init_igd_opregion(), PCI_COMMAND, PCI_COMMAND_MASTER, pci_dev_init(), pci_or_config16(), pci_read_config16(), pci_read_config8(), pci_write_config8(), printk, and udelay().
Definition at line 723 of file gma.c.
References MSAC, pci_dev_read_resources(), and pci_update_config8().
Definition at line 708 of file gma.c.
References CONFIG, get_uint_option(), PCI_COMMAND, PCI_COMMAND_MASTER, pci_or_config16(), and pci_write_config8().
Definition at line 716 of file gma.c.
References chip, device::chip_info, and drivers_intel_gma_displays_ssdt_generate().
Definition at line 618 of file gma.c.
References resource::base, BIOS_INFO, BIOS_SPEW, device::chip_info, CONFIG, generate_fake_intel_oprom(), northbridge_intel_i945_config::gfx, gfx_set_init_done(), GMADR, GMBUS_PORT_PANEL, GMBUS_PORT_VGADDC, GTTADR, intel_gma_init_lvds(), intel_gma_init_vga(), panel_setup(), pci_read_config32(), printk, probe_edid(), and device::resource_list.
Referenced by gma_func0_init().
|
static |
Definition at line 45 of file gma.c.
References BIOS_DEBUG, GFX_FLSH_CNTL, KiB, pci_read_config8(), pcidev_on_root(), PGETBL_CTL, PGETBL_ENABLED, printk, read32(), TOLUD, and write32().
Referenced by intel_gma_init_lvds(), and intel_gma_init_vga().
|
static |
Definition at line 74 of file gma.c.
References BASE_FREQUENCY, BIOS_DEBUG, BIOS_ERR, BIOS_INFO, BIOS_SPEW, edid::bytes_per_line, CONFIG, D_STATE, decode_edid(), decode_igd_memory_size(), DEIIR, DISPLAY_PLANE_ENABLE, DISPPLANE_BGRX888, DISPPLANE_GAMMA_ENABLE, DISPPLANE_SEL_PIPE_B, DIV_ROUND_CLOSEST, DPLL, DPLL_INTEGRATED_CLOCK_VLV, DPLL_INTEGRATED_CRI_CLK_VLV, DPLL_VCO_ENABLE, DPLL_VGA_MODE_DIS, DPLLB_LVDS_P2_CLOCK_DIV_14, DPLLB_LVDS_P2_CLOCK_DIV_7, DPLLB_MODE_LVDS, DSPADDR, DSPCNTR, DSPPOS, DSPSIZE, DSPSTRIDE, DSPSURF, DSTATE_DOT_CLOCK_GATING, DSTATE_GFX_CLOCK_GATING, DSTATE_PLL_D3_OFF, ECOSKPD, EIR, fb_new_framebuffer_info_from_edid(), FENCE_REG_965_0, FP0, GGC, GMBUS0, GMBUS_PORT_PANEL, northbridge_intel_i945_config::gpu_hotplug, northbridge_intel_i945_config::gpu_lvds_use_spread_spectrum_clock, gtt_setup(), edid_mode::hbl, HBLANK, edid_mode::hborder, HORIZ_AUTO_SCALE, edid_mode::hso, edid_mode::hspw, HSYNC, HTOTAL, HWS_PGA, HWSTAM, IIR, IMR, INSTPM, INSTPM_AGPBUSY_DIS, intel_gmbus_read_edid(), LVDS, LVDS_CLOCK_A_POWERUP_ALL, LVDS_CLOCK_B_POWERUP_ALL, LVDS_CLOCK_BOTH_POWERUP_ALL, edid_mode::lvds_dual_channel, LVDS_ON, LVDS_PIPE, m, MAX, mdelay(), memset(), MI_ARB_C3_LP_WRITE_ENABLE, MI_ARB_STATE, MIN, edid::mode, outl(), PALETTE, PANEL_POWER_OFF, PANEL_POWER_ON, PANEL_POWER_RESET, PANEL_UNLOCK_MASK, PANEL_UNLOCK_REGS, PCH_PP_CONTROL, pci_read_config16(), pcidev_on_root(), PF_CTL, PF_ENABLE, PF_FILTER_MED_3x3, PF_WIN_POS, PF_WIN_SZ, PFIT_CONTROL, PFIT_ENABLE, PFIT_PGM_RATIOS, PFIT_PIPE_SHIFT, PGETBL_CTL, edid_mode::phsync, PIPECONF, PIPECONF_ENABLE, PIPESRC, edid_mode::pixel_clock, PORT_HOTPLUG_EN, PP_CONTROL, PP_SEQUENCE_MASK, PP_SEQUENCE_NONE, PP_STATUS, PRB0_CTL, PRB0_HEAD, PRB0_START, PRB0_TAIL, printk, edid_mode::pvsync, read32(), RENDER_RING_BASE, SDEIIR, edid_mode::vbl, VBLANK, edid_mode::vborder, VERT_AUTO_SCALE, VGA_DISP_DISABLE, vga_misc_write(), VGA_PIPE_B_SELECT, vga_textmode_init(), VGACNTRL, edid_mode::vso, edid_mode::vspw, VSYNC, VTOTAL, write32(), edid::x_resolution, and edid::y_resolution.
Referenced by gma_ngi().
|
static |
Definition at line 374 of file gma.c.
References ADPA, ADPA_DAC_ENABLE, ADPA_DPMS_ON, ADPA_HSYNC_CNTL_ENABLE, ADPA_PIPE_A_SELECT, ADPA_USE_VGA_HVPOLARITY, ADPA_VSYNC_CNTL_ENABLE, BIOS_DEBUG, BIOS_SPEW, CACHE_MODE_0, CACHE_MODE_1, decode_igd_memory_size(), DEIIR, DISPLAY_PLANE_ENABLE, DISPPLANE_BGRX888, DPLL, DPLL_DAC_SERIAL_P2_CLOCK_DIV_10, DPLL_MD, DPLL_VCO_ENABLE, DPLL_VGA_MODE_DIS, DPLLB_MODE_DAC_SERIAL, DSPCLK_GATE_D, DSPCNTR, DSPFW3, EIR, FDI_RX_CTL, FDI_TX_CTL, FW_BLC, FW_BLC2, GGC, gtt_setup(), HBLANK, HSYNC, HTOTAL, IIR, IMR, INSTPM, mdelay(), MI_MODE, outl(), pci_read_config16(), pcidev_on_root(), PF_CTL, PF_ENABLE, PF_FILTER_MED_3x3, PF_WIN_POS, PF_WIN_SZ, PFIT_CONTROL, PINEVIEW_SELF_REFRESH_EN, PIPECONF, PIPECONF_BPP_6, PIPECONF_DITHER_EN, PIPECONF_ENABLE, PIPESRC, printk, SDEIIR, VBLANK, VGA0, VGA1, vga_cr_write(), VGA_DISP_DISABLE, vga_gr_write(), vga_misc_write(), vga_sr_read(), vga_sr_write(), vga_textmode_init(), VGACNTRL, VS_TIMER_DISPATCH, VSYNC, VTOTAL, and write32().
Referenced by gma_ngi().
Definition at line 588 of file gma.c.
References BLC_PWM_CTL, device::chip_info, DEFAULT_BLC_PWM, freq_to_blc_pwm_ctl(), get_cdclk(), northbridge_intel_i945_config::gpu_panel_power_backlight_off_delay, northbridge_intel_i945_config::gpu_panel_power_backlight_on_delay, northbridge_intel_i945_config::gpu_panel_power_cycle_delay, northbridge_intel_i945_config::gpu_panel_power_down_delay, northbridge_intel_i945_config::gpu_panel_power_up_delay, PP_DIVISOR, PP_OFF_DELAYS, PP_ON_DELAYS, PP_REFERENCE_DIVIDER_SHIFT, northbridge_intel_i945_config::pwm_freq, and write32().
Referenced by gma_ngi().
Definition at line 545 of file gma.c.
References BIOS_DEBUG, BIOS_SPEW, GMBUS0, header, intel_gmbus_read_edid(), intel_gmbus_stop(), printk, and slave.
Referenced by gma_ngi().
|
static |
|
static |
|
static |
|
static |