summaryrefslogtreecommitdiff
path: root/util/flashrom/chipset_enable.c
diff options
context:
space:
mode:
authorAndriy Gapon <avg@icyb.net.ua>2008-05-22 13:22:45 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2008-05-22 13:22:45 +0000
commit4b1cde877c39cbab29fffa28a5654958c07b723c (patch)
tree6d4f95cc5d08955cc7b8c53b702a32516bf4573b /util/flashrom/chipset_enable.c
parent42319797a68f873b142dc26cd1f4031c9ba52fcf (diff)
Changes to make flashrom compile (and work) on FreeBSD.
This patch addresses different argument order of outX() calls, FreeBSD-specific headers, difference in certain type names and system interface names, and also FreeBSD-specific way of gaining IO port access. Signed-off-by: Andriy Gapon <avg@icyb.net.ua> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3344 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/chipset_enable.c')
-rw-r--r--util/flashrom/chipset_enable.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/util/flashrom/chipset_enable.c b/util/flashrom/chipset_enable.c
index 8dca68f773..1ab9a24b00 100644
--- a/util/flashrom/chipset_enable.c
+++ b/util/flashrom/chipset_enable.c
@@ -65,37 +65,37 @@ static int enable_flash_sis630(struct pci_dev *dev, const char *name)
/* The same thing on SiS 950 Super I/O side... */
/* First probe for Super I/O on config port 0x2e. */
- outb(0x87, 0x2e);
- outb(0x01, 0x2e);
- outb(0x55, 0x2e);
- outb(0x55, 0x2e);
+ OUTB(0x87, 0x2e);
+ OUTB(0x01, 0x2e);
+ OUTB(0x55, 0x2e);
+ OUTB(0x55, 0x2e);
- if (inb(0x2f) != 0x87) {
+ if (INB(0x2f) != 0x87) {
/* If that failed, try config port 0x4e. */
- outb(0x87, 0x4e);
- outb(0x01, 0x4e);
- outb(0x55, 0x4e);
- outb(0xaa, 0x4e);
- if (inb(0x4f) != 0x87) {
+ OUTB(0x87, 0x4e);
+ OUTB(0x01, 0x4e);
+ OUTB(0x55, 0x4e);
+ OUTB(0xaa, 0x4e);
+ if (INB(0x4f) != 0x87) {
printf("Can not access SiS 950\n");
return -1;
}
- outb(0x24, 0x4e);
- b = inb(0x4f) | 0xfc;
- outb(0x24, 0x4e);
- outb(b, 0x4f);
- outb(0x02, 0x4e);
- outb(0x02, 0x4f);
+ OUTB(0x24, 0x4e);
+ b = INB(0x4f) | 0xfc;
+ OUTB(0x24, 0x4e);
+ OUTB(b, 0x4f);
+ OUTB(0x02, 0x4e);
+ OUTB(0x02, 0x4f);
}
- outb(0x24, 0x2e);
- printf("2f is %#x\n", inb(0x2f));
- b = inb(0x2f) | 0xfc;
- outb(0x24, 0x2e);
- outb(b, 0x2f);
+ OUTB(0x24, 0x2e);
+ printf("2f is %#x\n", INB(0x2f));
+ b = INB(0x2f) | 0xfc;
+ OUTB(0x24, 0x2e);
+ OUTB(b, 0x2f);
- outb(0x02, 0x2e);
- outb(0x02, 0x2f);
+ OUTB(0x02, 0x2e);
+ OUTB(0x02, 0x2f);
return 0;
}
@@ -522,13 +522,13 @@ static int enable_flash_sb400(struct pci_dev *dev, const char *name)
pci_write_byte(dev, 0x48, tmp);
/* Now become a bit silly. */
- tmp = inb(0xc6f);
- outb(tmp, 0xeb);
- outb(tmp, 0xeb);
+ tmp = INB(0xc6f);
+ OUTB(tmp, 0xeb);
+ OUTB(tmp, 0xeb);
tmp |= 0x40;
- outb(tmp, 0xc6f);
- outb(tmp, 0xeb);
- outb(tmp, 0xeb);
+ OUTB(tmp, 0xc6f);
+ OUTB(tmp, 0xeb);
+ OUTB(tmp, 0xeb);
return 0;
}