]> asedeno.scripts.mit.edu Git - linux.git/commit
habanalabs: fix F/W download in BE architecture
authorBen Segal <bpsegal20@gmail.com>
Tue, 23 Jul 2019 08:22:42 +0000 (11:22 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 29 Jul 2019 08:40:25 +0000 (11:40 +0300)
commit75035fe22b808a520e1d712ebe913684ba406e01
tree8b9668c0e0b03d24daebb6f81ff72ba83c3fc879
parent609488bc979f99f805f34e9a32c1e3b71179d10b
habanalabs: fix F/W download in BE architecture

writeX macros might perform byte-swapping in BE architectures. As our F/W
is in LE format, we need to make sure no byte-swapping will occur.

There is a standard kernel function (called memcpy_toio) for copying data
to I/O area which is used in a lot of drivers to download F/W to PCIe
adapters. That function also makes sure the data is copied "as-is",
without byte-swapping.

This patch use that function to copy the F/W to the GOYA ASIC instead of
writeX macros.

Signed-off-by: Ben Segal <bpsegal20@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/firmware_if.c