summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2016-03-21 13:53:00 +0100
committerDaniel Hellstrom <daniel@gaisler.com>2016-03-21 15:06:47 +0100
commit9b4457dae716842143403c9fe790e78cb90aabba (patch)
treeb1d93a7f45bb9a335d2c69878dce4ba3ae416ffe
parentec0db63b836bba3a07915a3e05399736dddc2a0f (diff)
leon: RMAP tid_msb must be used as unsigned
-rw-r--r--c/src/lib/libbsp/sparc/shared/include/rmap.h2
-rw-r--r--c/src/lib/libbsp/sparc/shared/spw/rmap_async.c2
-rw-r--r--c/src/lib/libbsp/sparc/shared/spw/rmap_common.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/include/rmap.h b/c/src/lib/libbsp/sparc/shared/include/rmap.h
index 6a34ae7c5e..1204f1d283 100644
--- a/c/src/lib/libbsp/sparc/shared/include/rmap.h
+++ b/c/src/lib/libbsp/sparc/shared/include/rmap.h
@@ -89,7 +89,7 @@ struct rmap_config {
rmap_route_t route_func; /* Function that will generate path addressing */
unsigned short spw_adr; /* The SpW Address of the SpW interface used */
unsigned char tid_msb; /* 8 most significant bits in TID.
- * Set to -1 for normal operation using
+ * Set to 0xff for normal operation using
* all bits in TID for sequence counting.
*/
unsigned char drv_cap; /* Driver capabilities */
diff --git a/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c b/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c
index d37b45a07d..f77089927a 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/rmap_async.c
@@ -45,7 +45,7 @@ void *rmap_async_init(struct rmap_config *config, int response_array_length)
memset(priv, 0, sizeof(struct rmap_async_priv) +
(response_array_length * sizeof(struct rmap_command *)));
priv->config = config;
- if (config->tid_msb >= 0) {
+ if (config->tid_msb != 0xff) {
priv->tid = config->tid_msb << 8;
}
priv->drv_cap = config->drv_cap;
diff --git a/c/src/lib/libbsp/sparc/shared/spw/rmap_common.c b/c/src/lib/libbsp/sparc/shared/spw/rmap_common.c
index ec3755fa2e..8e7cfefe6e 100644
--- a/c/src/lib/libbsp/sparc/shared/spw/rmap_common.c
+++ b/c/src/lib/libbsp/sparc/shared/spw/rmap_common.c
@@ -110,7 +110,7 @@ int rmap_build(struct rmap_common_priv *priv, struct rmap_command *cmd, struct r
*pos++ = priv->tid & 0xff;
cmd->tid = priv->tid; /* Remember TID */
/* Increment TID */
- if ( priv->config->tid_msb < 0 ) {
+ if ( priv->config->tid_msb == 0xff ) {
priv->tid++;
} else {
if ( (priv->tid & 0xff) == 0xff) {