summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-01 11:31:57 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-03-01 11:31:57 +0100
commit08d8599245aa8065bb6a182a00f5fd224134e020 (patch)
tree0e4cc6b4912cb74d1e1299214f673a79cd515f0a
parenta60db6958fa28c5c2e44b0900665c27433175c03 (diff)
downloadrtems-08d8599245aa8065bb6a182a00f5fd224134e020.tar.bz2
bsps/powerpc: Fix warnings
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/irq/irq.c4
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/nvram/nvram.c8
-rw-r--r--c/src/lib/libbsp/powerpc/shared/showbats.c5
-rw-r--r--c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c13
4 files changed, 17 insertions, 13 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c b/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c
index c689374a41..029ed3182e 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/irq/irq.c
@@ -73,6 +73,8 @@
/* */
/***********************************************************************/
+#include <inttypes.h>
+
#include <rtems.h>
#include <libcpu/powerpc-utility.h>
@@ -717,6 +719,6 @@ rtems_status_code bsp_interrupt_facility_initialize( void)
void bsp_interrupt_handler_default( rtems_vector_number vector)
{
if (vector != BSP_DECREMENTER) {
- printk( "Spurious interrupt: 0x%08x\n", vector);
+ printk( "Spurious interrupt: 0x%08" PRIx32 "\n", vector);
}
}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/nvram/nvram.c b/c/src/lib/libbsp/powerpc/gen5200/nvram/nvram.c
index e246d2c13f..8e174203e8 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/nvram/nvram.c
+++ b/c/src/lib/libbsp/powerpc/gen5200/nvram/nvram.c
@@ -579,12 +579,12 @@ rtems_device_driver nvram_driver_write(rtems_device_major_number major, rtems_de
return RTEMS_UNSATISFIED;
}
- else
- count = args->count;
- m93cxx_enable_write();
+ count = args->count;
- WAIT(1);
+ m93cxx_enable_write();
+
+ WAIT(1);
for(i = 0; i < count; i++)
{
diff --git a/c/src/lib/libbsp/powerpc/shared/showbats.c b/c/src/lib/libbsp/powerpc/shared/showbats.c
index 16cbbeed31..3978b53152 100644
--- a/c/src/lib/libbsp/powerpc/shared/showbats.c
+++ b/c/src/lib/libbsp/powerpc/shared/showbats.c
@@ -9,6 +9,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <string.h>
#include <bsp.h>
@@ -21,11 +22,11 @@ void printBAT( int bat, uint32_t upper, uint32_t lower )
uint32_t lowest_addr;
uint32_t size;
- printk("BAT%d raw(upper=0x%08x, lower=0x%08x) ", bat, upper, lower );
+ printk("BAT%d raw(upper=0x%08" PRIx32 ", lower=0x%08" PRIx32 ") ", bat, upper, lower );
lowest_addr = (upper & 0xFFFE0000);
size = (((upper & 0x00001FFC) >> 2) + 1) * (128 * 1024);
- printk(" range(0x%08x, 0x%08x) %s%s %s%s%s%s %s\n",
+ printk(" range(0x%08" PRIx32 ", 0x%08" PRIx32 ") %s%s %s%s%s%s %s\n",
lowest_addr,
lowest_addr + (size - 1),
(upper & 0x01) ? "P" : "p",
diff --git a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c b/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
index fcec5eea80..deec8124f6 100644
--- a/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
+++ b/c/src/lib/libbsp/powerpc/shared/uboot_dump_bdinfo.c
@@ -7,6 +7,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <bsp.h>
@@ -31,12 +32,12 @@ void dumpUBootBDInfo(
printk(
"*** U-Boot Information ***\n"
- "Start/Size of DRAM memory = %p for %lx\n"
- "Start/Size of Flash memory = %p for %lx\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 = %p for %ld\n"
+ "Start/Size of SRAM memory = %lu for %ld\n"
"Boot/Reboot flag = %ld\n"
- "IP Address = %d:%d:%d:%d\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"
@@ -45,12 +46,12 @@ void dumpUBootBDInfo(
"Console Baud Rate = %ld\n"
#endif
#if defined(CONFIG_MPC5xxx)
- "MBAR = %p\n"
+ "MBAR = %lx\n"
"IPB Bus Freq, in MHz = %ld\n"
"PCI Bus Freq, in MHz = %ld\n"
#endif
,
- u->bi_memstart, u->bi_memsize,
+ u->bi_memstart, (unsigned long long) u->bi_memsize,
u->bi_flashstart, u->bi_flashsize,
u->bi_flashoffset,
u->bi_sramstart, u->bi_sramsize,