diff options
author | Moti Haimovski <mhaimovski@habana.ai> | 2022-04-05 11:45:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-22 22:01:18 +0300 |
commit | 0ff1d6f8f55eafadea0a5ca25d0eaf3571813c70 (patch) | |
tree | 8fb8fd3db21d131487f9ede656348db5e17643a2 /drivers/misc/habanalabs/common/debugfs.c | |
parent | ab4ea5872842766b0155b2517db61a4ae99d98e0 (diff) | |
download | linux-0ff1d6f8f55eafadea0a5ca25d0eaf3571813c70.tar.xz |
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>
Diffstat (limited to 'drivers/misc/habanalabs/common/debugfs.c')
-rw-r--r-- | drivers/misc/habanalabs/common/debugfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/debugfs.c b/drivers/misc/habanalabs/common/debugfs.c index ffa613af6b0d..7c4a4d504e4c 100644 --- a/drivers/misc/habanalabs/common/debugfs.c +++ b/drivers/misc/habanalabs/common/debugfs.c @@ -688,6 +688,9 @@ static void hl_access_host_mem(struct hl_device *hdev, u64 addr, u64 *val, case DEBUGFS_WRITE64: *(u64 *) phys_to_virt(addr - offset) = *val; break; + default: + dev_err(hdev->dev, "hostmem access-type %d id not supported\n", acc_type); + break; } } |