blob: 99f9d3d282710439fe88377598c7c46bba841e69 [file] [log] [blame]
developere5e687d2023-08-08 16:05:33 +08001/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (c) 2023 MediaTek Inc. All Rights Reserved.
4 *
5 * Author: Alvin Kuo <alvin.kuog@mediatek.com>
6 */
7
8#ifndef _TOPS_SER_H_
9#define _TOPS_SER_H_
10
11#include <linux/list.h>
12#include <linux/spinlock.h>
13#include <linux/platform_device.h>
14
15#include "net-event.h"
16#include "mcu.h"
17#include "wdt.h"
18
19enum tops_ser_type {
20 TOPS_SER_NETSYS_FE_RST,
21 TOPS_SER_WDT_TO,
22
23 __TOPS_SER_TYPE_MAX,
24};
25
26struct tops_ser_params {
27 enum tops_ser_type type;
28
29 union {
30 struct tops_net_ser_data net;
31 struct tops_wdt_ser_data wdt;
32 } data;
33
34 void (*ser_callback)(struct tops_ser_params *ser_params);
35 void (*ser_mcmd_setup)(struct tops_ser_params *ser_params,
36 struct mcu_ctrl_cmd *mcmd);
37};
38
39int mtk_tops_ser(struct tops_ser_params *ser_params);
40int mtk_tops_ser_init(struct platform_device *pdev);
41int mtk_tops_ser_deinit(struct platform_device *pdev);
42#endif /* _TOPS_SER_H_ */