Peng Fan | bf494d7 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2018 NXP |
| 4 | */ |
| 5 | |
| 6 | #ifndef _SC_SCI_H |
| 7 | #define _SC_SCI_H |
| 8 | |
Simon Glass | f7ae49f | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 9 | #include <log.h> |
Peng Fan | 99ac6c7 | 2023-04-28 12:08:09 +0800 | [diff] [blame] | 10 | #include <firmware/imx/sci/types.h> |
| 11 | #include <firmware/imx/sci/svc/misc/api.h> |
| 12 | #include <firmware/imx/sci/svc/pad/api.h> |
| 13 | #include <firmware/imx/sci/svc/pm/api.h> |
| 14 | #include <firmware/imx/sci/svc/rm/api.h> |
| 15 | #include <firmware/imx/sci/svc/seco/api.h> |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 16 | #include <firmware/imx/sci/svc/timer/api.h> |
Peng Fan | 99ac6c7 | 2023-04-28 12:08:09 +0800 | [diff] [blame] | 17 | #include <firmware/imx/sci/rpc.h> |
Peng Fan | bf494d7 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 18 | #include <dt-bindings/soc/imx_rsrc.h> |
| 19 | #include <linux/errno.h> |
| 20 | |
| 21 | static inline int sc_err_to_linux(sc_err_t err) |
| 22 | { |
| 23 | int ret; |
| 24 | |
| 25 | switch (err) { |
| 26 | case SC_ERR_NONE: |
| 27 | return 0; |
| 28 | case SC_ERR_VERSION: |
| 29 | case SC_ERR_CONFIG: |
| 30 | case SC_ERR_PARM: |
| 31 | ret = -EINVAL; |
| 32 | break; |
| 33 | case SC_ERR_NOACCESS: |
| 34 | case SC_ERR_LOCKED: |
| 35 | case SC_ERR_UNAVAILABLE: |
| 36 | ret = -EACCES; |
| 37 | break; |
| 38 | case SC_ERR_NOTFOUND: |
| 39 | case SC_ERR_NOPOWER: |
| 40 | ret = -ENODEV; |
| 41 | break; |
| 42 | case SC_ERR_IPC: |
| 43 | ret = -EIO; |
| 44 | break; |
| 45 | case SC_ERR_BUSY: |
| 46 | ret = -EBUSY; |
| 47 | break; |
| 48 | case SC_ERR_FAIL: |
| 49 | ret = -EIO; |
| 50 | break; |
| 51 | default: |
| 52 | ret = 0; |
| 53 | break; |
| 54 | } |
| 55 | |
| 56 | debug("%s %d %d\n", __func__, err, ret); |
| 57 | |
| 58 | return ret; |
| 59 | } |
| 60 | |
Peng Fan | f991e98 | 2023-04-28 12:08:10 +0800 | [diff] [blame] | 61 | #if IS_ENABLED(CONFIG_IMX8) |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 62 | /* PM API*/ |
| 63 | int sc_pm_set_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, |
| 64 | sc_pm_power_mode_t mode); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 65 | int sc_pm_get_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, |
| 66 | sc_pm_power_mode_t *mode); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 67 | int sc_pm_set_clock_rate(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 68 | sc_pm_clock_rate_t *rate); |
| 69 | int sc_pm_get_clock_rate(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 70 | sc_pm_clock_rate_t *rate); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 71 | int sc_pm_clock_enable(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 72 | sc_bool_t enable, sc_bool_t autog); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 73 | int sc_pm_set_clock_parent(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 74 | sc_pm_clk_parent_t parent); |
| 75 | int sc_pm_cpu_start(sc_ipc_t ipc, sc_rsrc_t resource, sc_bool_t enable, |
| 76 | sc_faddr_t address); |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 77 | void sc_pm_reboot(sc_ipc_t ipc, sc_pm_reset_type_t type); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 78 | sc_bool_t sc_pm_is_partition_started(sc_ipc_t ipc, sc_rm_pt_t pt); |
Ye Li | 73d769d | 2019-11-13 21:20:43 -0800 | [diff] [blame] | 79 | int sc_pm_resource_reset(sc_ipc_t ipc, sc_rsrc_t resource); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 80 | |
| 81 | /* MISC API */ |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 82 | int sc_misc_set_control(sc_ipc_t ipc, sc_rsrc_t resource, |
| 83 | sc_ctrl_t ctrl, u32 val); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 84 | int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, |
| 85 | u32 *val); |
| 86 | void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev); |
| 87 | void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t status); |
Ye Li | dfbdaa6 | 2020-06-09 03:34:42 -0700 | [diff] [blame] | 88 | int sc_misc_get_boot_container(sc_ipc_t ipc, u8 *idx); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 89 | void sc_misc_build_info(sc_ipc_t ipc, u32 *build, u32 *commit); |
| 90 | int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val); |
Peng Fan | 7752a0f | 2019-05-05 13:23:51 +0000 | [diff] [blame] | 91 | int sc_misc_get_temp(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_temp_t temp, |
| 92 | s16 *celsius, s8 *tenths); |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 93 | void sc_misc_get_button_status(sc_ipc_t ipc, sc_bool_t *status); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 94 | |
| 95 | /* RM API */ |
| 96 | sc_bool_t sc_rm_is_memreg_owned(sc_ipc_t ipc, sc_rm_mr_t mr); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 97 | int sc_rm_find_memreg(sc_ipc_t ipc, sc_rm_mr_t *mr, sc_faddr_t addr_start, |
| 98 | sc_faddr_t addr_end); |
| 99 | int sc_rm_set_memreg_permissions(sc_ipc_t ipc, sc_rm_mr_t mr, |
| 100 | sc_rm_pt_t pt, sc_rm_perm_t perm); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 101 | int sc_rm_get_memreg_info(sc_ipc_t ipc, sc_rm_mr_t mr, sc_faddr_t *addr_start, |
| 102 | sc_faddr_t *addr_end); |
| 103 | sc_bool_t sc_rm_is_resource_owned(sc_ipc_t ipc, sc_rsrc_t resource); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 104 | int sc_rm_partition_alloc(sc_ipc_t ipc, sc_rm_pt_t *pt, sc_bool_t secure, |
| 105 | sc_bool_t isolated, sc_bool_t restricted, |
| 106 | sc_bool_t grant, sc_bool_t coherent); |
| 107 | int sc_rm_partition_free(sc_ipc_t ipc, sc_rm_pt_t pt); |
| 108 | int sc_rm_get_partition(sc_ipc_t ipc, sc_rm_pt_t *pt); |
| 109 | int sc_rm_set_parent(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rm_pt_t pt_parent); |
| 110 | int sc_rm_assign_resource(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rsrc_t resource); |
| 111 | int sc_rm_assign_pad(sc_ipc_t ipc, sc_rm_pt_t pt, sc_pad_t pad); |
| 112 | sc_bool_t sc_rm_is_pad_owned(sc_ipc_t ipc, sc_pad_t pad); |
| 113 | int sc_rm_get_resource_owner(sc_ipc_t ipc, sc_rsrc_t resource, |
| 114 | sc_rm_pt_t *pt); |
Peng Fan | ad9d40a | 2018-10-18 14:28:12 +0200 | [diff] [blame] | 115 | |
| 116 | /* PAD API */ |
| 117 | int sc_pad_set(sc_ipc_t ipc, sc_pad_t pad, u32 val); |
Franck LENORMAND | 242d1cd | 2019-10-09 10:27:43 +0200 | [diff] [blame] | 118 | int sc_pad_get(sc_ipc_t ipc, sc_pad_t pad, uint32_t *val); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 119 | |
| 120 | /* SMMU API */ |
| 121 | int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid); |
| 122 | |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 123 | /* Timer API */ |
| 124 | int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window); |
| 125 | |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 126 | /* SECO API */ |
| 127 | int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd, |
| 128 | sc_faddr_t addr); |
| 129 | int sc_seco_forward_lifecycle(sc_ipc_t ipc, u32 change); |
| 130 | int sc_seco_chip_info(sc_ipc_t ipc, u16 *lc, u16 *monotonic, u32 *uid_l, |
| 131 | u32 *uid_h); |
| 132 | void sc_seco_build_info(sc_ipc_t ipc, u32 *version, u32 *commit); |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 133 | int sc_seco_v2x_build_info(sc_ipc_t ipc, u32 *version, u32 *commit); |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 134 | int sc_seco_get_event(sc_ipc_t ipc, u8 idx, u32 *event); |
| 135 | int sc_seco_gen_key_blob(sc_ipc_t ipc, u32 id, sc_faddr_t load_addr, |
| 136 | sc_faddr_t export_addr, u16 max_size); |
Breno Lima | f959594 | 2019-10-16 18:10:54 -0300 | [diff] [blame] | 137 | int sc_seco_get_mp_key(sc_ipc_t ipc, sc_faddr_t dst_addr, u16 dst_size); |
| 138 | int sc_seco_update_mpmr(sc_ipc_t ipc, sc_faddr_t addr, u8 size, u8 lock); |
| 139 | int sc_seco_get_mp_sign(sc_ipc_t ipc, sc_faddr_t msg_addr, |
| 140 | u16 msg_size, sc_faddr_t dst_addr, u16 dst_size); |
Ye Li | 73d769d | 2019-11-13 21:20:43 -0800 | [diff] [blame] | 141 | int sc_seco_secvio_dgo_config(sc_ipc_t ipc, u8 id, u8 access, u32 *data); |
Franck LENORMAND | 242d1cd | 2019-10-09 10:27:43 +0200 | [diff] [blame] | 142 | int sc_seco_secvio_config(sc_ipc_t ipc, u8 id, u8 access, |
| 143 | u32 *data0, u32 *data1, u32 *data2, u32 *data3, |
| 144 | u32 *data4, u8 size); |
Peng Fan | f991e98 | 2023-04-28 12:08:10 +0800 | [diff] [blame] | 145 | #else |
| 146 | /* PM API*/ |
| 147 | static inline int sc_pm_set_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, |
| 148 | sc_pm_power_mode_t mode) |
| 149 | { |
| 150 | return -EOPNOTSUPP; |
| 151 | } |
| 152 | |
| 153 | static inline int sc_pm_get_resource_power_mode(sc_ipc_t ipc, sc_rsrc_t resource, |
| 154 | sc_pm_power_mode_t *mode) |
| 155 | { |
| 156 | return -EOPNOTSUPP; |
| 157 | } |
| 158 | |
| 159 | static inline int sc_pm_set_clock_rate(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 160 | sc_pm_clock_rate_t *rate) |
| 161 | { |
| 162 | return -EOPNOTSUPP; |
| 163 | } |
| 164 | |
| 165 | static inline int sc_pm_get_clock_rate(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 166 | sc_pm_clock_rate_t *rate) |
| 167 | { |
| 168 | return -EOPNOTSUPP; |
| 169 | } |
| 170 | |
| 171 | static inline int sc_pm_clock_enable(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 172 | sc_bool_t enable, sc_bool_t autog) |
| 173 | { |
| 174 | return -EOPNOTSUPP; |
| 175 | } |
| 176 | |
| 177 | static inline int sc_pm_set_clock_parent(sc_ipc_t ipc, sc_rsrc_t resource, sc_pm_clk_t clk, |
| 178 | sc_pm_clk_parent_t parent) |
| 179 | { |
| 180 | return -EOPNOTSUPP; |
| 181 | } |
| 182 | |
| 183 | static inline int sc_pm_cpu_start(sc_ipc_t ipc, sc_rsrc_t resource, sc_bool_t enable, |
| 184 | sc_faddr_t address) |
| 185 | { |
| 186 | return -EOPNOTSUPP; |
| 187 | } |
| 188 | |
| 189 | static inline sc_bool_t sc_pm_is_partition_started(sc_ipc_t ipc, sc_rm_pt_t pt) |
| 190 | { |
| 191 | return false; |
| 192 | } |
| 193 | |
| 194 | static inline int sc_pm_resource_reset(sc_ipc_t ipc, sc_rsrc_t resource) |
| 195 | { |
| 196 | return -EOPNOTSUPP; |
| 197 | } |
| 198 | |
| 199 | /* MISC API */ |
| 200 | static inline int sc_misc_set_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, u32 val) |
| 201 | { |
| 202 | return -EOPNOTSUPP; |
| 203 | } |
| 204 | |
| 205 | static inline int sc_misc_get_control(sc_ipc_t ipc, sc_rsrc_t resource, sc_ctrl_t ctrl, u32 *val) |
| 206 | { |
| 207 | return -EOPNOTSUPP; |
| 208 | } |
| 209 | |
| 210 | static inline void sc_misc_get_boot_dev(sc_ipc_t ipc, sc_rsrc_t *boot_dev) |
| 211 | { |
| 212 | } |
| 213 | |
| 214 | static inline void sc_misc_boot_status(sc_ipc_t ipc, sc_misc_boot_status_t status) |
| 215 | { |
| 216 | } |
| 217 | |
| 218 | static inline int sc_misc_get_boot_container(sc_ipc_t ipc, u8 *idx) |
| 219 | { |
| 220 | return -EOPNOTSUPP; |
| 221 | } |
| 222 | |
| 223 | static inline void sc_misc_build_info(sc_ipc_t ipc, u32 *build, u32 *commit) |
| 224 | { |
| 225 | } |
| 226 | |
| 227 | static inline int sc_misc_otp_fuse_read(sc_ipc_t ipc, u32 word, u32 *val) |
| 228 | { |
| 229 | return -EOPNOTSUPP; |
| 230 | } |
| 231 | |
| 232 | static inline int sc_misc_get_temp(sc_ipc_t ipc, sc_rsrc_t resource, sc_misc_temp_t temp, |
| 233 | s16 *celsius, s8 *tenths) |
| 234 | { |
| 235 | return -EOPNOTSUPP; |
| 236 | } |
| 237 | |
| 238 | /* RM API */ |
| 239 | static inline sc_bool_t sc_rm_is_memreg_owned(sc_ipc_t ipc, sc_rm_mr_t mr) |
| 240 | { |
| 241 | return true; |
| 242 | } |
| 243 | |
| 244 | static inline int sc_rm_find_memreg(sc_ipc_t ipc, sc_rm_mr_t *mr, sc_faddr_t addr_start, |
| 245 | sc_faddr_t addr_end) |
| 246 | { |
| 247 | return -EOPNOTSUPP; |
| 248 | } |
| 249 | |
| 250 | static inline int sc_rm_set_memreg_permissions(sc_ipc_t ipc, sc_rm_mr_t mr, sc_rm_pt_t pt, |
| 251 | sc_rm_perm_t perm) |
| 252 | { |
| 253 | return -EOPNOTSUPP; |
| 254 | } |
| 255 | |
| 256 | static inline int sc_rm_get_memreg_info(sc_ipc_t ipc, sc_rm_mr_t mr, sc_faddr_t *addr_start, |
| 257 | sc_faddr_t *addr_end) |
| 258 | { |
| 259 | return -EOPNOTSUPP; |
| 260 | } |
| 261 | |
| 262 | static inline sc_bool_t sc_rm_is_resource_owned(sc_ipc_t ipc, sc_rsrc_t resource) |
| 263 | { |
| 264 | return true; |
| 265 | } |
| 266 | |
| 267 | static inline int sc_rm_partition_alloc(sc_ipc_t ipc, sc_rm_pt_t *pt, sc_bool_t secure, |
| 268 | sc_bool_t isolated, sc_bool_t restricted, |
| 269 | sc_bool_t grant, sc_bool_t coherent) |
| 270 | { |
| 271 | return -EOPNOTSUPP; |
| 272 | } |
| 273 | |
| 274 | static inline int sc_rm_partition_free(sc_ipc_t ipc, sc_rm_pt_t pt) |
| 275 | { |
| 276 | return -EOPNOTSUPP; |
| 277 | } |
| 278 | |
| 279 | static inline int sc_rm_get_partition(sc_ipc_t ipc, sc_rm_pt_t *pt) |
| 280 | { |
| 281 | return -EOPNOTSUPP; |
| 282 | } |
| 283 | |
| 284 | static inline int sc_rm_set_parent(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rm_pt_t pt_parent) |
| 285 | { |
| 286 | return -EOPNOTSUPP; |
| 287 | } |
| 288 | |
| 289 | static inline int sc_rm_assign_resource(sc_ipc_t ipc, sc_rm_pt_t pt, sc_rsrc_t resource) |
| 290 | { |
| 291 | return -EOPNOTSUPP; |
| 292 | } |
| 293 | |
| 294 | static inline int sc_rm_assign_pad(sc_ipc_t ipc, sc_rm_pt_t pt, sc_pad_t pad) |
| 295 | { |
| 296 | return -EOPNOTSUPP; |
| 297 | } |
| 298 | |
| 299 | static inline sc_bool_t sc_rm_is_pad_owned(sc_ipc_t ipc, sc_pad_t pad) |
| 300 | { |
| 301 | return true; |
| 302 | } |
| 303 | |
| 304 | static inline int sc_rm_get_resource_owner(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_pt_t *pt) |
| 305 | { |
| 306 | return -EOPNOTSUPP; |
| 307 | } |
| 308 | |
| 309 | /* PAD API */ |
| 310 | static inline int sc_pad_set(sc_ipc_t ipc, sc_pad_t pad, u32 val) |
| 311 | { |
| 312 | return -EOPNOTSUPP; |
| 313 | } |
| 314 | |
| 315 | static inline int sc_pad_get(sc_ipc_t ipc, sc_pad_t pad, uint32_t *val) |
| 316 | { |
| 317 | return -EOPNOTSUPP; |
| 318 | } |
| 319 | |
| 320 | /* SMMU API */ |
| 321 | static inline int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid) |
| 322 | { |
| 323 | return -EOPNOTSUPP; |
| 324 | } |
| 325 | |
| 326 | /* SECO API */ |
| 327 | static inline int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd, sc_faddr_t addr) |
| 328 | { |
| 329 | return -EOPNOTSUPP; |
| 330 | } |
| 331 | |
| 332 | static inline int sc_seco_forward_lifecycle(sc_ipc_t ipc, u32 change) |
| 333 | { |
| 334 | return -EOPNOTSUPP; |
| 335 | } |
| 336 | |
| 337 | static inline int sc_seco_chip_info(sc_ipc_t ipc, u16 *lc, u16 *monotonic, u32 *uid_l, u32 *uid_h) |
| 338 | { |
| 339 | return -EOPNOTSUPP; |
| 340 | } |
| 341 | |
| 342 | void sc_seco_build_info(sc_ipc_t ipc, u32 *version, u32 *commit) |
| 343 | { |
| 344 | } |
| 345 | |
| 346 | static inline int sc_seco_get_event(sc_ipc_t ipc, u8 idx, u32 *event) |
| 347 | { |
| 348 | return -EOPNOTSUPP; |
| 349 | } |
| 350 | |
| 351 | static inline int sc_seco_gen_key_blob(sc_ipc_t ipc, u32 id, sc_faddr_t load_addr, |
| 352 | sc_faddr_t export_addr, u16 max_size) |
| 353 | { |
| 354 | return -EOPNOTSUPP; |
| 355 | } |
| 356 | |
| 357 | static inline int sc_seco_get_mp_key(sc_ipc_t ipc, sc_faddr_t dst_addr, u16 dst_size) |
| 358 | { |
| 359 | return -EOPNOTSUPP; |
| 360 | } |
| 361 | |
| 362 | static inline int sc_seco_update_mpmr(sc_ipc_t ipc, sc_faddr_t addr, u8 size, u8 lock) |
| 363 | { |
| 364 | return -EOPNOTSUPP; |
| 365 | } |
| 366 | |
| 367 | static inline int sc_seco_get_mp_sign(sc_ipc_t ipc, sc_faddr_t msg_addr, u16 msg_size, |
| 368 | sc_faddr_t dst_addr, u16 dst_size) |
| 369 | { |
| 370 | return -EOPNOTSUPP; |
| 371 | } |
| 372 | |
| 373 | static inline int sc_seco_secvio_dgo_config(sc_ipc_t ipc, u8 id, u8 access, u32 *data) |
| 374 | { |
| 375 | return -EOPNOTSUPP; |
| 376 | } |
| 377 | |
| 378 | static inline int sc_seco_secvio_config(sc_ipc_t ipc, u8 id, u8 access, u32 *data0, u32 *data1, |
| 379 | u32 *data2, u32 *data3, u32 *data4, u8 size) |
| 380 | { |
| 381 | return -EOPNOTSUPP; |
| 382 | } |
| 383 | |
Peng Fan | 922d450 | 2023-06-15 18:09:04 +0800 | [diff] [blame^] | 384 | static inline void sc_pm_reboot(sc_ipc_t ipc, sc_pm_reset_type_t type) |
| 385 | { |
| 386 | } |
| 387 | |
| 388 | static inline int sc_seco_v2x_build_info(sc_ipc_t ipc, u32 *version, u32 *commit) |
| 389 | { |
| 390 | return -EOPNOTSUPP; |
| 391 | } |
| 392 | |
| 393 | static inline void sc_misc_get_button_status(sc_ipc_t ipc, sc_bool_t *status) |
| 394 | { |
| 395 | } |
| 396 | |
| 397 | static inline int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window) |
| 398 | { |
| 399 | return -EOPNOTSUPP; |
| 400 | } |
Peng Fan | f991e98 | 2023-04-28 12:08:10 +0800 | [diff] [blame] | 401 | #endif |
Peng Fan | 4d81755 | 2019-09-23 10:12:31 +0000 | [diff] [blame] | 402 | |
Peng Fan | bf494d7 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 403 | #endif |