mediatek: mt7622: add Linux 5.10 support
[openwrt/staging/rmilecki.git] / target / linux / mediatek / files-5.10 / drivers / net / phy / rtk / rtl8367c / include / rtl8367c_asicdrv_interrupt.h
1 /*
2 * Copyright (C) 2013 Realtek Semiconductor Corp.
3 * All Rights Reserved.
4 *
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 *
10 * $Revision: 76306 $
11 * $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
12 *
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : Interrupt related functions
15 *
16 */
17
18 #ifndef _RTL8367C_ASICDRV_INTERRUPT_H_
19 #define _RTL8367C_ASICDRV_INTERRUPT_H_
20
21 #include <rtl8367c_asicdrv.h>
22
23 typedef enum RTL8367C_INTR_IMRS_E
24 {
25 IMRS_LINK_CHANGE,
26 IMRS_METER_EXCEED,
27 IMRS_L2_LEARN,
28 IMRS_SPEED_CHANGE,
29 IMRS_SPECIAL_CONGESTION,
30 IMRS_GREEN_FEATURE,
31 IMRS_LOOP_DETECTION,
32 IMRS_8051,
33 IMRS_CABLE_DIAG,
34 IMRS_ACL,
35 IMRS_RESERVED, /* Unused */
36 IMRS_SLIENT,
37 IMRS_END,
38 }RTL8367C_INTR_IMRS;
39
40 typedef enum RTL8367C_INTR_INDICATOR_E
41 {
42 INTRST_L2_LEARN = 0,
43 INTRST_SPEED_CHANGE,
44 INTRST_SPECIAL_CONGESTION,
45 INTRST_PORT_LINKDOWN,
46 INTRST_PORT_LINKUP,
47 INTRST_METER0_15,
48 INTRST_METER16_31,
49 INTRST_RLDP_LOOPED,
50 INTRST_RLDP_RELEASED,
51 INTRST_SYS_LEARN,
52 INTRST_END,
53 }RTL8367C_INTR_INDICATOR;
54
55 extern ret_t rtl8367c_setAsicInterruptPolarity(rtk_uint32 polarity);
56 extern ret_t rtl8367c_getAsicInterruptPolarity(rtk_uint32* pPolarity);
57 extern ret_t rtl8367c_setAsicInterruptMask(rtk_uint32 imr);
58 extern ret_t rtl8367c_getAsicInterruptMask(rtk_uint32* pImr);
59 extern ret_t rtl8367c_setAsicInterruptStatus(rtk_uint32 ims);
60 extern ret_t rtl8367c_getAsicInterruptStatus(rtk_uint32* pIms);
61 extern ret_t rtl8367c_setAsicInterruptRelatedStatus(rtk_uint32 type, rtk_uint32 status);
62 extern ret_t rtl8367c_getAsicInterruptRelatedStatus(rtk_uint32 type, rtk_uint32* pStatus);
63
64
65 #endif /*#ifndef _RTL8367C_ASICDRV_INTERRUPT_H_*/
66