Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <device/device.h> |
| 5 | #include <device/pci.h> |
| 6 | #include <device/pci_ids.h> |
| 7 | #include <device/pci_ops.h> |
Kyösti Mälkki | 13f6650 | 2019-03-03 08:01:05 +0200 | [diff] [blame] | 8 | #include <device/mmio.h> |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 9 | #include <delay.h> |
Vladimir Serbinenko | 75c8387 | 2014-09-05 01:01:31 +0200 | [diff] [blame] | 10 | #include <device/azalia_device.h> |
Kyösti Mälkki | 12b121c | 2019-08-18 16:33:39 +0300 | [diff] [blame] | 11 | |
| 12 | #include "chip.h" |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 13 | #include "pch.h" |
| 14 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 15 | typedef struct southbridge_intel_bd82x6x_config config_t; |
| 16 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 17 | static int codec_detect(u8 *base) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 18 | { |
| 19 | u8 reg8; |
| 20 | |
| 21 | /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */ |
Angel Pons | 61dd836 | 2020-12-05 18:02:32 +0100 | [diff] [blame^] | 22 | if (azalia_set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 23 | goto no_codec; |
| 24 | |
| 25 | /* Write back the value once reset bit is set. */ |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 26 | write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG)); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 27 | |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 28 | /* Read in Codec location (BAR + 0xe)[2..0] */ |
Elyes HAOUAS | 11178bd | 2020-08-03 15:34:46 +0200 | [diff] [blame] | 29 | reg8 = read8(base + HDA_STATESTS_REG); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 30 | reg8 &= 0x0f; |
| 31 | if (!reg8) |
| 32 | goto no_codec; |
| 33 | |
| 34 | return reg8; |
| 35 | |
| 36 | no_codec: |
| 37 | /* Codec Not found */ |
| 38 | /* Put HDA back in reset (BAR + 0x8) [0] */ |
Angel Pons | 61dd836 | 2020-12-05 18:02:32 +0100 | [diff] [blame^] | 39 | azalia_set_bits(base + HDA_GCTL_REG, 1, 0); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 40 | printk(BIOS_DEBUG, "Azalia: No codec!\n"); |
| 41 | return 0; |
| 42 | } |
| 43 | |
Elyes HAOUAS | e414a4e | 2019-01-03 10:40:43 +0100 | [diff] [blame] | 44 | static u32 find_verb(struct device *dev, u32 viddid, const u32 **verb) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 45 | { |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 46 | int idx = 0; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 47 | |
| 48 | while (idx < (cim_verb_data_size / sizeof(u32))) { |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 49 | u32 verb_size = 4 * cim_verb_data[idx + 2]; // in u32 |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 50 | if (cim_verb_data[idx] != viddid) { |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 51 | idx += verb_size + 3; // skip verb + header |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 52 | continue; |
| 53 | } |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 54 | *verb = &cim_verb_data[idx + 3]; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 55 | return verb_size; |
| 56 | } |
| 57 | |
| 58 | /* Not all codecs need to load another verb */ |
| 59 | return 0; |
| 60 | } |
| 61 | |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 62 | /* |
| 63 | * Wait 50usec for the codec to indicate it is ready. |
| 64 | * No response would imply that the codec is non-operative. |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 65 | */ |
| 66 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 67 | static int wait_for_ready(u8 *base) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 68 | { |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 69 | /* Use a 1msec timeout */ |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 70 | int timeout = 1000; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 71 | |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 72 | while (timeout--) { |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 73 | u32 reg32 = read32(base + HDA_ICII_REG); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 74 | if (!(reg32 & HDA_ICII_BUSY)) |
| 75 | return 0; |
| 76 | udelay(1); |
| 77 | } |
| 78 | |
| 79 | return -1; |
| 80 | } |
| 81 | |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 82 | /* |
| 83 | * Wait 50usec for the codec to indicate that it accepted the previous command. |
| 84 | * No response would imply that the code is non-operative. |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 85 | */ |
| 86 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 87 | static int wait_for_valid(u8 *base) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 88 | { |
| 89 | u32 reg32; |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 90 | /* Use a 1msec timeout */ |
| 91 | int timeout = 1000; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 92 | |
| 93 | /* Send the verb to the codec */ |
| 94 | reg32 = read32(base + HDA_ICII_REG); |
| 95 | reg32 |= HDA_ICII_BUSY | HDA_ICII_VALID; |
| 96 | write32(base + HDA_ICII_REG, reg32); |
| 97 | |
Elyes HAOUAS | ba28e8d | 2016-08-31 19:22:16 +0200 | [diff] [blame] | 98 | while (timeout--) { |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 99 | reg32 = read32(base + HDA_ICII_REG); |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 100 | if ((reg32 & (HDA_ICII_VALID | HDA_ICII_BUSY)) == HDA_ICII_VALID) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 101 | return 0; |
| 102 | udelay(1); |
| 103 | } |
| 104 | |
| 105 | return -1; |
| 106 | } |
| 107 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 108 | static void codec_init(struct device *dev, u8 *base, int addr) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 109 | { |
| 110 | u32 reg32; |
| 111 | const u32 *verb; |
| 112 | u32 verb_size; |
| 113 | int i; |
| 114 | |
| 115 | printk(BIOS_DEBUG, "Azalia: Initializing codec #%d\n", addr); |
| 116 | |
| 117 | /* 1 */ |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 118 | if (wait_for_ready(base) < 0) { |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 119 | printk(BIOS_DEBUG, " codec not ready.\n"); |
| 120 | return; |
| 121 | } |
| 122 | |
| 123 | reg32 = (addr << 28) | 0x000f0000; |
Elyes HAOUAS | 11178bd | 2020-08-03 15:34:46 +0200 | [diff] [blame] | 124 | write32(base + HDA_IC_REG, reg32); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 125 | |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 126 | if (wait_for_valid(base) < 0) { |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 127 | printk(BIOS_DEBUG, " codec not valid.\n"); |
| 128 | return; |
| 129 | } |
| 130 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 131 | /* 2 */ |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 132 | reg32 = read32(base + HDA_IR_REG); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 133 | printk(BIOS_DEBUG, "Azalia: codec viddid: %08x\n", reg32); |
| 134 | verb_size = find_verb(dev, reg32, &verb); |
| 135 | |
| 136 | if (!verb_size) { |
| 137 | printk(BIOS_DEBUG, "Azalia: No verb!\n"); |
| 138 | return; |
| 139 | } |
| 140 | printk(BIOS_DEBUG, "Azalia: verb_size: %d\n", verb_size); |
| 141 | |
| 142 | /* 3 */ |
| 143 | for (i = 0; i < verb_size; i++) { |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 144 | if (wait_for_ready(base) < 0) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 145 | return; |
| 146 | |
Elyes HAOUAS | 11178bd | 2020-08-03 15:34:46 +0200 | [diff] [blame] | 147 | write32(base + HDA_IC_REG, verb[i]); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 148 | |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 149 | if (wait_for_valid(base) < 0) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 150 | return; |
| 151 | } |
| 152 | printk(BIOS_DEBUG, "Azalia: verb loaded.\n"); |
| 153 | } |
| 154 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 155 | static void codecs_init(struct device *dev, u8 *base, u32 codec_mask) |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 156 | { |
| 157 | int i; |
| 158 | for (i = 3; i >= 0; i--) { |
| 159 | if (codec_mask & (1 << i)) |
| 160 | codec_init(dev, base, i); |
| 161 | } |
Dylan Reid | b98d078 | 2012-04-27 11:37:33 -0700 | [diff] [blame] | 162 | |
| 163 | for (i = 0; i < pc_beep_verbs_size; i++) { |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 164 | if (wait_for_ready(base) < 0) |
Dylan Reid | b98d078 | 2012-04-27 11:37:33 -0700 | [diff] [blame] | 165 | return; |
| 166 | |
Elyes HAOUAS | 11178bd | 2020-08-03 15:34:46 +0200 | [diff] [blame] | 167 | write32(base + HDA_IC_REG, pc_beep_verbs[i]); |
Dylan Reid | b98d078 | 2012-04-27 11:37:33 -0700 | [diff] [blame] | 168 | |
Angel Pons | 554713e | 2020-10-24 23:23:07 +0200 | [diff] [blame] | 169 | if (wait_for_valid(base) < 0) |
Dylan Reid | b98d078 | 2012-04-27 11:37:33 -0700 | [diff] [blame] | 170 | return; |
| 171 | } |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | static void azalia_init(struct device *dev) |
| 175 | { |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 176 | u8 *base; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 177 | struct resource *res; |
| 178 | u32 codec_mask; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 179 | u32 reg32; |
| 180 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 181 | res = find_resource(dev, PCI_BASE_ADDRESS_0); |
| 182 | if (!res) |
| 183 | return; |
| 184 | |
Elyes HAOUAS | 6ea24ff | 2020-08-11 09:21:24 +0200 | [diff] [blame] | 185 | // NOTE this will break as soon as the Azalia get's a bar above 4G. |
| 186 | // Is there anything we can do about it? |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 187 | base = res2mmio(res, 0, 0); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 188 | printk(BIOS_DEBUG, "Azalia: base = %08x\n", (u32)base); |
| 189 | |
Patrick Rudolph | 4f8b108 | 2019-07-14 11:54:58 +0200 | [diff] [blame] | 190 | if (RCBA32(CIR31) & (1 << 31)) { |
Kyösti Mälkki | fd98c65 | 2013-07-26 08:50:53 +0300 | [diff] [blame] | 191 | reg32 = pci_read_config32(dev, 0x120); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 192 | reg32 &= 0xf8ffff01; |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 193 | reg32 |= (1 << 24); // 2 << 24 for server |
Patrick Rudolph | 4f8b108 | 2019-07-14 11:54:58 +0200 | [diff] [blame] | 194 | reg32 |= RCBA32(CIR31) & 0xfe; |
Kyösti Mälkki | fd98c65 | 2013-07-26 08:50:53 +0300 | [diff] [blame] | 195 | pci_write_config32(dev, 0x120, reg32); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 196 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 197 | pci_or_config16(dev, 0x78, 1 << 11); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 198 | } else |
| 199 | printk(BIOS_DEBUG, "Azalia: V1CTL disabled.\n"); |
| 200 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 201 | pci_and_config32(dev, 0x114, ~0xfe); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 202 | |
| 203 | // Set VCi enable bit |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 204 | pci_or_config32(dev, 0x120, 1 << 31); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 205 | |
| 206 | // Enable HDMI codec: |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 207 | pci_or_config32(dev, 0xc4, 1 << 1); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 208 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 209 | pci_or_config8(dev, 0x43, 1 << 6); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 210 | |
| 211 | /* Additional programming steps */ |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 212 | pci_or_config32(dev, 0xc4, 1 << 13); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 213 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 214 | pci_or_config32(dev, 0xc4, 1 << 10); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 215 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 216 | pci_and_config32(dev, 0xd0, ~(1 << 31)); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 217 | |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 218 | if (dev->device == 0x1e20) { |
| 219 | /* Additional step on Panther Point */ |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 220 | pci_or_config32(dev, 0xc4, 1 << 17); |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 221 | } |
| 222 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 223 | /* Set Bus Master */ |
Elyes HAOUAS | 729c069 | 2020-04-28 19:50:44 +0200 | [diff] [blame] | 224 | pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 225 | |
| 226 | pci_write_config8(dev, 0x3c, 0x0a); // unused? |
| 227 | |
| 228 | /* Codec Initialization Programming Sequence */ |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 229 | |
| 230 | /* Take controller out of reset */ |
Elyes HAOUAS | 11178bd | 2020-08-03 15:34:46 +0200 | [diff] [blame] | 231 | reg32 = read32(base + HDA_GCTL_REG); |
| 232 | reg32 |= HDA_GCTL_CRST; |
| 233 | write32(base + HDA_GCTL_REG, reg32); |
Stefan Reinauer | 15ba2bc | 2012-11-14 12:25:15 -0800 | [diff] [blame] | 234 | /* Wait 1ms */ |
| 235 | udelay(1000); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 236 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 237 | // Select Azalia mode. This needs to be controlled via devicetree.cb |
| 238 | pci_or_config8(dev, 0x40, 1); // Audio Control |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 239 | |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 240 | // Docking not supported |
| 241 | pci_and_config8(dev, 0x4d, (u8)~(1 << 7)); // Docking Status |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 242 | |
| 243 | codec_mask = codec_detect(base); |
| 244 | |
| 245 | if (codec_mask) { |
| 246 | printk(BIOS_DEBUG, "Azalia: codec_mask = %02x\n", codec_mask); |
| 247 | codecs_init(dev, base, codec_mask); |
| 248 | } |
| 249 | |
| 250 | /* Enable dynamic clock gating */ |
Angel Pons | c803f65 | 2020-06-07 22:09:01 +0200 | [diff] [blame] | 251 | pci_update_config8(dev, 0x43, ~0x07, (1 << 2) | (1 << 0)); |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 252 | } |
| 253 | |
Aaron Durbin | aa090cb | 2017-09-13 16:01:52 -0600 | [diff] [blame] | 254 | static const char *azalia_acpi_name(const struct device *dev) |
Patrick Rudolph | 604f698 | 2017-06-07 09:46:52 +0200 | [diff] [blame] | 255 | { |
| 256 | return "HDEF"; |
| 257 | } |
| 258 | |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 259 | static struct device_operations azalia_ops = { |
| 260 | .read_resources = pci_dev_read_resources, |
| 261 | .set_resources = pci_dev_set_resources, |
| 262 | .enable_resources = pci_dev_enable_resources, |
| 263 | .init = azalia_init, |
Angel Pons | 1fc0edd | 2020-05-31 00:03:28 +0200 | [diff] [blame] | 264 | .ops_pci = &pci_dev_ops_pci, |
Patrick Rudolph | 604f698 | 2017-06-07 09:46:52 +0200 | [diff] [blame] | 265 | .acpi_name = azalia_acpi_name, |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 266 | }; |
| 267 | |
Stefan Reinauer | 9a380ab | 2012-06-22 13:16:11 -0700 | [diff] [blame] | 268 | static const unsigned short pci_device_ids[] = { 0x1c20, 0x1e20, 0 }; |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 269 | |
Stefan Reinauer | 9a380ab | 2012-06-22 13:16:11 -0700 | [diff] [blame] | 270 | static const struct pci_driver pch_azalia __pci_driver = { |
| 271 | .ops = &azalia_ops, |
| 272 | .vendor = PCI_VENDOR_ID_INTEL, |
| 273 | .devices = pci_device_ids, |
Stefan Reinauer | 8e07382 | 2012-04-04 00:07:22 +0200 | [diff] [blame] | 274 | }; |