first round name simplification. drop the <component>_ prefix.
[coreboot.git] / src / southbridge / via / vt8237r / lpc.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007, 2008 Rudolf Marek <r.marek@assembler.cz>
5  * Copyright (C) 2009 Jon Harrison <bothlyn@blueyonder.co.uk>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; version 2 of the License.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19  */
20
21 /* Inspiration from other VIA SB code. */
22
23 #include <arch/io.h>
24 #include <console/console.h>
25 #include <device/device.h>
26 #include <device/pci.h>
27 #include <device/pci_ids.h>
28 #include <pc80/mc146818rtc.h>
29 #include <arch/ioapic.h>
30 #include <cpu/x86/lapic.h>
31 #include <pc80/keyboard.h>
32 #include <pc80/i8259.h>
33 #include <stdlib.h>
34 #include "vt8237r.h"
35 #include "chip.h"
36
37 static void southbridge_init_common(struct device *dev);
38
39 #if CONFIG_EPIA_VT8237R_INIT
40                    /* Interrupts for  INT# A   B   C   D */
41 static const unsigned char pciIrqs[4]  = { 10, 11, 12, 0};
42
43             /* Interrupt Assignments for Pins   1   2   3   4  */
44 static const unsigned char sataPins[4] =     { 'A','B','C','D'};
45 static const unsigned char vgaPins[4] =      { 'A','B','C','D'};
46 static const unsigned char usbPins[4] =      { 'A','B','C','D'};
47 static const unsigned char enetPins[4] =     { 'A','B','C','D'};
48 static const unsigned char vt8237Pins[4] =   { 'A','B','C','D'};
49 static const unsigned char slotPins[4] =     { 'C','D','A','B'};
50 static const unsigned char riserPins[4] =    { 'D','C','B','A'};
51
52 static unsigned char *pin_to_irq(const unsigned char *pin)
53 {
54         static unsigned char Irqs[4];
55         int i;
56         for (i = 0 ; i < 4 ; i++)
57                 Irqs[i] = pciIrqs[ pin[i] - 'A' ];
58
59         return Irqs;
60 }
61 #endif
62
63 /** Set up PCI IRQ routing, route everything through APIC. */
64 static void pci_routing_fixup(struct device *dev)
65 {
66 #if CONFIG_EPIA_VT8237R_INIT
67         device_t pdev;
68 #endif
69
70         /* PCI PNP Interrupt Routing INTE/F - disable */
71         pci_write_config8(dev, 0x44, 0x00);
72
73         /* PCI PNP Interrupt Routing INTG/H - disable */
74         pci_write_config8(dev, 0x45, 0x00);
75
76         /* Gate Interrupts until RAM Writes are flushed */
77         pci_write_config8(dev, 0x49, 0x20);
78
79 #if CONFIG_EPIA_VT8237R_INIT
80
81         /* Share INTE-INTH with INTA-INTD as per stock BIOS. */
82         pci_write_config8(dev, 0x46, 0x00);
83
84         /* setup PCI IRQ routing (For PCI Slot)*/
85         pci_write_config8(dev, 0x55, pciIrqs[0] << 4);
86         pci_write_config8(dev, 0x56, pciIrqs[1] | (pciIrqs[2] << 4) );
87         pci_write_config8(dev, 0x57, pciIrqs[3] << 4);
88
89         /* PCI Routing Fixup */
90
91         //Setup MiniPCI Slot
92         pci_assign_irqs(0, 0x14, pin_to_irq(slotPins));
93
94         // Via 2 slot riser card 2nd slot
95         pci_assign_irqs(0, 0x13, pin_to_irq(riserPins));
96
97         //Setup USB
98         pci_assign_irqs(0, 0x10, pin_to_irq(usbPins));
99
100         //Setup VT8237R Sound
101         pci_assign_irqs(0, 0x11, pin_to_irq(vt8237Pins));
102
103         //Setup Ethernet
104         pci_assign_irqs(0, 0x12, pin_to_irq(enetPins));
105
106         //Setup VGA
107         pci_assign_irqs(1, 0x00, pin_to_irq(vgaPins));
108
109         /* APIC Routing Fixup */
110
111         // Setup SATA
112         pdev = dev_find_device(PCI_VENDOR_ID_VIA,
113                                 PCI_DEVICE_ID_VIA_VT6420_SATA, 0);
114         pci_write_config8(pdev, PCI_INTERRUPT_PIN, 0x02);
115         pci_assign_irqs(0, 0x0f, pin_to_irq(sataPins));
116
117
118         // Setup PATA Override
119         pdev = dev_find_device(PCI_VENDOR_ID_VIA,
120                                 PCI_DEVICE_ID_VIA_82C586_1, 0);
121         pci_write_config8(pdev, PCI_INTERRUPT_PIN, 0x01);
122         pci_write_config8(pdev, PCI_INTERRUPT_LINE, 0xFF);
123
124 #else
125         /* Route INTE-INTH through registers above, no map to INTA-INTD. */
126         pci_write_config8(dev, 0x46, 0x10);
127
128         /* PCI Interrupt Polarity */
129         pci_write_config8(dev, 0x54, 0x00);
130
131         /* PCI INTA# Routing */
132         pci_write_config8(dev, 0x55, 0x00);
133
134         /* PCI INTB#/C# Routing */
135         pci_write_config8(dev, 0x56, 0x00);
136
137         /* PCI INTD# Routing */
138         pci_write_config8(dev, 0x57, 0x00);
139 #endif
140 }
141
142
143
144 /**
145  * Set up the power management capabilities directly into ACPI mode.
146  * This avoids having to handle any System Management Interrupts (SMIs).
147  */
148
149 extern u8 acpi_slp_type;
150
151
152 static void setup_pm(device_t dev)
153 {
154         u16 tmp;
155         /* Debounce LID and PWRBTN# Inputs for 16ms. */
156         pci_write_config8(dev, 0x80, 0x20);
157
158         /* Set ACPI base address to I/O VT8237R_ACPI_IO_BASE. */
159         pci_write_config16(dev, 0x88, VT8237R_ACPI_IO_BASE | 0x1);
160
161         /* Set ACPI to 9, must set IRQ 9 override to level! Set PSON gating. */
162         pci_write_config8(dev, 0x82, 0x40 | VT8237R_ACPI_IRQ);
163
164 #if CONFIG_EPIA_VT8237R_INIT
165         /* Primary interupt channel, define wake events 0=IRQ0 15=IRQ15 1=en. */
166         pci_write_config16(dev, 0x84, 0x3052);
167 #else
168         /* Primary interupt channel, define wake events 0=IRQ0 15=IRQ15 1=en. */
169         pci_write_config16(dev, 0x84, 0x30b2);
170
171 #endif
172         /* SMI output level to low, 7.5us throttle clock */
173         pci_write_config8(dev, 0x8d, 0x18);
174
175         /* GP Timer Control 1s */
176         pci_write_config8(dev, 0x93, 0x88);
177
178         /*
179          * 7 = SMBus clock from RTC 32.768KHz
180          * 5 = Internal PLL reset from susp disabled
181          * 2 = GPO2 is SUSA#
182          */
183         pci_write_config8(dev, 0x94, 0xa0);
184
185         /*
186          * 7 = stp to sust delay 1msec
187          * 6 = SUSST# Deasserted Before PWRGD for STD
188          * 5 = Keyboard/Mouse Swap
189          * 4 = PWRGOOD reset on VT8237A/S
190          * 3 = GPO26/GPO27 is GPO
191          * 2 = Disable Alert on Lan
192          * 1 = SUSCLK/GPO4
193          * 0 = USB Wakeup
194          */
195
196 #if CONFIG_EPIA_VT8237R_INIT
197         pci_write_config8(dev, 0x95, 0xc2);
198 #else
199         pci_write_config8(dev, 0x95, 0xcc);
200 #endif
201
202         /* Disable GP3 timer. */
203         pci_write_config8(dev, 0x98, 0);
204
205         /* Enable ACPI accessm RTC signal gated with PSON. */
206         pci_write_config8(dev, 0x81, 0x84);
207
208         /* Clear status events. */
209         outw(0xffff, VT8237R_ACPI_IO_BASE + 0x00);
210         outw(0xffff, VT8237R_ACPI_IO_BASE + 0x20);
211         outw(0xffff, VT8237R_ACPI_IO_BASE + 0x28);
212         outl(0xffffffff, VT8237R_ACPI_IO_BASE + 0x30);
213
214         /* Disable SCI on GPIO. */
215         outw(0x0, VT8237R_ACPI_IO_BASE + 0x22);
216
217         /* Disable SMI on GPIO. */
218         outw(0x0, VT8237R_ACPI_IO_BASE + 0x24);
219
220         /* Disable all global enable SMIs. */
221         outw(0x0, VT8237R_ACPI_IO_BASE + 0x2a);
222
223         /* All SMI off, both IDE buses ON, PSON rising edge. */
224         outw(0x0, VT8237R_ACPI_IO_BASE + 0x2c);
225
226         /* Primary activity SMI disable. */
227         outl(0x0, VT8237R_ACPI_IO_BASE + 0x34);
228
229         /* GP timer reload on none. */
230         outl(0x0, VT8237R_ACPI_IO_BASE + 0x38);
231
232         /* Disable extended IO traps. */
233         outb(0x0, VT8237R_ACPI_IO_BASE + 0x42);
234
235         /* SCI is generated for RTC/pwrBtn/slpBtn. */
236         tmp = inw(VT8237R_ACPI_IO_BASE + 0x04);
237 #if CONFIG_HAVE_ACPI_RESUME == 1
238         acpi_slp_type = ((tmp & (7 << 10)) >> 10) == 1 ? 3 : 0 ;
239         printk(BIOS_DEBUG, "SLP_TYP type was %x %x\n", tmp, acpi_slp_type);
240 #endif
241         /* clear sleep */
242         tmp &= ~(7 << 10);
243         tmp |= 1;
244         outw(tmp, VT8237R_ACPI_IO_BASE + 0x04);
245 }
246
247 static void vt8237r_init(struct device *dev)
248 {
249         u8 enables;
250
251 #if CONFIG_EPIA_VT8237R_INIT
252         printk(BIOS_SPEW, "Entering vt8237r_init, for EPIA.\n");
253         /*
254          * TODO: Looks like stock BIOS can do this but causes a hang
255          * Enable SATA LED, disable special CPU Frequency Change -
256          * GPIO28 GPIO22 GPIO29 GPIO23 are GPIOs.
257          * Setup to match EPIA default
258          * PCS0# on Pin U1
259          */
260         enables = pci_read_config8(dev, 0xe5);
261         enables |= 0x23;
262         pci_write_config8(dev, 0xe5, enables);
263
264         /*
265          * Enable Flash Write Access.
266          * Note EPIA-N Does not use REQ5 or PCISTP#(Hang)
267          */
268         enables = pci_read_config8(dev, 0xe4);
269         enables |= 0x2B;
270         pci_write_config8(dev, 0xe4, enables);
271
272         /* Enables Extra RTC Ports */
273         enables = pci_read_config8(dev, 0x4E);
274         enables |= 0x80;
275         pci_write_config8(dev, 0x4E, enables);
276
277 #else
278         printk(BIOS_SPEW, "Entering vt8237r_init.\n");
279         /*
280          * Enable SATA LED, disable special CPU Frequency Change -
281          * GPIO28 GPIO22 GPIO29 GPIO23 are GPIOs.
282          */
283         pci_write_config8(dev, 0xe5, 0x09);
284
285         /* REQ5 as PCI request input - should be together with INTE-INTH. */
286         pci_write_config8(dev, 0xe4, 0x4);
287 #endif
288
289         /* Set bit 3 of 0x4f (use INIT# as CPU reset). */
290         enables = pci_read_config8(dev, 0x4f);
291         enables |= 0x08;
292         pci_write_config8(dev, 0x4f, enables);
293
294 #if CONFIG_EPIA_VT8237R_INIT
295         /*
296          * Set Read Pass Write Control Enable
297          */
298         pci_write_config8(dev, 0x48, 0x0c);
299 #else
300         /*
301          * Set Read Pass Write Control Enable
302          * (force A2 from APIC FSB to low).
303          */
304         pci_write_config8(dev, 0x48, 0x8c);
305 #endif
306
307         southbridge_init_common(dev);
308
309 #if !CONFIG_EPIA_VT8237R_INIT
310         /* FIXME: Intel needs more bit set for C2/C3. */
311
312         /*
313          * Allow SLP# signal to assert LDTSTOP_L.
314          * Will work for C3 and for FID/VID change.
315          */
316         outb(0x1, VT8237R_ACPI_IO_BASE + 0x11);
317 #endif
318
319         printk(BIOS_SPEW, "Leaving %s.\n", __func__);
320 }
321
322 static void vt8237a_init(struct device *dev)
323 {
324         /*
325          * FIXME: This is based on vt8237s_init() and the values the AMI
326          *        BIOS on my M2V wrote to these registers (by loking
327          *        at lspci -nxxx output).
328          *        Works for me.
329          */
330         u32 tmp;
331
332         /* Set bit 3 of 0x4f (use INIT# as CPU reset). */
333         tmp = pci_read_config8(dev, 0x4f);
334         tmp |= 0x08;
335         pci_write_config8(dev, 0x4f, tmp);
336
337         /*
338          * bit2: REQ5 as PCI request input - should be together with INTE-INTH.
339          * bit5: usb power control lines as gpio
340          */
341         pci_write_config8(dev, 0xe4, 0x24);
342         /*
343          * Enable APIC wakeup from INTH
344          * Enable SATA LED, disable special CPU Frequency Change -
345          * GPIO28 GPIO22 GPIO29 GPIO23 are GPIOs.
346          */
347         pci_write_config8(dev, 0xe5, 0x69);
348
349         /* Reduce further the STPCLK/LDTSTP signal to 5us. */
350         pci_write_config8(dev, 0xec, 0x4);
351
352         /* Host Bus Power Management Control, maybe not needed */
353         pci_write_config8(dev, 0x8c, 0x5);
354
355         /* Enable HPET at VT8237R_HPET_ADDR. */
356         pci_write_config32(dev, 0x68, (VT8237R_HPET_ADDR | 0x80));
357
358         southbridge_init_common(dev);
359
360         /* Share INTE-INTH with INTA-INTD for simplicity */
361         pci_write_config8(dev, 0x46, 0x00);
362
363         /* FIXME: Intel needs more bit set for C2/C3. */
364
365         /*
366          * Allow SLP# signal to assert LDTSTOP_L.
367          * Will work for C3 and for FID/VID change.
368          */
369         outb(0x1, VT8237R_ACPI_IO_BASE + 0x11);
370
371         dump_south(dev);
372 }
373
374 static void vt8237s_init(struct device *dev)
375 {
376         u32 tmp;
377
378         /* Put SPI base VT8237S_SPI_MEM_BASE. */
379         tmp = pci_read_config32(dev, 0xbc);
380         pci_write_config32(dev, 0xbc,
381                            (VT8237S_SPI_MEM_BASE >> 8) | (tmp & 0xFF000000));
382
383         /*
384          * REQ5 as PCI request input - should be together with INTE-INTH.
385          */
386         pci_write_config8(dev, 0xe4, 0x04);
387
388         /* Reduce further the STPCLK/LDTSTP signal to 5us. */
389         pci_write_config8(dev, 0xec, 0x4);
390
391         /* Host Bus Power Management Control, maybe not needed */
392         pci_write_config8(dev, 0x8c, 0x5);
393
394         /* Enable HPET at VT8237R_HPET_ADDR., does not work correctly on R. */
395         pci_write_config32(dev, 0x68, (VT8237R_HPET_ADDR | 0x80));
396
397         southbridge_init_common(dev);
398
399         /* FIXME: Intel needs more bit set for C2/C3. */
400
401         /*
402          * Allow SLP# signal to assert LDTSTOP_L.
403          * Will work for C3 and for FID/VID change. FIXME FIXME, pre rev A2.
404          */
405         outb(0xff, VT8237R_ACPI_IO_BASE + 0x50);
406
407         dump_south(dev);
408 }
409
410 static void vt8237_common_init(struct device *dev)
411 {
412         u8 enables, byte;
413
414         /* Enable addr/data stepping. */
415         byte = pci_read_config8(dev, PCI_COMMAND);
416         byte |= PCI_COMMAND_WAIT;
417         pci_write_config8(dev, PCI_COMMAND, byte);
418
419 /* EPIA-N(L) Uses CN400 for BIOS Access */
420 #if !CONFIG_EPIA_VT8237R_INIT
421         /* Enable the internal I/O decode. */
422         enables = pci_read_config8(dev, 0x6C);
423         enables |= 0x80;
424         pci_write_config8(dev, 0x6C, enables);
425
426         /*
427          * ROM decode
428          * bit range
429          *   7 000E0000h-000EFFFFh
430          *   6 FFF00000h-FFF7FFFFh
431          *   5 FFE80000h-FFEFFFFFh
432          *   4 FFE00000h-FFE7FFFFh
433          *   3 FFD80000h-FFDFFFFFh
434          *   2 FFD00000h-FFD7FFFFh
435          *   1 FFC80000h-FFCFFFFFh
436          *   0 FFC00000h-FFC7FFFFh
437          * So 0x7f here sets ROM decode to FFC00000-FFFFFFFF or 4Mbyte.
438          */
439         pci_write_config8(dev, 0x41, 0x7f);
440 #endif
441
442         /*
443          * Set bit 6 of 0x40 (I/O recovery time).
444          * IMPORTANT FIX - EISA = ECLR reg at 0x4d0! Decoding must be on so
445          * that PCI interrupts can be properly marked as level triggered.
446          */
447         enables = pci_read_config8(dev, 0x40);
448         enables |= 0x44;
449         pci_write_config8(dev, 0x40, enables);
450
451         /* Line buffer control */
452         enables = pci_read_config8(dev, 0x42);
453         enables |= 0xf8;
454         pci_write_config8(dev, 0x42, enables);
455
456         /* Delay transaction control */
457         pci_write_config8(dev, 0x43, 0xb);
458
459 #if CONFIG_EPIA_VT8237R_INIT
460         /* I/O recovery time, default IDE routing */
461         pci_write_config8(dev, 0x4c, 0x04);
462
463         /* ROM memory cycles go to LPC. */
464         pci_write_config8(dev, 0x59, 0x80);
465
466         /*
467          * Bit | Meaning
468          * -------------
469          *   3 | Bypass APIC De-Assert Message (1=Enable)
470          *   1 | possibly "INTE#, INTF#, INTG#, INTH# as PCI"
471          *     | bit 1=1 works for Aaron at VIA, bit 1=0 works for jakllsch
472          *   0 | Dynamic Clock Gating Main Switch (1=Enable)
473          */
474         pci_write_config8(dev, 0x5b, 0x9);
475
476         /* Set 0x58 to 0x42 APIC On and RTC Write Protect.*/
477         pci_write_config8(dev, 0x58, 0x42);
478
479         /* Enable serial IRQ, 6PCI clocks. */
480         pci_write_config8(dev, 0x52, 0x9);
481 #else
482         /* I/O recovery time, default IDE routing */
483         pci_write_config8(dev, 0x4c, 0x44);
484
485         /* ROM memory cycles go to LPC. */
486         pci_write_config8(dev, 0x59, 0x80);
487
488         /*
489          * Bit | Meaning
490          * -------------
491          *   3 | Bypass APIC De-Assert Message (1=Enable)
492          *   1 | possibly "INTE#, INTF#, INTG#, INTH# as PCI"
493          *     | bit 1=1 works for Aaron at VIA, bit 1=0 works for jakllsch
494          *   0 | Dynamic Clock Gating Main Switch (1=Enable)
495          */
496         pci_write_config8(dev, 0x5b, 0xb);
497
498         /* Set 0x58 to 0x43 APIC and RTC. */
499         pci_write_config8(dev, 0x58, 0x43);
500
501         /* Enable serial IRQ, 6PCI clocks. */
502         pci_write_config8(dev, 0x52, 0x9);
503
504 #endif
505
506         /* Power management setup */
507         setup_pm(dev);
508
509         /* Start the RTC. */
510         rtc_init(0);
511 }
512
513 static void vt8237r_read_resources(device_t dev)
514 {
515         struct resource *res;
516
517         pci_dev_read_resources(dev);
518
519         /* Fixed ACPI Base IO Base*/
520         res = new_resource(dev, 0x88);
521         res->base = VT8237R_ACPI_IO_BASE;
522         res->size = 128;
523         res->limit = 0xffffUL;
524         res->flags = IORESOURCE_IO | IORESOURCE_FIXED | IORESOURCE_RESERVE |
525                      IORESOURCE_STORED | IORESOURCE_ASSIGNED;
526
527         /* Fixed EISA ECLR I/O Regs     */
528         res = new_resource(dev, 3);
529         res->base = 0x4d0;
530         res->size = 2;
531         res->limit = 0xffffUL;
532         res->flags = IORESOURCE_IO | IORESOURCE_FIXED | IORESOURCE_RESERVE |
533                      IORESOURCE_STORED | IORESOURCE_ASSIGNED;
534
535         /* Fixed System Management Bus I/O Resource */
536         res = new_resource(dev, 0xD0);
537         res->base = VT8237R_SMBUS_IO_BASE;
538         res->size = 16;
539         res->limit = 0xffffUL;
540         res->flags = IORESOURCE_IO | IORESOURCE_FIXED | IORESOURCE_RESERVE |
541                      IORESOURCE_STORED | IORESOURCE_ASSIGNED;
542
543         /* Fixed APIC resource */
544         res = new_resource(dev, 0x44);
545         res->base = IO_APIC_ADDR;
546         res->size = 256;
547         res->limit = 0xffffffffUL;
548         res->align = 8;
549         res->gran = 8;
550         res->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_RESERVE |
551                      IORESOURCE_STORED | IORESOURCE_ASSIGNED;
552
553         /* Fixed flashrom resource */
554         res = new_resource(dev, 4);
555         res->base = 0xff000000UL;
556         res->size = 0x01000000UL; /* 16MB */
557         res->limit = 0xffffffffUL;
558         res->flags = IORESOURCE_MEM | IORESOURCE_FIXED | IORESOURCE_RESERVE |
559                      IORESOURCE_STORED | IORESOURCE_ASSIGNED;
560
561         res = new_resource(dev, 1);
562         res->base = 0x0UL;
563         res->size = 0x1000UL;
564         res->limit = 0xffffUL;
565         res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
566 }
567
568 static void init_keyboard(struct device *dev)
569 {
570         u8 regval = pci_read_config8(dev, 0x51);
571         if (regval & 0x1)
572                 pc_keyboard_init(0);
573 }
574
575 static void southbridge_init_common(struct device *dev)
576 {
577         vt8237_common_init(dev);
578         pci_routing_fixup(dev);
579         setup_ioapic(IO_APIC_ADDR, VT8237R_APIC_ID);
580         setup_i8259();
581         init_keyboard(dev);
582 }
583
584 static const struct device_operations vt8237r_lpc_ops_s = {
585         .read_resources         = vt8237r_read_resources,
586         .set_resources          = pci_dev_set_resources,
587         .enable_resources       = pci_dev_enable_resources,
588         .init                   = vt8237s_init,
589         .scan_bus               = scan_static_bus,
590 };
591
592 static const struct device_operations vt8237r_lpc_ops_r = {
593         .read_resources         = vt8237r_read_resources,
594         .set_resources          = pci_dev_set_resources,
595         .enable_resources       = pci_dev_enable_resources,
596         .init                   = vt8237r_init,
597         .scan_bus               = scan_static_bus,
598 };
599
600 static const struct device_operations vt8237r_lpc_ops_a = {
601         .read_resources         = vt8237r_read_resources,
602         .set_resources          = pci_dev_set_resources,
603         .enable_resources       = pci_dev_enable_resources,
604         .init                   = vt8237a_init,
605         .scan_bus               = scan_static_bus,
606 };
607
608 static const struct pci_driver lpc_driver_r __pci_driver = {
609         .ops    = &vt8237r_lpc_ops_r,
610         .vendor = PCI_VENDOR_ID_VIA,
611         .device = PCI_DEVICE_ID_VIA_VT8237R_LPC,
612 };
613
614 static const struct pci_driver lpc_driver_a __pci_driver = {
615         .ops    = &vt8237r_lpc_ops_a,
616         .vendor = PCI_VENDOR_ID_VIA,
617         .device = PCI_DEVICE_ID_VIA_VT8237A_LPC,
618 };
619
620 static const struct pci_driver lpc_driver_s __pci_driver = {
621         .ops    = &vt8237r_lpc_ops_s,
622         .vendor = PCI_VENDOR_ID_VIA,
623         .device = PCI_DEVICE_ID_VIA_VT8237S_LPC,
624 };