From 5ab52ddc3dc289267b603c0a348c461d336aeaf5 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 5 Jan 2015 13:01:01 -0800 Subject: southbridge: 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 southbridge code to use printk() on all non-ROMCC boards. Change-Id: I312406257e66bbdc3940e206b5256460559a2c98 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/8110 Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- src/southbridge/via/k8t890/early_car.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'src/southbridge/via/k8t890/early_car.c') diff --git a/src/southbridge/via/k8t890/early_car.c b/src/southbridge/via/k8t890/early_car.c index d7049ae3ba..7eba967a73 100644 --- a/src/southbridge/via/k8t890/early_car.c +++ b/src/southbridge/via/k8t890/early_car.c @@ -80,23 +80,23 @@ u8 k8t890_early_setup_ht(void) } #if CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8M800 - print_debug("K8M800 found at LDT "); + printk(BIOS_DEBUG, "K8M800 found at LDT "); #elif CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8T800 - print_debug("K8T800 found at LDT "); + printk(BIOS_DEBUG, "K8T800 found at LDT "); #elif CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8T800_OLD - print_debug("K8T800_OLD found at LDT "); + printk(BIOS_DEBUG, "K8T800_OLD found at LDT "); pci_write_config8(PCI_DEV(0, 0x0, 0), 0x64, 0x00); pci_write_config8(PCI_DEV(0, 0x0, 0), 0xdd, 0x50); #elif CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8T800PRO - print_debug("K8T800 Pro found at LDT "); + printk(BIOS_DEBUG, "K8T800 Pro found at LDT "); #elif CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8M890 - print_debug("K8M890 found at LDT "); + printk(BIOS_DEBUG, "K8M890 found at LDT "); /* K8M890 fix HT delay */ pci_write_config8(PCI_DEV(0, 0x0, 2), 0xab, 0x22); #elif CONFIG_SOUTHBRIDGE_VIA_SUBTYPE_K8T890 - print_debug("K8T890 found at LDT "); + printk(BIOS_DEBUG, "K8T890 found at LDT "); #endif - print_debug_hex8(ldtnr); + printk(BIOS_DEBUG, "%02x", ldtnr); /* get the maximum widths for both sides */ cldtwidth_in = pci_read_config8(PCI_DEV(0, 0x18, 0), ldtreg[ldtnr]) & 0x7; @@ -105,8 +105,7 @@ u8 k8t890_early_setup_ht(void) vldtwidth_out = (pci_read_config8(PCI_DEV(0, 0x0, 0), K8X8XX_HT_CFG_BASE + 0x6) >> 4) & 0x7; width = MIN(MIN(MIN(cldtwidth_out, cldtwidth_in), vldtwidth_out), vldtwidth_in); - print_debug(" Agreed on width: "); - print_debug_hex8(width); + printk(BIOS_DEBUG, " Agreed on width: %02x", width); awidth = pci_read_config8(PCI_DEV(0, 0x0, 0), K8X8XX_HT_CFG_BASE + 0x7); @@ -117,12 +116,10 @@ u8 k8t890_early_setup_ht(void) /* Get programmed HT freq at base 0x89 */ cldtfreq = pci_read_config8(PCI_DEV(0, 0x18, 0), ldtreg[ldtnr] + 3) & 0xf; - print_debug(" CPU programmed to HT freq: "); - print_debug_hex8(cldtfreq); + printk(BIOS_DEBUG, " CPU programmed to HT freq: %02x", cldtfreq); - print_debug(" VIA HT caps: "); vldtcaps = pci_read_config16(PCI_DEV(0, 0, 0), K8X8XX_HT_CFG_BASE + 0xe); - print_debug_hex16(vldtcaps); + printk(BIOS_DEBUG, " VIA HT caps: %04x", vldtcaps); if (!(vldtcaps & (1 << cldtfreq ))) { die("Chipset does not support desired HT frequency\n"); @@ -130,7 +127,7 @@ u8 k8t890_early_setup_ht(void) afreq = pci_read_config8(PCI_DEV(0, 0x0, 0), K8X8XX_HT_CFG_BASE + 0xd); pci_write_config8(PCI_DEV(0, 0x0, 0), K8X8XX_HT_CFG_BASE + 0xd, cldtfreq); - print_debug("\n"); + printk(BIOS_DEBUG, "\n"); /* no reset needed */ if ((width == awidth) && (afreq == cldtfreq)) { -- cgit v1.2.3