summaryrefslogtreecommitdiff
path: root/src/mainboard/iei/nova4899r/debug.c
diff options
context:
space:
mode:
authorLuis Correia <luis.f.correia@gmail.com>2006-11-26 19:05:16 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2006-11-26 19:05:16 +0000
commit3e15652a103bbe703064e3beea6171c58ca2a5e1 (patch)
treea681ea7edc190e426422f651721959e5d9a9d80f /src/mainboard/iei/nova4899r/debug.c
parent98b75f0e2426c3a0ced242b07bb1afdde0bb5f18 (diff)
Add support for the IEI NOVA-4899R 5.25 SBC mainboard (patch submitted by
Luis Correia <luis.f.correia@gmail.com>). The code is loosely based on the Eaglelion 5bcm mainboard. Warning: this is work in progress! As of now, it does boot with serial console only (no vga), and two ethernet cards work sometimes. This has to do with the IRQ assignments, which are a complete mess. USB is now apparently working, but I can't make any device to be recognized. The PCI slot is still unusable due to the IRQ thing. Audio, other serial ports, irda, floppy and paralell port support is unknown aka untested yet. (closes #32) Signed-off-by: Luis Correia <luis.f.correia@gmail.com> Acked-by: Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2508 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/iei/nova4899r/debug.c')
-rw-r--r--src/mainboard/iei/nova4899r/debug.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/mainboard/iei/nova4899r/debug.c b/src/mainboard/iei/nova4899r/debug.c
new file mode 100644
index 0000000000..7eeabdef47
--- /dev/null
+++ b/src/mainboard/iei/nova4899r/debug.c
@@ -0,0 +1,66 @@
+
+static void print_debug_pci_dev(unsigned dev)
+{
+ print_debug("PCI: ");
+ print_debug_hex8((dev >> 16) & 0xff);
+ print_debug_char(':');
+ print_debug_hex8((dev >> 11) & 0x1f);
+ print_debug_char('.');
+ print_debug_hex8((dev >> 8) & 7);
+}
+
+static void print_pci_devices(void)
+{
+ device_t dev;
+ for(dev = PCI_DEV(0, 0, 0);
+ dev <= PCI_DEV(0, 0x1f, 0x7);
+ dev += PCI_DEV(0,0,1)) {
+ uint32_t id;
+ id = pci_read_config32(dev, PCI_VENDOR_ID);
+ if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
+ (((id >> 16) & 0xffff) == 0xffff) ||
+ (((id >> 16) & 0xffff) == 0x0000)) {
+ continue;
+ }
+ print_debug_pci_dev(dev);
+ print_debug("\r\n");
+ }
+}
+
+static void dump_pci_device(unsigned dev)
+{
+ int i;
+ print_debug_pci_dev(dev);
+ print_debug("\r\n");
+
+ for(i = 0; i <= 255; i++) {
+ unsigned char val;
+ if ((i & 0x0f) == 0) {
+ print_debug_hex8(i);
+ print_debug_char(':');
+ }
+ val = pci_read_config8(dev, i);
+ print_debug_char(' ');
+ print_debug_hex8(val);
+ if ((i & 0x0f) == 0x0f) {
+ print_debug("\r\n");
+ }
+ }
+}
+
+static void dump_pci_devices(void)
+{
+ device_t dev;
+ for(dev = PCI_DEV(0, 0, 0);
+ dev <= PCI_DEV(0, 0x1f, 0x7);
+ dev += PCI_DEV(0,0,1)) {
+ uint32_t id;
+ id = pci_read_config32(dev, PCI_VENDOR_ID);
+ if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) ||
+ (((id >> 16) & 0xffff) == 0xffff) ||
+ (((id >> 16) & 0xffff) == 0x0000)) {
+ continue;
+ }
+ dump_pci_device(dev);
+ }
+}