[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210809042921.28931-1-qiangqing.zhang@nxp.com>
Date: Mon, 9 Aug 2021 12:29:21 +0800
From: Joakim Zhang <qiangqing.zhang@....com>
To: davem@...emloft.net, kuba@...nel.org, groeck7@...il.com
Cc: netdev@...r.kernel.org, linux-imx@....com
Subject: [PATCH net-next] net: fec: fix build error for ARCH m68k
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
make.cross ARCH=m68k m5272c3_defconfig
make.cross ARCH=m68k
drivers/net/ethernet/freescale/fec_main.c: In function 'fec_enet_eee_mode_set':
>> drivers/net/ethernet/freescale/fec_main.c:2758:33: error: 'FEC_LPI_SLEEP' undeclared (first use in this function); did you mean 'FEC_ECR_SLEEP'?
2758 | writel(sleep_cycle, fep->hwp + FEC_LPI_SLEEP);
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_no.h:25:66: note: in definition of macro '__raw_writel'
25 | #define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b))
| ^~~~
drivers/net/ethernet/freescale/fec_main.c:2758:2: note: in expansion of macro 'writel'
2758 | writel(sleep_cycle, fep->hwp + FEC_LPI_SLEEP);
| ^~~~~~
drivers/net/ethernet/freescale/fec_main.c:2758:33: note: each undeclared identifier is reported only once for each function it appears in
2758 | writel(sleep_cycle, fep->hwp + FEC_LPI_SLEEP);
| ^~~~~~~~~~~~~
arch/m68k/include/asm/io_no.h:25:66: note: in definition of macro '__raw_writel'
25 | #define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b))
| ^~~~
drivers/net/ethernet/freescale/fec_main.c:2758:2: note: in expansion of macro 'writel'
2758 | writel(sleep_cycle, fep->hwp + FEC_LPI_SLEEP);
| ^~~~~~
>> drivers/net/ethernet/freescale/fec_main.c:2759:32: error: 'FEC_LPI_WAKE' undeclared (first use in this function)
2759 | writel(wake_cycle, fep->hwp + FEC_LPI_WAKE);
| ^~~~~~~~~~~~
arch/m68k/include/asm/io_no.h:25:66: note: in definition of macro '__raw_writel'
25 | #define __raw_writel(b, addr) (void)((*(__force volatile u32 *) (addr)) = (b))
| ^~~~
drivers/net/ethernet/freescale/fec_main.c:2759:2: note: in expansion of macro 'writel'
2759 | writel(wake_cycle, fep->hwp + FEC_LPI_WAKE);
| ^~~~~~
This patch adds register definition for M5272 platform to pass build.
Fixes: b82f8c3f1409 ("net: fec: add eee mode tx lpi support")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
---
drivers/net/ethernet/freescale/fec.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index fe4dfe2d25ea..9d0f5854288a 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -189,6 +189,8 @@
#define FEC_RXIC0 0xfff
#define FEC_RXIC1 0xfff
#define FEC_RXIC2 0xfff
+#define FEC_LPI_SLEEP 0xfff
+#define FEC_LPI_WAKE 0xfff
#endif /* CONFIG_M5272 */
--
2.17.1
Powered by blists - more mailing lists