drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / net / ethernet / microchip / lan969x / lan969x.h
blob2489d0d32dfd1d3929bfa0b4dcf079a0b4a80b5c
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Microchip lan969x Switch driver
4 * Copyright (c) 2024 Microchip Technology Inc. and its subsidiaries.
5 */
7 #ifndef __LAN969X_H__
8 #define __LAN969X_H__
10 #include "../sparx5/sparx5_main.h"
11 #include "../sparx5/sparx5_regs.h"
12 #include "../sparx5/sparx5_vcap_impl.h"
14 /* lan969x.c */
15 extern const struct sparx5_match_data lan969x_desc;
17 /* lan969x_vcap_ag_api.c */
18 extern const struct vcap_statistics lan969x_vcap_stats;
19 extern const struct vcap_info lan969x_vcaps[];
21 /* lan969x_vcap_impl.c */
22 extern const struct sparx5_vcap_inst lan969x_vcap_inst_cfg[];
24 /* lan969x_regs.c */
25 extern const unsigned int lan969x_tsize[TSIZE_LAST];
26 extern const unsigned int lan969x_raddr[RADDR_LAST];
27 extern const unsigned int lan969x_rcnt[RCNT_LAST];
28 extern const unsigned int lan969x_gaddr[GADDR_LAST];
29 extern const unsigned int lan969x_gcnt[GCNT_LAST];
30 extern const unsigned int lan969x_gsize[GSIZE_LAST];
31 extern const unsigned int lan969x_fpos[FPOS_LAST];
32 extern const unsigned int lan969x_fsize[FSIZE_LAST];
34 static inline bool lan969x_port_is_2g5(int portno)
36 return portno == 1 || portno == 2 || portno == 3 ||
37 portno == 5 || portno == 6 || portno == 7 ||
38 portno == 10 || portno == 11 || portno == 14 ||
39 portno == 15 || portno == 18 || portno == 19 ||
40 portno == 22 || portno == 23;
43 static inline bool lan969x_port_is_5g(int portno)
45 return portno == 9 || portno == 13 || portno == 17 ||
46 portno == 21;
49 static inline bool lan969x_port_is_10g(int portno)
51 return portno == 0 || portno == 4 || portno == 8 ||
52 portno == 12 || portno == 16 || portno == 20 ||
53 portno == 24 || portno == 25 || portno == 26 ||
54 portno == 27;
57 static inline bool lan969x_port_is_25g(int portno)
59 return false;
62 /* lan969x_calendar.c */
63 int lan969x_dsm_calendar_calc(struct sparx5 *sparx5, u32 taxi,
64 struct sparx5_calendar_data *data);
65 #endif