162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is provided under a dual BSD/GPLv2 license.  When using or
362306a36Sopenharmony_ci * redistributing this file, you may do so under either license.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * GPL LICENSE SUMMARY
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify
1062306a36Sopenharmony_ci * it under the terms of version 2 of the GNU General Public License as
1162306a36Sopenharmony_ci * published by the Free Software Foundation.
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * This program is distributed in the hope that it will be useful, but
1462306a36Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of
1562306a36Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1662306a36Sopenharmony_ci * General Public License for more details.
1762306a36Sopenharmony_ci *
1862306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License
1962306a36Sopenharmony_ci * along with this program; if not, write to the Free Software
2062306a36Sopenharmony_ci * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
2162306a36Sopenharmony_ci * The full GNU General Public License is included in this distribution
2262306a36Sopenharmony_ci * in the file called LICENSE.GPL.
2362306a36Sopenharmony_ci *
2462306a36Sopenharmony_ci * BSD LICENSE
2562306a36Sopenharmony_ci *
2662306a36Sopenharmony_ci * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
2762306a36Sopenharmony_ci * All rights reserved.
2862306a36Sopenharmony_ci *
2962306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
3062306a36Sopenharmony_ci * modification, are permitted provided that the following conditions
3162306a36Sopenharmony_ci * are met:
3262306a36Sopenharmony_ci *
3362306a36Sopenharmony_ci *   * Redistributions of source code must retain the above copyright
3462306a36Sopenharmony_ci *     notice, this list of conditions and the following disclaimer.
3562306a36Sopenharmony_ci *   * Redistributions in binary form must reproduce the above copyright
3662306a36Sopenharmony_ci *     notice, this list of conditions and the following disclaimer in
3762306a36Sopenharmony_ci *     the documentation and/or other materials provided with the
3862306a36Sopenharmony_ci *     distribution.
3962306a36Sopenharmony_ci *   * Neither the name of Intel Corporation nor the names of its
4062306a36Sopenharmony_ci *     contributors may be used to endorse or promote products derived
4162306a36Sopenharmony_ci *     from this software without specific prior written permission.
4262306a36Sopenharmony_ci *
4362306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4462306a36Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4562306a36Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4662306a36Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
4762306a36Sopenharmony_ci * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4862306a36Sopenharmony_ci * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
4962306a36Sopenharmony_ci * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5062306a36Sopenharmony_ci * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5162306a36Sopenharmony_ci * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5262306a36Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5362306a36Sopenharmony_ci * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5462306a36Sopenharmony_ci */
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci#ifndef __SCU_EVENT_CODES_HEADER__
5762306a36Sopenharmony_ci#define __SCU_EVENT_CODES_HEADER__
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci/**
6062306a36Sopenharmony_ci * This file contains the constants and macros for the SCU event codes.
6162306a36Sopenharmony_ci *
6262306a36Sopenharmony_ci *
6362306a36Sopenharmony_ci */
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci#define SCU_EVENT_TYPE_CODE_SHIFT      24
6662306a36Sopenharmony_ci#define SCU_EVENT_TYPE_CODE_MASK       0x0F000000
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC_CODE_SHIFT  18
6962306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC_CODE_MASK   0x00FC0000
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci#define SCU_EVENT_CODE_MASK \
7262306a36Sopenharmony_ci	(SCU_EVENT_TYPE_CODE_MASK | SCU_EVENT_SPECIFIC_CODE_MASK)
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci/**
7562306a36Sopenharmony_ci * SCU_EVENT_TYPE() -
7662306a36Sopenharmony_ci *
7762306a36Sopenharmony_ci * This macro constructs an SCU event type from the type value.
7862306a36Sopenharmony_ci */
7962306a36Sopenharmony_ci#define SCU_EVENT_TYPE(type) \
8062306a36Sopenharmony_ci	((u32)(type) << SCU_EVENT_TYPE_CODE_SHIFT)
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci/**
8362306a36Sopenharmony_ci * SCU_EVENT_SPECIFIC() -
8462306a36Sopenharmony_ci *
8562306a36Sopenharmony_ci * This macro constructs an SCU event specifier from the code value.
8662306a36Sopenharmony_ci */
8762306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC(code) \
8862306a36Sopenharmony_ci	((u32)(code) << SCU_EVENT_SPECIFIC_CODE_SHIFT)
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci/**
9162306a36Sopenharmony_ci * SCU_EVENT_MESSAGE() -
9262306a36Sopenharmony_ci *
9362306a36Sopenharmony_ci * This macro constructs a combines an SCU event type and SCU event specifier
9462306a36Sopenharmony_ci * from the type and code values.
9562306a36Sopenharmony_ci */
9662306a36Sopenharmony_ci#define SCU_EVENT_MESSAGE(type, code) \
9762306a36Sopenharmony_ci	((type) | SCU_EVENT_SPECIFIC(code))
9862306a36Sopenharmony_ci
9962306a36Sopenharmony_ci/**
10062306a36Sopenharmony_ci * SCU_EVENT_TYPE() -
10162306a36Sopenharmony_ci *
10262306a36Sopenharmony_ci * SCU_EVENT_TYPES
10362306a36Sopenharmony_ci */
10462306a36Sopenharmony_ci#define SCU_EVENT_TYPE_SMU_COMMAND_ERROR  SCU_EVENT_TYPE(0x08)
10562306a36Sopenharmony_ci#define SCU_EVENT_TYPE_SMU_PCQ_ERROR      SCU_EVENT_TYPE(0x09)
10662306a36Sopenharmony_ci#define SCU_EVENT_TYPE_SMU_ERROR          SCU_EVENT_TYPE(0x00)
10762306a36Sopenharmony_ci#define SCU_EVENT_TYPE_TRANSPORT_ERROR    SCU_EVENT_TYPE(0x01)
10862306a36Sopenharmony_ci#define SCU_EVENT_TYPE_BROADCAST_CHANGE   SCU_EVENT_TYPE(0x02)
10962306a36Sopenharmony_ci#define SCU_EVENT_TYPE_OSSP_EVENT         SCU_EVENT_TYPE(0x03)
11062306a36Sopenharmony_ci#define SCU_EVENT_TYPE_FATAL_MEMORY_ERROR SCU_EVENT_TYPE(0x0F)
11162306a36Sopenharmony_ci#define SCU_EVENT_TYPE_RNC_SUSPEND_TX     SCU_EVENT_TYPE(0x04)
11262306a36Sopenharmony_ci#define SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX  SCU_EVENT_TYPE(0x05)
11362306a36Sopenharmony_ci#define SCU_EVENT_TYPE_RNC_OPS_MISC       SCU_EVENT_TYPE(0x06)
11462306a36Sopenharmony_ci#define SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT SCU_EVENT_TYPE(0x07)
11562306a36Sopenharmony_ci#define SCU_EVENT_TYPE_ERR_CNT_EVENT      SCU_EVENT_TYPE(0x0A)
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci/**
11862306a36Sopenharmony_ci *
11962306a36Sopenharmony_ci *
12062306a36Sopenharmony_ci * SCU_EVENT_SPECIFIERS
12162306a36Sopenharmony_ci */
12262306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIER_DRIVER_SUSPEND 0x20
12362306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIER_RNC_RELEASE    0x00
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci/**
12662306a36Sopenharmony_ci *
12762306a36Sopenharmony_ci *
12862306a36Sopenharmony_ci * SMU_COMMAND_EVENTS
12962306a36Sopenharmony_ci */
13062306a36Sopenharmony_ci#define SCU_EVENT_INVALID_CONTEXT_COMMAND \
13162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_COMMAND_ERROR, 0x00)
13262306a36Sopenharmony_ci
13362306a36Sopenharmony_ci/**
13462306a36Sopenharmony_ci *
13562306a36Sopenharmony_ci *
13662306a36Sopenharmony_ci * SMU_PCQ_EVENTS
13762306a36Sopenharmony_ci */
13862306a36Sopenharmony_ci#define SCU_EVENT_UNCORRECTABLE_PCQ_ERROR \
13962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_PCQ_ERROR, 0x00)
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci/**
14262306a36Sopenharmony_ci *
14362306a36Sopenharmony_ci *
14462306a36Sopenharmony_ci * SMU_EVENTS
14562306a36Sopenharmony_ci */
14662306a36Sopenharmony_ci#define SCU_EVENT_UNCORRECTABLE_REGISTER_WRITE \
14762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_ERROR, 0x02)
14862306a36Sopenharmony_ci#define SCU_EVENT_UNCORRECTABLE_REGISTER_READ \
14962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_ERROR, 0x03)
15062306a36Sopenharmony_ci#define SCU_EVENT_PCIE_INTERFACE_ERROR \
15162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_ERROR, 0x04)
15262306a36Sopenharmony_ci#define SCU_EVENT_FUNCTION_LEVEL_RESET \
15362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_SMU_ERROR, 0x05)
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci/**
15662306a36Sopenharmony_ci *
15762306a36Sopenharmony_ci *
15862306a36Sopenharmony_ci * TRANSPORT_LEVEL_ERRORS
15962306a36Sopenharmony_ci */
16062306a36Sopenharmony_ci#define SCU_EVENT_ACK_NAK_TIMEOUT_ERROR	\
16162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_TRANSPORT_ERROR, 0x00)
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci/**
16462306a36Sopenharmony_ci *
16562306a36Sopenharmony_ci *
16662306a36Sopenharmony_ci * BROADCAST_CHANGE_EVENTS
16762306a36Sopenharmony_ci */
16862306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_CHANGE \
16962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x01)
17062306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_RESERVED0 \
17162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x02)
17262306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_RESERVED1 \
17362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x03)
17462306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_SES	\
17562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x04)
17662306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_EXPANDER \
17762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x05)
17862306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_AEN	\
17962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x06)
18062306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_RESERVED3 \
18162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x07)
18262306a36Sopenharmony_ci#define SCU_EVENT_BROADCAST_RESERVED4 \
18362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x08)
18462306a36Sopenharmony_ci#define SCU_EVENT_PE_SUSPENDED \
18562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_BROADCAST_CHANGE, 0x09)
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci/**
18862306a36Sopenharmony_ci *
18962306a36Sopenharmony_ci *
19062306a36Sopenharmony_ci * OSSP_EVENTS
19162306a36Sopenharmony_ci */
19262306a36Sopenharmony_ci#define SCU_EVENT_PORT_SELECTOR_DETECTED \
19362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x10)
19462306a36Sopenharmony_ci#define SCU_EVENT_SENT_PORT_SELECTION \
19562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x11)
19662306a36Sopenharmony_ci#define SCU_EVENT_HARD_RESET_TRANSMITTED \
19762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x12)
19862306a36Sopenharmony_ci#define SCU_EVENT_HARD_RESET_RECEIVED \
19962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x13)
20062306a36Sopenharmony_ci#define SCU_EVENT_RECEIVED_IDENTIFY_TIMEOUT \
20162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x15)
20262306a36Sopenharmony_ci#define SCU_EVENT_LINK_FAILURE \
20362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x16)
20462306a36Sopenharmony_ci#define SCU_EVENT_SATA_SPINUP_HOLD \
20562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x17)
20662306a36Sopenharmony_ci#define SCU_EVENT_SAS_15_SSC \
20762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x18)
20862306a36Sopenharmony_ci#define SCU_EVENT_SAS_15 \
20962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x19)
21062306a36Sopenharmony_ci#define SCU_EVENT_SAS_30_SSC \
21162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1A)
21262306a36Sopenharmony_ci#define SCU_EVENT_SAS_30 \
21362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1B)
21462306a36Sopenharmony_ci#define SCU_EVENT_SAS_60_SSC \
21562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1C)
21662306a36Sopenharmony_ci#define SCU_EVENT_SAS_60 \
21762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1D)
21862306a36Sopenharmony_ci#define SCU_EVENT_SATA_15_SSC \
21962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1E)
22062306a36Sopenharmony_ci#define SCU_EVENT_SATA_15 \
22162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x1F)
22262306a36Sopenharmony_ci#define SCU_EVENT_SATA_30_SSC \
22362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x20)
22462306a36Sopenharmony_ci#define SCU_EVENT_SATA_30 \
22562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x21)
22662306a36Sopenharmony_ci#define SCU_EVENT_SATA_60_SSC \
22762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x22)
22862306a36Sopenharmony_ci#define SCU_EVENT_SATA_60 \
22962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x23)
23062306a36Sopenharmony_ci#define SCU_EVENT_SAS_PHY_DETECTED \
23162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x24)
23262306a36Sopenharmony_ci#define SCU_EVENT_SATA_PHY_DETECTED \
23362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_OSSP_EVENT, 0x25)
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci/**
23662306a36Sopenharmony_ci *
23762306a36Sopenharmony_ci *
23862306a36Sopenharmony_ci * FATAL_INTERNAL_MEMORY_ERROR_EVENTS
23962306a36Sopenharmony_ci */
24062306a36Sopenharmony_ci#define SCU_EVENT_TSC_RNSC_UNCORRECTABLE_ERROR \
24162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_FATAL_MEMORY_ERROR,  0x00)
24262306a36Sopenharmony_ci#define SCU_EVENT_TC_RNC_UNCORRECTABLE_ERROR \
24362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_FATAL_MEMORY_ERROR,  0x01)
24462306a36Sopenharmony_ci#define SCU_EVENT_ZPT_UNCORRECTABLE_ERROR \
24562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_FATAL_MEMORY_ERROR,  0x02)
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ci/**
24862306a36Sopenharmony_ci *
24962306a36Sopenharmony_ci *
25062306a36Sopenharmony_ci * REMOTE_NODE_SUSPEND_EVENTS
25162306a36Sopenharmony_ci */
25262306a36Sopenharmony_ci#define SCU_EVENT_TL_RNC_SUSPEND_TX \
25362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_SUSPEND_TX, 0x00)
25462306a36Sopenharmony_ci#define SCU_EVENT_TL_RNC_SUSPEND_TX_RX \
25562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX, 0x00)
25662306a36Sopenharmony_ci#define SCU_EVENT_DRIVER_POST_RNC_SUSPEND_TX \
25762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_SUSPEND_TX, 0x20)
25862306a36Sopenharmony_ci#define SCU_EVENT_DRIVER_POST_RNC_SUSPEND_TX_RX	\
25962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX, 0x20)
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci/**
26262306a36Sopenharmony_ci *
26362306a36Sopenharmony_ci *
26462306a36Sopenharmony_ci * REMOTE_NODE_MISC_EVENTS
26562306a36Sopenharmony_ci */
26662306a36Sopenharmony_ci#define SCU_EVENT_POST_RCN_RELEASE \
26762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_OPS_MISC, SCU_EVENT_SPECIFIER_RNC_RELEASE)
26862306a36Sopenharmony_ci#define SCU_EVENT_POST_IT_NEXUS_LOSS_TIMER_ENABLE \
26962306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_OPS_MISC, 0x01)
27062306a36Sopenharmony_ci#define SCU_EVENT_POST_IT_NEXUS_LOSS_TIMER_DISABLE \
27162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_OPS_MISC, 0x02)
27262306a36Sopenharmony_ci#define SCU_EVENT_POST_RNC_COMPLETE \
27362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_OPS_MISC, 0x03)
27462306a36Sopenharmony_ci#define SCU_EVENT_POST_RNC_INVALIDATE_COMPLETE \
27562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_RNC_OPS_MISC, 0x04)
27662306a36Sopenharmony_ci
27762306a36Sopenharmony_ci/**
27862306a36Sopenharmony_ci *
27962306a36Sopenharmony_ci *
28062306a36Sopenharmony_ci * ERROR_COUNT_EVENT
28162306a36Sopenharmony_ci */
28262306a36Sopenharmony_ci#define SCU_EVENT_RX_CREDIT_BLOCKED_RECEIVED \
28362306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_ERR_CNT_EVENT, 0x00)
28462306a36Sopenharmony_ci#define SCU_EVENT_TX_DONE_CREDIT_TIMEOUT \
28562306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_ERR_CNT_EVENT, 0x01)
28662306a36Sopenharmony_ci#define SCU_EVENT_RX_DONE_CREDIT_TIMEOUT \
28762306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_ERR_CNT_EVENT, 0x02)
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci/**
29062306a36Sopenharmony_ci * scu_get_event_type() -
29162306a36Sopenharmony_ci *
29262306a36Sopenharmony_ci * This macro returns the SCU event type from the event code.
29362306a36Sopenharmony_ci */
29462306a36Sopenharmony_ci#define scu_get_event_type(event_code) \
29562306a36Sopenharmony_ci	((event_code) & SCU_EVENT_TYPE_CODE_MASK)
29662306a36Sopenharmony_ci
29762306a36Sopenharmony_ci/**
29862306a36Sopenharmony_ci * scu_get_event_specifier() -
29962306a36Sopenharmony_ci *
30062306a36Sopenharmony_ci * This macro returns the SCU event specifier from the event code.
30162306a36Sopenharmony_ci */
30262306a36Sopenharmony_ci#define scu_get_event_specifier(event_code) \
30362306a36Sopenharmony_ci	((event_code) & SCU_EVENT_SPECIFIC_CODE_MASK)
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ci/**
30662306a36Sopenharmony_ci * scu_get_event_code() -
30762306a36Sopenharmony_ci *
30862306a36Sopenharmony_ci * This macro returns the combined SCU event type and SCU event specifier from
30962306a36Sopenharmony_ci * the event code.
31062306a36Sopenharmony_ci */
31162306a36Sopenharmony_ci#define scu_get_event_code(event_code) \
31262306a36Sopenharmony_ci	((event_code) & SCU_EVENT_CODE_MASK)
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ci/**
31662306a36Sopenharmony_ci *
31762306a36Sopenharmony_ci *
31862306a36Sopenharmony_ci * PTS_SCHEDULE_EVENT
31962306a36Sopenharmony_ci */
32062306a36Sopenharmony_ci#define SCU_EVENT_SMP_RESPONSE_NO_PE \
32162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT, 0x00)
32262306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC_SMP_RESPONSE_NO_PE \
32362306a36Sopenharmony_ci	scu_get_event_specifier(SCU_EVENT_SMP_RESPONSE_NO_PE)
32462306a36Sopenharmony_ci
32562306a36Sopenharmony_ci#define SCU_EVENT_TASK_TIMEOUT \
32662306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT, 0x01)
32762306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC_TASK_TIMEOUT	\
32862306a36Sopenharmony_ci	scu_get_event_specifier(SCU_EVENT_TASK_TIMEOUT)
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ci#define SCU_EVENT_IT_NEXUS_TIMEOUT \
33162306a36Sopenharmony_ci	SCU_EVENT_MESSAGE(SCU_EVENT_TYPE_PTX_SCHEDULE_EVENT, 0x02)
33262306a36Sopenharmony_ci#define SCU_EVENT_SPECIFIC_IT_NEXUS_TIMEOUT \
33362306a36Sopenharmony_ci	scu_get_event_specifier(SCU_EVENT_IT_NEXUS_TIMEOUT)
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_ci#endif /* __SCU_EVENT_CODES_HEADER__ */
337