13c910ecbSThomas 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 19*8cde3c21SCarlo Caione int meson_sm_call(struct meson_sm_firmware *fw, unsigned int cmd_index, 20*8cde3c21SCarlo Caione u32 *ret, u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4); 21*8cde3c21SCarlo Caione int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer, 22*8cde3c21SCarlo Caione unsigned int b_size, unsigned int cmd_index, u32 arg0, 23*8cde3c21SCarlo Caione u32 arg1, u32 arg2, u32 arg3, u32 arg4); 24*8cde3c21SCarlo Caione int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer, 25*8cde3c21SCarlo Caione unsigned int bsize, unsigned int cmd_index, u32 arg0, 26*8cde3c21SCarlo Caione u32 arg1, u32 arg2, u32 arg3, u32 arg4); 27*8cde3c21SCarlo Caione struct meson_sm_firmware *meson_sm_get(struct device_node *firmware_node); 282c4ddb21SCarlo Caione 292c4ddb21SCarlo Caione #endif /* _MESON_SM_FW_H_ */ 30