hw/net/can/xlnx-versal-canfd: Fix byte ordering
authorDoug Brown <doug@schmorgal.com>
Fri, 13 Sep 2024 14:31:48 +0000 (15:31 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 13 Sep 2024 14:31:48 +0000 (15:31 +0100)
commitbe243e9ddb8f0ba149a1c51faee035c303be7eeb
tree50da5a3e5fb2653baedb05d042d63cf5e244b14f
parent7f34aae641ce1a2654c1a950aec4eab6f371a55d
hw/net/can/xlnx-versal-canfd: Fix byte ordering

The endianness of the CAN data was backwards in each group of 4 bytes.
For example, the following data:

00 11 22 33 44 55 66 77

was showing up like this:

33 22 11 00 77 66 55 44

Fix both the TX and RX code to put the data in the correct order.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Message-id: 20240827034927.66659-6-doug@schmorgal.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/net/can/xlnx-versal-canfd.c