summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/shared
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-24 07:18:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-24 10:24:22 +0200
commit670f10439034f439252ca9a12b5a09c3aadf635a (patch)
treec4ae51b520c18eb47acb4ceb743192a7dd407499 /bsps/powerpc/shared
parentbsps: Move uboot_getenv.c to bsps (diff)
downloadrtems-670f10439034f439252ca9a12b5a09c3aadf635a.tar.bz2
bsps: Move uboot_dump_bdinfo.c to bsps
This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'bsps/powerpc/shared')
-rw-r--r--bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c b/bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c
new file mode 100644
index 0000000000..deec8124f6
--- /dev/null
+++ b/bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c
@@ -0,0 +1,79 @@
+/*
+ * COPYRIGHT (c) 1989-2007.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <inttypes.h>
+
+#include <bsp.h>
+
+#if defined(HAS_UBOOT)
+
+#include <bsp/u-boot.h>
+#include <rtems/bspIo.h>
+
+/*
+ * Dump U-Boot Board Information Structure
+ *
+ * u - pointer to information structure
+ */
+void dumpUBootBDInfo(
+ bd_t *u
+)
+{
+ if ( u == (bd_t *)1 ) {
+ printk( "UBoot BD Info Ptr NOT Set\n" );
+ return;
+ }
+
+ printk(
+ "*** U-Boot Information ***\n"
+ "Start/Size of DRAM memory = %lu for %llx\n"
+ "Start/Size of Flash memory = %lu for %lx\n"
+ "Reserved area for startup monitor = %ld\n"
+ "Start/Size of SRAM memory = %lu for %ld\n"
+ "Boot/Reboot flag = %ld\n"
+ "IP Address = %ld:%ld:%ld:%ld\n"
+ "Ethernet address = %02x:%02x:%02x:%02x:%02x:%02x\n"
+ "Ethernet speed in Mbps = %d\n"
+ "Internal Freq, in MHz = %ld\n"
+ "Bus Freq, in MHz = %ld\n"
+ #if !defined(U_BOOT_GENERIC_BOARD_INFO)
+ "Console Baud Rate = %ld\n"
+ #endif
+ #if defined(CONFIG_MPC5xxx)
+ "MBAR = %lx\n"
+ "IPB Bus Freq, in MHz = %ld\n"
+ "PCI Bus Freq, in MHz = %ld\n"
+ #endif
+ ,
+ u->bi_memstart, (unsigned long long) u->bi_memsize,
+ u->bi_flashstart, u->bi_flashsize,
+ u->bi_flashoffset,
+ u->bi_sramstart, u->bi_sramsize,
+ u->bi_bootflags,
+ ((u->bi_ip_addr >> 24) & 0xff), ((u->bi_ip_addr >> 16) & 0xff),
+ ((u->bi_ip_addr >> 8) & 0xff), (u->bi_ip_addr & 0xff),
+ u->bi_enetaddr[0], u->bi_enetaddr[1], u->bi_enetaddr[2],
+ u->bi_enetaddr[3], u->bi_enetaddr[4], u->bi_enetaddr[5],
+ u->bi_ethspeed,
+ u->bi_intfreq,
+ u->bi_busfreq
+ #if !defined(U_BOOT_GENERIC_BOARD_INFO)
+ ,
+ u->bi_baudrate
+ #endif
+ #if defined(CONFIG_MPC5xxx)
+ ,
+ u->bi_mbar_base,
+ u->bi_ipbfreq,
+ u->bi_pcifreq
+ #endif
+ );
+}
+
+#endif