}
}
+static void ck804_set_subsystem(device_t dev, unsigned vendor, unsigned device)
+{
+ pci_write_config32(dev, 0x40,
+ ((device & 0xffff) << 16) | (vendor & 0xffff));
+}
+
+struct pci_operations ck804_pci_ops = {
+ .set_subsystem = ck804_set_subsystem,
+};
+
struct chip_operations southbridge_nvidia_ck804_ops = {
CHIP_NAME("NVIDIA CK804 Southbridge")
.enable_dev = ck804_enable,
void ck804_enable(device_t dev);
void ck804_enable_usbdebug(unsigned int port);
+extern struct pci_operations ck804_pci_ops;
+
#endif
#include <device/pci_ops.h>
#include "ck804.h"
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations ac97audio_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
// .enable = ck804_enable,
.init = 0,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver ac97audio_driver __pci_driver = {
// .enable = ck804_enable,
.init = 0,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver ac97modem_driver __pci_driver = {
#include <device/pci_ops.h>
#include "ck804.h"
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations ht_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = 0,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver ht_driver __pci_driver = {
#endif
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations ide_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.init = ide_init,
.scan_bus = 0,
// .enable = ck804_enable,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver ide_driver __pci_driver = {
ck804_lpc_enable_childrens_resources(dev);
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations lpc_ops = {
.read_resources = ck804_lpc_read_resources,
.set_resources = pci_dev_set_resources,
.init = lpc_init,
.scan_bus = scan_static_bus,
// .enable = ck804_enable,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver lpc_driver __pci_driver = {
.enable_resources = pci_dev_enable_resources,
.init = lpc_slave_init,
// .enable = ck804_enable,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver lpc_driver_slave __pci_driver = {
#endif
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations nic_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.init = nic_init,
.scan_bus = 0,
// .enable = ck804_enable,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver nic_driver __pci_driver = {
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations sata_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
// .enable = ck804_enable,
.init = sata_init,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver sata0_driver __pci_driver = {
.write_byte = lsmbus_write_byte,
};
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations smbus_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.init = 0,
.scan_bus = scan_static_bus,
// .enable = ck804_enable,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
.ops_smbus_bus = &lops_smbus_bus,
};
}
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations usb_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.init = usb1_init,
// .enable = ck804_enable,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver usb_driver __pci_driver = {
pci_write_config32(dev, 0xf8, dword);
}
-static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
-{
- pci_write_config32(dev, 0x40,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
-}
-
-static struct pci_operations lops_pci = {
- .set_subsystem = lpci_set_subsystem,
-};
-
static struct device_operations usb2_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.init = usb2_init,
// .enable = ck804_enable,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = &ck804_pci_ops,
};
static const struct pci_driver usb2_driver __pci_driver = {