accel/habanalabs: fix address decode RAZWI handling
authorDani Liberman <dliberman@habana.ai>
Tue, 17 Jan 2023 11:17:15 +0000 (13:17 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 15 Mar 2023 11:29:12 +0000 (13:29 +0200)
commitc0e6df916050dbc71450d20e8df6712c2ebe83e8
tree4781478868a620e0e8392bf5031861b9c30f775b
parent6071e21325426f7930a4fd98b37f39cd332f50ed
accel/habanalabs: fix address decode RAZWI handling

PSOC RAZWI handling code did not took into account single router that
supports several initiators with different XY coordinates. Also, it
ignored XY_HI coordinate. This caused 2 problems:
1. RAZWI handle ignored some initiators.
2. When getting PSOC RAZWI from some routers, there was a lot of
   possible engines which could have caused the RAZWI.

Fixed the above issue by handling PSOC RAZWI with both low and high
XY coordinates. This way driver supports all initiators and in
the worst case there are not more than 2 possible engines for RAZWI.

Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
drivers/accel/habanalabs/gaudi2/gaudi2.c