Author: uwe
Date: 2007-06-03 18:57:27 +0200 (Sun, 03 Jun 2007)
New Revision: 2707
Modified:
trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb.h
trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_early_smbus.c
trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_ide.c
trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_smbus.c
Log:
Intel 82371EB: Some code simplifications (trivial).
Signed-off-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified: trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb.h
===================================================================
--- trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb.h 2007-06-02 23:55:17 UTC (rev 2706)
+++ trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb.h 2007-06-03 16:57:27 UTC (rev 2707)
@@ -26,7 +26,6 @@
void i82371eb_enable(device_t dev);
#endif
-#define PCICMD 0x04 /* PCI Command Register */
#define XBCS 0x4e /* X-Bus Chip Select register */
/* SMBus */
Modified: trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_early_smbus.c
===================================================================
--- trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_early_smbus.c 2007-06-02 23:55:17 UTC (rev 2706)
+++ trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_early_smbus.c 2007-06-03 16:57:27 UTC (rev 2707)
@@ -49,9 +49,9 @@
pci_write_config8(dev, SMBHSTCFG, reg8);
/* Enable access to the SMBus I/O space. */
- reg16 = pci_read_config16(dev, PCICMD);
+ reg16 = pci_read_config16(dev, PCI_COMMAND);
reg16 |= IOSE;
- pci_write_config16(dev, PCICMD, reg16);
+ pci_write_config16(dev, PCI_COMMAND, reg16);
/* Clear any lingering errors, so the transaction will run. */
outb(inb(SMBUS_IO_BASE + SMBHST_STATUS), SMBUS_IO_BASE + SMBHST_STATUS);
Modified: trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_ide.c
===================================================================
--- trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_ide.c 2007-06-02 23:55:17 UTC (rev 2706)
+++ trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_ide.c 2007-06-03 16:57:27 UTC (rev 2707)
@@ -35,10 +35,8 @@
static void ide_init(struct device *dev)
{
uint16_t reg;
- struct southbridge_intel_i82371eb_config *conf;
+ struct southbridge_intel_i82371eb_config *conf = dev->chip_info;
- conf = dev->chip_info;
-
/* Enable/disable the primary IDE interface. */
reg = pci_read_config16(dev, IDETIM_PRI);
if (conf->ide0_enable) {
@@ -62,18 +60,13 @@
pci_write_config16(dev, IDETIM_SEC, reg);
}
-/* There are no subsystem IDs on the Intel 82371EB. */
-static struct pci_operations lops_pci = {
- // .set_subsystem = 0,
-};
-
static struct device_operations ide_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = ide_init,
.scan_bus = 0,
- .ops_pci = &lops_pci,
+ .ops_pci = 0, /* No subsystem IDs on 82371EB! */
};
static struct pci_driver ide_driver __pci_driver = {
Modified: trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_smbus.c
===================================================================
--- trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_smbus.c 2007-06-02 23:55:17 UTC (rev 2706)
+++ trunk/LinuxBIOSv2/src/southbridge/intel/i82371eb/i82371eb_smbus.c 2007-06-03 16:57:27 UTC (rev 2707)
@@ -27,11 +27,6 @@
static struct smbus_bus_operations lops_smbus_bus = {
};
-/* There are no subsystem IDs on the Intel 82371EB. */
-static struct pci_operations lops_pci = {
- // .set_subsystem = 0,
-};
-
static struct device_operations smbus_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
@@ -39,7 +34,7 @@
.init = 0,
.scan_bus = scan_static_bus,
// .enable = i82371eb_enable, // TODO: Needed?
- .ops_pci = &lops_pci,
+ .ops_pci = 0, /* No subsystem IDs on 82371EB! */
.ops_smbus_bus = &lops_smbus_bus,
};