Software APIs
dif_soc_proxy_autogen.h
Go to the documentation of this file.
1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5
6
7#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SOC_PROXY_AUTOGEN_H_
8#define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SOC_PROXY_AUTOGEN_H_
9
10// THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
11// util/autogen_dif.py -i
12// hw/top_darjeeling/ip/soc_proxy/data/soc_proxy.hjson -o
13// bazel-out/k8-fastbuild-ST-24cc6a2908d2/bin/sw/device/lib/dif/autogen
14
15
16/**
17 * @file
18 * @brief <a href="/book/hw/ip/soc_proxy/">SOC_PROXY</a> Device Interface Functions
19 */
20
21#include <stdbool.h>
22#include <stdint.h>
23
27#include "hw/top/dt/dt_soc_proxy.h" // Generated.
28
29#ifdef __cplusplus
30extern "C" {
31#endif // __cplusplus
32
33/**
34 * A handle to soc_proxy.
35 *
36 * This type should be treated as opaque by users.
37 */
38typedef struct dif_soc_proxy {
39 /**
40 * The base address for the soc_proxy hardware registers.
41 */
43 /**
44 * The instance, set to `kDtSocProxyCount` if not initialized
45 * through `dif_soc_proxy_init_from_dt`.
46 */
49
50/**
51 * Creates a new handle for a(n) soc_proxy peripheral.
52 *
53 * This function does not actuate the hardware.
54 *
55 * @param base_addr The MMIO base address of the soc_proxy peripheral.
56 * @param[out] soc_proxy Out param for the initialized handle.
57 * @return The result of the operation.
58 *
59 * DEPRECATED This function exists solely for the transition to
60 * dt-based DIFs and will be removed in the future.
61 */
64 mmio_region_t base_addr,
65 dif_soc_proxy_t *soc_proxy);
66
67/**
68 * Creates a new handle for a(n) soc_proxy peripheral.
69 *
70 * This function does not actuate the hardware.
71 *
72 * @param dt The devicetable description of the device.
73 * @param[out] soc_proxy Out param for the initialized handle.
74 * @return The result of the operation.
75 */
79 dif_soc_proxy_t *soc_proxy);
80
81/**
82 * Get the DT handle from this DIF.
83 *
84 * If this DIF was initialized by `dif_soc_proxy_init_from_dt(dt, ..)`
85 * then this function will return `dt`. Otherwise it will return an error.
86 *
87 * @param soc_proxy A soc_proxy handle.
88 * @param[out] dt DT handle.
89 * @return `kDifBadArg` if the DIF has no DT information, `kDifOk` otherwise.
90 */
93 const dif_soc_proxy_t *soc_proxy,
94 dt_soc_proxy_t *dt);
95
96 /**
97 * A soc_proxy alert type.
98 */
99 typedef enum dif_soc_proxy_alert {
100 /**
101 * Fatal bus integrity alert
102 */
105
106 /**
107 * Forces a particular alert, causing it to be escalated as if the hardware
108 * had raised it.
109 *
110 * @param soc_proxy A soc_proxy handle.
111 * @param alert The alert to force.
112 * @return The result of the operation.
113 */
116 const dif_soc_proxy_t *soc_proxy,
118
119
120#ifdef __cplusplus
121} // extern "C"
122#endif // __cplusplus
123
124#endif // OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_SOC_PROXY_AUTOGEN_H_