summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-15 11:09:50 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-15 11:09:50 +0100
commit73f8d938474d04013d785f5918d75b9d82c80ca3 (patch)
treec6ddedad00d35feb387e681bd2666504ea7d9a36 /c/src/lib/libbsp
parentscore: Fix warning (diff)
downloadrtems-73f8d938474d04013d785f5918d75b9d82c80ca3.tar.bz2
bsps/powerpc: Fix warnings
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/powerpc/psim/network/if_sim.c10
-rw-r--r--c/src/lib/libbsp/powerpc/shared/openpic/openpic.c11
2 files changed, 11 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/powerpc/psim/network/if_sim.c b/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
index 4314aad655..240bf05e67 100644
--- a/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
+++ b/c/src/lib/libbsp/powerpc/psim/network/if_sim.c
@@ -107,16 +107,16 @@ struct ifsim_softc theIfSims[IFSIM_SLOTS] = {{{{0}}} };
rtems_id ifsim_tid = 0;
-__inline__ uint32_t
+static __inline__ uint32_t
ifsim_in(struct ifsim_softc *sc, unsigned regno)
{
- return in_be32( sc->pvt.base + regno );
+ return in_be32((volatile uint32_t *) (sc->pvt.base + regno));
}
-__inline__ void
+static __inline__ void
ifsim_out(struct ifsim_softc *sc, unsigned regno, uint32_t v)
{
- out_be32(sc->pvt.base + regno, v);
+ out_be32((volatile uint32_t *) (sc->pvt.base + regno), v);
}
static void *
@@ -378,7 +378,7 @@ rtems_event_set evs;
if ( crc_len
&& (memcpy(&crc_net, (char*)eh + len, crc_len),
(crc = (ether_crc32_le((uint8_t *)eh, len) ^ 0xffffffff)) != crc_net) ) {
- printk("CSUM: me 0x%08X, them 0x%08x\n", crc, crc_net);
+ printk("CSUM: me 0x%08" PRIx32 ", them 0x%08" PRIx32 "\n", crc, crc_net);
sc->pvt.rx_cserrs++;
} else {
diff --git a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
index 39abcd9301..15a37d1444 100644
--- a/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
+++ b/c/src/lib/libbsp/powerpc/shared/openpic/openpic.c
@@ -25,6 +25,7 @@
#include <libcpu/io.h>
#include <libcpu/byteorder.h>
#include <rtems/bspIo.h>
+#include <inttypes.h>
#ifndef NULL
#define NULL 0
@@ -72,9 +73,9 @@ static int openpic_src_offst = 0;
printk("openpic.c:%d: illegal priority %d\n", __LINE__, pri);
#define check_arg_irq(irq) \
if (irq < 0 || irq >= NumSources) \
- printk("openpic.c:%d: illegal irq %d from 0x%08x,[0x%08x],[[0x%08x]]\n", \
- __LINE__, irq, __builtin_return_address(0), \
- __builtin_return_address(1), __builtin_return_address(2) \
+ printk("openpic.c:%d: illegal irq %d from 0x%08" PRIxPTR ",[0x%08" PRIxPTR "],[[0x%08" PRIxPTR "]]\n", \
+ __LINE__, irq, (uintptr_t) __builtin_return_address(0), \
+ (uintptr_t) __builtin_return_address(1), (uintptr_t) __builtin_return_address(2) \
);
#define check_arg_cpu(cpu) \
if (cpu < 0 || cpu >= NumProcessors) \
@@ -234,8 +235,8 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses
break;
}
}
- printk("OpenPIC Version %s (%d CPUs and %d IRQ sources) at 0x%08x\n", version,
- NumProcessors, NumSources, OpenPIC);
+ printk("OpenPIC Version %s (%d CPUs and %d IRQ sources) at 0x%08" PRIuPTR "\n", version,
+ NumProcessors, NumSources, (uintptr_t) OpenPIC);
printk("OpenPIC Vendor %d (%s), Device %d (%s), Stepping %d\n", vendorid,
vendor, devid, device, stepping);