summaryrefslogtreecommitdiff
path: root/rust/helpers/security.c
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@arm.com>2025-07-31 13:23:37 +0100
committerSuzuki K Poulose <suzuki.poulose@arm.com>2025-09-23 14:14:12 +0100
commit8a79026926b329d4ab0c6d0921373a80ec8aab6e (patch)
tree6d3429b8bfe5160cef60c43da6ff8e6d4abc9a9a /rust/helpers/security.c
parentdcdc42f5dcf9b9197c51246c62966e2d54a033d8 (diff)
coresight: tmc: Support atclk
The atclk is an optional clock for the CoreSight TMC, but the driver misses to initialize it. In most cases, TMC shares the atclk clock with other CoreSight components. Since these components enable the clock before the TMC device is initialized, the TMC continues properly, which is why we don’t observe any lockup issues. This change enables atclk in probe of the TMC driver. Given the clock is optional, it is possible to return NULL if the clock does not exist. IS_ERR() is tolerant for this case. Dynamically disable and enable atclk during suspend and resume. The clock pointers will never be error values if the driver has successfully probed, and the case of a NULL pointer case will be handled by the clock core layer. The driver data is always valid after probe. Therefore, remove the related checks. Also in the resume flow adds error handling. Fixes: bc4bf7fe98da ("coresight-tmc: add CoreSight TMC driver") Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20250731-arm_cs_fix_clock_v4-v6-1-1dfe10bb3f6f@arm.com
Diffstat (limited to 'rust/helpers/security.c')
0 files changed, 0 insertions, 0 deletions