18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright IBM Corp. 2001, 2007
48c2ecf20Sopenharmony_ci * Authors: 	Fritz Elfert (felfert@millenux.com)
58c2ecf20Sopenharmony_ci * 		Peter Tiedemann (ptiedem@de.ibm.com)
68c2ecf20Sopenharmony_ci * 	MPC additions :
78c2ecf20Sopenharmony_ci *		Belinda Thompson (belindat@us.ibm.com)
88c2ecf20Sopenharmony_ci *		Andy Richter (richtera@us.ibm.com)
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci#ifndef _CTCM_FSMS_H_
118c2ecf20Sopenharmony_ci#define _CTCM_FSMS_H_
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include <linux/module.h>
148c2ecf20Sopenharmony_ci#include <linux/init.h>
158c2ecf20Sopenharmony_ci#include <linux/kernel.h>
168c2ecf20Sopenharmony_ci#include <linux/slab.h>
178c2ecf20Sopenharmony_ci#include <linux/errno.h>
188c2ecf20Sopenharmony_ci#include <linux/types.h>
198c2ecf20Sopenharmony_ci#include <linux/interrupt.h>
208c2ecf20Sopenharmony_ci#include <linux/timer.h>
218c2ecf20Sopenharmony_ci#include <linux/bitops.h>
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#include <linux/signal.h>
248c2ecf20Sopenharmony_ci#include <linux/string.h>
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci#include <linux/ip.h>
278c2ecf20Sopenharmony_ci#include <linux/if_arp.h>
288c2ecf20Sopenharmony_ci#include <linux/tcp.h>
298c2ecf20Sopenharmony_ci#include <linux/skbuff.h>
308c2ecf20Sopenharmony_ci#include <linux/ctype.h>
318c2ecf20Sopenharmony_ci#include <net/dst.h>
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#include <linux/io.h>
348c2ecf20Sopenharmony_ci#include <asm/ccwdev.h>
358c2ecf20Sopenharmony_ci#include <asm/ccwgroup.h>
368c2ecf20Sopenharmony_ci#include <linux/uaccess.h>
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#include <asm/idals.h>
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#include "fsm.h"
418c2ecf20Sopenharmony_ci#include "ctcm_main.h"
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/*
448c2ecf20Sopenharmony_ci * Definitions for the channel statemachine(s) for ctc and ctcmpc
458c2ecf20Sopenharmony_ci *
468c2ecf20Sopenharmony_ci * To allow better kerntyping, prefix-less definitions for channel states
478c2ecf20Sopenharmony_ci * and channel events have been replaced :
488c2ecf20Sopenharmony_ci * ch_event... -> ctc_ch_event...
498c2ecf20Sopenharmony_ci * CH_EVENT... -> CTC_EVENT...
508c2ecf20Sopenharmony_ci * ch_state... -> ctc_ch_state...
518c2ecf20Sopenharmony_ci * CH_STATE... -> CTC_STATE...
528c2ecf20Sopenharmony_ci */
538c2ecf20Sopenharmony_ci/*
548c2ecf20Sopenharmony_ci * Events of the channel statemachine(s) for ctc and ctcmpc
558c2ecf20Sopenharmony_ci */
568c2ecf20Sopenharmony_cienum ctc_ch_events {
578c2ecf20Sopenharmony_ci	/*
588c2ecf20Sopenharmony_ci	 * Events, representing return code of
598c2ecf20Sopenharmony_ci	 * I/O operations (ccw_device_start, ccw_device_halt et al.)
608c2ecf20Sopenharmony_ci	 */
618c2ecf20Sopenharmony_ci	CTC_EVENT_IO_SUCCESS,
628c2ecf20Sopenharmony_ci	CTC_EVENT_IO_EBUSY,
638c2ecf20Sopenharmony_ci	CTC_EVENT_IO_ENODEV,
648c2ecf20Sopenharmony_ci	CTC_EVENT_IO_UNKNOWN,
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci	CTC_EVENT_ATTNBUSY,
678c2ecf20Sopenharmony_ci	CTC_EVENT_ATTN,
688c2ecf20Sopenharmony_ci	CTC_EVENT_BUSY,
698c2ecf20Sopenharmony_ci	/*
708c2ecf20Sopenharmony_ci	 * Events, representing unit-check
718c2ecf20Sopenharmony_ci	 */
728c2ecf20Sopenharmony_ci	CTC_EVENT_UC_RCRESET,
738c2ecf20Sopenharmony_ci	CTC_EVENT_UC_RSRESET,
748c2ecf20Sopenharmony_ci	CTC_EVENT_UC_TXTIMEOUT,
758c2ecf20Sopenharmony_ci	CTC_EVENT_UC_TXPARITY,
768c2ecf20Sopenharmony_ci	CTC_EVENT_UC_HWFAIL,
778c2ecf20Sopenharmony_ci	CTC_EVENT_UC_RXPARITY,
788c2ecf20Sopenharmony_ci	CTC_EVENT_UC_ZERO,
798c2ecf20Sopenharmony_ci	CTC_EVENT_UC_UNKNOWN,
808c2ecf20Sopenharmony_ci	/*
818c2ecf20Sopenharmony_ci	 * Events, representing subchannel-check
828c2ecf20Sopenharmony_ci	 */
838c2ecf20Sopenharmony_ci	CTC_EVENT_SC_UNKNOWN,
848c2ecf20Sopenharmony_ci	/*
858c2ecf20Sopenharmony_ci	 * Events, representing machine checks
868c2ecf20Sopenharmony_ci	 */
878c2ecf20Sopenharmony_ci	CTC_EVENT_MC_FAIL,
888c2ecf20Sopenharmony_ci	CTC_EVENT_MC_GOOD,
898c2ecf20Sopenharmony_ci	/*
908c2ecf20Sopenharmony_ci	 * Event, representing normal IRQ
918c2ecf20Sopenharmony_ci	 */
928c2ecf20Sopenharmony_ci	CTC_EVENT_IRQ,
938c2ecf20Sopenharmony_ci	CTC_EVENT_FINSTAT,
948c2ecf20Sopenharmony_ci	/*
958c2ecf20Sopenharmony_ci	 * Event, representing timer expiry.
968c2ecf20Sopenharmony_ci	 */
978c2ecf20Sopenharmony_ci	CTC_EVENT_TIMER,
988c2ecf20Sopenharmony_ci	/*
998c2ecf20Sopenharmony_ci	 * Events, representing commands from upper levels.
1008c2ecf20Sopenharmony_ci	 */
1018c2ecf20Sopenharmony_ci	CTC_EVENT_START,
1028c2ecf20Sopenharmony_ci	CTC_EVENT_STOP,
1038c2ecf20Sopenharmony_ci	CTC_NR_EVENTS,
1048c2ecf20Sopenharmony_ci	/*
1058c2ecf20Sopenharmony_ci	 * additional MPC events
1068c2ecf20Sopenharmony_ci	 */
1078c2ecf20Sopenharmony_ci	CTC_EVENT_SEND_XID = CTC_NR_EVENTS,
1088c2ecf20Sopenharmony_ci	CTC_EVENT_RSWEEP_TIMER,
1098c2ecf20Sopenharmony_ci	/*
1108c2ecf20Sopenharmony_ci	 * MUST be always the last element!!
1118c2ecf20Sopenharmony_ci	 */
1128c2ecf20Sopenharmony_ci	CTC_MPC_NR_EVENTS,
1138c2ecf20Sopenharmony_ci};
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci/*
1168c2ecf20Sopenharmony_ci * States of the channel statemachine(s) for ctc and ctcmpc.
1178c2ecf20Sopenharmony_ci */
1188c2ecf20Sopenharmony_cienum ctc_ch_states {
1198c2ecf20Sopenharmony_ci	/*
1208c2ecf20Sopenharmony_ci	 * Channel not assigned to any device,
1218c2ecf20Sopenharmony_ci	 * initial state, direction invalid
1228c2ecf20Sopenharmony_ci	 */
1238c2ecf20Sopenharmony_ci	CTC_STATE_IDLE,
1248c2ecf20Sopenharmony_ci	/*
1258c2ecf20Sopenharmony_ci	 * Channel assigned but not operating
1268c2ecf20Sopenharmony_ci	 */
1278c2ecf20Sopenharmony_ci	CTC_STATE_STOPPED,
1288c2ecf20Sopenharmony_ci	CTC_STATE_STARTWAIT,
1298c2ecf20Sopenharmony_ci	CTC_STATE_STARTRETRY,
1308c2ecf20Sopenharmony_ci	CTC_STATE_SETUPWAIT,
1318c2ecf20Sopenharmony_ci	CTC_STATE_RXINIT,
1328c2ecf20Sopenharmony_ci	CTC_STATE_TXINIT,
1338c2ecf20Sopenharmony_ci	CTC_STATE_RX,
1348c2ecf20Sopenharmony_ci	CTC_STATE_TX,
1358c2ecf20Sopenharmony_ci	CTC_STATE_RXIDLE,
1368c2ecf20Sopenharmony_ci	CTC_STATE_TXIDLE,
1378c2ecf20Sopenharmony_ci	CTC_STATE_RXERR,
1388c2ecf20Sopenharmony_ci	CTC_STATE_TXERR,
1398c2ecf20Sopenharmony_ci	CTC_STATE_TERM,
1408c2ecf20Sopenharmony_ci	CTC_STATE_DTERM,
1418c2ecf20Sopenharmony_ci	CTC_STATE_NOTOP,
1428c2ecf20Sopenharmony_ci	CTC_NR_STATES,     /* MUST be the last element of non-expanded states */
1438c2ecf20Sopenharmony_ci	/*
1448c2ecf20Sopenharmony_ci	 * additional MPC states
1458c2ecf20Sopenharmony_ci	 */
1468c2ecf20Sopenharmony_ci	CH_XID0_PENDING = CTC_NR_STATES,
1478c2ecf20Sopenharmony_ci	CH_XID0_INPROGRESS,
1488c2ecf20Sopenharmony_ci	CH_XID7_PENDING,
1498c2ecf20Sopenharmony_ci	CH_XID7_PENDING1,
1508c2ecf20Sopenharmony_ci	CH_XID7_PENDING2,
1518c2ecf20Sopenharmony_ci	CH_XID7_PENDING3,
1528c2ecf20Sopenharmony_ci	CH_XID7_PENDING4,
1538c2ecf20Sopenharmony_ci	CTC_MPC_NR_STATES, /* MUST be the last element of expanded mpc states */
1548c2ecf20Sopenharmony_ci};
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ciextern const char *ctc_ch_event_names[];
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ciextern const char *ctc_ch_state_names[];
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_civoid ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg);
1618c2ecf20Sopenharmony_civoid ctcm_purge_skb_queue(struct sk_buff_head *q);
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci/*
1648c2ecf20Sopenharmony_ci * ----- non-static actions for ctcm channel statemachine -----
1658c2ecf20Sopenharmony_ci *
1668c2ecf20Sopenharmony_ci */
1678c2ecf20Sopenharmony_civoid ctcm_chx_txidle(fsm_instance *fi, int event, void *arg);
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci/*
1708c2ecf20Sopenharmony_ci * ----- FSM (state/event/action) of the ctcm channel statemachine -----
1718c2ecf20Sopenharmony_ci */
1728c2ecf20Sopenharmony_ciextern const fsm_node ch_fsm[];
1738c2ecf20Sopenharmony_ciextern int ch_fsm_len;
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ci/*
1778c2ecf20Sopenharmony_ci * ----- non-static actions for ctcmpc channel statemachine ----
1788c2ecf20Sopenharmony_ci *
1798c2ecf20Sopenharmony_ci */
1808c2ecf20Sopenharmony_ci/* shared :
1818c2ecf20Sopenharmony_civoid ctcm_chx_txidle(fsm_instance * fi, int event, void *arg);
1828c2ecf20Sopenharmony_ci */
1838c2ecf20Sopenharmony_civoid ctcmpc_chx_rxidle(fsm_instance *fi, int event, void *arg);
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_ci/*
1868c2ecf20Sopenharmony_ci * ----- FSM (state/event/action) of the ctcmpc channel statemachine -----
1878c2ecf20Sopenharmony_ci */
1888c2ecf20Sopenharmony_ciextern const fsm_node ctcmpc_ch_fsm[];
1898c2ecf20Sopenharmony_ciextern int mpc_ch_fsm_len;
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ci/*
1928c2ecf20Sopenharmony_ci * Definitions for the device interface statemachine for ctc and mpc
1938c2ecf20Sopenharmony_ci */
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci/*
1968c2ecf20Sopenharmony_ci * States of the device interface statemachine.
1978c2ecf20Sopenharmony_ci */
1988c2ecf20Sopenharmony_cienum dev_states {
1998c2ecf20Sopenharmony_ci	DEV_STATE_STOPPED,
2008c2ecf20Sopenharmony_ci	DEV_STATE_STARTWAIT_RXTX,
2018c2ecf20Sopenharmony_ci	DEV_STATE_STARTWAIT_RX,
2028c2ecf20Sopenharmony_ci	DEV_STATE_STARTWAIT_TX,
2038c2ecf20Sopenharmony_ci	DEV_STATE_STOPWAIT_RXTX,
2048c2ecf20Sopenharmony_ci	DEV_STATE_STOPWAIT_RX,
2058c2ecf20Sopenharmony_ci	DEV_STATE_STOPWAIT_TX,
2068c2ecf20Sopenharmony_ci	DEV_STATE_RUNNING,
2078c2ecf20Sopenharmony_ci	/*
2088c2ecf20Sopenharmony_ci	 * MUST be always the last element!!
2098c2ecf20Sopenharmony_ci	 */
2108c2ecf20Sopenharmony_ci	CTCM_NR_DEV_STATES
2118c2ecf20Sopenharmony_ci};
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_ciextern const char *dev_state_names[];
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci/*
2168c2ecf20Sopenharmony_ci * Events of the device interface statemachine.
2178c2ecf20Sopenharmony_ci * ctcm and ctcmpc
2188c2ecf20Sopenharmony_ci */
2198c2ecf20Sopenharmony_cienum dev_events {
2208c2ecf20Sopenharmony_ci	DEV_EVENT_START,
2218c2ecf20Sopenharmony_ci	DEV_EVENT_STOP,
2228c2ecf20Sopenharmony_ci	DEV_EVENT_RXUP,
2238c2ecf20Sopenharmony_ci	DEV_EVENT_TXUP,
2248c2ecf20Sopenharmony_ci	DEV_EVENT_RXDOWN,
2258c2ecf20Sopenharmony_ci	DEV_EVENT_TXDOWN,
2268c2ecf20Sopenharmony_ci	DEV_EVENT_RESTART,
2278c2ecf20Sopenharmony_ci	/*
2288c2ecf20Sopenharmony_ci	 * MUST be always the last element!!
2298c2ecf20Sopenharmony_ci	 */
2308c2ecf20Sopenharmony_ci	CTCM_NR_DEV_EVENTS
2318c2ecf20Sopenharmony_ci};
2328c2ecf20Sopenharmony_ci
2338c2ecf20Sopenharmony_ciextern const char *dev_event_names[];
2348c2ecf20Sopenharmony_ci
2358c2ecf20Sopenharmony_ci/*
2368c2ecf20Sopenharmony_ci * Actions for the device interface statemachine.
2378c2ecf20Sopenharmony_ci * ctc and ctcmpc
2388c2ecf20Sopenharmony_ci */
2398c2ecf20Sopenharmony_ci/*
2408c2ecf20Sopenharmony_cistatic void dev_action_start(fsm_instance * fi, int event, void *arg);
2418c2ecf20Sopenharmony_cistatic void dev_action_stop(fsm_instance * fi, int event, void *arg);
2428c2ecf20Sopenharmony_cistatic void dev_action_restart(fsm_instance *fi, int event, void *arg);
2438c2ecf20Sopenharmony_cistatic void dev_action_chup(fsm_instance * fi, int event, void *arg);
2448c2ecf20Sopenharmony_cistatic void dev_action_chdown(fsm_instance * fi, int event, void *arg);
2458c2ecf20Sopenharmony_ci*/
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci/*
2488c2ecf20Sopenharmony_ci * The (state/event/action) fsm table of the device interface statemachine.
2498c2ecf20Sopenharmony_ci * ctcm and ctcmpc
2508c2ecf20Sopenharmony_ci */
2518c2ecf20Sopenharmony_ciextern const fsm_node dev_fsm[];
2528c2ecf20Sopenharmony_ciextern int dev_fsm_len;
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ci/*
2568c2ecf20Sopenharmony_ci * Definitions for the MPC Group statemachine
2578c2ecf20Sopenharmony_ci */
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci/*
2608c2ecf20Sopenharmony_ci * MPC Group Station FSM States
2618c2ecf20Sopenharmony_ci
2628c2ecf20Sopenharmony_ciState Name		When In This State
2638c2ecf20Sopenharmony_ci======================	=======================================
2648c2ecf20Sopenharmony_ciMPCG_STATE_RESET	Initial State When Driver Loaded
2658c2ecf20Sopenharmony_ci			We receive and send NOTHING
2668c2ecf20Sopenharmony_ci
2678c2ecf20Sopenharmony_ciMPCG_STATE_INOP         INOP Received.
2688c2ecf20Sopenharmony_ci			Group level non-recoverable error
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_ciMPCG_STATE_READY	XID exchanges for at least 1 write and
2718c2ecf20Sopenharmony_ci			1 read channel have completed.
2728c2ecf20Sopenharmony_ci			Group is ready for data transfer.
2738c2ecf20Sopenharmony_ci
2748c2ecf20Sopenharmony_ciStates from ctc_mpc_alloc_channel
2758c2ecf20Sopenharmony_ci==============================================================
2768c2ecf20Sopenharmony_ciMPCG_STATE_XID2INITW	Awaiting XID2(0) Initiation
2778c2ecf20Sopenharmony_ci			      ATTN from other side will start
2788c2ecf20Sopenharmony_ci			      XID negotiations.
2798c2ecf20Sopenharmony_ci			      Y-side protocol only.
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ciMPCG_STATE_XID2INITX	XID2(0) negotiations are in progress.
2828c2ecf20Sopenharmony_ci			      At least 1, but not all, XID2(0)'s
2838c2ecf20Sopenharmony_ci			      have been received from partner.
2848c2ecf20Sopenharmony_ci
2858c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITW	XID2(0) complete
2868c2ecf20Sopenharmony_ci			      No XID2(7)'s have yet been received.
2878c2ecf20Sopenharmony_ci			      XID2(7) negotiations pending.
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITX	XID2(7) negotiations in progress.
2908c2ecf20Sopenharmony_ci			      At least 1, but not all, XID2(7)'s
2918c2ecf20Sopenharmony_ci			      have been received from partner.
2928c2ecf20Sopenharmony_ci
2938c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITF	XID2(7) negotiations complete.
2948c2ecf20Sopenharmony_ci			      Transitioning to READY.
2958c2ecf20Sopenharmony_ci
2968c2ecf20Sopenharmony_ciMPCG_STATE_READY	      Ready for Data Transfer.
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ci
2998c2ecf20Sopenharmony_ciStates from ctc_mpc_establish_connectivity call
3008c2ecf20Sopenharmony_ci==============================================================
3018c2ecf20Sopenharmony_ciMPCG_STATE_XID0IOWAIT	Initiating XID2(0) negotiations.
3028c2ecf20Sopenharmony_ci			      X-side protocol only.
3038c2ecf20Sopenharmony_ci			      ATTN-BUSY from other side will convert
3048c2ecf20Sopenharmony_ci			      this to Y-side protocol and the
3058c2ecf20Sopenharmony_ci			      ctc_mpc_alloc_channel flow will begin.
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_ciMPCG_STATE_XID0IOWAIX	XID2(0) negotiations are in progress.
3088c2ecf20Sopenharmony_ci			      At least 1, but not all, XID2(0)'s
3098c2ecf20Sopenharmony_ci			      have been received from partner.
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITI	XID2(0) complete
3128c2ecf20Sopenharmony_ci			      No XID2(7)'s have yet been received.
3138c2ecf20Sopenharmony_ci			      XID2(7) negotiations pending.
3148c2ecf20Sopenharmony_ci
3158c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITZ	XID2(7) negotiations in progress.
3168c2ecf20Sopenharmony_ci			      At least 1, but not all, XID2(7)'s
3178c2ecf20Sopenharmony_ci			      have been received from partner.
3188c2ecf20Sopenharmony_ci
3198c2ecf20Sopenharmony_ciMPCG_STATE_XID7INITF	XID2(7) negotiations complete.
3208c2ecf20Sopenharmony_ci			      Transitioning to READY.
3218c2ecf20Sopenharmony_ci
3228c2ecf20Sopenharmony_ciMPCG_STATE_READY	      Ready for Data Transfer.
3238c2ecf20Sopenharmony_ci
3248c2ecf20Sopenharmony_ci*/
3258c2ecf20Sopenharmony_ci
3268c2ecf20Sopenharmony_cienum mpcg_events {
3278c2ecf20Sopenharmony_ci	MPCG_EVENT_INOP,
3288c2ecf20Sopenharmony_ci	MPCG_EVENT_DISCONC,
3298c2ecf20Sopenharmony_ci	MPCG_EVENT_XID0DO,
3308c2ecf20Sopenharmony_ci	MPCG_EVENT_XID2,
3318c2ecf20Sopenharmony_ci	MPCG_EVENT_XID2DONE,
3328c2ecf20Sopenharmony_ci	MPCG_EVENT_XID7DONE,
3338c2ecf20Sopenharmony_ci	MPCG_EVENT_TIMER,
3348c2ecf20Sopenharmony_ci	MPCG_EVENT_DOIO,
3358c2ecf20Sopenharmony_ci	MPCG_NR_EVENTS,
3368c2ecf20Sopenharmony_ci};
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_cienum mpcg_states {
3398c2ecf20Sopenharmony_ci	MPCG_STATE_RESET,
3408c2ecf20Sopenharmony_ci	MPCG_STATE_INOP,
3418c2ecf20Sopenharmony_ci	MPCG_STATE_XID2INITW,
3428c2ecf20Sopenharmony_ci	MPCG_STATE_XID2INITX,
3438c2ecf20Sopenharmony_ci	MPCG_STATE_XID7INITW,
3448c2ecf20Sopenharmony_ci	MPCG_STATE_XID7INITX,
3458c2ecf20Sopenharmony_ci	MPCG_STATE_XID0IOWAIT,
3468c2ecf20Sopenharmony_ci	MPCG_STATE_XID0IOWAIX,
3478c2ecf20Sopenharmony_ci	MPCG_STATE_XID7INITI,
3488c2ecf20Sopenharmony_ci	MPCG_STATE_XID7INITZ,
3498c2ecf20Sopenharmony_ci	MPCG_STATE_XID7INITF,
3508c2ecf20Sopenharmony_ci	MPCG_STATE_FLOWC,
3518c2ecf20Sopenharmony_ci	MPCG_STATE_READY,
3528c2ecf20Sopenharmony_ci	MPCG_NR_STATES,
3538c2ecf20Sopenharmony_ci};
3548c2ecf20Sopenharmony_ci
3558c2ecf20Sopenharmony_ci#endif
3568c2ecf20Sopenharmony_ci/* --- This is the END my friend --- */
357