UPSTREAM: coresight: Convert coresight_timeout to use access abstraction

Convert the generic routines to use the new access abstraction layer
gradually, starting with coresigth_timeout.

Bug: 174685394
Link: https://lore.kernel.org/r/20210110224850.1880240-6-suzuki.poulose@arm.com
Cc: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210201181351.1475223-8-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 020052825e49128d381d6444d1ce079e8ca82386)
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: I501cb5db6842c365813390e3bfc75231e43d04a5
This commit is contained in:
Suzuki K Poulose
2021-02-01 11:13:27 -07:00
committed by Todd Kjos
parent 37b6c2ad00
commit 0c890c3fdf
8 changed files with 54 additions and 32 deletions

View File

@@ -460,7 +460,7 @@ coresight_register(struct coresight_desc *desc);
extern void coresight_unregister(struct coresight_device *csdev);
extern int coresight_enable(struct coresight_device *csdev);
extern void coresight_disable(struct coresight_device *csdev);
extern int coresight_timeout(void __iomem *addr, u32 offset,
extern int coresight_timeout(struct csdev_access *csa, u32 offset,
int position, int value);
extern int coresight_claim_device(void __iomem *base);
@@ -491,8 +491,13 @@ static inline void coresight_unregister(struct coresight_device *csdev) {}
static inline int
coresight_enable(struct coresight_device *csdev) { return -ENOSYS; }
static inline void coresight_disable(struct coresight_device *csdev) {}
static inline int coresight_timeout(void __iomem *addr, u32 offset,
int position, int value) { return 1; }
static inline int coresight_timeout(struct csdev_access *csa, u32 offset,
int position, int value)
{
return 1;
}
static inline int coresight_claim_device_unlocked(void __iomem *base)
{
return -EINVAL;