summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/include/mach/etzpc.h
blob: fd697c3e2acd8fab0da384bf81e4d3d4a2af3b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */
/*
 * Copyright (C) 2023, STMicroelectronics - All Rights Reserved
 */

#ifndef MACH_ETZPC_H
#define MACH_ETZPC_H

#include <linux/types.h>

/**
 * stm32_etzpc_check_access - Check ETZPC accesses for given device node
 *
 * @device_node		Node of the device for which the accesses are checked
 *
 * @returns 0 on success (if access is granted), -EINVAL if access is denied.
 *          Else, returns an appropriate negative ERRNO value
 */
int stm32_etzpc_check_access(ofnode device_node);

/**
 * stm32_etzpc_check_access_by_id - Check ETZPC accesses for given id
 *
 * @device_node		Node of the device to get a reference on ETZPC
 * @id			ID of the resource to check
 *
 * @returns 0 on success (if access is granted), -EINVAL if access is denied.
 *          Else, returns an appropriate negative ERRNO value
 */
int stm32_etzpc_check_access_by_id(ofnode device_node, u32 id);

#endif /* MACH_ETZPC_H*/