source: rtems/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.8 KB
Line 
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
11#include <bsp.h>
12
13#if defined(HAS_UBOOT)
14
15#include <bsp/u-boot.h>
16#include <rtems/bspIo.h>
17
18/*
19 *  Dump U-Boot Board Information Structure
20 *
21 *  u - pointer to information structure
22 */
23void dumpUBootBDInfo(
24  bd_t *u
25)
26{
27  if ( u == (bd_t *)1 ) {
28    printk( "UBoot BD Info Ptr NOT Set\n" );
29    return;
30  }
31
32  printk(
33    "*** U-Boot Information ***\n"
34    "Start/Size of DRAM memory  = %p for %lx\n"
35    "Start/Size of Flash memory = %p for %lx\n"
36    "Reserved area for startup monitor = %ld\n"
37    "Start/Size of SRAM memory  = %p for %ld\n"
38    "Boot/Reboot flag = %ld\n"
39    "IP Address = %d:%d:%d:%d\n"
40    "Ethernet address = %02x:%02x:%02x:%02x:%02x:%02x\n"
41    "Ethernet speed in Mbps = %d\n"
42    "Internal Freq, in MHz = %ld\n"
43    "Bus Freq, in MHz = %ld\n"
44    "Console Baud Rate = %ld\n"
45    #if defined(CONFIG_MPC5xxx)
46      "MBAR                       = %p\n"
47      "IPB Bus Freq, in MHz       = %ld\n"
48      "PCI Bus Freq, in MHz       = %ld\n"
49    #endif
50    ,
51    u->bi_memstart,   u->bi_memsize,
52    u->bi_flashstart, u->bi_flashsize,
53    u->bi_flashoffset,
54    u->bi_sramstart, u->bi_sramsize,
55    u->bi_bootflags,
56    ((u->bi_ip_addr >> 24) & 0xff), ((u->bi_ip_addr >> 16) & 0xff),
57    ((u->bi_ip_addr >> 8) & 0xff),  (u->bi_ip_addr & 0xff),
58    u->bi_enetaddr[0], u->bi_enetaddr[1], u->bi_enetaddr[2],
59    u->bi_enetaddr[3], u->bi_enetaddr[4], u->bi_enetaddr[5],
60    u->bi_ethspeed,
61    u->bi_intfreq,
62    u->bi_busfreq,
63    u->bi_baudrate
64    #if defined(CONFIG_MPC5xxx)
65      ,
66      u->bi_mbar_base,
67      u->bi_ipbfreq,
68      u->bi_pcifreq
69    #endif
70  );
71}
72
73#endif
Note: See TracBrowser for help on using the repository browser.