developer | e5e687d | 2023-08-08 16:05:33 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * Copyright (c) 2023 MediaTek Inc. All Rights Reserved. |
| 4 | * |
| 5 | * Author: Ren-Ting Wang <ren-ting.wang@mediatek.com> |
| 6 | */ |
| 7 | |
| 8 | #ifndef _TOPS_FW_H_ |
| 9 | #define _TOPS_FW_H_ |
| 10 | |
| 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/time.h> |
| 13 | |
| 14 | enum tops_role_type { |
| 15 | TOPS_ROLE_TYPE_MGMT, |
| 16 | TOPS_ROLE_TYPE_CLUSTER, |
| 17 | |
| 18 | __TOPS_ROLE_TYPE_MAX, |
| 19 | }; |
| 20 | |
| 21 | u64 mtk_tops_fw_get_git_commit_id(enum tops_role_type rtype); |
| 22 | void mtk_tops_fw_get_built_date(enum tops_role_type rtype, struct tm *tm); |
| 23 | u32 mtk_tops_fw_attr_get_num(enum tops_role_type rtype); |
| 24 | const char *mtk_tops_fw_attr_get_property(enum tops_role_type rtype, u32 idx); |
| 25 | const char *mtk_tops_fw_attr_get_value(enum tops_role_type rtype, |
| 26 | const char *property); |
| 27 | |
| 28 | int mtk_tops_fw_bring_up_default_cores(void); |
| 29 | int mtk_tops_fw_bring_up_core(const char *fw_path); |
| 30 | void mtk_tops_fw_clean_up(void); |
| 31 | int mtk_tops_fw_init(struct platform_device *pdev); |
| 32 | #endif /* _TOPS_FW_H_ */ |