xref: /linux/arch/microblaze/include/asm/xilinx_mb_manager.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1a5e3aaa6SAppana Durga Kedareswara rao /* SPDX-License-Identifier: GPL-2.0 */
2a5e3aaa6SAppana Durga Kedareswara rao /*
3a5e3aaa6SAppana Durga Kedareswara rao  * Copyright (C) 2022 Xilinx, Inc.
4a5e3aaa6SAppana Durga Kedareswara rao  */
5a5e3aaa6SAppana Durga Kedareswara rao #ifndef _XILINX_MB_MANAGER_H
6a5e3aaa6SAppana Durga Kedareswara rao #define _XILINX_MB_MANAGER_H
7a5e3aaa6SAppana Durga Kedareswara rao 
8*adc4cefaSAppana Durga Kedareswara rao # ifndef __ASSEMBLY__
9*adc4cefaSAppana Durga Kedareswara rao 
10a5e3aaa6SAppana Durga Kedareswara rao #include <linux/of_address.h>
11a5e3aaa6SAppana Durga Kedareswara rao 
12a5e3aaa6SAppana Durga Kedareswara rao /*
13a5e3aaa6SAppana Durga Kedareswara rao  * When the break vector gets asserted because of error injection, the break
14a5e3aaa6SAppana Durga Kedareswara rao  * signal must be blocked before exiting from the break handler, Below api
15a5e3aaa6SAppana Durga Kedareswara rao  * updates the manager address and control register and error counter callback
16a5e3aaa6SAppana Durga Kedareswara rao  * arguments, which will be used by the break handler to block the break and
17a5e3aaa6SAppana Durga Kedareswara rao  * call the callback function.
18a5e3aaa6SAppana Durga Kedareswara rao  */
19a5e3aaa6SAppana Durga Kedareswara rao void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
20a5e3aaa6SAppana Durga Kedareswara rao 			  void (*callback)(void *data),
21a5e3aaa6SAppana Durga Kedareswara rao 			  void *priv, void (*reset_callback)(void *data));
22*adc4cefaSAppana Durga Kedareswara rao asmlinkage void xmb_inject_err(void);
23*adc4cefaSAppana Durga Kedareswara rao 
24*adc4cefaSAppana Durga Kedareswara rao # endif /* __ASSEMBLY__ */
25*adc4cefaSAppana Durga Kedareswara rao 
26*adc4cefaSAppana Durga Kedareswara rao /* Error injection offset */
27*adc4cefaSAppana Durga Kedareswara rao #define XMB_INJECT_ERR_OFFSET	0x200
28a5e3aaa6SAppana Durga Kedareswara rao 
29a5e3aaa6SAppana Durga Kedareswara rao #endif /* _XILINX_MB_MANAGER_H */
30