summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-31 14:47:43 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-31 14:47:43 +0000
commit64ed2b73451de4b655b3fdda0ff42825a165c317 (patch)
tree0faaae313a9a9edbf8b33f56fc18830ba14aa75f /src/lib
parent5a1f5970857a5ad1fda0cf9d5945192408bf537b (diff)
downloadcoreboot-64ed2b73451de4b655b3fdda0ff42825a165c317.tar.xz
Drop \r\n and \n\r as both print_XXX and printk now do this internally.
Only some assembler files still have \r\n ... Can we move that part to C completely? Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5342 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/debug.c6
-rw-r--r--src/lib/generic_dump_spd.c14
-rw-r--r--src/lib/generic_sdram.c6
-rw-r--r--src/lib/ramtest.c36
4 files changed, 31 insertions, 31 deletions
diff --git a/src/lib/debug.c b/src/lib/debug.c
index 7eeabdef47..ab7c1f8562 100644
--- a/src/lib/debug.c
+++ b/src/lib/debug.c
@@ -23,7 +23,7 @@ static void print_pci_devices(void)
continue;
}
print_debug_pci_dev(dev);
- print_debug("\r\n");
+ print_debug("\n");
}
}
@@ -31,7 +31,7 @@ static void dump_pci_device(unsigned dev)
{
int i;
print_debug_pci_dev(dev);
- print_debug("\r\n");
+ print_debug("\n");
for(i = 0; i <= 255; i++) {
unsigned char val;
@@ -43,7 +43,7 @@ static void dump_pci_device(unsigned dev)
print_debug_char(' ');
print_debug_hex8(val);
if ((i & 0x0f) == 0x0f) {
- print_debug("\r\n");
+ print_debug("\n");
}
}
}
diff --git a/src/lib/generic_dump_spd.c b/src/lib/generic_dump_spd.c
index b4ff598612..2fe1ea305b 100644
--- a/src/lib/generic_dump_spd.c
+++ b/src/lib/generic_dump_spd.c
@@ -6,7 +6,7 @@
static void dump_spd_registers(const struct mem_controller *ctrl)
{
int i;
- print_debug("\r\n");
+ print_debug("\n");
for(i = 0; i < 4; i++) {
unsigned device;
device = ctrl->channel0[i];
@@ -20,20 +20,20 @@ static void dump_spd_registers(const struct mem_controller *ctrl)
int status;
unsigned char byte;
if ((j & 0xf) == 0) {
- print_debug("\r\n");
+ print_debug("\n");
print_debug_hex8(j);
print_debug(": ");
}
status = spd_read_byte(device, j);
if (status < 0) {
- print_debug("bad device\r\n");
+ print_debug("bad device\n");
break;
}
byte = status & 0xff;
print_debug_hex8(byte);
print_debug_char(' ');
}
- print_debug("\r\n");
+ print_debug("\n");
}
device = ctrl->channel1[i];
if (device) {
@@ -46,20 +46,20 @@ static void dump_spd_registers(const struct mem_controller *ctrl)
int status;
unsigned char byte;
if ((j & 0xf) == 0) {
- print_debug("\r\n");
+ print_debug("\n");
print_debug_hex8(j);
print_debug(": ");
}
status = spd_read_byte(device, j);
if (status < 0) {
- print_debug("bad device\r\n");
+ print_debug("bad device\n");
break;
}
byte = status & 0xff;
print_debug_hex8(byte);
print_debug_char(' ');
}
- print_debug("\r\n");
+ print_debug("\n");
}
}
}
diff --git a/src/lib/generic_sdram.c b/src/lib/generic_sdram.c
index 79b501f9a4..edecc06850 100644
--- a/src/lib/generic_sdram.c
+++ b/src/lib/generic_sdram.c
@@ -9,7 +9,7 @@ static inline void print_debug_sdram_8(const char *strval, uint32_t val)
#if CONFIG_USE_PRINTK_IN_CAR
printk(BIOS_DEBUG, "%s%02x\n", strval, val);
#else
- print_debug(strval); print_debug_hex8(val); print_debug("\r\n");
+ print_debug(strval); print_debug_hex8(val); print_debug("\n");
#endif
}
@@ -48,7 +48,7 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
* Some chipsets do the work for us while on others
* we need to it by hand.
*/
- print_debug("Ram3\r\n");
+ print_debug("Ram3\n");
#if RAMINIT_SYSINFO == 1
sdram_enable(controllers, ctrl, sysinfo);
@@ -56,5 +56,5 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
sdram_enable(controllers, ctrl);
#endif
- print_debug("Ram4\r\n");
+ print_debug("Ram4\n");
}
diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c
index a43101235b..605d555e46 100644
--- a/src/lib/ramtest.c
+++ b/src/lib/ramtest.c
@@ -52,13 +52,13 @@ static void ram_fill(unsigned long start, unsigned long stop)
* Fill.
*/
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "DRAM fill: 0x%08lx-0x%08lx\r\n", start, stop);
+ printk(BIOS_DEBUG, "DRAM fill: 0x%08lx-0x%08lx\n", start, stop);
#else
print_debug("DRAM fill: ");
print_debug_hex32(start);
print_debug("-");
print_debug_hex32(stop);
- print_debug("\r\n");
+ print_debug("\n");
#endif
for(addr = start; addr < stop ; addr += 4) {
/* Display address being filled */
@@ -74,10 +74,10 @@ static void ram_fill(unsigned long start, unsigned long stop)
};
/* Display final address */
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "%08lx\r\nDRAM filled\r\n", addr);
+ printk(BIOS_DEBUG, "%08lx\nDRAM filled\n", addr);
#else
print_debug_hex32(addr);
- print_debug("\r\nDRAM filled\r\n");
+ print_debug("\nDRAM filled\n");
#endif
}
@@ -89,13 +89,13 @@ static void ram_verify(unsigned long start, unsigned long stop)
* Verify.
*/
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "DRAM verify: 0x%08lx-0x%08lx\r\n", start, stop);
+ printk(BIOS_DEBUG, "DRAM verify: 0x%08lx-0x%08lx\n", start, stop);
#else
print_debug("DRAM verify: ");
print_debug_hex32(start);
print_debug_char('-');
print_debug_hex32(stop);
- print_debug("\r\n");
+ print_debug("\n");
#endif
for(addr = start; addr < stop ; addr += 4) {
unsigned long value;
@@ -112,20 +112,20 @@ static void ram_verify(unsigned long start, unsigned long stop)
if (value != addr) {
/* Display address with error */
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_ERR, "Fail: @0x%08lx Read value=0x%08lx\r\n", addr, value);
+ printk(BIOS_ERR, "Fail: @0x%08lx Read value=0x%08lx\n", addr, value);
#else
print_err("Fail: @0x");
print_err_hex32(addr);
print_err(" Read value=0x");
print_err_hex32(value);
- print_err("\r\n");
+ print_err("\n");
#endif
i++;
if(i>256) {
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "Aborting.\n\r");
+ printk(BIOS_DEBUG, "Aborting.\n");
#else
- print_debug("Aborting.\n\r");
+ print_debug("Aborting.\n");
#endif
break;
}
@@ -140,17 +140,17 @@ static void ram_verify(unsigned long start, unsigned long stop)
if (i) {
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "\r\nDRAM did _NOT_ verify!\r\n");
+ printk(BIOS_DEBUG, "\nDRAM did _NOT_ verify!\n");
#else
- print_debug("\r\nDRAM did _NOT_ verify!\r\n");
+ print_debug("\nDRAM did _NOT_ verify!\n");
#endif
die("DRAM ERROR");
}
else {
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "\r\nDRAM range verified.\r\n");
+ printk(BIOS_DEBUG, "\nDRAM range verified.\n");
#else
- print_debug("\r\nDRAM range verified.\r\n");
+ print_debug("\nDRAM range verified.\n");
#endif
}
}
@@ -164,22 +164,22 @@ void ram_check(unsigned long start, unsigned long stop)
* are tested. -Tyson
*/
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "Testing DRAM : %08lx - %08lx\r\n", start, stop);
+ printk(BIOS_DEBUG, "Testing DRAM : %08lx - %08lx\n", start, stop);
#else
print_debug("Testing DRAM : ");
print_debug_hex32(start);
print_debug("-");
print_debug_hex32(stop);
- print_debug("\r\n");
+ print_debug("\n");
#endif
ram_fill(start, stop);
/* Make sure we don't read before we wrote */
phys_memory_barrier();
ram_verify(start, stop);
#if CONFIG_USE_PRINTK_IN_CAR
- printk(BIOS_DEBUG, "Done.\r\n");
+ printk(BIOS_DEBUG, "Done.\n");
#else
- print_debug("Done.\r\n");
+ print_debug("Done.\n");
#endif
}