summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-21 21:43:27 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-21 21:43:54 +0100
commitc05d7a9d17445f74174dde54c9e15c78a0e97158 (patch)
tree67c233ee4f6d51b4278dd523a3df4ac2b4501328
parentbsps/sparc: Fix typo (diff)
downloadrtems-c05d7a9d17445f74174dde54c9e15c78a0e97158.tar.bz2
bsps/sparc: Fix warnings
-rw-r--r--bsps/sparc/shared/amba/ahbstat.c6
-rw-r--r--bsps/sparc/shared/net/greth.c3
-rw-r--r--bsps/sparc/shared/pci/gr_701.c13
-rw-r--r--bsps/sparc/shared/pci/gr_cpci_gr740.c8
-rw-r--r--bsps/sparc/shared/pci/gr_leon4_n2x.c8
-rw-r--r--bsps/sparc/shared/pci/gr_rasta_adcdac.c15
-rw-r--r--bsps/sparc/shared/pci/gr_rasta_io.c15
-rw-r--r--bsps/sparc/shared/pci/gr_rasta_spw_router.c9
-rw-r--r--bsps/sparc/shared/pci/gr_rasta_tmtc.c13
-rw-r--r--bsps/sparc/shared/pci/gr_tmtc_1553.c9
10 files changed, 65 insertions, 34 deletions
diff --git a/bsps/sparc/shared/amba/ahbstat.c b/bsps/sparc/shared/amba/ahbstat.c
index f57d6430c9..4e4cd72525 100644
--- a/bsps/sparc/shared/amba/ahbstat.c
+++ b/bsps/sparc/shared/amba/ahbstat.c
@@ -8,7 +8,7 @@
* http://www.rtems.org/license/LICENSE.
*/
-#include <stdint.h>
+#include <inttypes.h>
#include <string.h>
#include <rtems.h>
#include <rtems/bspIo.h>
@@ -177,8 +177,8 @@ void ahbstat_isr(void *arg)
rc = ahbstat_error(priv->minor, priv->regs, status, fadr);
if ((rc & 0x1) == 0) {
- printk("\n### AHBSTAT: %s %s error of size %ld by master %ld"
- " at 0x%08lx\n",
+ printk("\n### AHBSTAT: %s %s error of size %" PRId32
+ " by master %" PRId32 " at 0x%08" PRIx32 "\n",
status & AHBSTAT_STS_CE ? "single" : "non-correctable",
status & AHBSTAT_STS_HW ? "write" : "read",
(status & AHBSTAT_STS_HS) >> AHBSTAT_STS_HS_BIT,
diff --git a/bsps/sparc/shared/net/greth.c b/bsps/sparc/shared/net/greth.c
index f45f83c6f5..a927ddfee6 100644
--- a/bsps/sparc/shared/net/greth.c
+++ b/bsps/sparc/shared/net/greth.c
@@ -327,7 +327,8 @@ static void print_init_info(struct greth_softc *sc)
}
#ifdef GRETH_AUTONEGO_PRINT_TIME
if ( sc->auto_neg ) {
- printf("Autonegotiation Time: %ldms\n", sc->auto_neg_time.tv_sec * 1000 +
+ printf("Autonegotiation Time: %" PRIdMAX "ms\n",
+ (intmax_t)sc->auto_neg_time.tv_sec * 1000 +
sc->auto_neg_time.tv_nsec / 1000000);
}
#endif
diff --git a/bsps/sparc/shared/pci/gr_701.c b/bsps/sparc/shared/pci/gr_701.c
index 03f3020db0..b0070fd9dd 100644
--- a/bsps/sparc/shared/pci/gr_701.c
+++ b/bsps/sparc/shared/pci/gr_701.c
@@ -15,6 +15,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -344,8 +345,10 @@ int gr701_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n\n\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printk(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-701 target? */
@@ -572,8 +575,10 @@ void gr701_print_dev(struct drvmgr_dev *dev, int options)
bar1 = devinfo->resources[1].address;
bar1_size = devinfo->resources[1].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printf(" IRQ: %d\n", devinfo->irq);
/* Frequency is the same as the PCI bus frequency */
diff --git a/bsps/sparc/shared/pci/gr_cpci_gr740.c b/bsps/sparc/shared/pci/gr_cpci_gr740.c
index dbb094744d..a9a614996c 100644
--- a/bsps/sparc/shared/pci/gr_cpci_gr740.c
+++ b/bsps/sparc/shared/pci/gr_cpci_gr740.c
@@ -25,6 +25,7 @@
* Interrupt testing
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -482,7 +483,7 @@ int gr_cpci_gr740_init1(struct drvmgr_dev *dev)
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
for (i = 0; i < 3; i++) {
- printk(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
+ printk(" PCI BAR[%d]: 0x%08" PRIx32 " - 0x%08" PRIx32 "\n",
i, devinfo->resources[i].address,
devinfo->resources[i].address +
(devinfo->resources[i].size - 1));
@@ -737,8 +738,9 @@ void gr_cpci_gr740_print_dev(struct drvmgr_dev *dev, int options)
bar0 = devinfo->resources[0].address;
bar0_size = devinfo->resources[0].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_leon4_n2x.c b/bsps/sparc/shared/pci/gr_leon4_n2x.c
index 76e2bb0b28..4dd9005f67 100644
--- a/bsps/sparc/shared/pci/gr_leon4_n2x.c
+++ b/bsps/sparc/shared/pci/gr_leon4_n2x.c
@@ -24,6 +24,7 @@
* bar1 RESOURCE 0xf0000000 L2-Cache registers
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -505,7 +506,7 @@ int gr_cpci_leon4_n2x_init1(struct drvmgr_dev *dev)
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
for (i = 0; i < 3; i++) {
- printk(" PCI BAR[%d]: 0x%08lx - 0x%08lx\n",
+ printk(" PCI BAR[%d]: 0x%08" PRIx32 " - 0x%08" PRIx32 "\n",
i, devinfo->resources[i].address,
devinfo->resources[i].address +
(devinfo->resources[i].size - 1));
@@ -760,8 +761,9 @@ void gr_cpci_leon4_n2x_print_dev(struct drvmgr_dev *dev, int options)
bar0 = devinfo->resources[0].address;
bar0_size = devinfo->resources[0].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_rasta_adcdac.c b/bsps/sparc/shared/pci/gr_rasta_adcdac.c
index 1c46510772..bea58328d4 100644
--- a/bsps/sparc/shared/pci/gr_rasta_adcdac.c
+++ b/bsps/sparc/shared/pci/gr_rasta_adcdac.c
@@ -15,6 +15,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -409,8 +410,10 @@ int gr_rasta_adcdac_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printk(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-RASTA-ADCDAC target? */
@@ -651,9 +654,11 @@ void gr_rasta_adcdac_print_dev(struct drvmgr_dev *dev, int options)
bar1 = devinfo->resources[1].address;
bar1_size = devinfo->resources[1].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->version->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_rasta_io.c b/bsps/sparc/shared/pci/gr_rasta_io.c
index fed4b368ac..63299c10a7 100644
--- a/bsps/sparc/shared/pci/gr_rasta_io.c
+++ b/bsps/sparc/shared/pci/gr_rasta_io.c
@@ -15,6 +15,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -588,8 +589,10 @@ int gr_rasta_io_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printk(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-RASTA-IO target? */
@@ -848,9 +851,11 @@ void gr_rasta_io_print_dev(struct drvmgr_dev *dev, int options)
bar1 = devinfo->resources[1].address;
bar1_size = devinfo->resources[1].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->version->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_rasta_spw_router.c b/bsps/sparc/shared/pci/gr_rasta_spw_router.c
index dede9a8190..0bfc645dc2 100644
--- a/bsps/sparc/shared/pci/gr_rasta_spw_router.c
+++ b/bsps/sparc/shared/pci/gr_rasta_spw_router.c
@@ -13,6 +13,7 @@
* GR-RASTA-IO driver.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -422,7 +423,8 @@ int gr_rasta_spw_router_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%08lx - 0x%08lx\n", bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[0]: 0x%08" PRIx32 " - 0x%08" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-RASTA-SPW-ROUTER target? */
@@ -655,8 +657,9 @@ void gr_rasta_spw_router_print_dev(struct drvmgr_dev *dev, int options)
bar0 = devinfo->resources[0].address;
bar0_size = devinfo->resources[0].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->version->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_rasta_tmtc.c b/bsps/sparc/shared/pci/gr_rasta_tmtc.c
index f615958c84..b243259d96 100644
--- a/bsps/sparc/shared/pci/gr_rasta_tmtc.c
+++ b/bsps/sparc/shared/pci/gr_rasta_tmtc.c
@@ -15,6 +15,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -601,8 +602,10 @@ int gr_rasta_tmtc_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printk(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printk(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-RASTA-IO target? */
@@ -854,8 +857,10 @@ void gr_rasta_tmtc_print_dev(struct drvmgr_dev *dev, int options)
bar1 = devinfo->resources[1].address;
bar1_size = devinfo->resources[1].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" PCI BAR[1]: 0x%lx - 0x%lx\n", bar1, bar1 + bar1_size - 1);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" PCI BAR[1]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar1, bar1 + bar1_size - 1);
printf(" IRQ: %d\n", devinfo->irq);
printf(" PCI REVISION: %d\n", devinfo->rev);
printf(" FREQ: %d Hz\n", priv->version->amba_freq_hz);
diff --git a/bsps/sparc/shared/pci/gr_tmtc_1553.c b/bsps/sparc/shared/pci/gr_tmtc_1553.c
index a8181b6429..2a497fe7de 100644
--- a/bsps/sparc/shared/pci/gr_tmtc_1553.c
+++ b/bsps/sparc/shared/pci/gr_tmtc_1553.c
@@ -15,6 +15,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -326,7 +327,8 @@ int gr_tmtc_1553_init1(struct drvmgr_dev *dev)
PCI_DEV_EXPAND(priv->pcidev));
printk(" PCI VENDOR: 0x%04x, DEVICE: 0x%04x\n",
devinfo->id.vendor, devinfo->id.device);
- printk(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
+ printk(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
printk(" IRQ: %d\n\n\n", devinfo->irq);
/* all neccessary space assigned to GR-TMTC-1553 target? */
@@ -556,8 +558,9 @@ void gr_tmtc_1553_print_dev(struct drvmgr_dev *dev, int options)
bar0 = devinfo->resources[0].address;
bar0_size = devinfo->resources[0].size;
- printf(" PCI BAR[0]: 0x%lx - 0x%lx\n", bar0, bar0 + bar0_size - 1);
- printf(" IRQ REGS: 0x%x\n", (unsigned int)priv->irq);
+ printf(" PCI BAR[0]: 0x%" PRIx32 " - 0x%" PRIx32 "\n",
+ bar0, bar0 + bar0_size - 1);
+ printf(" IRQ REGS: 0x%" PRIxPTR "\n", (uintptr_t)priv->irq);
printf(" IRQ: %d\n", devinfo->irq);
printf(" FREQ: %d Hz\n", priv->version->amba_freq_hz);
printf(" IMASK: 0x%08x\n", priv->irq->mask[0]);