23 #define GTTSIZE (512 * 1024)
25 #define PGETBL2_CTL 0x20c4
26 #define PGETBL2_1MB (1 << 8)
28 #define PGETBL_CTL 0x2020
29 #define PGETBL_1MB (3 << 1)
30 #define PGETBL_512KB 0
31 #define PGETBL_ENABLED 0x1
33 #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \
34 ADPA_CRT_HOTPLUG_WARMUP_10MS | \
35 ADPA_CRT_HOTPLUG_MONITOR_COLOR| \
36 ADPA_CRT_HOTPLUG_SAMPLE_4S | \
37 ADPA_CRT_HOTPLUG_VOLTAGE_50 | \
38 ADPA_CRT_HOTPLUG_VOLREF_325MV | \
39 ADPA_CRT_HOTPLUG_ENABLE)
69 (
u32)gtt, (
u32)mmio, piobase, physbase);
111 0x5f, 0x4f, 0x50, 0x82, 0x55,
112 0x81, 0xbf, 0x1f, 0x00, 0x4f,
113 0x0d, 0x0e, 0x00, 0x00, 0x00,
114 0x00, 0x9c, 0x8e, 0x8f, 0x28,
115 0x1f, 0x96, 0xb9, 0xa3, 0xff,
156 write32(mmio +
HTOTAL(0), ((hactive - 1) << 16) | (hactive - 1));
157 write32(mmio +
HBLANK(0), ((hactive - 1) << 16) | (hactive - 1));
158 write32(mmio +
HSYNC(0), ((hactive - 1) << 16) | (hactive - 1));
159 write32(mmio +
VTOTAL(0), ((vactive - 1) << 16) | (vactive - 1));
160 write32(mmio +
VBLANK(0), ((vactive - 1) << 16) | (vactive - 1));
161 write32(mmio +
VSYNC(0), ((vactive - 1) << 16) | (vactive - 1));
197 for (i = 0; i < (8192 - 512) / 4; i++) {
198 outl((i << 2) | 1, piobase);
199 outl(physbase + (i << 12) + 1, piobase + 4);
227 if (!
CONFIG(MAINBOARD_DO_NATIVE_VGA_INIT)) {
246 "skipping NATIVE graphic init\n");
253 physbase, pio_res->
base);
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define printk(level,...)
void mdelay(unsigned int msecs)
void outl(u32 val, u16 port)
DEVTREE_CONST struct device * pcidev_on_root(uint8_t dev, uint8_t fn)
struct resource * find_resource(const struct device *dev, unsigned int index)
Return an existing resource structure for a given index.
static struct smmstore_params_info info
void generate_fake_intel_oprom(const struct i915_gpu_controller_info *conf, struct device *dev, const char *idstr)
#define ADPA_USE_VGA_HVPOLARITY
#define DPLL_VGA_MODE_DIS
#define VS_TIMER_DISPATCH
#define ADPA_VSYNC_CNTL_ENABLE
#define PIPECONF_DITHER_EN
#define DPLL_DAC_SERIAL_P2_CLOCK_DIV_10
#define DPLLB_MODE_DAC_SERIAL
#define PF_FILTER_MED_3x3
#define DISPPLANE_BGRX888
#define ADPA_PIPE_A_SELECT
#define DISPLAY_PLANE_ENABLE
#define ADPA_HSYNC_CNTL_ENABLE
#define PINEVIEW_SELF_REFRESH_EN
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
static const char * gma_acpi_name(const struct device *dev)
static struct resource * gtt_res
static void gma_func0_init(struct device *dev)
static const struct pci_driver gma __pci_driver
static const unsigned short pci_device_ids[]
#define ADPA_HOTPLUG_BITS
static struct device_operations gma_func0_ops
static struct resource * mmio_res
static void intel_gma_init(const struct northbridge_intel_pineview_config *info, struct device *vga, u8 *mmio, u8 *gtt, u32 physbase, u16 piobase)
static int gtt_setup(u8 *mmiobase)
enum cb_err intel_gma_init_igd_opregion(void)
#define PCI_COMMAND_MASTER
#define PCI_BASE_ADDRESS_0
#define PCI_BASE_ADDRESS_1
#define PCI_BASE_ADDRESS_3
void pci_dev_init(struct device *dev)
Default handler: only runs the relevant PCI BIOS.
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
static void * res2mmio(const struct resource *res, unsigned long offset, unsigned long mask)
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info
struct i915_gpu_controller_info gfx
void vga_textmode_init(void)
void vga_misc_write(unsigned char value)
unsigned char vga_sr_read(unsigned char index)
void vga_gr_write(unsigned char index, unsigned char value)
void vga_cr_write(unsigned char index, unsigned char value)
void vga_sr_write(unsigned char index, unsigned char value)