Drop tons of duplicated debug.c files, move common file to
authorUwe Hermann <uwe@hermann-uwe.de>
Sun, 12 Oct 2008 22:34:08 +0000 (22:34 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Sun, 12 Oct 2008 22:34:08 +0000 (22:34 +0000)
lib/debug.c and use that one.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3653 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

33 files changed:
src/lib/debug.c [new file with mode: 0644]
src/mainboard/a-trend/atc-6220/auto.c
src/mainboard/a-trend/atc-6240/auto.c
src/mainboard/abit/be6-ii_v2_0/auto.c
src/mainboard/amd/rumba/debug.c [deleted file]
src/mainboard/artecgroup/dbe61/debug.c [deleted file]
src/mainboard/asus/mew-am/auto.c
src/mainboard/asus/mew-vm/auto.c
src/mainboard/asus/mew-vm/debug.c [deleted file]
src/mainboard/asus/p2b-f/auto.c
src/mainboard/asus/p2b/auto.c
src/mainboard/asus/p3b-f/auto.c
src/mainboard/azza/pt-6ibd/auto.c
src/mainboard/biostar/m6tba/auto.c
src/mainboard/compaq/deskpro_en_sff_p600/auto.c
src/mainboard/digitallogic/adl855pc/debug.c [deleted file]
src/mainboard/digitallogic/msm800sev/debug.c [deleted file]
src/mainboard/eaglelion/5bcm/auto.c
src/mainboard/eaglelion/5bcm/debug.c [deleted file]
src/mainboard/emulation/qemu-x86/auto.c
src/mainboard/emulation/qemu-x86/debug.c [deleted file]
src/mainboard/gigabyte/ga-6bxc/auto.c
src/mainboard/lippert/frontrunner/debug.c [deleted file]
src/mainboard/msi/ms6119/auto.c
src/mainboard/olpc/btest/debug.c [deleted file]
src/mainboard/olpc/rev_a/debug.c [deleted file]
src/mainboard/tyan/s1846/auto.c
src/mainboard/via/epia-m/auto.c
src/mainboard/via/epia-m/debug.c [deleted file]
src/mainboard/via/epia/auto.c
src/mainboard/via/epia/debug.c [deleted file]
src/northbridge/intel/i82830/debug.c [deleted file]
src/northbridge/intel/i82830/raminit.c

diff --git a/src/lib/debug.c b/src/lib/debug.c
new file mode 100644 (file)
index 0000000..7eeabde
--- /dev/null
@@ -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);
+       }
+}
index 22ac2027d9c9a48c37097b2e9ff709391e00e2cd..a387063a4eae5d30c02bd891b286408ae2be56af 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index b67f23faf95b6d02cd9714353ed28f7de55abe55..4ae17511340cf09781edc30967be0f5a21600b0e 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index a2e22b06fe003f774a23d83019d14c3c94f612a2..f29311e21e78a81e60295a170e30e796619efd40 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
diff --git a/src/mainboard/amd/rumba/debug.c b/src/mainboard/amd/rumba/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
diff --git a/src/mainboard/artecgroup/dbe61/debug.c b/src/mainboard/artecgroup/dbe61/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index 56b5c34fc59bdd70e55e9a3f990cd1f8e2f98594..22cb164d370f4c0d21c960d1e258ff3308654c03 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82801xx/i82801xx_early_smbus.c"
 #include "northbridge/intel/i82810/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 133b399de2b824e79b1842b205056330775bc210..b0874e20699ab3482fcd7948ffbff933d0e7e772 100644 (file)
@@ -47,7 +47,7 @@ void udelay(int usecs)
                outb(i&0xff, 0x80);
 }
 
-#include "debug.c"
+#include "lib/debug.c"
 #include "lib/delay.c"
 
 #include "northbridge/intel/i82810/raminit.c"
