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

4.115
Last change on this file since b79f98f was b79f98f, checked in by Sebastian Huber <sebastian.huber@…>, on 12/19/14 at 08:00:18

bsps/u-boot: Update due to API changes

  • Property mode set to 100644
File size: 1.9 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    #if !defined(U_BOOT_GENERIC_BOARD_INFO)
45      "Console Baud Rate = %ld\n"
46    #endif
47    #if defined(CONFIG_MPC5xxx)
48      "MBAR                       = %p\n"
49      "IPB Bus Freq, in MHz       = %ld\n"
50      "PCI Bus Freq, in MHz       = %ld\n"
51    #endif
52    ,
53    u->bi_memstart,   u->bi_memsize,
54    u->bi_flashstart, u->bi_flashsize,
55    u->bi_flashoffset,
56    u->bi_sramstart, u->bi_sramsize,
57    u->bi_bootflags,
58    ((u->bi_ip_addr >> 24) & 0xff), ((u->bi_ip_addr >> 16) & 0xff),
59    ((u->bi_ip_addr >> 8) & 0xff),  (u->bi_ip_addr & 0xff),
60    u->bi_enetaddr[0], u->bi_enetaddr[1], u->bi_enetaddr[2],
61    u->bi_enetaddr[3], u->bi_enetaddr[4], u->bi_enetaddr[5],
62    u->bi_ethspeed,
63    u->bi_intfreq,
64    u->bi_busfreq
65    #if !defined(U_BOOT_GENERIC_BOARD_INFO)
66      ,
67      u->bi_baudrate
68    #endif
69    #if defined(CONFIG_MPC5xxx)
70      ,
71      u->bi_mbar_base,
72      u->bi_ipbfreq,
73      u->bi_pcifreq
74    #endif
75  );
76}
77
78#endif
Note: See TracBrowser for help on using the repository browser.