Files
linux-nv-oot/drivers/video/tegra/tsec/tsec.h
Mayuresh Kulkarni d3bc17ca8b tsec: add debugfs support
add a debugfs file to read-out firmware log messages

Change-Id: I3501b117884a822bd835beecd8e3956481c37386
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2884815
(cherry picked from commit 590640045e9ba26914cad055000f7ce3618640b9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2895857
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-03 21:02:32 -07:00

72 lines
1.4 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
*
* Tegra TSEC Module Support
*/
#ifndef TSEC_H
#define TSEC_H
/*
* TSEC Device Data Structure
*/
#define TSEC_CLK_NAME "tsec"
#define TSEC_CLK_INDEX (0)
#define EFUSE_CLK_NAME "efuse"
#define EFUSE_CLK_INDEX (1)
#define TSEC_PKA_CLK_NAME "tsec_pka"
#define TSEC_PKA_CLK_INDEX (2)
#define TSEC_NUM_OF_CLKS (3)
struct tsec_device_data {
void __iomem *reg_aperture;
struct device_dma_parameters dma_parms;
int irq;
/* spin lock for module irq */
spinlock_t mirq_lock;
/* If module is powered on */
bool power_on;
struct clk *clk[TSEC_NUM_OF_CLKS];
long rate[TSEC_NUM_OF_CLKS];
/* private platform data */
void *private_data;
/* owner platform_device */
struct platform_device *pdev;
/* reset control for this device */
struct reset_control *reset_control;
/* store the risc-v info */
void *riscv_data;
/* name of riscv descriptor binary */
char *riscv_desc_bin;
/* name of riscv image binary */
char *riscv_image_bin;
#ifdef CONFIG_DEBUG_FS
struct dentry *debug_root;
#endif /* CONFIG_DEBUG_FS */
};
/*
* TSEC Register Access APIs
*/
void tsec_writel(struct tsec_device_data *pdata, u32 r, u32 v);
u32 tsec_readl(struct tsec_device_data *pdata, u32 r);
/*
* TSEC power on/off APIs
*/
int tsec_poweron(struct device *dev);
int tsec_poweroff(struct device *dev);
#endif /* TSEC_H */