coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gma.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <commonlib/helpers.h>
4 #include <arch/io.h>
5 #include <device/mmio.h>
6 #include <device/pci_ops.h>
7 #include <console/console.h>
8 #include <bootmode.h>
9 #include <delay.h>
10 #include <device/device.h>
11 #include <device/pci.h>
12 #include <device/pci_ids.h>
14 #include <drivers/intel/gma/i915.h>
19 #include <types.h>
20 
21 #include "chip.h"
22 #include "haswell.h"
23 
24 struct gt_reg {
28 };
29 
30 static const struct gt_reg haswell_gt_setup[] = {
31  /* Enable Counters */
32  { 0x0a248, 0x00000000, 0x00000016 },
33  { 0x0a000, 0x00000000, 0x00070020 },
34  { 0x0a180, 0xff3fffff, 0x15000000 },
35  /* Enable DOP Clock Gating */
36  { 0x09424, 0x00000000, 0x000003fd },
37  /* Enable Unit Level Clock Gating */
38  { 0x09400, 0x00000000, 0x00000080 },
39  { 0x09404, 0x00000000, 0x40401000 },
40  { 0x09408, 0x00000000, 0x00000000 },
41  { 0x0940c, 0x00000000, 0x02000001 },
42  { 0x0a008, 0x00000000, 0x08000000 },
43  /* Wake Rate Limits */
44  { 0x0a090, 0xffffffff, 0x00000000 },
45  { 0x0a098, 0xffffffff, 0x03e80000 },
46  { 0x0a09c, 0xffffffff, 0x00280000 },
47  { 0x0a0a8, 0xffffffff, 0x0001e848 },
48  { 0x0a0ac, 0xffffffff, 0x00000019 },
49  /* Render/Video/Blitter Idle Max Count */
50  { 0x02054, 0x00000000, 0x0000000a },
51  { 0x12054, 0x00000000, 0x0000000a },
52  { 0x22054, 0x00000000, 0x0000000a },
53  /* RC Sleep / RCx Thresholds */
54  { 0x0a0b0, 0xffffffff, 0x00000000 },
55  { 0x0a0b4, 0xffffffff, 0x000003e8 },
56  { 0x0a0b8, 0xffffffff, 0x0000c350 },
57  /* RP Settings */
58  { 0x0a010, 0xffffffff, 0x000f4240 },
59  { 0x0a014, 0xffffffff, 0x12060000 },
60  { 0x0a02c, 0xffffffff, 0x0000e808 },
61  { 0x0a030, 0xffffffff, 0x0003bd08 },
62  { 0x0a068, 0xffffffff, 0x000101d0 },
63  { 0x0a06c, 0xffffffff, 0x00055730 },
64  { 0x0a070, 0xffffffff, 0x0000000a },
65  /* RP Control */
66  { 0x0a024, 0x00000000, 0x00000b92 },
67  /* HW RC6 Control */
68  { 0x0a090, 0x00000000, 0x88040000 },
69  /* Video Frequency Request */
70  { 0x0a00c, 0x00000000, 0x08000000 },
71  { 0 },
72 };
73 
74 static const struct gt_reg haswell_gt_lock[] = {
75  { 0x0a248, 0xffffffff, 0x80000000 },
76  { 0x0a004, 0xffffffff, 0x00000010 },
77  { 0x0a080, 0xffffffff, 0x00000004 },
78  { 0x0a180, 0xffffffff, 0x80000000 },
79  { 0 },
80 };
81 
82 /*
83  * Some VGA option roms are used for several chipsets but they only have one PCI ID in their
84  * header. If we encounter such an option rom, we need to do the mapping ourselves.
85  */
86 
88 {
89  u32 new_vendev = vendev;
90 
91  switch (vendev) {
92  case 0x80860402: /* GT1 Desktop */
93  case 0x80860406: /* GT1 Mobile */
94  case 0x8086040a: /* GT1 Server */
95  case 0x80860a06: /* GT1 ULT */
96 
97  case 0x80860412: /* GT2 Desktop */
98  case 0x80860416: /* GT2 Mobile */
99  case 0x8086041a: /* GT2 Server */
100  case 0x8086041e: /* GT1.5 Desktop */
101  case 0x80860a16: /* GT2 ULT */
102 
103  case 0x80860422: /* GT3 Desktop */
104  case 0x80860426: /* GT3 Mobile */
105  case 0x8086042a: /* GT3 Server */
106  case 0x80860a26: /* GT3 ULT */
107 
108  case 0x80860d22: /* GT3e Desktop */
109  case 0x80860d16: /* GT1 Mobile 4+3 */
110  case 0x80860d26: /* GT2 Mobile 4+3, GT3e Mobile */
111  case 0x80860d36: /* GT3 Mobile 4+3 */
112 
113  new_vendev = 0x80860406; /* GT1 Mobile */
114  break;
115  }
116 
117  return new_vendev;
118 }
119 
120 static struct resource *gtt_res = NULL;
121 
123 {
124  u32 val;
125  val = read32(res2mmio(gtt_res, reg, 0));
126  return val;
127 
128 }
129 
130 void gtt_write(u32 reg, u32 data)
131 {
132  write32(res2mmio(gtt_res, reg, 0), data);
133 }
134 
135 static inline void gtt_rmw(u32 reg, u32 andmask, u32 ormask)
136 {
137  u32 val = gtt_read(reg);
138  val &= andmask;
139  val |= ormask;
140  gtt_write(reg, val);
141 }
142 
143 static inline void gtt_write_regs(const struct gt_reg *gt)
144 {
145  for (; gt && gt->reg; gt++) {
146  if (gt->andmask)
147  gtt_rmw(gt->reg, gt->andmask, gt->ormask);
148  else
149  gtt_write(gt->reg, gt->ormask);
150  }
151 }
152 
153 #define GTT_RETRY 1000
155 {
156  unsigned int try = GTT_RETRY;
157  u32 data;
158 
159  while (try--) {
160  data = gtt_read(reg);
161  if ((data & mask) == value)
162  return 1;
163 
164  udelay(10);
165  }
166 
167  printk(BIOS_ERR, "GT init timeout\n");
168  return 0;
169 }
170 
171 static void power_well_enable(void)
172 {
175 }
176 
177 static void gma_pm_init_pre_vbios(struct device *dev)
178 {
179  printk(BIOS_DEBUG, "GT Power Management Init\n");
180 
182  if (!gtt_res || !gtt_res->base)
183  return;
184 
186 
187  /*
188  * Enable RC6
189  */
190 
191  /* Enable Force Wake */
192  gtt_write(0x0a180, 1 << 5);
193  gtt_write(0x0a188, 0x00010001);
194  gtt_poll(FORCEWAKE_ACK_HSW, 1 << 0, 1 << 0);
195 
196  /* GT Settings */
198 
199  /* Wait for Mailbox Ready */
200  gtt_poll(0x138124, (1 << 31), (0 << 31));
201 
202  /* Mailbox Data - RC6 VIDS */
203  gtt_write(0x138128, 0x00000000);
204 
205  /* Mailbox Command */
206  gtt_write(0x138124, 0x80000004);
207 
208  /* Wait for Mailbox Ready */
209  gtt_poll(0x138124, (1 << 31), (0 << 31));
210 
211  /* Enable PM Interrupts */
216 
217  /* Enable RC6 in idle */
218  gtt_write(0x0a094, 0x00040000);
219 
220  /* PM Lock Settings */
222 }
223 
224 static void init_display_planes(void)
225 {
226  int pipe, plane;
227 
228  /* Disable cursor mode */
229  for (pipe = PIPE_A; pipe <= PIPE_C; pipe++) {
231  gtt_write(CURBASE_IVB(pipe), 0x00000000);
232  }
233 
234  /* Disable primary plane and set surface base address */
235  for (plane = PLANE_A; plane <= PLANE_C; plane++) {
237  gtt_write(DSPSURF(plane), 0x00000000);
238  }
239 
240  /* Disable VGA display */
242 }
243 
244 static void gma_setup_panel(struct device *dev)
245 {
246  struct northbridge_intel_haswell_config *conf = config_of(dev);
247  const struct i915_gpu_panel_config *panel_cfg = &conf->panel_cfg;
248  u32 reg32;
249 
250  /* Setup Digital Port Hotplug */
251  reg32 = gtt_read(PCH_PORT_HOTPLUG);
252  if (!reg32) {
253  reg32 = (conf->gpu_dp_b_hotplug & 0x7) << 2;
254  reg32 |= (conf->gpu_dp_c_hotplug & 0x7) << 10;
255  reg32 |= (conf->gpu_dp_d_hotplug & 0x7) << 18;
256  gtt_write(PCH_PORT_HOTPLUG, reg32);
257  }
258 
259  /* Setup Panel Power On Delays */
260  reg32 = gtt_read(PCH_PP_ON_DELAYS);
261  if (!reg32) {
262  reg32 |= ((panel_cfg->up_delay_ms * 10) & 0x1fff) << 16;
263  reg32 |= (panel_cfg->backlight_on_delay_ms * 10) & 0x1fff;
264  gtt_write(PCH_PP_ON_DELAYS, reg32);
265  }
266 
267  /* Setup Panel Power Off Delays */
268  reg32 = gtt_read(PCH_PP_OFF_DELAYS);
269  if (!reg32) {
270  reg32 = ((panel_cfg->down_delay_ms * 10) & 0x1fff) << 16;
271  reg32 |= (panel_cfg->backlight_off_delay_ms * 10) & 0x1fff;
273  }
274 
275  /* Setup Panel Power Cycle Delay */
276  if (panel_cfg->cycle_delay_ms) {
277  reg32 = gtt_read(PCH_PP_DIVISOR);
278  reg32 &= ~0x1f;
279  reg32 |= (DIV_ROUND_UP(panel_cfg->cycle_delay_ms, 100) + 1) & 0x1f;
280  gtt_write(PCH_PP_DIVISOR, reg32);
281  }
282 
283  /* Enforce the PCH PWM function, as so does Linux.
284  The CPU PWM controls are disabled after reset. */
285  if (panel_cfg->backlight_pwm_hz) {
286  /* Reference clock is either 24MHz or 135MHz. We can choose
287  either a 16 or a 128 step increment. Use 16 if we would
288  have less than 100 steps otherwise. */
289  const unsigned int refclock = CONFIG(INTEL_LYNXPOINT_LP) ? 24*MHz : 135*MHz;
290  const unsigned int hz_limit = refclock / 128 / 100;
291  unsigned int pwm_increment, pwm_period;
292  u32 south_chicken2;
293 
294  south_chicken2 = gtt_read(SOUTH_CHICKEN2);
295  if (panel_cfg->backlight_pwm_hz > hz_limit) {
296  pwm_increment = 16;
297  south_chicken2 |= LPT_PWM_GRANULARITY;
298  } else {
299  pwm_increment = 128;
300  south_chicken2 &= ~LPT_PWM_GRANULARITY;
301  }
302  gtt_write(SOUTH_CHICKEN2, south_chicken2);
303 
304  pwm_period = refclock / pwm_increment / panel_cfg->backlight_pwm_hz;
306  "GMA: Setting backlight PWM frequency to %uMHz / %u / %u = %uHz\n",
307  refclock / MHz, pwm_increment, pwm_period,
308  DIV_ROUND_CLOSEST(refclock, pwm_increment * pwm_period));
309 
310  /* Start with a 50% duty cycle. */
311  gtt_write(BLC_PWM_PCH_CTL2, pwm_period << 16 | pwm_period / 2);
312 
314  (panel_cfg->backlight_polarity == GPU_BACKLIGHT_POLARITY_LOW) << 29 |
316  }
317 
318  /* Get display,pipeline,and DDI registers into a basic sane state */
320 
322 
323  /*
324  * DDI-A params set:
325  * bit 0: Display detected (RO)
326  * bit 4: DDI A supports 4 lanes and DDI E is not used
327  * bit 7: DDI buffer is idle
328  */
330  if (!conf->gpu_ddi_e_connected)
331  reg32 |= DDI_A_4_LANES;
332  gtt_write(DDI_BUF_CTL_A, reg32);
333 
334  /* Set FDI registers - is this required? */
335  gtt_write(_FDI_RXA_MISC, 0x00200090);
336  gtt_write(_FDI_RXA_MISC, 0x0a000000);
337 
338  /* Enable the handshake with PCH display when processing reset */
340 
341  /* Undocumented */
342  gtt_write(0x42090, 0x04000000);
343  gtt_write(0x9840, 0x00000000);
344  gtt_write(0x42090, 0xa4000000);
345 
347 
348  /* Undocumented */
349  gtt_write(0x42080, 0x00004000);
350 
351  /* Prepare DDI buffers for DP and FDI */
353 
354  /* Hot plug detect buffer enabled for port A */
356 
357  /* Enable HPD buffer for digital port D and B */
359 
360  /*
361  * Bits 4:0 - Power cycle delay (default 0x6 --> 500ms)
362  * Bits 31:8 - Reference divider (0x0004af ----> 24MHz)
363  */
364  gtt_write(PCH_PP_DIVISOR, 0x0004af06);
365 }
366 
367 static void gma_pm_init_post_vbios(struct device *dev)
368 {
369  int cdclk = 0;
370  int devid = pci_read_config16(dev, PCI_DEVICE_ID);
371  int gpu_is_ulx = 0;
372 
373  if (devid == 0x0a0e || devid == 0x0a1e)
374  gpu_is_ulx = 1;
375 
376  /* CD Frequency */
377  if ((gtt_read(0x42014) & 0x1000000) || gpu_is_ulx || haswell_is_ult())
378  cdclk = 0; /* fixed frequency */
379  else
380  cdclk = 2; /* variable frequency */
381 
382  if (gpu_is_ulx || cdclk != 0)
383  gtt_rmw(0x130040, 0xf7ffffff, 0x04000000);
384  else
385  gtt_rmw(0x130040, 0xf3ffffff, 0x00000000);
386 
387  /* More magic */
388  if (haswell_is_ult() || gpu_is_ulx) {
389  if (!gpu_is_ulx)
390  gtt_write(0x138128, 0x00000000);
391  else
392  gtt_write(0x138128, 0x00000001);
393  gtt_write(0x13812c, 0x00000000);
394  gtt_write(0x138124, 0x80000017);
395  }
396 
397  /* Disable Force Wake */
398  gtt_write(0x0a188, 0x00010000);
399  gtt_poll(FORCEWAKE_ACK_HSW, 1 << 0, 0 << 0);
400  gtt_write(0x0a188, 0x00000001);
401 }
402 
403 /* Enable SCI to ACPI _GPE._L06 */
404 static void gma_enable_swsci(void)
405 {
406  u16 reg16;
407 
408  /* Clear DMISCI status */
409  reg16 = inw(get_pmbase() + TCO1_STS);
410  reg16 &= DMISCI_STS;
411  outw(get_pmbase() + TCO1_STS, reg16);
412 
413  /* Clear and enable ACPI TCO SCI */
414  enable_tco_sci();
415 }
416 
417 static void gma_func0_init(struct device *dev)
418 {
419  int lightup_ok = 0;
420 
422 
423  /* Init graphics power management */
425 
426  /* Pre panel init */
427  gma_setup_panel(dev);
428 
429  if (!CONFIG(NO_GFX_INIT))
431 
432  int vga_disable = (pci_read_config16(dev, GGC) & 2) >> 1;
433 
434  if (CONFIG(MAINBOARD_USE_LIBGFXINIT)) {
435  if (vga_disable) {
437  "IGD is not decoding legacy VGA MEM and IO: skipping NATIVE graphic init\n");
438  } else {
439  printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
440  gma_gfxinit(&lightup_ok);
442  }
443  }
444 
445  if (!lightup_ok) {
446  printk(BIOS_SPEW, "FUI did not run; using VBIOS\n");
447  pci_dev_init(dev);
448  }
449 
450  printk(BIOS_DEBUG, "GT Power Management Init (post VBIOS)\n");
451 
453 
455 }
456 
457 static void gma_generate_ssdt(const struct device *dev)
458 {
459  const struct northbridge_intel_haswell_config *chip = dev->chip_info;
460 
462 }
463 
464 static struct device_operations gma_func0_ops = {
466  .set_resources = pci_dev_set_resources,
467  .enable_resources = pci_dev_enable_resources,
468  .init = gma_func0_init,
469  .acpi_fill_ssdt = gma_generate_ssdt,
470  .ops_pci = &pci_dev_ops_pci,
471 };
472 
473 static const unsigned short pci_device_ids[] = {
474  0x0402, /* Desktop GT1 */
475  0x0412, /* Desktop GT2 */
476  0x041e, /* Desktop GT1.5 */
477  0x0422, /* Desktop GT3 */
478  0x0d22, /* Desktop GT3e */
479  0x0406, /* Mobile GT1 */
480  0x0416, /* Mobile GT2 */
481  0x0426, /* Mobile GT3 */
482  0x0d16, /* Mobile 4+3 GT1 */
483  0x0d26, /* Mobile 4+3 GT2, Mobile GT3e */
484  0x0d36, /* Mobile 4+3 GT3 */
485  0x0a06, /* ULT GT1 */
486  0x0a16, /* ULT GT2 */
487  0x0a26, /* ULT GT3 */
488  0x0a0e, /* ULX GT1 */
489  0x0a1e, /* ULX GT2 */
490  0,
491 };
492 
493 static const struct pci_driver pch_lpc __pci_driver = {
494  .ops = &gma_func0_ops,
495  .vendor = PCI_VID_INTEL,
496  .devices = pci_device_ids,
497 };
uint16_t get_pmbase(void)
Definition: pmutil.c:254
pte_t value
Definition: mmu.c:91
static void write32(void *addr, uint32_t val)
Definition: mmio.h:40
static uint32_t read32(const void *addr)
Definition: mmio.h:22
void gfx_set_init_done(int done)
Definition: bootmode.c:17
void enable_tco_sci(void)
Definition: pmutil.c:309
#define DMISCI_STS
Definition: pm.h:59
#define MHz
Definition: helpers.h:80
#define DIV_ROUND_UP(x, y)
Definition: helpers.h:60
#define printk(level,...)
Definition: stdlib.h:16
static int haswell_is_ult(void)
Definition: haswell.h:184
u16 inw(u16 port)
void outw(u16 val, u16 port)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
Definition: device_util.c:323
void drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *conf)
Definition: acpi.c:8
@ CONFIG
Definition: dsi_common.h:201
#define GGC
Definition: host_bridge.h:9
static struct tpm_chip chip
Definition: tis.c:17
plane
Definition: i915.h:52
@ PLANE_A
Definition: i915.h:53
@ PLANE_C
Definition: i915.h:55
pipe
Definition: i915.h:38
@ PIPE_C
Definition: i915.h:41
@ PIPE_A
Definition: i915.h:39
void intel_prepare_ddi(void)
Definition: intel_ddi.c:61
#define GEN6_PM_RP_DOWN_THRESHOLD
Definition: i915_reg.h:3982
#define CPU_VGA_DISABLE
Definition: i915_reg.h:2966
#define PCH_PP_DIVISOR
Definition: i915_reg.h:3785
#define CURSOR_MODE_DISABLE
Definition: i915_reg.h:2686
#define DSPSURF(plane)
Definition: i915_reg.h:2764
#define BLM_PCH_OVERRIDE_ENABLE
Definition: i915_reg.h:1662
#define NDE_RSTWRN_OPT
Definition: i915_reg.h:4380
#define BLC_PWM_PCH_CTL2
Definition: i915_reg.h:1664
#define DIGITAL_PORTA_HOTPLUG_ENABLE
Definition: i915_reg.h:2969
#define PORTB_HOTPLUG_ENABLE
Definition: i915_reg.h:3306
#define HSW_PWR_WELL_CTL1
Definition: i915_reg.h:4159
#define PCH_PP_OFF_DELAYS
Definition: i915_reg.h:3774
#define GEN6_PM_RP_DOWN_EI_EXPIRED
Definition: i915_reg.h:3984
#define PCH_PP_ON_DELAYS
Definition: i915_reg.h:3762
#define SOUTH_CHICKEN2
Definition: i915_reg.h:3562
#define PORTD_HOTPLUG_ENABLE
Definition: i915_reg.h:3288
#define FORCEWAKE_ACK_HSW
Definition: i915_reg.h:3882
#define HSW_PWR_WELL_STATE
Definition: i915_reg.h:4164
#define PCH_PORT_HOTPLUG
Definition: i915_reg.h:3287
#define RST_PCH_HNDSHK_EN
Definition: i915_reg.h:4381
#define HSW_PWR_WELL_ENABLE
Definition: i915_reg.h:4163
#define BLC_PWM_PCH_CTL1
Definition: i915_reg.h:1660
#define CURBASE_IVB(pipe)
Definition: i915_reg.h:2713
#define BLM_PCH_PWM_ENABLE
Definition: i915_reg.h:1661
#define _FDI_RXA_MISC
Definition: i915_reg.h:3663
#define GEN6_PM_RP_UP_EI_EXPIRED
Definition: i915_reg.h:3983
#define DDI_BUF_CTL_A
Definition: i915_reg.h:4231
#define GEN6_PM_THERMAL_EVENT
Definition: i915_reg.h:3979
#define CPU_VGACNTRL
Definition: i915_reg.h:2965
#define DDI_A_4_LANES
Definition: i915_reg.h:4246
#define DISPLAY_PLANE_DISABLE
Definition: i915_reg.h:2719
#define CURCNTR_IVB(pipe)
Definition: i915_reg.h:2712
#define DIGITAL_PORT_HOTPLUG_CNTRL
Definition: i915_reg.h:2968
#define DDI_INIT_DISPLAY_DETECTED
Definition: i915_reg.h:4251
#define GEN6_PM_MBOX_EVENT
Definition: i915_reg.h:3978
#define GEN6_PM_RP_UP_THRESHOLD
Definition: i915_reg.h:3981
#define SOUTH_DSPCLK_GATE_D
Definition: i915_reg.h:3574
#define PCH_LP_PARTITION_LEVEL_DISABLE
Definition: i915_reg.h:3576
#define DSPCNTR(plane)
Definition: i915_reg.h:2759
#define LPT_PWM_GRANULARITY
Definition: i915_reg.h:3565
#define GEN6_PMIER
Definition: i915_reg.h:3977
#define GEN6_PM_RP_DOWN_TIMEOUT
Definition: i915_reg.h:3980
#define DDI_BUF_IS_IDLE
Definition: i915_reg.h:4245
#define DIV_ROUND_CLOSEST(x, divisor)
Definition: helpers.h:17
static DEVTREE_CONST void * config_of(const struct device *dev)
Definition: device.h:382
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
Definition: pci_ops.h:180
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
Definition: pci_ops.h:52
void gma_gfxinit(int *lightup_ok)
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
Definition: loglevel.h:142
u32 gtt_read(u32 reg)
Definition: gma.c:22
void gtt_write(u32 reg, u32 data)
Definition: gma.c:27
static const struct gt_reg haswell_gt_lock[]
Definition: gma.c:74
static void gma_enable_swsci(void)
Definition: gma.c:404
static void power_well_enable(void)
Definition: gma.c:171
static struct resource * gtt_res
Definition: gma.c:120
static void gma_func0_init(struct device *dev)
Definition: gma.c:417
static void gma_pm_init_pre_vbios(struct device *dev)
Definition: gma.c:177
static void gma_generate_ssdt(const struct device *dev)
Definition: gma.c:457
static void init_display_planes(void)
Definition: gma.c:224
u32 map_oprom_vendev(u32 vendev)
Definition: gma.c:87
#define GTT_RETRY
Definition: gma.c:153
static void gtt_rmw(u32 reg, u32 andmask, u32 ormask)
Definition: gma.c:135
static const struct gt_reg haswell_gt_setup[]
Definition: gma.c:30
static const struct pci_driver pch_lpc __pci_driver
Definition: gma.c:493
static const unsigned short pci_device_ids[]
Definition: gma.c:473
int gtt_poll(u32 reg, u32 mask, u32 value)
Definition: gma.c:154
static void gma_pm_init_post_vbios(struct device *dev)
Definition: gma.c:367
static struct device_operations gma_func0_ops
Definition: gma.c:464
static void gma_setup_panel(struct device *dev)
Definition: gma.c:244
static void gtt_write_regs(const struct gt_reg *gt)
Definition: gma.c:143
enum cb_err intel_gma_init_igd_opregion(void)
Definition: opregion.c:310
#define PCI_COMMAND_MASTER
Definition: pci_def.h:13
#define PCI_BASE_ADDRESS_0
Definition: pci_def.h:63
#define PCI_COMMAND
Definition: pci_def.h:10
#define PCI_DEVICE_ID
Definition: pci_def.h:9
void pci_dev_init(struct device *dev)
Default handler: only runs the relevant PCI BIOS.
Definition: pci_device.c:873
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
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static void * res2mmio(const struct resource *res, unsigned long offset, unsigned long mask)
Definition: resource.h:87
#define TCO1_STS
Definition: smbus.h:7
static const int mask[4]
Definition: gpio.c:308
#define NULL
Definition: stddef.h:19
uint32_t u32
Definition: stdint.h:51
uint16_t u16
Definition: stdint.h:48
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107
DEVTREE_CONST void * chip_info
Definition: device.h:164
Definition: gma.c:24
u32 ormask
Definition: gma.c:27
u32 reg
Definition: gma.c:25
u32 andmask
Definition: gma.c:26
unsigned int up_delay_ms
Definition: gma.h:16
unsigned int backlight_off_delay_ms
Definition: gma.h:20
unsigned int backlight_on_delay_ms
Definition: gma.h:19
unsigned int cycle_delay_ms
Definition: gma.h:18
@ GPU_BACKLIGHT_POLARITY_LOW
Definition: gma.h:24
enum i915_gpu_panel_config::@68 backlight_polarity
unsigned int down_delay_ms
Definition: gma.h:17
unsigned int backlight_pwm_hz
Definition: gma.h:21
struct i915_gpu_panel_config panel_cfg
Definition: chip.h:29
resource_t base
Definition: resource.h:45
u8 val
Definition: sys.c:300
void udelay(uint32_t us)
Definition: udelay.c:15