diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2016-11-16 16:40:30 +0200 |
---|---|---|
committer | Scott Wood <oss@buserror.net> | 2016-11-23 21:01:25 -0600 |
commit | 18058822768f4665e2132ddd1cb413a9033edf09 (patch) | |
tree | 64f89bcf17829fab7540e4f493f075274faa3e85 /drivers/soc/fsl/qbman/qman_test_api.c | |
parent | 496bfa11de2e6805b63168d45c2f92edbeae54e2 (diff) |
soc/qman: Handle endianness of h/w descriptors
The hardware descriptors have big endian (BE) format.
Provide proper endianness handling for the remaining
descriptor fields, to ensure they are correctly
accessed by non-BE CPUs too.
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'drivers/soc/fsl/qbman/qman_test_api.c')
-rw-r--r-- | drivers/soc/fsl/qbman/qman_test_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/fsl/qbman/qman_test_api.c b/drivers/soc/fsl/qbman/qman_test_api.c index dba6a80622ed..2895d062cf51 100644 --- a/drivers/soc/fsl/qbman/qman_test_api.c +++ b/drivers/soc/fsl/qbman/qman_test_api.c @@ -65,7 +65,7 @@ static void fd_init(struct qm_fd *fd) { qm_fd_addr_set64(fd, 0xabdeadbeefLLU); qm_fd_set_contig_big(fd, 0x0000ffff); - fd->cmd = 0xfeedf00d; + fd->cmd = cpu_to_be32(0xfeedf00d); } static void fd_inc(struct qm_fd *fd) @@ -86,7 +86,7 @@ static void fd_inc(struct qm_fd *fd) len--; qm_fd_set_param(fd, fmt, off, len); - fd->cmd++; + fd->cmd = cpu_to_be32(be32_to_cpu(fd->cmd) + 1); } /* The only part of the 'fd' we can't memcmp() is the ppid */ |