aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:24 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:24 -0700
commit9b5e93485e69abe65c3a3bac1dc4f73f3751fb21 (patch)
treea7ff841bd910090b46c74218d7475717df50ee0d /com32
parent88a2699b38db0c312a2076054a50554996743f2e (diff)
downloadsyslinux.git-9b5e93485e69abe65c3a3bac1dc4f73f3751fb21.tar.gz
syslinux.git-9b5e93485e69abe65c3a3bac1dc4f73f3751fb21.tar.xz
syslinux.git-9b5e93485e69abe65c3a3bac1dc4f73f3751fb21.zip
Run Nindent on com32/lib/pci/readx.c
Automatically reformat com32/lib/pci/readx.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32')
-rw-r--r--com32/lib/pci/readx.c93
1 files changed, 46 insertions, 47 deletions
diff --git a/com32/lib/pci/readx.c b/com32/lib/pci/readx.c
index 3f19cad2..f073eaa1 100644
--- a/com32/lib/pci/readx.c
+++ b/com32/lib/pci/readx.c
@@ -1,52 +1,51 @@
#include "pci/pci.h"
#include <string.h>
-TYPE BWL(pci_read) (pciaddr_t a)
-{
- TYPE r;
-
- for (;;) {
- switch ( __pci_cfg_type ) {
- case PCI_CFG_AUTO:
- pci_set_config_type(PCI_CFG_AUTO);
- break; /* Try again */
-
- case PCI_CFG_TYPE1:
- {
- uint32_t oldcf8;
- cli();
- oldcf8 = inl(0xcf8);
- outl(a, 0xcf8);
- r = BWL(in) (0xcfc + (a & 3));
- outl(oldcf8, 0xcf8);
- sti();
- }
- return r;
-
- case PCI_CFG_TYPE2:
- {
- uint8_t oldcf8, oldcfa;
-
- if ( a & (0x10 << 11) )
- return (TYPE)~0; /* Device 16-31 not supported */
-
- cli();
- oldcf8 = inb(0xcf8);
- oldcfa = inb(0xcfa);
- outb(0xf0 + ((a >> (8-1)) & 0x0e), 0xcf8);
- outb(a >> 16, 0xcfa);
- r = BWL(in) (0xc000 + ((a >> (11-8)) & 0xf00) + (a & 0xff));
- outb(oldcf8, 0xcf8);
- outb(oldcfa, 0xcfa);
- sti();
- }
- return r;
-
- case PCI_CFG_BIOS:
- return (TYPE) __pci_read_bios(BIOSCALL, a);
-
- default:
- return (TYPE)~0;
+TYPE BWL(pci_read) (pciaddr_t a) {
+ TYPE r;
+
+ for (;;) {
+ switch (__pci_cfg_type) {
+ case PCI_CFG_AUTO:
+ pci_set_config_type(PCI_CFG_AUTO);
+ break; /* Try again */
+
+ case PCI_CFG_TYPE1:
+ {
+ uint32_t oldcf8;
+ cli();
+ oldcf8 = inl(0xcf8);
+ outl(a, 0xcf8);
+ r = BWL(in) (0xcfc + (a & 3));
+ outl(oldcf8, 0xcf8);
+ sti();
+ }
+ return r;
+
+ case PCI_CFG_TYPE2:
+ {
+ uint8_t oldcf8, oldcfa;
+
+ if (a & (0x10 << 11))
+ return (TYPE) ~ 0; /* Device 16-31 not supported */
+
+ cli();
+ oldcf8 = inb(0xcf8);
+ oldcfa = inb(0xcfa);
+ outb(0xf0 + ((a >> (8 - 1)) & 0x0e), 0xcf8);
+ outb(a >> 16, 0xcfa);
+ r = BWL(in) (0xc000 + ((a >> (11 - 8)) & 0xf00) + (a & 0xff));
+ outb(oldcf8, 0xcf8);
+ outb(oldcfa, 0xcfa);
+ sti();
+ }
+ return r;
+
+ case PCI_CFG_BIOS:
+ return (TYPE) __pci_read_bios(BIOSCALL, a);
+
+ default:
+ return (TYPE) ~ 0;
+ }
}
- }
}