aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/via/vx900/sata.c
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2015-01-05 12:59:54 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-01-06 20:15:02 +0100
commit65b72ab55d7dff1f13cdf495d345e04e634b97ac (patch)
tree11771914bc4459d7cf9e020ff4489e9bb6a81e75 /src/northbridge/via/vx900/sata.c
parentd42c9dae8528594b2ab8534d061c118c15e92d3d (diff)
northbridge: Drop print_ implementation from non-romcc boards
Because we had no stack on romcc boards, we had a separate, not as powerful clone of printk: print_*. Back in the day, like more than half a decade ago, we migrated a lot of boards to printk, but we never cleaned up the existing code to be consistent. instead, we worked around the problem with a very messy console.h (nowadays the mess is hidden in romstage_console.c and early_print.h) This patch cleans up the northbridge code to use printk() on all non-ROMCC boards. Change-Id: I4a36cd965c58aae65d74ce1e697dc0d0f58f47a1 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/7856 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/via/vx900/sata.c')
-rw-r--r--src/northbridge/via/vx900/sata.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/northbridge/via/vx900/sata.c b/src/northbridge/via/vx900/sata.c
index 63295e56c3..c5f36a8fdd 100644
--- a/src/northbridge/via/vx900/sata.c
+++ b/src/northbridge/via/vx900/sata.c
@@ -44,47 +44,47 @@ static void vx900_print_sata_errors(u32 flags)
(flags & (1 << 27)) ? "detected" : "not detected");
/* Errors */
if (flags & (1 << 0))
- print_debug("\tRecovered data integrity ERROR\n");
+ printk(BIOS_DEBUG, "\tRecovered data integrity ERROR\n");
if (flags & (1 << 1))
- print_debug("\tRecovered data communication ERROR\n");
+ printk(BIOS_DEBUG, "\tRecovered data communication ERROR\n");
if (flags & (1 << 8))
- print_debug("\tNon-recovered Transient Data Integrity ERROR\n");
+ printk(BIOS_DEBUG, "\tNon-recovered Transient Data Integrity ERROR\n");
if (flags & (1 << 9))
- print_debug("\tNon-recovered Persistent Communication or"
+ printk(BIOS_DEBUG, "\tNon-recovered Persistent Communication or"
"\tData Integrity ERROR\n");
if (flags & (1 << 10))
- print_debug("\tProtocol ERROR\n");
+ printk(BIOS_DEBUG, "\tProtocol ERROR\n");
if (flags & (1 << 11))
- print_debug("\tInternal ERROR\n");
+ printk(BIOS_DEBUG, "\tInternal ERROR\n");
if (flags & (1 << 17))
- print_debug("\tPHY Internal ERROR\n");
+ printk(BIOS_DEBUG, "\tPHY Internal ERROR\n");
if (flags & (1 << 19))
- print_debug("\t10B to 8B Decode ERROR\n");
+ printk(BIOS_DEBUG, "\t10B to 8B Decode ERROR\n");
if (flags & (1 << 20))
- print_debug("\tDisparity ERROR\n");
+ printk(BIOS_DEBUG, "\tDisparity ERROR\n");
if (flags & (1 << 21))
- print_debug("\tCRC ERROR\n");
+ printk(BIOS_DEBUG, "\tCRC ERROR\n");
if (flags & (1 << 22))
- print_debug("\tHandshake ERROR\n");
+ printk(BIOS_DEBUG, "\tHandshake ERROR\n");
if (flags & (1 << 23))
- print_debug("\tLink Sequence ERROR\n");
+ printk(BIOS_DEBUG, "\tLink Sequence ERROR\n");
if (flags & (1 << 24))
- print_debug("\tTransport State Transition ERROR\n");
+ printk(BIOS_DEBUG, "\tTransport State Transition ERROR\n");
if (flags & (1 << 25))
- print_debug("\tUNRECOGNIZED FIS type\n");
+ printk(BIOS_DEBUG, "\tUNRECOGNIZED FIS type\n");
}
static void vx900_dbg_sata_errors(device_t dev)
{
/* Port 0 */
if (pci_read_config8(dev, 0xa0) & (1 << 0)) {
- print_debug("Device detected in SATA port 0.\n");
+ printk(BIOS_DEBUG, "Device detected in SATA port 0.\n");
u32 flags = pci_read_config32(dev, 0xa8);
vx900_print_sata_errors(flags);
};
/* Port 1 */
if (pci_read_config8(dev, 0xa1) & (1 << 0)) {
- print_debug("Device detected in SATA port 1.\n");
+ printk(BIOS_DEBUG, "Device detected in SATA port 1.\n");
u32 flags = pci_read_config32(dev, 0xac);
vx900_print_sata_errors(flags);
};
@@ -147,21 +147,18 @@ static void vx900_sata_write_phy_config(device_t dev, sata_phy_config cfg)
static void vx900_sata_dump_phy_config(sata_phy_config cfg)
{
- print_debug("SATA PHY config:\n");
+ printk(BIOS_DEBUG, "SATA PHY config:\n");
int i;
for (i = 0; i < sizeof(sata_phy_config); i++) {
unsigned char val;
- if ((i & 0x0f) == 0) {
- print_debug_hex8(i);
- print_debug_char(':');
- }
+ if ((i & 0x0f) == 0)
+ printk(BIOS_DEBUG, "%02x:", i);
val = cfg[i];
if ((i & 7) == 0)
- print_debug(" |");
- print_debug_char(' ');
- print_debug_hex8(val);
+ printk(BIOS_DEBUG, " |");
+ printk(BIOS_DEBUG, " %02x", val);
if ((i & 0x0f) == 0x0f) {
- print_debug("\n");
+ printk(BIOS_DEBUG, "\n");
}
}
}