nb/intel/i440bx/debug.c: Bugfix and cleanup
Fix dump_pci_device() broken by commit65b72ab5
(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 commitaef8542
(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:
parent
28e02556c1
commit
f516dd8b40
|
@ -2,10 +2,7 @@
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <spd.h>
|
#include <spd.h>
|
||||||
#include "raminit.h"
|
#include "raminit.h"
|
||||||
#include <spd.h>
|
|
||||||
#include <console/console.h>
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)
|
|
||||||
void dump_spd_registers(void)
|
void dump_spd_registers(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -44,9 +41,9 @@ void dump_pci_device(unsigned dev)
|
||||||
unsigned char val;
|
unsigned char val;
|
||||||
val = pci_read_config8(dev, i);
|
val = pci_read_config8(dev, i);
|
||||||
if ((i & 0x0f) == 0)
|
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)
|
if ((i & 0x0f) == 0x0f)
|
||||||
printk(BIOS_DEBUG, "\n");
|
printk(BIOS_DEBUG, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in New Issue