]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite8a49414e0b9d65baef9cd66edd1b6cb05cd328b
tree8fb8fd3db21d131487f9ede656348db5e17643a2
parent3a99991665f8ff77cb749b8dac6baffb2a4251b8
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