Skip to content

Commit

Permalink
habanalabs: set ETR as non-secured
Browse files Browse the repository at this point in the history
ETR should always be non-secured as it is used by the users to record
profiling/trace data.

Signed-off-by: Oded Gabbay <[email protected]>
Reviewed-by: Omer Shpigelman <[email protected]>
  • Loading branch information
ogabbay committed Nov 21, 2019
1 parent e1a84d5 commit 6476b47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/misc/habanalabs/goya/goya_coresight.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "goyaP.h"
#include "include/goya/goya_coresight.h"
#include "include/goya/asic_reg/goya_regs.h"
#include "include/goya/asic_reg/goya_masks.h"

#include <uapi/misc/habanalabs.h>

Expand Down Expand Up @@ -425,7 +426,8 @@ static int goya_config_etr(struct hl_device *hdev,
WREG32(mmPSOC_ETR_BUFWM, 0x3FFC);
WREG32(mmPSOC_ETR_RSZ, input->buffer_size);
WREG32(mmPSOC_ETR_MODE, input->sink_mode);
WREG32(mmPSOC_ETR_AXICTL, 0x700);
WREG32(mmPSOC_ETR_AXICTL,
0x700 | PSOC_ETR_AXICTL_PROTCTRLBIT1_SHIFT);
WREG32(mmPSOC_ETR_DBALO,
lower_32_bits(input->buffer_address));
WREG32(mmPSOC_ETR_DBAHI,
Expand Down
2 changes: 2 additions & 0 deletions drivers/misc/habanalabs/include/goya/asic_reg/goya_masks.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,6 @@
#define DMA_QM_3_GLBL_CFG1_DMA_STOP_SHIFT DMA_QM_0_GLBL_CFG1_DMA_STOP_SHIFT
#define DMA_QM_4_GLBL_CFG1_DMA_STOP_SHIFT DMA_QM_0_GLBL_CFG1_DMA_STOP_SHIFT

#define PSOC_ETR_AXICTL_PROTCTRLBIT1_SHIFT 1

#endif /* ASIC_REG_GOYA_MASKS_H_ */

0 comments on commit 6476b47

Please sign in to comment.