From 670f10439034f439252ca9a12b5a09c3aadf635a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 24 Apr 2018 07:18:09 +0200 Subject: bsps: Move uboot_dump_bdinfo.c to bsps This patch is a part of the BSP source reorganization. Update #3285. --- bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c | 79 ++++++++++++++++++++++ c/src/lib/libbsp/powerpc/gen5200/Makefile.am | 2 +- .../lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c | 79 ---------------------- 3 files changed, 80 insertions(+), 80 deletions(-) create mode 100644 bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c delete mode 100644 c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c 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 + +#include + +#if defined(HAS_UBOOT) + +#include +#include + +/* + * 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 diff --git a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am index 5892c93627..807bb0500e 100644 --- a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am +++ b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am @@ -95,7 +95,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bsp-uboot-board-inf librtemsbsp_a_SOURCES += ../shared/showbats.c librtemsbsp_a_SOURCES += ../shared/src/memcpy.c librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/start/bspidle.c -librtemsbsp_a_SOURCES += ../shared/uboot_dump_bdinfo.c +librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/u-boot/uboot_dump_bdinfo.c librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/shared/u-boot/uboot_getenv.c librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/start/bspreset.c librtemsbsp_a_SOURCES += ../../../../../../bsps/powerpc/gen5200/start/bspstart.c diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c b/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c deleted file mode 100644 index deec8124f6..0000000000 --- a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 - -#include - -#if defined(HAS_UBOOT) - -#include -#include - -/* - * 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 -- cgit v1.2.3