[PATCH net] net: ethernet: mtk_eth_soc: add reset bits for MT7988

kernel test robot lkp at intel.com
Mon Aug 21 11:38:12 PDT 2023


Hi Daniel,

kernel test robot noticed the following build errors:

[auto build test ERROR on linux-next/master]
[cannot apply to net/main linus/master v6.5-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988/20230821-102205
base:   linux-next/master
patch link:    https://lore.kernel.org/r/b983a3adf5184a30e4ce620fbbf028c9c76648ae.1692382239.git.daniel%40makrotopia.org
patch subject: [PATCH net] net: ethernet: mtk_eth_soc: add reset bits for MT7988
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230822/202308220205.gbt5lcAY-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220205.gbt5lcAY-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308220205.gbt5lcAY-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:31:
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_hw_reset':
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:3625:50: error: 'MTK_RSTCTRL_PPE2' undeclared (first use in this function); did you mean 'MTK_RSTCTRL_PPE1'?
    3625 |                 if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:1022:53: note: in definition of macro 'MTK_HAS_CAPS'
    1022 | #define MTK_HAS_CAPS(caps, _x)          (((caps) & (_x)) == (_x))
         |                                                     ^~
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:3625:50: note: each undeclared identifier is reported only once for each function it appears in
    3625 |                 if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:1022:53: note: in definition of macro 'MTK_HAS_CAPS'
    1022 | #define MTK_HAS_CAPS(caps, _x)          (((caps) & (_x)) == (_x))
         |                                                     ^~
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_hw_warm_reset':
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:3673:50: error: 'MTK_RSTCTRL_PPE2' undeclared (first use in this function); did you mean 'MTK_RSTCTRL_PPE1'?
    3673 |                 if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:1022:53: note: in definition of macro 'MTK_HAS_CAPS'
    1022 | #define MTK_HAS_CAPS(caps, _x)          (((caps) & (_x)) == (_x))
         |                                                     ^~
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_prepare_for_reset':
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:4042:50: error: 'MTK_RSTCTRL_PPE2' undeclared (first use in this function); did you mean 'MTK_RSTCTRL_PPE1'?
    4042 |                 if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:1022:53: note: in definition of macro 'MTK_HAS_CAPS'
    1022 | #define MTK_HAS_CAPS(caps, _x)          (((caps) & (_x)) == (_x))
         |                                                     ^~
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_pending_work':
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:4113:50: error: 'MTK_RSTCTRL_PPE2' undeclared (first use in this function); did you mean 'MTK_RSTCTRL_PPE1'?
    4113 |                 if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:1022:53: note: in definition of macro 'MTK_HAS_CAPS'
    1022 | #define MTK_HAS_CAPS(caps, _x)          (((caps) & (_x)) == (_x))
         |                                                     ^~


vim +3625 drivers/net/ethernet/mediatek/mtk_eth_soc.c

  3611	
  3612	static void mtk_hw_reset(struct mtk_eth *eth)
  3613	{
  3614		u32 val;
  3615	
  3616		if (mtk_is_netsys_v2_or_greater(eth))
  3617			regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0);
  3618	
  3619		if (mtk_is_netsys_v3_or_greater(eth)) {
  3620			val = RSTCTRL_PPE0_V3;
  3621	
  3622			if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE1))
  3623				val |= RSTCTRL_PPE1_V3;
  3624	
> 3625			if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE2))
  3626				val |= RSTCTRL_PPE2;
  3627	
  3628			val |= RSTCTRL_WDMA0 | RSTCTRL_WDMA1 | RSTCTRL_WDMA2;
  3629		} else if (mtk_is_netsys_v2_or_greater(eth)) {
  3630			val = RSTCTRL_PPE0_V2;
  3631	
  3632			if (MTK_HAS_CAPS(eth->soc->caps, MTK_RSTCTRL_PPE1))
  3633				val |= RSTCTRL_PPE1;
  3634		} else {
  3635			val = RSTCTRL_PPE0;
  3636		}
  3637	
  3638		ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val);
  3639	
  3640		if (mtk_is_netsys_v3_or_greater(eth))
  3641			regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
  3642				     0x6f8ff);
  3643		else if (mtk_is_netsys_v2_or_greater(eth))
  3644			regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
  3645				     0x3ffffff);
  3646	}
  3647	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the Linux-mediatek mailing list