Please bear with me - another rename checkin. This qualifies as trivial, no
[coreboot.git] / src / southbridge / intel / i82801db / i82801db.c
1 /*
2  * This file is part of the coreboot project.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
17  */
18
19 #include <console/console.h>
20 #include <device/device.h>
21 #include <device/pci.h>
22 #include <device/pci_ids.h>
23 #include "i82801db.h"
24
25 void i82801db_enable(device_t dev)
26 {
27         device_t lpc_dev;
28         uint16_t word;
29
30         printk_debug("Entering %s\n", __FUNCTION__);
31         /* See if we are behind the i82801db pci bridge 
32         lpc_dev = dev_find_slot(dev->bus->secondary, PCI_DEVFN(0x1f, 0));
33         */
34         lpc_dev = dev_find_slot(0, PCI_DEVFN(0x1f, 0));
35         if (!lpc_dev) {
36                 return;
37         }
38         
39         word = 0x0040;
40         pci_write_config16(lpc_dev, 0xf2, word);
41         /*
42         if((dev->path.u.pci.devfn &0xf8)== 0xf8) {
43                 index = dev->path.u.pci.devfn & 7;
44         }
45         else if((dev->path.u.pci.devfn &0xf8)== 0xe8) {
46                 index = (dev->path.u.pci.devfn & 7) +8;
47         }
48
49         reg = reg_old = pci_read_config16(lpc_dev, 0xf2);
50         reg &= ~(1 << index);
51         if (!dev->enabled) {
52                 reg |= (1 << index);
53         }
54         if (reg != reg_old) {
55                 printk_debug("Trying to enable device, [0:1f:0] reg 0xf2 <- %04x\n", reg);
56                 pci_write_config16(lpc_dev, 0xf2, reg);
57         }
58         */      
59 }
60
61 struct chip_operations southbridge_intel_i82801db_ops = {
62         CHIP_NAME("Intel 82801DB Southbridge")
63         .enable_dev = i82801db_enable,
64 };