Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
[coreboot.git] / src / southbridge / nvidia / ck804 / ck804_ht.c
1 /*
2  * Copyright 2004 Tyan Computer
3  *  by yhlu@tyan.com
4  */
5 #include <console/console.h>
6 #include <device/device.h>
7 #include <device/pci.h>
8 #include <device/pci_ids.h>
9 #include <device/pci_ops.h>
10 #include "ck804.h"
11
12 static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
13 {       
14         pci_write_config32(dev, 0x40, 
15                 ((device & 0xffff) << 16) | (vendor & 0xffff));
16 }
17 static struct pci_operations lops_pci = {
18         .set_subsystem = lpci_set_subsystem,
19 };
20
21 static struct device_operations ht_ops  = {
22         .read_resources   = pci_dev_read_resources,
23         .set_resources    = pci_dev_set_resources,
24         .enable_resources = pci_dev_enable_resources,
25         .init             = 0,
26         .scan_bus         = 0,
27         .ops_pci          = &lops_pci,
28 };
29
30 static struct pci_driver ht_driver __pci_driver = {
31         .ops    = &ht_ops,
32         .vendor = PCI_VENDOR_ID_NVIDIA,
33         .device = PCI_DEVICE_ID_NVIDIA_CK804_HT,
34 };
35