xref: /linux/include/linux/firmware/meson/meson_sm.h (revision 3c910ecbdda4227abd145967774f92b1a3341493)
1*3c910ecbSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
22c4ddb21SCarlo Caione /*
32c4ddb21SCarlo Caione  * Copyright (C) 2016 Endless Mobile, Inc.
42c4ddb21SCarlo Caione  * Author: Carlo Caione <carlo@endlessm.com>
52c4ddb21SCarlo Caione  */
62c4ddb21SCarlo Caione 
72c4ddb21SCarlo Caione #ifndef _MESON_SM_FW_H_
82c4ddb21SCarlo Caione #define _MESON_SM_FW_H_
92c4ddb21SCarlo Caione 
102c4ddb21SCarlo Caione enum {
112c4ddb21SCarlo Caione 	SM_EFUSE_READ,
122c4ddb21SCarlo Caione 	SM_EFUSE_WRITE,
132c4ddb21SCarlo Caione 	SM_EFUSE_USER_MAX,
140789724fSNeil Armstrong 	SM_GET_CHIP_ID,
152c4ddb21SCarlo Caione };
162c4ddb21SCarlo Caione 
172c4ddb21SCarlo Caione struct meson_sm_firmware;
182c4ddb21SCarlo Caione 
192c4ddb21SCarlo Caione int meson_sm_call(unsigned int cmd_index, u32 *ret, u32 arg0, u32 arg1,
202c4ddb21SCarlo Caione 		  u32 arg2, u32 arg3, u32 arg4);
212c4ddb21SCarlo Caione int meson_sm_call_write(void *buffer, unsigned int b_size, unsigned int cmd_index,
222c4ddb21SCarlo Caione 			u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
2383e007a0SCarlo Caione int meson_sm_call_read(void *buffer, unsigned int bsize, unsigned int cmd_index,
2483e007a0SCarlo Caione 		       u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4);
252c4ddb21SCarlo Caione 
262c4ddb21SCarlo Caione #endif /* _MESON_SM_FW_H_ */
27