src/southbridge/sis/sis966/nic.c: Improve code formatting

Change-Id: If4f3d3ed43fca1bff52ea99cc3eab29beb4e2a08
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Elyes HAOUAS 2018-04-26 18:40:03 +02:00 committed by Felix Held
parent 5be7bb3fa6
commit 5a33d12c24

View File

@ -73,9 +73,9 @@ static void readApcMacAddr(void)
outl((inl(0xcfc) & 0xfffffffd), 0xcfc ); // enable IO78/79h for APC Index/Data
printk(BIOS_DEBUG, "MAC addr in APC = ");
for (i = 0x9; i <=0xe; i++) {
for (i = 0x9; i <= 0xe; i++)
printk(BIOS_DEBUG, "%2.2x",readApcByte(i));
}
printk(BIOS_DEBUG, "\n");
/* Set APC Reload */
@ -150,7 +150,8 @@ static unsigned long ReadEEprom( struct device *dev, u8 *base, u32 Reg)
mdelay(50);
if (i==LoopNum) data=0x10000;
if (i == LoopNum)
data = 0x10000;
else {
ulValue = read32(base + 0x3c);
data = ((ulValue & 0xffff0000) >> 16);
@ -196,19 +197,18 @@ static int phy_detect(u8 *base,u16 *PhyAddr) //BOOL PHY_Detect()
// Scan all PHY address(0 ~ 31) to find a valid PHY
for (PhyAddress = 0; PhyAddress < 32; PhyAddress++) {
usData=phy_read(base,PhyAddress,StatusReg); // Status register is a PHY's register(offset 01h)
// Status register is a PHY's register(offset 01h)
usData = phy_read(base,PhyAddress,StatusReg);
// Found a valid PHY
if ((usData != 0x0) && (usData != 0xffff)) {
bFoundPhy = TRUE;
break;
}
}
if (!bFoundPhy) {
if (!bFoundPhy)
printk(BIOS_DEBUG, "PHY not found !!!!\n");
}
*PhyAddr = PhyAddress;
@ -259,7 +259,7 @@ static void nic_init(struct device *dev)
ulValue = read32(base + 0x38L); // check EEPROM existing
if ((ulValue & 0x0002)) {
if (ulValue & 0x0002) {
// read MAC address from EEPROM at first
@ -269,7 +269,8 @@ static void nic_init(struct device *dev)
for (i = 0; i < 3; i++) {
//status = smbus_read_byte(dev_eeprom, i);
ulValue = ReadEEprom(dev, base, i + 3L);
if (ulValue ==0x10000) break; // error
if (ulValue == 0x10000)
break; // error
MacAddr[i] = ulValue & 0xFFFF;
@ -301,7 +302,6 @@ static void nic_init(struct device *dev)
printk(BIOS_DEBUG, "\n");
}
#endif
}
@ -309,7 +309,6 @@ static void nic_init(struct device *dev)
printk(BIOS_DEBUG, "NIC_INIT:<----------\n");
return;
}
static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)