Skip to content

Commit

Permalink
Optimize ethernet code also for ARM64 Mediatek targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz M committed Sep 29, 2024
1 parent c9cbafb commit c152cf8
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -1331,6 +1331,22 @@ struct mtk_mac {
@@ -1331,6 +1331,37 @@ struct mtk_mac {
/* the struct describing the SoC. these are declared in the soc_xyz.c files */
extern const struct of_device_id of_mtk_match[];

Expand All @@ -30,6 +30,21 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+{
+ return false;
+}
+#elif !defined(CONFIG_COMMON_CLK_MT7622)
+static inline bool mtk_is_netsys_v1(struct mtk_eth *eth)
+{
+ return false;
+}
+
+static inline bool mtk_is_netsys_v2_or_greater(struct mtk_eth *eth)
+{
+ return true;
+}
+
+static inline bool mtk_is_netsys_v3_or_greater(struct mtk_eth *eth)
+{
+ return eth->soc->version > 2;
+}
+#else
static inline bool mtk_is_netsys_v1(struct mtk_eth *eth)
{
Expand Down

0 comments on commit c152cf8

Please sign in to comment.