aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/btext.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-30 15:29:03 -0400
committerPaul Mackerras <paulus@samba.org>2008-08-20 02:34:57 -0400
commit542ad5d4ccbaf49f581bacff1af206077189bc30 (patch)
treecdec3449a0e82dccf9132472f90883bf88da1a8e /arch/powerpc/kernel/btext.c
parent01f3880dd8a7fa78c419da2db740cba511ca7798 (diff)
powerpc: Use the common ascii hex helpers
[akpm@linux-foundation.org: exclude prom_init.c] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/btext.c')
-rw-r--r--arch/powerpc/kernel/btext.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index d8f0329b1344..26e58630ed7b 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -442,28 +442,26 @@ void btext_drawtext(const char *c, unsigned int len)
442 442
443void btext_drawhex(unsigned long v) 443void btext_drawhex(unsigned long v)
444{ 444{
445 char *hex_table = "0123456789abcdef";
446
447 if (!boot_text_mapped) 445 if (!boot_text_mapped)
448 return; 446 return;
449#ifdef CONFIG_PPC64 447#ifdef CONFIG_PPC64
450 btext_drawchar(hex_table[(v >> 60) & 0x0000000FUL]); 448 btext_drawchar(hex_asc_hi(v >> 56));
451 btext_drawchar(hex_table[(v >> 56) & 0x0000000FUL]); 449 btext_drawchar(hex_asc_lo(v >> 56));
452 btext_drawchar(hex_table[(v >> 52) & 0x0000000FUL]); 450 btext_drawchar(hex_asc_hi(v >> 48));
453 btext_drawchar(hex_table[(v >> 48) & 0x0000000FUL]); 451 btext_drawchar(hex_asc_lo(v >> 48));
454 btext_drawchar(hex_table[(v >> 44) & 0x0000000FUL]); 452 btext_drawchar(hex_asc_hi(v >> 40));
455 btext_drawchar(hex_table[(v >> 40) & 0x0000000FUL]); 453 btext_drawchar(hex_asc_lo(v >> 40));
456 btext_drawchar(hex_table[(v >> 36) & 0x0000000FUL]); 454 btext_drawchar(hex_asc_hi(v >> 32));
457 btext_drawchar(hex_table[(v >> 32) & 0x0000000FUL]); 455 btext_drawchar(hex_asc_lo(v >> 32));
458#endif 456#endif
459 btext_drawchar(hex_table[(v >> 28) & 0x0000000FUL]); 457 btext_drawchar(hex_asc_hi(v >> 24));
460 btext_drawchar(hex_table[(v >> 24) & 0x0000000FUL]); 458 btext_drawchar(hex_asc_lo(v >> 24));
461 btext_drawchar(hex_table[(v >> 20) & 0x0000000FUL]); 459 btext_drawchar(hex_asc_hi(v >> 16));
462 btext_drawchar(hex_table[(v >> 16) & 0x0000000FUL]); 460 btext_drawchar(hex_asc_lo(v >> 16));
463 btext_drawchar(hex_table[(v >> 12) & 0x0000000FUL]); 461 btext_drawchar(hex_asc_hi(v >> 8));
464 btext_drawchar(hex_table[(v >> 8) & 0x0000000FUL]); 462 btext_drawchar(hex_asc_lo(v >> 8));
465 btext_drawchar(hex_table[(v >> 4) & 0x0000000FUL]); 463 btext_drawchar(hex_asc_hi(v));
466 btext_drawchar(hex_table[(v >> 0) & 0x0000000FUL]); 464 btext_drawchar(hex_asc_lo(v));
467 btext_drawchar(' '); 465 btext_drawchar(' ');
468} 466}
469 467