diff --git a/src/mainboard/asus/mew-vm/debug.c b/src/mainboard/asus/mew-vm/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index acb3c2fb9fe5f0b7a4bad44afaf5a3af128203ee..96bb9141615918478d2f4530f6bb14f962b36c7b 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 22ac2027d9c9a48c37097b2e9ff709391e00e2cd..a387063a4eae5d30c02bd891b286408ae2be56af 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 5de70fb52138893027f03d7882d5cb6ab3e29934..413b4f3cd8666718d7aba51b7bfc7b10c0949f8d 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 4d9f8f787abdea86e67eacd30c161286cc7b0ed5..55a1ace7eb31af96e10948e072e16e53ffdfbe67 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 48e41f8f9f37fd02407c9363f7acce0c46cfc314..05220fc14dfeadc48675bd3ade83db4745f6b19c 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 658151a86c76b68bdad08d53e5c933a44b1a0c42..773c51c0660fe2273137b3f51294266b452490db 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
diff --git a/src/mainboard/digitallogic/adl855pc/debug.c b/src/mainboard/digitallogic/adl855pc/debug.c
deleted file mode 100644 (file)
index 714fcc5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-
-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);
-       }
-}
-#if 0
-static void dump_spd_registers(const struct mem_controller *ctrl)
-{
-       int i;
-       print_debug("\r\n");
-       for(i = 0; i < 4; i++) {
-               unsigned device;
-               device = ctrl->channel0[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".0: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-               device = ctrl->channel1[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".1: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-       }
-}
-#endif
diff --git a/src/mainboard/digitallogic/msm800sev/debug.c b/src/mainboard/digitallogic/msm800sev/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index ba7f77fcba8fe009af86c2d6cae32bdfbe0db9c6..b49039773a4ec4c911f481bc32825c9ee3d2e800 100644 (file)
@@ -17,7 +17,6 @@
 
 #define SERIAL_DEV PNP_DEV(0x2e, PC97317_SP1)
 
-//#include "debug.c"
 //#include "lib/delay.c"
 
 #include "northbridge/amd/gx1/raminit.c"
diff --git a/src/mainboard/eaglelion/5bcm/debug.c b/src/mainboard/eaglelion/5bcm/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index d2fa623d68c1fa8833486abdd87a18ef82a073c9..7cf4012134519a9d88b1d1f750b386d3743df13a 100644 (file)
@@ -23,7 +23,6 @@ void udelay(int usecs)
 
 #include "lib/delay.c"
 #include "cpu/x86/lapic/boot_cpu.c"
-#include "debug.c"
 
 static void main(void)
 {
diff --git a/src/mainboard/emulation/qemu-x86/debug.c b/src/mainboard/emulation/qemu-x86/debug.c
deleted file mode 100644 (file)
index 714fcc5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-
-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);
-       }
-}
-#if 0
-static void dump_spd_registers(const struct mem_controller *ctrl)
-{
-       int i;
-       print_debug("\r\n");
-       for(i = 0; i < 4; i++) {
-               unsigned device;
-               device = ctrl->channel0[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".0: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-               device = ctrl->channel1[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".1: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-       }
-}
-#endif
index bfef2cc43ec303a889759dd5ee7a875f5c74c97a..e17800305a12afc141d69d457658232b30ae81d7 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
diff --git a/src/mainboard/lippert/frontrunner/debug.c b/src/mainboard/lippert/frontrunner/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index 0acdbe09791070b5212fbc2bb740412a79d54c90..9ff08d13f3f4d575b6311cac5e11f368dee5884e 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
diff --git a/src/mainboard/olpc/btest/debug.c b/src/mainboard/olpc/btest/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
diff --git a/src/mainboard/olpc/rev_a/debug.c b/src/mainboard/olpc/rev_a/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index d80e23d9a26bc47595406af8f1913d7c740cccc7..9380bd2f7926350c4af57b681a1173b7c2ab391e 100644 (file)
@@ -32,7 +32,7 @@
 #include "ram/ramtest.c"
 #include "southbridge/intel/i82371eb/i82371eb_early_smbus.c"
 #include "northbridge/intel/i440bx/raminit.h"
-#include "mainboard/asus/mew-vm/debug.c"       /* FIXME */
+#include "lib/debug.c"
 #include "pc80/udelay_io.c"
 #include "lib/delay.c"
 #include "cpu/x86/mtrr/earlymtrr.c"
index 1f444d61b774e9da1ac56353720c503421917517..ac50b963739ed7fa8ccbf4c05f0426e088a3734a 100644 (file)
@@ -29,7 +29,7 @@ void udelay(int usecs)
 
 #include "lib/delay.c"
 #include "cpu/x86/lapic/boot_cpu.c"
-#include "debug.c"
+#include "lib/debug.c"
 
 #include "southbridge/via/vt8235/vt8235_early_smbus.c"
 
diff --git a/src/mainboard/via/epia-m/debug.c b/src/mainboard/via/epia-m/debug.c
deleted file mode 100644 (file)
index 714fcc5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-
-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);
-       }
-}
-#if 0
-static void dump_spd_registers(const struct mem_controller *ctrl)
-{
-       int i;
-       print_debug("\r\n");
-       for(i = 0; i < 4; i++) {
-               unsigned device;
-               device = ctrl->channel0[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".0: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-               device = ctrl->channel1[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".1: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-       }
-}
-#endif
index a45a32e6cfadfd48b142e73a6e1896c5fec239a3..fadf5b5363a26425730b9120e2456811cf9d54ce 100644 (file)
@@ -25,7 +25,7 @@ void udelay(int usecs)
 
 #include "lib/delay.c"
 #include "cpu/x86/lapic/boot_cpu.c"
-#include "debug.c"
+#include "lib/debug.c"
 
 #include "southbridge/via/vt8231/vt8231_early_smbus.c"
 #include "southbridge/via/vt8231/vt8231_early_serial.c"
diff --git a/src/mainboard/via/epia/debug.c b/src/mainboard/via/epia/debug.c
deleted file mode 100644 (file)
index 714fcc5..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-
-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);
-       }
-}
-#if 0
-static void dump_spd_registers(const struct mem_controller *ctrl)
-{
-       int i;
-       print_debug("\r\n");
-       for(i = 0; i < 4; i++) {
-               unsigned device;
-               device = ctrl->channel0[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".0: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-               device = ctrl->channel1[i];
-               if (device) {
-                       int j;
-                       print_debug("dimm: "); 
-                       print_debug_hex8(i); 
-                       print_debug(".1: ");
-                       print_debug_hex8(device);
-                       for(j = 0; j < 256; j++) {
-                               int status;
-                               unsigned char byte;
-                               if ((j & 0xf) == 0) {
-                                       print_debug("\r\n");
-                                       print_debug_hex8(j);
-                                       print_debug(": ");
-                               }
-                               status = smbus_read_byte(device, j);
-                               if (status < 0) {
-                                       print_debug("bad device\r\n");
-                                       break;
-                               }
-                               byte = status & 0xff;
-                               print_debug_hex8(byte);
-                               print_debug_char(' ');
-                       }
-                       print_debug("\r\n");
-               }
-       }
-}
-#endif
diff --git a/src/northbridge/intel/i82830/debug.c b/src/northbridge/intel/i82830/debug.c
deleted file mode 100644 (file)
index 7eeabde..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-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);
-       }
-}
index b6e8661745307b2c50df9a0e08b5f45f2b174154..89f828d1dd5d60a5705980f45514475c141ac4fa 100644 (file)
@@ -22,7 +22,7 @@
 #include <spd.h>
 #include <sdram_mode.h>
 #include <delay.h>
-#include "debug.c"
+#include "lib/debug.c"
 #include "i82830.h"
 
 /*-----------------------------------------------------------------------------