summaryrefslogtreecommitdiff
path: root/payloads/coreinfo
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-08-04 21:02:07 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-08-04 21:02:07 +0000
commit754edf712cc5ee4a8014dc115ee18bb9126cbb64 (patch)
tree0f7f1bcdd1158cd6cbae0c3f021019410ab43dcf /payloads/coreinfo
parent83233d0a15fd7a03026e50441383d3de86a49294 (diff)
downloadcoreboot-754edf712cc5ee4a8014dc115ee18bb9126cbb64.tar.xz
Remove duplicated code which is already in libpayload (trivial).
Build-tested against the latest libpayload. 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@3471 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/coreinfo')
-rw-r--r--payloads/coreinfo/pci_module.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/payloads/coreinfo/pci_module.c b/payloads/coreinfo/pci_module.c
index 49523f55bc..3e05b8bd54 100644
--- a/payloads/coreinfo/pci_module.c
+++ b/payloads/coreinfo/pci_module.c
@@ -18,6 +18,7 @@
*/
#include <arch/io.h>
+#include <libpayload.h>
#include "coreinfo.h"
#ifdef CONFIG_MODULE_PCI
@@ -30,17 +31,6 @@ struct pci_devices {
static struct pci_devices devices[64];
static int devices_index;
-#define REG_VENDOR_ID 0x00
-#define REG_HEADER_TYPE 0x0e
-#define REG_PRIMARY_BUS 0x18
-
-#define HEADER_TYPE_NORMAL 0
-#define HEADER_TYPE_BRIDGE 1
-#define HEADER_TYPE_CARDBUS 2
-
-#define PCI_ADDR(_bus, _dev, _reg) \
- (0x80000000 | (_bus << 16) | (_dev << 8) | (_reg & ~3))
-
/* Number of entries to show in the list */
#define MENU_VISIBLE 16
@@ -94,20 +84,6 @@ static void quicksort(struct pci_devices *list, int len)
quicksort(&(list[index]), len - index);
}
-static void pci_read_dword(unsigned int bus, unsigned int devfn,
- unsigned int reg, unsigned int *val)
-{
- outl(PCI_ADDR(bus, devfn, reg), 0xcf8);
- *val = inl(0xcfc);
-}
-
-static void pci_read_byte(unsigned int bus, unsigned int devfn,
- unsigned int reg, unsigned char *val)
-{
- outl(PCI_ADDR(bus, devfn, reg), 0xcf8);
- *val = inb(0xcfc + (reg & 3));
-}
-
static void show_config_space(WINDOW *win, int row, int col, int index)
{
unsigned char cspace[64];