Angel Pons | 4b42983 | 2020-04-02 23:48:50 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 3 | |
Nico Huber | c2e4642 | 2020-03-23 01:22:49 +0100 | [diff] [blame] | 4 | #include <commonlib/helpers.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 5 | #include <arch/io.h> |
Kyösti Mälkki | 13f6650 | 2019-03-03 08:01:05 +0200 | [diff] [blame] | 6 | #include <device/mmio.h> |
Kyösti Mälkki | f1b58b7 | 2019-03-01 13:43:02 +0200 | [diff] [blame] | 7 | #include <device/pci_ops.h> |
Matt DeVillier | 7c78970 | 2017-06-16 23:36:46 -0500 | [diff] [blame] | 8 | #include <cbmem.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 9 | #include <console/console.h> |
Kyösti Mälkki | ab56b3b | 2013-11-28 16:44:51 +0200 | [diff] [blame] | 10 | #include <bootmode.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 11 | #include <delay.h> |
| 12 | #include <device/device.h> |
| 13 | #include <device/pci.h> |
| 14 | #include <device/pci_ids.h> |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 15 | #include <drivers/intel/gma/i915_reg.h> |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 16 | #include <drivers/intel/gma/i915.h> |
Nico Huber | 1822816 | 2017-06-08 16:31:57 +0200 | [diff] [blame] | 17 | #include <drivers/intel/gma/libgfxinit.h> |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 18 | #include <cpu/intel/haswell/haswell.h> |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 19 | #include <drivers/intel/gma/opregion.h> |
Matt DeVillier | 7c78970 | 2017-06-16 23:36:46 -0500 | [diff] [blame] | 20 | #include <southbridge/intel/lynxpoint/nvs.h> |
Ronald G. Minnich | 9518b56 | 2013-09-19 16:45:22 -0700 | [diff] [blame] | 21 | #include <string.h> |
Elyes HAOUAS | 51401c3 | 2019-05-15 21:09:30 +0200 | [diff] [blame] | 22 | #include <types.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 23 | |
| 24 | #include "chip.h" |
| 25 | #include "haswell.h" |
| 26 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 27 | #if CONFIG(CHROMEOS) |
Furquan Shaikh | cb61ea7 | 2013-08-15 15:23:58 -0700 | [diff] [blame] | 28 | #include <vendorcode/google/chromeos/chromeos.h> |
| 29 | #endif |
| 30 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 31 | struct gt_reg { |
| 32 | u32 reg; |
| 33 | u32 andmask; |
| 34 | u32 ormask; |
| 35 | }; |
| 36 | |
| 37 | static const struct gt_reg haswell_gt_setup[] = { |
| 38 | /* Enable Counters */ |
| 39 | { 0x0a248, 0x00000000, 0x00000016 }, |
| 40 | { 0x0a000, 0x00000000, 0x00070020 }, |
| 41 | { 0x0a180, 0xff3fffff, 0x15000000 }, |
| 42 | /* Enable DOP Clock Gating */ |
| 43 | { 0x09424, 0x00000000, 0x000003fd }, |
| 44 | /* Enable Unit Level Clock Gating */ |
| 45 | { 0x09400, 0x00000000, 0x00000080 }, |
| 46 | { 0x09404, 0x00000000, 0x40401000 }, |
| 47 | { 0x09408, 0x00000000, 0x00000000 }, |
| 48 | { 0x0940c, 0x00000000, 0x02000001 }, |
| 49 | { 0x0a008, 0x00000000, 0x08000000 }, |
| 50 | /* Wake Rate Limits */ |
| 51 | { 0x0a090, 0xffffffff, 0x00000000 }, |
| 52 | { 0x0a098, 0xffffffff, 0x03e80000 }, |
| 53 | { 0x0a09c, 0xffffffff, 0x00280000 }, |
| 54 | { 0x0a0a8, 0xffffffff, 0x0001e848 }, |
| 55 | { 0x0a0ac, 0xffffffff, 0x00000019 }, |
| 56 | /* Render/Video/Blitter Idle Max Count */ |
| 57 | { 0x02054, 0x00000000, 0x0000000a }, |
| 58 | { 0x12054, 0x00000000, 0x0000000a }, |
| 59 | { 0x22054, 0x00000000, 0x0000000a }, |
| 60 | /* RC Sleep / RCx Thresholds */ |
| 61 | { 0x0a0b0, 0xffffffff, 0x00000000 }, |
| 62 | { 0x0a0b4, 0xffffffff, 0x000003e8 }, |
| 63 | { 0x0a0b8, 0xffffffff, 0x0000c350 }, |
| 64 | /* RP Settings */ |
| 65 | { 0x0a010, 0xffffffff, 0x000f4240 }, |
| 66 | { 0x0a014, 0xffffffff, 0x12060000 }, |
| 67 | { 0x0a02c, 0xffffffff, 0x0000e808 }, |
| 68 | { 0x0a030, 0xffffffff, 0x0003bd08 }, |
| 69 | { 0x0a068, 0xffffffff, 0x000101d0 }, |
| 70 | { 0x0a06c, 0xffffffff, 0x00055730 }, |
| 71 | { 0x0a070, 0xffffffff, 0x0000000a }, |
| 72 | /* RP Control */ |
| 73 | { 0x0a024, 0x00000000, 0x00000b92 }, |
| 74 | /* HW RC6 Control */ |
| 75 | { 0x0a090, 0x00000000, 0x88040000 }, |
| 76 | /* Video Frequency Request */ |
| 77 | { 0x0a00c, 0x00000000, 0x08000000 }, |
| 78 | { 0 }, |
| 79 | }; |
| 80 | |
| 81 | static const struct gt_reg haswell_gt_lock[] = { |
| 82 | { 0x0a248, 0xffffffff, 0x80000000 }, |
| 83 | { 0x0a004, 0xffffffff, 0x00000010 }, |
| 84 | { 0x0a080, 0xffffffff, 0x00000004 }, |
| 85 | { 0x0a180, 0xffffffff, 0x80000000 }, |
| 86 | { 0 }, |
| 87 | }; |
| 88 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 89 | /* |
| 90 | * Some VGA option roms are used for several chipsets but they only have one PCI ID in their |
| 91 | * header. If we encounter such an option rom, we need to do the mapping ourselves. |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 92 | */ |
| 93 | |
| 94 | u32 map_oprom_vendev(u32 vendev) |
| 95 | { |
Elyes HAOUAS | 69d658f | 2016-09-17 20:32:07 +0200 | [diff] [blame] | 96 | u32 new_vendev = vendev; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 97 | |
| 98 | switch (vendev) { |
Aaron Durbin | 7116129 | 2012-12-13 16:43:32 -0600 | [diff] [blame] | 99 | case 0x80860402: /* GT1 Desktop */ |
| 100 | case 0x80860406: /* GT1 Mobile */ |
| 101 | case 0x8086040a: /* GT1 Server */ |
Duncan Laurie | 26e7dd7 | 2012-12-19 09:12:31 -0800 | [diff] [blame] | 102 | case 0x80860a06: /* GT1 ULT */ |
Aaron Durbin | 7116129 | 2012-12-13 16:43:32 -0600 | [diff] [blame] | 103 | |
| 104 | case 0x80860412: /* GT2 Desktop */ |
| 105 | case 0x80860416: /* GT2 Mobile */ |
| 106 | case 0x8086041a: /* GT2 Server */ |
Duncan Laurie | 26e7dd7 | 2012-12-19 09:12:31 -0800 | [diff] [blame] | 107 | case 0x80860a16: /* GT2 ULT */ |
Aaron Durbin | 7116129 | 2012-12-13 16:43:32 -0600 | [diff] [blame] | 108 | |
| 109 | case 0x80860422: /* GT3 Desktop */ |
| 110 | case 0x80860426: /* GT3 Mobile */ |
| 111 | case 0x8086042a: /* GT3 Server */ |
Duncan Laurie | 26e7dd7 | 2012-12-19 09:12:31 -0800 | [diff] [blame] | 112 | case 0x80860a26: /* GT3 ULT */ |
Aaron Durbin | 7116129 | 2012-12-13 16:43:32 -0600 | [diff] [blame] | 113 | |
Elyes HAOUAS | 69d658f | 2016-09-17 20:32:07 +0200 | [diff] [blame] | 114 | new_vendev = 0x80860406; /* GT1 Mobile */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 115 | break; |
| 116 | } |
| 117 | |
| 118 | return new_vendev; |
| 119 | } |
| 120 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 121 | /** FIXME: Seems to be outdated. */ |
| 122 | /* |
| 123 | * GTT is the Global Translation Table for the graphics pipeline. It is used to translate |
| 124 | * graphics addresses to physical memory addresses. As in the CPU, GTTs map 4K pages. |
| 125 | * |
| 126 | * The setgtt function adds a further bit of flexibility: it allows you to set a range (the |
| 127 | * first two parameters) to point to a physical address (third parameter); the physical address |
| 128 | * is incremented by a count (fourth parameter) for each GTT in the range. |
| 129 | * |
| 130 | * Why do it this way? For ultrafast startup, we can point all the GTT entries to point to one |
| 131 | * page, and set that page to 0s: |
| 132 | * |
| 133 | * memset(physbase, 0, 4096); |
| 134 | * setgtt(0, 4250, physbase, 0); |
| 135 | * |
| 136 | * this takes about 2 ms, and is a win because zeroing the page takes up to 200 ms. |
| 137 | * |
| 138 | * This call sets the GTT to point to a linear range of pages starting at physbase. |
Ronald G. Minnich | 4c8465c | 2013-09-30 15:57:21 -0700 | [diff] [blame] | 139 | */ |
| 140 | |
| 141 | #define GTT_PTE_BASE (2 << 20) |
| 142 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 143 | void set_translation_table(int start, int end, u64 base, int inc) |
Ronald G. Minnich | 4c8465c | 2013-09-30 15:57:21 -0700 | [diff] [blame] | 144 | { |
| 145 | int i; |
| 146 | |
Elyes HAOUAS | 12df950 | 2016-08-23 21:29:48 +0200 | [diff] [blame] | 147 | for (i = start; i < end; i++){ |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 148 | u64 physical_address = base + i * inc; |
| 149 | |
Ronald G. Minnich | 4c8465c | 2013-09-30 15:57:21 -0700 | [diff] [blame] | 150 | /* swizzle the 32:39 bits to 4:11 */ |
| 151 | u32 word = physical_address | ((physical_address >> 28) & 0xff0) | 1; |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 152 | |
| 153 | /* |
| 154 | * Note: we've confirmed by checking the values that MRC does no useful |
| 155 | * setup before we run this. |
Ronald G. Minnich | 4c8465c | 2013-09-30 15:57:21 -0700 | [diff] [blame] | 156 | */ |
| 157 | gtt_write(GTT_PTE_BASE + i * 4, word); |
| 158 | gtt_read(GTT_PTE_BASE + i * 4); |
| 159 | } |
| 160 | } |
| 161 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 162 | static struct resource *gtt_res = NULL; |
| 163 | |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 164 | u32 gtt_read(u32 reg) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 165 | { |
Ronald G. Minnich | 9518b56 | 2013-09-19 16:45:22 -0700 | [diff] [blame] | 166 | u32 val; |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 167 | val = read32(res2mmio(gtt_res, reg, 0)); |
Ronald G. Minnich | 9518b56 | 2013-09-19 16:45:22 -0700 | [diff] [blame] | 168 | return val; |
| 169 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 170 | } |
| 171 | |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 172 | void gtt_write(u32 reg, u32 data) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 173 | { |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 174 | write32(res2mmio(gtt_res, reg, 0), data); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 175 | } |
| 176 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 177 | static inline void gtt_rmw(u32 reg, u32 andmask, u32 ormask) |
| 178 | { |
| 179 | u32 val = gtt_read(reg); |
| 180 | val &= andmask; |
| 181 | val |= ormask; |
| 182 | gtt_write(reg, val); |
| 183 | } |
| 184 | |
| 185 | static inline void gtt_write_regs(const struct gt_reg *gt) |
| 186 | { |
| 187 | for (; gt && gt->reg; gt++) { |
| 188 | if (gt->andmask) |
| 189 | gtt_rmw(gt->reg, gt->andmask, gt->ormask); |
| 190 | else |
| 191 | gtt_write(gt->reg, gt->ormask); |
| 192 | } |
| 193 | } |
| 194 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 195 | #define GTT_RETRY 1000 |
Ronald G. Minnich | 9518b56 | 2013-09-19 16:45:22 -0700 | [diff] [blame] | 196 | int gtt_poll(u32 reg, u32 mask, u32 value) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 197 | { |
Martin Roth | 468d02c | 2019-10-23 21:44:42 -0600 | [diff] [blame] | 198 | unsigned int try = GTT_RETRY; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 199 | u32 data; |
| 200 | |
| 201 | while (try--) { |
| 202 | data = gtt_read(reg); |
| 203 | if ((data & mask) == value) |
| 204 | return 1; |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 205 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 206 | udelay(10); |
| 207 | } |
| 208 | |
| 209 | printk(BIOS_ERR, "GT init timeout\n"); |
| 210 | return 0; |
| 211 | } |
| 212 | |
Patrick Rudolph | 19c2ad8 | 2017-06-30 14:52:01 +0200 | [diff] [blame] | 213 | uintptr_t gma_get_gnvs_aslb(const void *gnvs) |
| 214 | { |
| 215 | const global_nvs_t *gnvs_ptr = gnvs; |
| 216 | return (uintptr_t)(gnvs_ptr ? gnvs_ptr->aslb : 0); |
| 217 | } |
| 218 | |
| 219 | void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb) |
| 220 | { |
| 221 | global_nvs_t *gnvs_ptr = gnvs; |
| 222 | if (gnvs_ptr) |
| 223 | gnvs_ptr->aslb = aslb; |
| 224 | } |
| 225 | |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 226 | static void power_well_enable(void) |
| 227 | { |
| 228 | gtt_write(HSW_PWR_WELL_CTL1, HSW_PWR_WELL_ENABLE); |
| 229 | gtt_poll(HSW_PWR_WELL_CTL1, HSW_PWR_WELL_STATE, HSW_PWR_WELL_STATE); |
| 230 | } |
| 231 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 232 | static void gma_pm_init_pre_vbios(struct device *dev) |
| 233 | { |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 234 | printk(BIOS_DEBUG, "GT Power Management Init\n"); |
| 235 | |
| 236 | gtt_res = find_resource(dev, PCI_BASE_ADDRESS_0); |
| 237 | if (!gtt_res || !gtt_res->base) |
| 238 | return; |
| 239 | |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 240 | power_well_enable(); |
| 241 | |
Duncan Laurie | 67113e9 | 2013-01-10 13:23:04 -0800 | [diff] [blame] | 242 | /* |
| 243 | * Enable RC6 |
| 244 | */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 245 | |
Duncan Laurie | 67113e9 | 2013-01-10 13:23:04 -0800 | [diff] [blame] | 246 | /* Enable Force Wake */ |
| 247 | gtt_write(0x0a180, 1 << 5); |
| 248 | gtt_write(0x0a188, 0x00010001); |
Edward O'Callaghan | 986e85c | 2014-10-29 12:15:34 +1100 | [diff] [blame] | 249 | gtt_poll(FORCEWAKE_ACK_HSW, 1 << 0, 1 << 0); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 250 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 251 | /* GT Settings */ |
| 252 | gtt_write_regs(haswell_gt_setup); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 253 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 254 | /* Wait for Mailbox Ready */ |
Ryan Salsamendi | fa0725d | 2017-06-30 17:29:37 -0700 | [diff] [blame] | 255 | gtt_poll(0x138124, (1UL << 31), (0UL << 31)); |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 256 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 257 | /* Mailbox Data - RC6 VIDS */ |
| 258 | gtt_write(0x138128, 0x00000000); |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 259 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 260 | /* Mailbox Command */ |
| 261 | gtt_write(0x138124, 0x80000004); |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 262 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 263 | /* Wait for Mailbox Ready */ |
Ryan Salsamendi | fa0725d | 2017-06-30 17:29:37 -0700 | [diff] [blame] | 264 | gtt_poll(0x138124, (1UL << 31), (0UL << 31)); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 265 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 266 | /* Enable PM Interrupts */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 267 | gtt_write(GEN6_PMIER, GEN6_PM_MBOX_EVENT | GEN6_PM_THERMAL_EVENT | |
| 268 | GEN6_PM_RP_DOWN_TIMEOUT | GEN6_PM_RP_UP_THRESHOLD | |
| 269 | GEN6_PM_RP_DOWN_THRESHOLD | GEN6_PM_RP_UP_EI_EXPIRED | |
| 270 | GEN6_PM_RP_DOWN_EI_EXPIRED); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 271 | |
Duncan Laurie | 67113e9 | 2013-01-10 13:23:04 -0800 | [diff] [blame] | 272 | /* Enable RC6 in idle */ |
| 273 | gtt_write(0x0a094, 0x00040000); |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 274 | |
| 275 | /* PM Lock Settings */ |
| 276 | gtt_write_regs(haswell_gt_lock); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 277 | } |
| 278 | |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 279 | static void init_display_planes(void) |
| 280 | { |
| 281 | int pipe, plane; |
| 282 | |
| 283 | /* Disable cursor mode */ |
| 284 | for (pipe = PIPE_A; pipe <= PIPE_C; pipe++) { |
| 285 | gtt_write(CURCNTR_IVB(pipe), CURSOR_MODE_DISABLE); |
| 286 | gtt_write(CURBASE_IVB(pipe), 0x00000000); |
| 287 | } |
| 288 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 289 | /* Disable primary plane and set surface base address */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 290 | for (plane = PLANE_A; plane <= PLANE_C; plane++) { |
| 291 | gtt_write(DSPCNTR(plane), DISPLAY_PLANE_DISABLE); |
| 292 | gtt_write(DSPSURF(plane), 0x00000000); |
| 293 | } |
| 294 | |
| 295 | /* Disable VGA display */ |
| 296 | gtt_write(CPU_VGACNTRL, CPU_VGA_DISABLE); |
| 297 | } |
| 298 | |
Duncan Laurie | c7f2ab7 | 2013-05-28 07:49:09 -0700 | [diff] [blame] | 299 | static void gma_setup_panel(struct device *dev) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 300 | { |
| 301 | struct northbridge_intel_haswell_config *conf = dev->chip_info; |
| 302 | u32 reg32; |
| 303 | |
| 304 | printk(BIOS_DEBUG, "GT Power Management Init (post VBIOS)\n"); |
| 305 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 306 | /* Setup Digital Port Hotplug */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 307 | reg32 = gtt_read(PCH_PORT_HOTPLUG); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 308 | if (!reg32) { |
| 309 | reg32 = (conf->gpu_dp_b_hotplug & 0x7) << 2; |
| 310 | reg32 |= (conf->gpu_dp_c_hotplug & 0x7) << 10; |
| 311 | reg32 |= (conf->gpu_dp_d_hotplug & 0x7) << 18; |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 312 | gtt_write(PCH_PORT_HOTPLUG, reg32); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 313 | } |
| 314 | |
| 315 | /* Setup Panel Power On Delays */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 316 | reg32 = gtt_read(PCH_PP_ON_DELAYS); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 317 | if (!reg32) { |
| 318 | reg32 = (conf->gpu_panel_port_select & 0x3) << 30; |
| 319 | reg32 |= (conf->gpu_panel_power_up_delay & 0x1fff) << 16; |
| 320 | reg32 |= (conf->gpu_panel_power_backlight_on_delay & 0x1fff); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 321 | gtt_write(PCH_PP_ON_DELAYS, reg32); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 322 | } |
| 323 | |
| 324 | /* Setup Panel Power Off Delays */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 325 | reg32 = gtt_read(PCH_PP_OFF_DELAYS); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 326 | if (!reg32) { |
| 327 | reg32 = (conf->gpu_panel_power_down_delay & 0x1fff) << 16; |
| 328 | reg32 |= (conf->gpu_panel_power_backlight_off_delay & 0x1fff); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 329 | gtt_write(PCH_PP_OFF_DELAYS, reg32); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 330 | } |
| 331 | |
| 332 | /* Setup Panel Power Cycle Delay */ |
| 333 | if (conf->gpu_panel_power_cycle_delay) { |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 334 | reg32 = gtt_read(PCH_PP_DIVISOR); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 335 | reg32 &= ~0xff; |
| 336 | reg32 |= conf->gpu_panel_power_cycle_delay & 0xff; |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 337 | gtt_write(PCH_PP_DIVISOR, reg32); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 338 | } |
| 339 | |
Nico Huber | c2e4642 | 2020-03-23 01:22:49 +0100 | [diff] [blame] | 340 | /* Enforce the PCH PWM function, as so does Linux. |
| 341 | The CPU PWM controls are disabled after reset. */ |
| 342 | if (conf->gpu_pch_backlight_pwm_hz) { |
| 343 | /* Reference clock is either 24MHz or 135MHz. We can choose |
| 344 | either a 16 or a 128 step increment. Use 16 if we would |
| 345 | have less than 100 steps otherwise. */ |
| 346 | const unsigned int refclock = CONFIG(INTEL_LYNXPOINT_LP) ? 24*MHz : 135*MHz; |
| 347 | const unsigned int hz_limit = refclock / 128 / 100; |
| 348 | unsigned int pwm_increment, pwm_period; |
| 349 | u32 south_chicken2; |
| 350 | |
| 351 | south_chicken2 = gtt_read(SOUTH_CHICKEN2); |
| 352 | if (conf->gpu_pch_backlight_pwm_hz > hz_limit) { |
| 353 | pwm_increment = 16; |
| 354 | south_chicken2 |= LPT_PWM_GRANULARITY; |
| 355 | } else { |
| 356 | pwm_increment = 128; |
| 357 | south_chicken2 &= ~LPT_PWM_GRANULARITY; |
| 358 | } |
| 359 | gtt_write(SOUTH_CHICKEN2, south_chicken2); |
| 360 | |
| 361 | pwm_period = refclock / pwm_increment / conf->gpu_pch_backlight_pwm_hz; |
| 362 | printk(BIOS_INFO, |
| 363 | "GMA: Setting backlight PWM frequency to %uMHz / %u / %u = %uHz\n", |
| 364 | refclock / MHz, pwm_increment, pwm_period, |
| 365 | DIV_ROUND_CLOSEST(refclock, pwm_increment * pwm_period)); |
| 366 | |
| 367 | /* Start with a 50% duty cycle. */ |
| 368 | gtt_write(BLC_PWM_PCH_CTL2, pwm_period << 16 | pwm_period / 2); |
| 369 | |
| 370 | gtt_write(BLC_PWM_PCH_CTL1, |
| 371 | (conf->gpu_pch_backlight_polarity == GPU_BACKLIGHT_POLARITY_LOW) << 29 | |
| 372 | BLM_PCH_OVERRIDE_ENABLE | BLM_PCH_PWM_ENABLE); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 373 | } |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 374 | |
| 375 | /* Get display,pipeline,and DDI registers into a basic sane state */ |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 376 | power_well_enable(); |
| 377 | |
| 378 | init_display_planes(); |
| 379 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 380 | /* |
| 381 | * DDI-A params set: |
| 382 | * bit 0: Display detected (RO) |
| 383 | * bit 4: DDI A supports 4 lanes and DDI E is not used |
| 384 | * bit 7: DDI buffer is idle |
| 385 | */ |
Tristan Corrick | 1a73eb0 | 2018-10-31 02:27:29 +1300 | [diff] [blame] | 386 | reg32 = DDI_BUF_IS_IDLE | DDI_INIT_DISPLAY_DETECTED; |
| 387 | if (!conf->gpu_ddi_e_connected) |
| 388 | reg32 |= DDI_A_4_LANES; |
| 389 | gtt_write(DDI_BUF_CTL_A, reg32); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 390 | |
| 391 | /* Set FDI registers - is this required? */ |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 392 | gtt_write(_FDI_RXA_MISC, 0x00200090); |
| 393 | gtt_write(_FDI_RXA_MISC, 0x0a000000); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 394 | |
| 395 | /* Enable the handshake with PCH display when processing reset */ |
| 396 | gtt_write(NDE_RSTWRN_OPT, RST_PCH_HNDSHK_EN); |
| 397 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 398 | /* Undocumented */ |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 399 | gtt_write(0x42090, 0x04000000); |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 400 | gtt_write(0x9840, 0x00000000); |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 401 | gtt_write(0x42090, 0xa4000000); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 402 | |
| 403 | gtt_write(SOUTH_DSPCLK_GATE_D, PCH_LP_PARTITION_LEVEL_DISABLE); |
| 404 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 405 | /* Undocumented */ |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 406 | gtt_write(0x42080, 0x00004000); |
Furquan Shaikh | 77f48cd | 2013-08-19 10:16:50 -0700 | [diff] [blame] | 407 | |
| 408 | /* Prepare DDI buffers for DP and FDI */ |
| 409 | intel_prepare_ddi(); |
| 410 | |
| 411 | /* Hot plug detect buffer enabled for port A */ |
| 412 | gtt_write(DIGITAL_PORT_HOTPLUG_CNTRL, DIGITAL_PORTA_HOTPLUG_ENABLE); |
| 413 | |
| 414 | /* Enable HPD buffer for digital port D and B */ |
| 415 | gtt_write(PCH_PORT_HOTPLUG, PORTD_HOTPLUG_ENABLE | PORTB_HOTPLUG_ENABLE); |
| 416 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 417 | /* |
| 418 | * Bits 4:0 - Power cycle delay (default 0x6 --> 500ms) |
| 419 | * Bits 31:8 - Reference divider (0x0004af ----> 24MHz) |
| 420 | */ |
Ronald G. Minnich | 5bcca7e | 2013-06-25 15:56:46 -0700 | [diff] [blame] | 421 | gtt_write(PCH_PP_DIVISOR, 0x0004af06); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 422 | } |
| 423 | |
Duncan Laurie | c7f2ab7 | 2013-05-28 07:49:09 -0700 | [diff] [blame] | 424 | static void gma_pm_init_post_vbios(struct device *dev) |
| 425 | { |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 426 | int cdclk = 0; |
| 427 | int devid = pci_read_config16(dev, PCI_DEVICE_ID); |
| 428 | int gpu_is_ulx = 0; |
| 429 | |
| 430 | if (devid == 0x0a0e || devid == 0x0a1e) |
| 431 | gpu_is_ulx = 1; |
| 432 | |
| 433 | /* CD Frequency */ |
Duncan Laurie | 3106d0f | 2013-08-12 13:51:22 -0700 | [diff] [blame] | 434 | if ((gtt_read(0x42014) & 0x1000000) || gpu_is_ulx || haswell_is_ult()) |
| 435 | cdclk = 0; /* fixed frequency */ |
| 436 | else |
| 437 | cdclk = 2; /* variable frequency */ |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 438 | |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 439 | if (gpu_is_ulx || cdclk != 0) |
| 440 | gtt_rmw(0x130040, 0xf7ffffff, 0x04000000); |
| 441 | else |
| 442 | gtt_rmw(0x130040, 0xf3ffffff, 0x00000000); |
| 443 | |
| 444 | /* More magic */ |
| 445 | if (haswell_is_ult() || gpu_is_ulx) { |
Duncan Laurie | 3106d0f | 2013-08-12 13:51:22 -0700 | [diff] [blame] | 446 | if (!gpu_is_ulx) |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 447 | gtt_write(0x138128, 0x00000000); |
| 448 | else |
| 449 | gtt_write(0x138128, 0x00000001); |
| 450 | gtt_write(0x13812c, 0x00000000); |
| 451 | gtt_write(0x138124, 0x80000017); |
| 452 | } |
| 453 | |
Duncan Laurie | c7f2ab7 | 2013-05-28 07:49:09 -0700 | [diff] [blame] | 454 | /* Disable Force Wake */ |
| 455 | gtt_write(0x0a188, 0x00010000); |
Edward O'Callaghan | 986e85c | 2014-10-29 12:15:34 +1100 | [diff] [blame] | 456 | gtt_poll(FORCEWAKE_ACK_HSW, 1 << 0, 0 << 0); |
Duncan Laurie | 356833d | 2013-07-09 15:40:27 -0700 | [diff] [blame] | 457 | gtt_write(0x0a188, 0x00000001); |
Duncan Laurie | c7f2ab7 | 2013-05-28 07:49:09 -0700 | [diff] [blame] | 458 | } |
| 459 | |
Patrick Rudolph | 89f3a60 | 2017-06-20 18:25:22 +0200 | [diff] [blame] | 460 | /* Enable SCI to ACPI _GPE._L06 */ |
| 461 | static void gma_enable_swsci(void) |
| 462 | { |
| 463 | u16 reg16; |
| 464 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 465 | /* Clear DMISCI status */ |
Patrick Rudolph | 89f3a60 | 2017-06-20 18:25:22 +0200 | [diff] [blame] | 466 | reg16 = inw(get_pmbase() + TCO1_STS); |
| 467 | reg16 &= DMISCI_STS; |
| 468 | outw(get_pmbase() + TCO1_STS, reg16); |
| 469 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 470 | /* Clear and enable ACPI TCO SCI */ |
Patrick Rudolph | 89f3a60 | 2017-06-20 18:25:22 +0200 | [diff] [blame] | 471 | enable_tco_sci(); |
| 472 | } |
| 473 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 474 | static void gma_func0_init(struct device *dev) |
| 475 | { |
Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 476 | int lightup_ok = 0; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 477 | u32 reg32; |
Matt DeVillier | 6955b9c | 2017-04-16 01:42:44 -0500 | [diff] [blame] | 478 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 479 | /* IGD needs to be Bus Master */ |
| 480 | reg32 = pci_read_config32(dev, PCI_COMMAND); |
| 481 | reg32 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO; |
| 482 | pci_write_config32(dev, PCI_COMMAND, reg32); |
| 483 | |
| 484 | /* Init graphics power management */ |
| 485 | gma_pm_init_pre_vbios(dev); |
| 486 | |
Matt DeVillier | 6955b9c | 2017-04-16 01:42:44 -0500 | [diff] [blame] | 487 | /* Pre panel init */ |
Duncan Laurie | c7f2ab7 | 2013-05-28 07:49:09 -0700 | [diff] [blame] | 488 | gma_setup_panel(dev); |
| 489 | |
Arthur Heymans | e6c8f7e | 2018-08-09 11:31:51 +0200 | [diff] [blame] | 490 | int vga_disable = (pci_read_config16(dev, GGC) & 2) >> 1; |
| 491 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 492 | if (CONFIG(MAINBOARD_USE_LIBGFXINIT)) { |
Arthur Heymans | e6c8f7e | 2018-08-09 11:31:51 +0200 | [diff] [blame] | 493 | if (vga_disable) { |
| 494 | printk(BIOS_INFO, |
| 495 | "IGD is not decoding legacy VGA MEM and IO: skipping NATIVE graphic init\n"); |
| 496 | } else { |
| 497 | printk(BIOS_SPEW, "NATIVE graphics, run native enable\n"); |
| 498 | gma_gfxinit(&lightup_ok); |
| 499 | gfx_set_init_done(1); |
| 500 | } |
Arthur Heymans | 23cda347 | 2016-12-18 16:03:52 +0100 | [diff] [blame] | 501 | } |
| 502 | |
Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 503 | if (! lightup_ok) { |
| 504 | printk(BIOS_SPEW, "FUI did not run; using VBIOS\n"); |
Stefan Reinauer | f1aabec | 2014-01-22 15:16:30 -0800 | [diff] [blame] | 505 | mdelay(CONFIG_PRE_GRAPHICS_DELAY); |
Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 506 | pci_dev_init(dev); |
| 507 | } |
| 508 | |
Matt DeVillier | 6955b9c | 2017-04-16 01:42:44 -0500 | [diff] [blame] | 509 | /* Post panel init */ |
Ronald G. Minnich | 4f78b18 | 2013-04-17 16:57:30 -0700 | [diff] [blame] | 510 | gma_pm_init_post_vbios(dev); |
Patrick Rudolph | 89f3a60 | 2017-06-20 18:25:22 +0200 | [diff] [blame] | 511 | |
| 512 | gma_enable_swsci(); |
| 513 | intel_gma_restore_opregion(); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 514 | } |
| 515 | |
Matt DeVillier | 41c4eb5 | 2020-03-30 19:20:54 -0500 | [diff] [blame] | 516 | static void gma_generate_ssdt(struct device *dev) |
Vladimir Serbinenko | dd2bc3f | 2014-10-31 09:16:31 +0100 | [diff] [blame] | 517 | { |
Matt DeVillier | 41c4eb5 | 2020-03-30 19:20:54 -0500 | [diff] [blame] | 518 | const struct northbridge_intel_haswell_config *chip = dev->chip_info; |
Vladimir Serbinenko | dd2bc3f | 2014-10-31 09:16:31 +0100 | [diff] [blame] | 519 | |
Matt DeVillier | 41c4eb5 | 2020-03-30 19:20:54 -0500 | [diff] [blame] | 520 | drivers_intel_gma_displays_ssdt_generate(&chip->gfx); |
Vladimir Serbinenko | dd2bc3f | 2014-10-31 09:16:31 +0100 | [diff] [blame] | 521 | } |
| 522 | |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 523 | static unsigned long gma_write_acpi_tables(struct device *const dev, unsigned long current, |
| 524 | struct acpi_rsdp *const rsdp) |
Patrick Rudolph | ee14ccc | 2017-05-20 11:46:06 +0200 | [diff] [blame] | 525 | { |
| 526 | igd_opregion_t *opregion = (igd_opregion_t *)current; |
Matt DeVillier | 7c78970 | 2017-06-16 23:36:46 -0500 | [diff] [blame] | 527 | global_nvs_t *gnvs; |
Patrick Rudolph | ee14ccc | 2017-05-20 11:46:06 +0200 | [diff] [blame] | 528 | |
Matt DeVillier | ebe08e0 | 2017-07-14 13:28:42 -0500 | [diff] [blame] | 529 | if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS) |
Patrick Rudolph | ee14ccc | 2017-05-20 11:46:06 +0200 | [diff] [blame] | 530 | return current; |
| 531 | |
| 532 | current += sizeof(igd_opregion_t); |
| 533 | |
Matt DeVillier | 7c78970 | 2017-06-16 23:36:46 -0500 | [diff] [blame] | 534 | /* GNVS has been already set up */ |
| 535 | gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); |
| 536 | if (gnvs) { |
| 537 | /* IGD OpRegion Base Address */ |
Patrick Rudolph | 19c2ad8 | 2017-06-30 14:52:01 +0200 | [diff] [blame] | 538 | gma_set_gnvs_aslb(gnvs, (uintptr_t)opregion); |
Matt DeVillier | 7c78970 | 2017-06-16 23:36:46 -0500 | [diff] [blame] | 539 | } else { |
| 540 | printk(BIOS_ERR, "Error: GNVS table not found.\n"); |
| 541 | } |
| 542 | |
Patrick Rudolph | ee14ccc | 2017-05-20 11:46:06 +0200 | [diff] [blame] | 543 | current = acpi_align_current(current); |
| 544 | return current; |
| 545 | } |
| 546 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 547 | static struct pci_operations gma_pci_ops = { |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 548 | .set_subsystem = pci_dev_set_subsystem, |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 549 | }; |
| 550 | |
| 551 | static struct device_operations gma_func0_ops = { |
Matt DeVillier | 41c4eb5 | 2020-03-30 19:20:54 -0500 | [diff] [blame] | 552 | .read_resources = pci_dev_read_resources, |
| 553 | .set_resources = pci_dev_set_resources, |
| 554 | .enable_resources = pci_dev_enable_resources, |
| 555 | .init = gma_func0_init, |
| 556 | .acpi_fill_ssdt = gma_generate_ssdt, |
Matt DeVillier | 41c4eb5 | 2020-03-30 19:20:54 -0500 | [diff] [blame] | 557 | .ops_pci = &gma_pci_ops, |
| 558 | .write_acpi_tables = gma_write_acpi_tables, |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 559 | }; |
| 560 | |
Duncan Laurie | df7be71 | 2012-12-17 11:22:57 -0800 | [diff] [blame] | 561 | static const unsigned short pci_device_ids[] = { |
| 562 | 0x0402, /* Desktop GT1 */ |
| 563 | 0x0412, /* Desktop GT2 */ |
| 564 | 0x0422, /* Desktop GT3 */ |
| 565 | 0x0406, /* Mobile GT1 */ |
| 566 | 0x0416, /* Mobile GT2 */ |
| 567 | 0x0426, /* Mobile GT3 */ |
| 568 | 0x0d16, /* Mobile 4+3 GT1 */ |
| 569 | 0x0d26, /* Mobile 4+3 GT2 */ |
| 570 | 0x0d36, /* Mobile 4+3 GT3 */ |
| 571 | 0x0a06, /* ULT GT1 */ |
| 572 | 0x0a16, /* ULT GT2 */ |
| 573 | 0x0a26, /* ULT GT3 */ |
| 574 | 0, |
| 575 | }; |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 576 | |
| 577 | static const struct pci_driver pch_lpc __pci_driver = { |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 578 | .ops = &gma_func0_ops, |
| 579 | .vendor = PCI_VENDOR_ID_INTEL, |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 580 | .devices = pci_device_ids, |
| 581 | }; |