[LinuxBIOS] GIGABYTE GA-2761GXDK
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sat Nov 3 02:07:58 CET 2007
Dear Morgan,
this patch is against latest svn. Please review.
Thanks,
Carl-Daniel
Change one PCI vendor ID from Nvidia to SiS and remove some dead code.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
---
Index: LinuxBIOSv2/src/southbridge/sis/sis966/sis966_early_ctrl.c
===================================================================
--- LinuxBIOSv2/src/southbridge/sis/sis966/sis966_early_ctrl.c (Revision 2935)
+++ LinuxBIOSv2/src/southbridge/sis/sis966/sis966_early_ctrl.c (Arbeitskopie)
@@ -23,14 +23,12 @@
{
device_t dev;
- /* Find the device.
- */
+ /* Find the device. */
dev = pci_locate_device_on_bus(
- PCI_ID(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_SIS_SIS966_HT),
+ PCI_ID(PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS_SIS966_HT),
bus);
return (dev>>15) & 0x1f;
-
}
static void hard_reset(void)
@@ -41,6 +39,7 @@
outb(0x0a, 0x0cf9);
outb(0x0e, 0x0cf9);
}
+
static void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn)
{
/* default value for sis966 is good */
Index: LinuxBIOSv2/src/southbridge/sis/sis966/sis966_nic.c
===================================================================
--- LinuxBIOSv2/src/southbridge/sis/sis966/sis966_nic.c (Revision 2935)
+++ LinuxBIOSv2/src/southbridge/sis/sis966/sis966_nic.c (Arbeitskopie)
@@ -353,64 +353,6 @@
print_debug("NIC_INIT:<----------\n");
return;
-#define RegStationMgtInf 0x44
-#define PHY_RGMII 0x10000000
-
- writel(PHY_RGMII, base + RegStationMgtInf);
- conf = dev->chip_info;
-
- if(conf->mac_eeprom_smbus != 0) {
-// read MAC address from EEPROM at first
-
- struct device *dev_eeprom;
- dev_eeprom = dev_find_slot_on_smbus(conf->mac_eeprom_smbus, conf->mac_eeprom_addr);
-
- if(dev_eeprom) {
- // if that is valid we will use that
- unsigned char dat[6];
- int status;
- int i;
- for(i=0;i<6;i++) {
- status = smbus_read_byte(dev_eeprom, i);
- if(status < 0) break;
- dat[i] = status & 0xff;
- }
- if(status >= 0) {
- mac_l = 0;
- for(i=3;i>=0;i--) {
- mac_l <<= 8;
- mac_l += dat[i];
- }
- if(mac_l != 0xffffffff) {
- mac_l += nic_index;
- mac_h = 0;
- for(i=5;i>=4;i--) {
- mac_h <<= 8;
- mac_h += dat[i];
- }
- eeprom_valid = 1;
- }
- }
- }
- }
-
-// if that is invalid we will read that from romstrap
- if(!eeprom_valid) {
- unsigned long mac_pos;
- mac_pos = 0xffffffd0; // refer to romstrap.inc and romstrap.lds
- mac_l = readl(mac_pos) + nic_index; // overflow?
- mac_h = readl(mac_pos + 4);
-
- }
-
-// set that into NIC MMIO
-#define NvRegMacAddrA 0xA8
-#define NvRegMacAddrB 0xAC
- writel(mac_l, base + NvRegMacAddrA);
- writel(mac_h, base + NvRegMacAddrB);
-
- nic_index++;
-
#if CONFIG_PCI_ROM_RUN == 1
pci_dev_init(dev);// it will init option rom
#endif
@@ -436,6 +378,7 @@
// .enable = sis966_enable,
.ops_pci = &lops_pci,
};
+
static const struct pci_driver nic_driver __pci_driver = {
.ops = &nic_ops,
.vendor = PCI_VENDOR_ID_SIS,
More information about the coreboot
mailing list