xref: /linux/include/linux/firmware/meson/meson_sm.h (revision 2c4ddb215521d5dfb30f72123ef966ac6bdd16d7)
1*2c4ddb21SCarlo Caione /*
2*2c4ddb21SCarlo Caione  * Copyright (C) 2016 Endless Mobile, Inc.
3*2c4ddb21SCarlo Caione  * Author: Carlo Caione <carlo@endlessm.com>
4*2c4ddb21SCarlo Caione  *
5*2c4ddb21SCarlo Caione  * This program is free software; you can redistribute it and/or
6*2c4ddb21SCarlo Caione  * modify it under the terms of the GNU General Public License
7*2c4ddb21SCarlo Caione  * version 2 as published by the Free Software Foundation.
8*2c4ddb21SCarlo Caione  *
9*2c4ddb21SCarlo Caione  * You should have received a copy of the GNU General Public License
10*2c4ddb21SCarlo Caione  * along with this program. If not, see <http://www.gnu.org/licenses/>.
11*2c4ddb21SCarlo Caione  */
12*2c4ddb21SCarlo Caione 
13*2c4ddb21SCarlo Caione #ifndef _MESON_SM_FW_H_
14*2c4ddb21SCarlo Caione #define _MESON_SM_FW_H_
15*2c4ddb21SCarlo Caione 
16*2c4ddb21SCarlo Caione enum {
17*2c4ddb21SCarlo Caione 	SM_EFUSE_READ,
18*2c4ddb21SCarlo Caione 	SM_EFUSE_WRITE,
19*2c4ddb21SCarlo Caione 	SM_EFUSE_USER_MAX,
20*2c4ddb21SCarlo Caione };
21*2c4ddb21SCarlo Caione 
22*2c4ddb21SCarlo Caione struct meson_sm_firmware;
23*2c4ddb21SCarlo Caione 
24*2c4ddb21SCarlo Caione int meson_sm_call(unsigned int cmd_index, u32 *ret, u32 arg0, u32 arg1,
25*2c4ddb21SCarlo Caione 		  u32 arg2, u32 arg3, u32 arg4);
26*2c4ddb21SCarlo Caione int meson_sm_call_write(void *buffer, unsigned int b_size, unsigned int cmd_index,
27*2c4ddb21SCarlo Caione 			u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
28*2c4ddb21SCarlo Caione int meson_sm_call_read(void *buffer, unsigned int cmd_index, u32 arg0, u32 arg1,
29*2c4ddb21SCarlo Caione 		       u32 arg2, u32 arg3, u32 arg4);
30*2c4ddb21SCarlo Caione 
31*2c4ddb21SCarlo Caione #endif /* _MESON_SM_FW_H_ */
32