summaryrefslogtreecommitdiff
path: root/com32/lib/pci
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
commit8f9529ac5d65b514a58619287c409011dc7add32 (patch)
treee78aa2161881aa53671106888678b9cd8b0fcc32 /com32/lib/pci
parent24f14d344bf2701e407f824b4eae90ed454f5661 (diff)
downloadsyslinux-8f9529ac5d65b514a58619287c409011dc7add32.tar.gz
Run Nindent on com32/lib/pci/writex.c
Automatically reformat com32/lib/pci/writex.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/lib/pci')
-rw-r--r--com32/lib/pci/writex.c79
1 files changed, 39 insertions, 40 deletions
diff --git a/com32/lib/pci/writex.c b/com32/lib/pci/writex.c
index d5a53c0f..14b20380 100644
--- a/com32/lib/pci/writex.c
+++ b/com32/lib/pci/writex.c
@@ -1,50 +1,49 @@
#include "pci/pci.h"
-void BWL(pci_write) (TYPE v, pciaddr_t a)
-{
- for (;;) {
- switch ( __pci_cfg_type ) {
- case PCI_CFG_AUTO:
- pci_set_config_type(PCI_CFG_AUTO);
- break; /* Try again */
+void BWL(pci_write) (TYPE v, pciaddr_t a) {
+ 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);
- BWL(out) (v, 0xcfc + (a & 3));
- outl(oldcf8, 0xcf8);
- sti();
- }
- return;
+ case PCI_CFG_TYPE1:
+ {
+ uint32_t oldcf8;
+ cli();
+ oldcf8 = inl(0xcf8);
+ outl(a, 0xcf8);
+ BWL(out) (v, 0xcfc + (a & 3));
+ outl(oldcf8, 0xcf8);
+ sti();
+ }
+ return;
- case PCI_CFG_TYPE2:
- {
- uint8_t oldcf8, oldcfa;
+ case PCI_CFG_TYPE2:
+ {
+ uint8_t oldcf8, oldcfa;
- if ( a & (0x10 << 11) )
- return; /* Devices 16-31 not supported */
+ if (a & (0x10 << 11))
+ return; /* Devices 16-31 not supported */
- cli();
- oldcf8 = inb(0xcf8);
- oldcfa = inb(0xcfa);
- outb(0xf0 + ((a >> (8-1)) & 0x0e), 0xcf8);
- outb(a >> 16, 0xcfa);
- BWL(out) (v, 0xc000 + ((a >> (11-8)) & 0xf00) + (a & 0xff));
- outb(oldcf8, 0xcf8);
- outb(oldcfa, 0xcfa);
- sti();
- }
- return;
+ cli();
+ oldcf8 = inb(0xcf8);
+ oldcfa = inb(0xcfa);
+ outb(0xf0 + ((a >> (8 - 1)) & 0x0e), 0xcf8);
+ outb(a >> 16, 0xcfa);
+ BWL(out) (v, 0xc000 + ((a >> (11 - 8)) & 0xf00) + (a & 0xff));
+ outb(oldcf8, 0xcf8);
+ outb(oldcfa, 0xcfa);
+ sti();
+ }
+ return;
- case PCI_CFG_BIOS:
- __pci_write_bios(BIOSCALL, v, a);
- return;
+ case PCI_CFG_BIOS:
+ __pci_write_bios(BIOSCALL, v, a);
+ return;
- default:
- return;
+ default:
+ return;
+ }
}
- }
}