summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorYinghai Lu <yinghailu@gmail.com>2004-10-21 01:52:21 +0000
committerYinghai Lu <yinghailu@gmail.com>2004-10-21 01:52:21 +0000
commitf19e2c766ac602f51882cf3c1c28c90d12f21c8d (patch)
tree40914b9072597944a823f9eaf51c69e0d2093112 /src/southbridge
parent6014983babe46d025cdcfb76bc20ff009eb27817 (diff)
downloadcoreboot-f19e2c766ac602f51882cf3c1c28c90d12f21c8d.tar.xz
better support enable_dev for amd8111
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1695 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/amd/amd8111/Config.lb4
-rw-r--r--src/southbridge/amd/amd8111/amd8111.c11
-rw-r--r--src/southbridge/amd/amd8111/amd8111_ac97.c4
-rw-r--r--src/southbridge/amd/amd8111/amd8111_acpi.c2
-rw-r--r--src/southbridge/amd/amd8111/amd8111_lpc.c2
-rw-r--r--src/southbridge/amd/amd8111/amd8111_nic.c2
-rw-r--r--src/southbridge/amd/amd8111/amd8111_usb.c6
-rw-r--r--src/southbridge/amd/amd8111/amd8111_usb2.c4
8 files changed, 22 insertions, 13 deletions
diff --git a/src/southbridge/amd/amd8111/Config.lb b/src/southbridge/amd/amd8111/Config.lb
index 8575c2b1eb..584b15ecd4 100644
--- a/src/southbridge/amd/amd8111/Config.lb
+++ b/src/southbridge/amd/amd8111/Config.lb
@@ -5,7 +5,7 @@ driver amd8111_lpc.o
driver amd8111_ide.o
driver amd8111_acpi.o
#driver amd8111_usb2.o
-driver amd8111_ac97.o
-driver amd8111_nic.o
+#driver amd8111_ac97.o
+#driver amd8111_nic.o
driver amd8111_pci.o
object amd8111_reset.o
diff --git a/src/southbridge/amd/amd8111/amd8111.c b/src/southbridge/amd/amd8111/amd8111.c
index afb02f1fec..a9b132cdaf 100644
--- a/src/southbridge/amd/amd8111/amd8111.c
+++ b/src/southbridge/amd/amd8111/amd8111.c
@@ -9,9 +9,11 @@ void amd8111_enable(device_t dev)
device_t lpc_dev;
device_t bus_dev;
unsigned index;
+ uint32_t dword;
uint16_t reg_old, reg;
uint8_t byte;
+
/* See if we are on the behind the amd8111 pci bridge */
bus_dev = dev->bus->dev;
if ((bus_dev->vendor == PCI_VENDOR_ID_AMD) &&
@@ -39,8 +41,13 @@ void amd8111_enable(device_t dev)
}
}
- if ((dev->vendor == PCI_VENDOR_ID_AMD) &&
- (dev->device == PCI_DEVICE_ID_AMD_8111_USB2)) {
+ /* Now read the vendor and device id */
+ dword= pci_read_config32(dev, PCI_VENDOR_ID);
+#if 0
+ printk_debug(" %s dev->vendor= %04x, dev->device= %04x, id = %08x\n", dev_path(dev), dev->vendor, dev->device, dword);
+#endif
+
+ if (dword == (PCI_VENDOR_ID_AMD | (PCI_DEVICE_ID_AMD_8111_USB2 << 16))) {
if(!dev->enabled) {
byte = pci_read_config8(lpc_dev, 0x47);
byte |= (1<<7);
diff --git a/src/southbridge/amd/amd8111/amd8111_ac97.c b/src/southbridge/amd/amd8111/amd8111_ac97.c
index 63a0e1264e..36ed41feed 100644
--- a/src/southbridge/amd/amd8111/amd8111_ac97.c
+++ b/src/southbridge/amd/amd8111/amd8111_ac97.c
@@ -13,7 +13,7 @@ static struct device_operations ac97audio_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
.init = 0,
.scan_bus = 0,
};
@@ -29,7 +29,7 @@ static struct device_operations ac97modem_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
.init = 0,
.scan_bus = 0,
};
diff --git a/src/southbridge/amd/amd8111/amd8111_acpi.c b/src/southbridge/amd/amd8111/amd8111_acpi.c
index e3b7038e46..557e54f858 100644
--- a/src/southbridge/amd/amd8111/amd8111_acpi.c
+++ b/src/southbridge/amd/amd8111/amd8111_acpi.c
@@ -104,7 +104,7 @@ static struct device_operations acpi_ops = {
.enable_resources = pci_dev_enable_resources,
.init = acpi_init,
.scan_bus = 0,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
};
static struct pci_driver acpi_driver __pci_driver = {
diff --git a/src/southbridge/amd/amd8111/amd8111_lpc.c b/src/southbridge/amd/amd8111/amd8111_lpc.c
index ff767c7cc4..6441c86efe 100644
--- a/src/southbridge/amd/amd8111/amd8111_lpc.c
+++ b/src/southbridge/amd/amd8111/amd8111_lpc.c
@@ -194,7 +194,7 @@ static struct device_operations lpc_ops = {
.enable_resources = pci_dev_enable_resources,
.init = lpc_init,
.scan_bus = scan_static_bus,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
};
static struct pci_driver lpc_driver __pci_driver = {
diff --git a/src/southbridge/amd/amd8111/amd8111_nic.c b/src/southbridge/amd/amd8111/amd8111_nic.c
index b3792086a5..512b2683c5 100644
--- a/src/southbridge/amd/amd8111/amd8111_nic.c
+++ b/src/southbridge/amd/amd8111/amd8111_nic.c
@@ -13,7 +13,7 @@ static struct device_operations nic_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
.init = 0,
.scan_bus = 0,
};
diff --git a/src/southbridge/amd/amd8111/amd8111_usb.c b/src/southbridge/amd/amd8111/amd8111_usb.c
index 669b828e55..680b610267 100644
--- a/src/southbridge/amd/amd8111/amd8111_usb.c
+++ b/src/southbridge/amd/amd8111/amd8111_usb.c
@@ -7,17 +7,19 @@
static void usb_init(struct device *dev)
{
-#if 0
uint32_t cmd;
+#if 0
printk_debug("USB: Setting up controller.. ");
cmd = pci_read_config32(dev, PCI_COMMAND);
pci_write_config32(dev, PCI_COMMAND,
cmd | PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
+
printk_debug("done.\n");
#endif
+
}
static struct device_operations usb_ops = {
@@ -26,7 +28,7 @@ static struct device_operations usb_ops = {
.enable_resources = pci_dev_enable_resources,
.init = usb_init,
.scan_bus = 0,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
};
static struct pci_driver usb_driver __pci_driver = {
diff --git a/src/southbridge/amd/amd8111/amd8111_usb2.c b/src/southbridge/amd/amd8111/amd8111_usb2.c
index 12a9cfb010..d3393ae4d3 100644
--- a/src/southbridge/amd/amd8111/amd8111_usb2.c
+++ b/src/southbridge/amd/amd8111/amd8111_usb2.c
@@ -9,9 +9,9 @@
static void usb2_init(struct device *dev)
{
-#if 0
uint32_t cmd;
+#if 0
printk_debug("USB: Setting up controller.. ");
cmd = pci_read_config32(dev, PCI_COMMAND);
pci_write_config32(dev, PCI_COMMAND,
@@ -29,7 +29,7 @@ static struct device_operations usb2_ops = {
.enable_resources = pci_dev_enable_resources,
.init = usb2_init,
.scan_bus = 0,
- .enable = amd8111_enable,
+// .enable = amd8111_enable,
};
static struct pci_driver usb2_driver __pci_driver = {