nb/intel/i440bx/debug.c: Bugfix and cleanup

Fix dump_pci_device() broken by commit 65b72ab5 (Drop print_ implementation
from non-romcc boards) in 2015 (!) where only one in 16 bytes were being
dumped.

Also remove the #if made redundant by commit aef8542 (Compile debug.c
only if CONFIG_DEBUG_RAM_SETUP) as this whole file is only compiled in
that case.

Also clean up headers that were included twice.

Change-Id: I60e272b29417039feb15540e49d7300f86e5ed21
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/21203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Keith Hui 2017-08-25 12:51:14 -04:00 committed by Kyösti Mälkki
parent 28e02556c1
commit f516dd8b40
1 changed files with 2 additions and 5 deletions

View File

@ -2,10 +2,7 @@
#include <arch/io.h>
#include <spd.h>
#include "raminit.h"
#include <spd.h>
#include <console/console.h>
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
void dump_spd_registers(void)
{
int i;
@ -44,9 +41,9 @@ void dump_pci_device(unsigned dev)
unsigned char val;
val = pci_read_config8(dev, i);
if ((i & 0x0f) == 0)
printk(BIOS_DEBUG, "%02x: %02x", i, val);
printk(BIOS_DEBUG, "%02x:", i);
printk(BIOS_DEBUG, " %02x", val);
if ((i & 0x0f) == 0x0f)
printk(BIOS_DEBUG, "\n");
}
}
#endif