1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2007. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #include <inttypes.h> |
---|
11 | |
---|
12 | #include <bsp.h> |
---|
13 | |
---|
14 | #if defined(HAS_UBOOT) |
---|
15 | |
---|
16 | #include <bsp/u-boot.h> |
---|
17 | #include <rtems/bspIo.h> |
---|
18 | |
---|
19 | /* |
---|
20 | * Dump U-Boot Board Information Structure |
---|
21 | * |
---|
22 | * u - pointer to information structure |
---|
23 | */ |
---|
24 | void dumpUBootBDInfo( |
---|
25 | bd_t *u |
---|
26 | ) |
---|
27 | { |
---|
28 | if ( u == (bd_t *)1 ) { |
---|
29 | printk( "UBoot BD Info Ptr NOT Set\n" ); |
---|
30 | return; |
---|
31 | } |
---|
32 | |
---|
33 | printk( |
---|
34 | "*** U-Boot Information ***\n" |
---|
35 | "Start/Size of DRAM memory = %lu for %llx\n" |
---|
36 | "Start/Size of Flash memory = %lu for %lx\n" |
---|
37 | "Reserved area for startup monitor = %ld\n" |
---|
38 | "Start/Size of SRAM memory = %lu for %ld\n" |
---|
39 | "Boot/Reboot flag = %ld\n" |
---|
40 | "IP Address = %ld:%ld:%ld:%ld\n" |
---|
41 | "Ethernet address = %02x:%02x:%02x:%02x:%02x:%02x\n" |
---|
42 | "Ethernet speed in Mbps = %d\n" |
---|
43 | "Internal Freq, in MHz = %ld\n" |
---|
44 | "Bus Freq, in MHz = %ld\n" |
---|
45 | #if !defined(U_BOOT_GENERIC_BOARD_INFO) |
---|
46 | "Console Baud Rate = %ld\n" |
---|
47 | #endif |
---|
48 | #if defined(CONFIG_MPC5xxx) |
---|
49 | "MBAR = %lx\n" |
---|
50 | "IPB Bus Freq, in MHz = %ld\n" |
---|
51 | "PCI Bus Freq, in MHz = %ld\n" |
---|
52 | #endif |
---|
53 | , |
---|
54 | u->bi_memstart, (unsigned long long) u->bi_memsize, |
---|
55 | u->bi_flashstart, u->bi_flashsize, |
---|
56 | u->bi_flashoffset, |
---|
57 | u->bi_sramstart, u->bi_sramsize, |
---|
58 | u->bi_bootflags, |
---|
59 | ((u->bi_ip_addr >> 24) & 0xff), ((u->bi_ip_addr >> 16) & 0xff), |
---|
60 | ((u->bi_ip_addr >> 8) & 0xff), (u->bi_ip_addr & 0xff), |
---|
61 | u->bi_enetaddr[0], u->bi_enetaddr[1], u->bi_enetaddr[2], |
---|
62 | u->bi_enetaddr[3], u->bi_enetaddr[4], u->bi_enetaddr[5], |
---|
63 | u->bi_ethspeed, |
---|
64 | u->bi_intfreq, |
---|
65 | u->bi_busfreq |
---|
66 | #if !defined(U_BOOT_GENERIC_BOARD_INFO) |
---|
67 | , |
---|
68 | u->bi_baudrate |
---|
69 | #endif |
---|
70 | #if defined(CONFIG_MPC5xxx) |
---|
71 | , |
---|
72 | u->bi_mbar_base, |
---|
73 | u->bi_ipbfreq, |
---|
74 | u->bi_pcifreq |
---|
75 | #endif |
---|
76 | ); |
---|
77 | } |
---|
78 | |
---|
79 | #endif |
---|