cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

xlnx-event-manager.h (1139B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2
      3#ifndef _FIRMWARE_XLNX_EVENT_MANAGER_H_
      4#define _FIRMWARE_XLNX_EVENT_MANAGER_H_
      5
      6#include <linux/firmware/xlnx-zynqmp.h>
      7
      8#define CB_MAX_PAYLOAD_SIZE	(4U) /*In payload maximum 32bytes */
      9
     10/************************** Exported Function *****************************/
     11
     12typedef void (*event_cb_func_t)(const u32 *payload, void *data);
     13
     14#if IS_REACHABLE(CONFIG_XLNX_EVENT_MANAGER)
     15int xlnx_register_event(const enum pm_api_cb_id cb_type, const u32 node_id,
     16			const u32 event, const bool wake,
     17			event_cb_func_t cb_fun, void *data);
     18
     19int xlnx_unregister_event(const enum pm_api_cb_id cb_type, const u32 node_id,
     20			  const u32 event, event_cb_func_t cb_fun, void *data);
     21#else
     22static inline int xlnx_register_event(const enum pm_api_cb_id cb_type, const u32 node_id,
     23				      const u32 event, const bool wake,
     24				      event_cb_func_t cb_fun, void *data)
     25{
     26	return -ENODEV;
     27}
     28
     29static inline int xlnx_unregister_event(const enum pm_api_cb_id cb_type, const u32 node_id,
     30					const u32 event, event_cb_func_t cb_fun, void *data)
     31{
     32	return -ENODEV;
     33}
     34#endif
     35
     36#endif /* _FIRMWARE_XLNX_EVENT_MANAGER_H_ */