27 { 0xa200, 0xcc000000 },
28 { 0xa204, 0x07000040 },
29 { 0xa208, 0x0000fe00 },
30 { 0xa20c, 0x00000000 },
31 { 0xa210, 0x17000000 },
32 { 0xa214, 0x00000021 },
33 { 0xa218, 0x0817fe19 },
34 { 0xa21c, 0x00000000 },
35 { 0xa220, 0x00000000 },
36 { 0xa224, 0xcc000000 },
37 { 0xa228, 0x07000040 },
38 { 0xa22c, 0x0000fe00 },
39 { 0xa230, 0x00000000 },
40 { 0xa234, 0x17000000 },
41 { 0xa238, 0x00000021 },
42 { 0xa23c, 0x0817fe19 },
43 { 0xa240, 0x00000000 },
44 { 0xa244, 0x00000000 },
45 { 0xa248, 0x8000421e },
50 { 0xa200, 0x330000a6 },
51 { 0xa204, 0x402d0031 },
52 { 0xa208, 0x00165f83 },
53 { 0xa20c, 0xf1000000 },
54 { 0xa210, 0x00000000 },
55 { 0xa214, 0x00160016 },
56 { 0xa218, 0x002a002b },
57 { 0xa21c, 0x00000000 },
58 { 0xa220, 0x00000000 },
59 { 0xa224, 0x330000a6 },
60 { 0xa228, 0x402d0031 },
61 { 0xa22c, 0x00165f83 },
62 { 0xa230, 0xf1000000 },
63 { 0xa234, 0x00000000 },
64 { 0xa238, 0x00160016 },
65 { 0xa23c, 0x002a002b },
66 { 0xa240, 0x00000000 },
67 { 0xa244, 0x00000000 },
68 { 0xa248, 0x8000421e },
73 { 0xa800, 0x00000000 },
74 { 0xa804, 0x00021c00 },
75 { 0xa808, 0x00000403 },
76 { 0xa80c, 0x02001700 },
77 { 0xa810, 0x05000200 },
78 { 0xa814, 0x00000000 },
79 { 0xa818, 0x00690500 },
80 { 0xa81c, 0x0000007f },
81 { 0xa820, 0x01002501 },
82 { 0xa824, 0x00000300 },
83 { 0xa828, 0x01000331 },
84 { 0xa82c, 0x0000000c },
85 { 0xa830, 0x00010016 },
86 { 0xa834, 0x01100101 },
87 { 0xa838, 0x00010103 },
88 { 0xa83c, 0x00041300 },
89 { 0xa840, 0x00000b30 },
90 { 0xa844, 0x00000000 },
91 { 0xa848, 0x7f000000 },
92 { 0xa84c, 0x05000008 },
93 { 0xa850, 0x00000001 },
94 { 0xa854, 0x00000004 },
95 { 0xa858, 0x00000007 },
96 { 0xa85c, 0x00000000 },
97 { 0xa860, 0x00010000 },
98 { 0xa248, 0x0000221e },
99 { 0xa900, 0x00000000 },
100 { 0xa904, 0x00001c00 },
101 { 0xa908, 0x00000000 },
102 { 0xa90c, 0x06000000 },
103 { 0xa910, 0x09000200 },
104 { 0xa914, 0x00000000 },
105 { 0xa918, 0x00590000 },
106 { 0xa91c, 0x00000000 },
107 { 0xa920, 0x04002501 },
108 { 0xa924, 0x00000100 },
109 { 0xa928, 0x03000410 },
110 { 0xa92c, 0x00000000 },
111 { 0xa930, 0x00020000 },
112 { 0xa934, 0x02070106 },
113 { 0xa938, 0x00010100 },
114 { 0xa93c, 0x00401c00 },
115 { 0xa940, 0x00000000 },
116 { 0xa944, 0x00000000 },
117 { 0xa948, 0x10000e00 },
118 { 0xa94c, 0x02000004 },
119 { 0xa950, 0x00000001 },
120 { 0xa954, 0x00000004 },
121 { 0xa960, 0x00060000 },
122 { 0xaa3c, 0x00001c00 },
123 { 0xaa54, 0x00000004 },
124 { 0xaa60, 0x00060000 },
129 { 0xa800, 0x20000000 },
130 { 0xa804, 0x000e3800 },
131 { 0xa808, 0x00000806 },
132 { 0xa80c, 0x0c002f00 },
133 { 0xa810, 0x0c000800 },
134 { 0xa814, 0x00000000 },
135 { 0xa818, 0x00d20d00 },
136 { 0xa81c, 0x000000ff },
137 { 0xa820, 0x03004b02 },
138 { 0xa824, 0x00000600 },
139 { 0xa828, 0x07000773 },
140 { 0xa82c, 0x00000000 },
141 { 0xa830, 0x00020032 },
142 { 0xa834, 0x1520040d },
143 { 0xa838, 0x00020105 },
144 { 0xa83c, 0x00083700 },
145 { 0xa840, 0x000016ff },
146 { 0xa844, 0x00000000 },
147 { 0xa848, 0xff000000 },
148 { 0xa84c, 0x0a000010 },
149 { 0xa850, 0x00000002 },
150 { 0xa854, 0x00000008 },
151 { 0xa858, 0x0000000f },
152 { 0xa85c, 0x00000000 },
153 { 0xa860, 0x00020000 },
154 { 0xa248, 0x0000221e },
155 { 0xa900, 0x00000000 },
156 { 0xa904, 0x00003800 },
157 { 0xa908, 0x00000000 },
158 { 0xa90c, 0x0c000000 },
159 { 0xa910, 0x12000800 },
160 { 0xa914, 0x00000000 },
161 { 0xa918, 0x00b20000 },
162 { 0xa91c, 0x00000000 },
163 { 0xa920, 0x08004b02 },
164 { 0xa924, 0x00000300 },
165 { 0xa928, 0x01000820 },
166 { 0xa92c, 0x00000000 },
167 { 0xa930, 0x00030000 },
168 { 0xa934, 0x15150406 },
169 { 0xa938, 0x00020300 },
170 { 0xa93c, 0x00903900 },
171 { 0xa940, 0x00000000 },
172 { 0xa944, 0x00000000 },
173 { 0xa948, 0x20001b00 },
174 { 0xa94c, 0x0a000010 },
175 { 0xa950, 0x00000000 },
176 { 0xa954, 0x00000008 },
177 { 0xa960, 0x00110000 },
178 { 0xaa3c, 0x00003900 },
179 { 0xaa54, 0x00000008 },
180 { 0xaa60, 0x00110000 },
185 { 0xa800, 0x00000000 },
186 { 0xa804, 0x00030400 },
187 { 0xa808, 0x00000806 },
188 { 0xa80c, 0x0c002f00 },
189 { 0xa810, 0x0c000300 },
190 { 0xa814, 0x00000000 },
191 { 0xa818, 0x00d20d00 },
192 { 0xa81c, 0x000000ff },
193 { 0xa820, 0x03004b02 },
194 { 0xa824, 0x00000600 },
195 { 0xa828, 0x07000773 },
196 { 0xa82c, 0x00000000 },
197 { 0xa830, 0x00020032 },
198 { 0xa834, 0x1520040d },
199 { 0xa838, 0x00020105 },
200 { 0xa83c, 0x00083700 },
201 { 0xa840, 0x000016ff },
202 { 0xa844, 0x00000000 },
203 { 0xa848, 0xff000000 },
204 { 0xa84c, 0x0a000010 },
205 { 0xa850, 0x00000001 },
206 { 0xa854, 0x00000008 },
207 { 0xa858, 0x00000008 },
208 { 0xa85c, 0x00000000 },
209 { 0xa860, 0x00020000 },
210 { 0xa248, 0x0000221e },
211 { 0xa900, 0x00000000 },
212 { 0xa904, 0x00003800 },
213 { 0xa908, 0x00000000 },
214 { 0xa90c, 0x0c000000 },
215 { 0xa910, 0x12000800 },
216 { 0xa914, 0x00000000 },
217 { 0xa918, 0x00b20000 },
218 { 0xa91c, 0x00000000 },
219 { 0xa920, 0x08004b02 },
220 { 0xa924, 0x00000300 },
221 { 0xa928, 0x01000820 },
222 { 0xa92c, 0x00000000 },
223 { 0xa930, 0x00030000 },
224 { 0xa934, 0x15150406 },
225 { 0xa938, 0x00020300 },
226 { 0xa93c, 0x00903900 },
227 { 0xa940, 0x00000000 },
228 { 0xa944, 0x00000000 },
229 { 0xa948, 0x20001b00 },
230 { 0xa94c, 0x0a000010 },
231 { 0xa950, 0x00000000 },
232 { 0xa954, 0x00000008 },
233 { 0xa960, 0x00110000 },
234 { 0xaa3c, 0x00003900 },
235 { 0xaa54, 0x00000008 },
236 { 0xaa60, 0x00110000 },
247 u32 new_vendev = vendev;
261 new_vendev = 0x80860106;
282 for (; pm && pm->
reg; pm++)
286 #define GTT_RETRY 1000
318 gtt_poll(0x130090, (1 << 0), (1 << 0));
322 gtt_poll(0x130040, (1 << 0), (1 << 0));
328 reg32 |= (1 << 14) | (1 << 15);
335 reg32 |= (1 << 1) | (1 << 0);
342 if (reg32 & (1 << 13)) {
352 if (reg32 & (1 << 13)) {
365 }
else if ((tdp >= 25) && (tdp <= 35)) {
388 reg32 |= (1 << 26) | (1 << 31);
404 gtt_poll(0x941c, (1 << 1), (0 << 1));
420 if (
gtt_poll(0x138124, (1 << 31), (0 << 31))) {
423 if (
gtt_poll(0x138124, (1 << 31), (0 << 31)))
425 gtt_poll(0x138124, (1 << 31), (0 << 31));
484 reg32 &= ~0x000001c0;
510 gtt_poll(0x130090, (1 << 0), (0 << 0));
513 if (
gtt_poll(0x130040, (1 << 0), (0 << 0)))
594 if (!
CONFIG(MAINBOARD_USE_LIBGFXINIT))
605 CONFIG(MAINBOARD_USE_LIBGFXINIT)) {
608 "IGD is not decoding legacy VGA MEM and IO: skipping NATIVE graphic init\n");
655 0x0102, 0x0106, 0x010a, 0x0112,
656 0x0116, 0x0122, 0x0126, 0x0156,
657 0x0166, 0x0162, 0x016a, 0x0152,
static int acpi_is_wakeup_s3(void)
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
void gfx_set_init_done(int done)
#define printk(level,...)
void outl(u32 val, u16 port)
void outw(u16 val, u16 port)
DEVTREE_CONST struct device * pcidev_on_root(uint8_t dev, uint8_t fn)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
void drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *conf)
static __always_inline uint32_t mchbar_read32(const uintptr_t offset)
static struct tpm_chip chip
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)
void gma_gfxinit(int *lightup_ok)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
void gtt_write(u32 reg, u32 data)
u32 map_oprom_vendev(u32 vendev)
int gtt_poll(u32 reg, u32 mask, u32 value)
static const char * gma_acpi_name(const struct device *dev)
static const struct gt_powermeter ivb_pm_gt1[]
static void gma_enable_swsci(void)
static const struct gt_powermeter snb_pm_gt2[]
static struct resource * gtt_res
static void gma_func0_init(struct device *dev)
static void gma_pm_init_pre_vbios(struct device *dev)
static const struct pci_driver gma __pci_driver
static const struct gt_powermeter ivb_pm_gt2_35w[]
static void gtt_write_powermeter(const struct gt_powermeter *pm)
static const unsigned short pci_device_ids[]
static void gma_pm_init_post_vbios(struct device *dev)
static struct device_operations gma_func0_ops
static const struct gt_powermeter snb_pm_gt1[]
static void gma_func0_disable(struct device *dev)
static const struct gt_powermeter ivb_pm_gt2_17w[]
static void gma_generate_ssdt(const struct device *device)
bool is_sandybridge(void)
enum cb_err intel_gma_init_igd_opregion(void)
#define PCI_COMMAND_MASTER
#define PCI_BASE_ADDRESS_0
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
u16 gpu_panel_power_backlight_on_delay
u16 gpu_panel_power_down_delay
u16 gpu_panel_power_up_delay
u16 gpu_panel_power_backlight_off_delay
enum northbridge_intel_sandybridge_config::@330 gpu_panel_port_select
u8 gpu_panel_power_cycle_delay