habanalabs: support debugfs Byte access to device DRAM
authorMoti Haimovski <mhaimovski@habana.ai>
Tue, 5 Apr 2022 08:45:51 +0000 (11:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 May 2022 19:01:18 +0000 (21:01 +0200)
commit0ff1d6f8f55eafadea0a5ca25d0eaf3571813c70
tree8fb8fd3db21d131487f9ede656348db5e17643a2
parentab4ea5872842766b0155b2517db61a4ae99d98e0
habanalabs: support debugfs Byte access to device DRAM

The habanalabs HW requires memory resources to be used by its
internal hardware structures. These structures are allocated and
initialized by the driver. We would like to use the device HBM for
that purpose. This memory is io-remapped and accessed using the
writel()/writeb()/writew() commands.
Since some of the HW structures are one byte in size we need to
add support for the  writeb() and readb() functions in the driver.

Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/habanalabs/common/debugfs.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h