ramips: support jumbo frame on mt7621 up to 2k
[openwrt/openwrt.git] / target / linux / ramips / patches-4.4 / 0503-net-next-mediatek-add-switch-driver-for-mt7620.patch
index 88882d7fa4c4fa2ae60889517e860fe8bfdfa34c..397d3bd33f20a89505c2b4fd2ae819e3cc66fdca 100644 (file)
@@ -242,7 +242,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      else
 +              gsw->port4 = PORT4_EPHY;
 +
-+      gsw->irq = irq_of_parse_and_map(np, 0);
++      gsw->irq = platform_get_irq(pdev, 0);
 +
 +      platform_set_drvdata(pdev, gsw);
 +
@@ -274,7 +274,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +MODULE_VERSION(MTK_FE_DRV_VERSION);
 --- /dev/null
 +++ b/drivers/net/ethernet/mediatek/gsw_mt7620.h
-@@ -0,0 +1,117 @@
+@@ -0,0 +1,123 @@
 +/*   This program is free software; you can redistribute it and/or modify
 + *   it under the terms of the GNU General Public License as published by
 + *   the Free Software Foundation; version 2 of the License
@@ -322,6 +322,12 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +#define GSW_REG_ISR           0x700c
 +#define GSW_REG_GPC1          0x7014
 +
++#define GSW_REG_MAC_P0_MCR    0x100
++#define GSW_REG_MAC_P1_MCR    0x200
++
++// Global MAC control register
++#define GSW_REG_GMACCR                0x30E0
++
 +#define SYSC_REG_CHIP_REV_ID  0x0c
 +#define SYSC_REG_CFG1         0x14
 +#define RST_CTRL_MCM          BIT(2)