summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801xx/i82801xx.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-06-19 22:47:11 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-06-19 22:47:11 +0000
commitdfb3c130d5cdd3a01531c23c3d15e7a1010bf221 (patch)
tree625092b43a0c3ac24fa359eb14df0f922f81e6ad /src/southbridge/intel/i82801xx/i82801xx.c
parentc72ff11281233c097441e809a52b560b1a131196 (diff)
Various minor cosmetics and coding style fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2727 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel/i82801xx/i82801xx.c')
-rw-r--r--src/southbridge/intel/i82801xx/i82801xx.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/southbridge/intel/i82801xx/i82801xx.c b/src/southbridge/intel/i82801xx/i82801xx.c
index 5cceab9b9b..c2ff949734 100644
--- a/src/southbridge/intel/i82801xx/i82801xx.c
+++ b/src/southbridge/intel/i82801xx/i82801xx.c
@@ -2,7 +2,7 @@
* This file is part of the LinuxBIOS project.
*
* Copyright (C) 2005 Digital Design Corporation
- * (Written by Steven J. Magnani <steve@digidescorp.com> for Digital Design Corp)
+ * (Written by Steven J. Magnani <steve@digidescorp.com> for Digital Design)
* Copyright (C) 2007 Corey Osgood <corey.osgood@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -30,31 +30,30 @@ void i82801xx_enable(device_t dev)
unsigned int index = 0;
uint16_t cur_disable_mask, new_disable_mask;
- // All 82801 devices should be on bus 0
- unsigned int devfn = PCI_DEVFN(0x1f, 0); // lpc
- device_t lpc_dev = dev_find_slot(0, devfn); // 0
+ /* All 82801 devices should be on bus 0. */
+ unsigned int devfn = PCI_DEVFN(0x1f, 0); // LPC
+ device_t lpc_dev = dev_find_slot(0, devfn); // 0
if (!lpc_dev)
return;
- /* We're going to assume, perhaps incorrectly, that if a function exists
- it can be disabled. Workarounds for ICH variants that don't follow this
- should be done by checking the device ID */
-
+ /* We're going to assume, perhaps incorrectly, that if a function
+ * exists it can be disabled. Workarounds for ICH variants that don't
+ * follow this should be done by checking the device ID.
+ */
if (PCI_SLOT(dev->path.u.pci.devfn) == 31) {
index = PCI_FUNC(dev->path.u.pci.devfn);
} else if (PCI_SLOT(dev->path.u.pci.devfn) == 29) {
index = 8 + PCI_FUNC(dev->path.u.pci.devfn);
}
-
- /* Function 0 is a bit of an exception */
- if(index == 0)
- {
+
+ /* Function 0 is a bit of an exception. */
+ if (index == 0) {
index = 14;
}
cur_disable_mask = pci_read_config16(lpc_dev, FUNC_DIS);
- new_disable_mask = cur_disable_mask & ~(1 << index); // enable it
+ new_disable_mask = cur_disable_mask & ~(1 << index); // enable it
if (!dev->enabled) {
- new_disable_mask |= (1 << index); // disable it, if desired
+ new_disable_mask |= (1 << index); // disable it, if desired
}
if (new_disable_mask != cur_disable_mask) {
pci_write_config16(lpc_dev, FUNC_DIS, new_disable_mask);