1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Intel MIC Platform Software Stack (MPSS)
5 * Copyright(c) 2015 Intel Corporation.
7 * Intel MIC Coprocessor State Management (COSM) Driver
12 #include <linux/scif.h>
13 #include "../bus/cosm_bus.h"
15 #define COSM_HEARTBEAT_SEND_SEC 30
16 #define SCIF_COSM_LISTEN_PORT 201
20 * @COSM_MSG_SHUTDOWN: host->card trigger shutdown
21 * @COSM_MSG_SYNC_TIME: host->card send host time to card to sync time
22 * @COSM_MSG_HEARTBEAT: card->host heartbeat
23 * @COSM_MSG_SHUTDOWN_STATUS: card->host with shutdown status as payload
29 COSM_MSG_SHUTDOWN_STATUS,
43 extern const char * const cosm_state_string[];
44 extern const char * const cosm_shutdown_status_string[];
46 void cosm_sysfs_init(struct cosm_device *cdev);
47 int cosm_start(struct cosm_device *cdev);
48 void cosm_stop(struct cosm_device *cdev, bool force);
49 int cosm_reset(struct cosm_device *cdev);
50 int cosm_shutdown(struct cosm_device *cdev);
51 void cosm_set_state(struct cosm_device *cdev, u8 state);
52 void cosm_set_shutdown_status(struct cosm_device *cdev, u8 status);
53 void cosm_init_debugfs(void);
54 void cosm_exit_debugfs(void);
55 void cosm_create_debug_dir(struct cosm_device *cdev);
56 void cosm_delete_debug_dir(struct cosm_device *cdev);
57 int cosm_scif_init(void);
58 void cosm_scif_exit(void);
59 void cosm_scif_work(struct work_struct *work);