* [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers
@ 2016-11-17 19:19 Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST Florian Fainelli
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
Hi all,
This patch series allows building the Freescale and Marvell Ethernet network
drivers with COMPILE_TEST.
Changes in v4:
- add proper HAS_DMA to fix build errors on m32r
- provide an inline stub for mvebu_mbus_get_dram_win_info
- added an additional patch to fix build errors with mv88e6xxx on m32r
Changes in v3:
- reorder patches to avoid introducing a build warning between commits
Changes in v2:
- rename register define clash when building for i386 (spotted by LKP)
Florian Fainelli (5):
net: gianfar_ptp: Rename FS bit to FIPERST
net: fsl: Allow most drivers to be built with COMPILE_TEST
bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info
net: marvell: Allow drivers to be built with COMPILE_TEST
net: dsa: mv88e6xxx: Select IRQ_DOMAIN
drivers/net/dsa/mv88e6xxx/Kconfig | 1 +
drivers/net/ethernet/freescale/Kconfig | 4 +++-
drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++--
drivers/net/ethernet/marvell/Kconfig | 11 +++++++----
include/linux/mbus.h | 8 ++++++++
5 files changed, 21 insertions(+), 7 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
@ 2016-11-17 19:19 ` Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 2/5] net: fsl: Allow most drivers to be built with COMPILE_TEST Florian Fainelli
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
FS is a global symbol used by the x86 32-bit architecture, fixes builds
re-definitions:
>> drivers/net/ethernet/freescale/gianfar_ptp.c:75:0: warning: "FS"
>> redefined
#define FS (1<<28) /* FIPER start indication */
In file included from arch/x86/include/uapi/asm/ptrace.h:5:0,
from arch/x86/include/asm/ptrace.h:6,
from arch/x86/include/asm/math_emu.h:4,
from arch/x86/include/asm/processor.h:11,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:15,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from
drivers/net/ethernet/freescale/gianfar_ptp.c:23:
arch/x86/include/uapi/asm/ptrace-abi.h:15:0: note: this is the
location of the previous definition
#define FS 9
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
index 57798814160d..3e8d1fffe34e 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -72,7 +72,7 @@ struct gianfar_ptp_registers {
/* Bit definitions for the TMR_CTRL register */
#define ALM1P (1<<31) /* Alarm1 output polarity */
#define ALM2P (1<<30) /* Alarm2 output polarity */
-#define FS (1<<28) /* FIPER start indication */
+#define FIPERST (1<<28) /* FIPER start indication */
#define PP1L (1<<27) /* Fiper1 pulse loopback mode enabled. */
#define PP2L (1<<26) /* Fiper2 pulse loopback mode enabled. */
#define TCLK_PERIOD_SHIFT (16) /* 1588 timer reference clock period. */
@@ -502,7 +502,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);
gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);
set_alarm(etsects);
- gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE|FRD);
+ gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FIPERST|RTPE|TE|FRD);
spin_unlock_irqrestore(&etsects->lock, flags);
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v4 2/5] net: fsl: Allow most drivers to be built with COMPILE_TEST
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST Florian Fainelli
@ 2016-11-17 19:19 ` Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info Florian Fainelli
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
There are only a handful of Freescale Ethernet drivers that don't
actually build with COMPILE_TEST:
* FEC, for which we would need to define a default register layout if no
supported architecture is defined
* UCC_GETH which depends on PowerPC cpm.h header (which could be moved
to a generic location)
* GIANFAR needs to depend on HAS_DMA to fix linking failures on some
architectures (like m32r)
We need to fix an unmet dependency to get there though:
warning: (FSL_XGMAC_MDIO) selects OF_MDIO which has unmet direct
dependencies (OF && PHYLIB)
which would result in CONFIG_OF_MDIO=[ym] without CONFIG_OF to be set.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/freescale/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig
index aa3f615886b4..0d415516b577 100644
--- a/drivers/net/ethernet/freescale/Kconfig
+++ b/drivers/net/ethernet/freescale/Kconfig
@@ -8,7 +8,7 @@ config NET_VENDOR_FREESCALE
depends on FSL_SOC || QUICC_ENGINE || CPM1 || CPM2 || PPC_MPC512x || \
M523x || M527x || M5272 || M528x || M520x || M532x || \
ARCH_MXC || ARCH_MXS || (PPC_MPC52xx && PPC_BESTCOMM) || \
- ARCH_LAYERSCAPE
+ ARCH_LAYERSCAPE || COMPILE_TEST
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
@@ -65,6 +65,7 @@ config FSL_PQ_MDIO
config FSL_XGMAC_MDIO
tristate "Freescale XGMAC MDIO"
select PHYLIB
+ depends on OF
select OF_MDIO
---help---
This driver supports the MDIO bus on the Fman 10G Ethernet MACs, and
@@ -85,6 +86,7 @@ config UGETH_TX_ON_DEMAND
config GIANFAR
tristate "Gianfar Ethernet"
+ depends on HAS_DMA
select FSL_PQ_MDIO
select PHYLIB
select CRC32
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 2/5] net: fsl: Allow most drivers to be built with COMPILE_TEST Florian Fainelli
@ 2016-11-17 19:19 ` Florian Fainelli
2016-11-18 8:32 ` Gregory CLEMENT
2016-11-17 19:19 ` [PATCH net-next v4 4/5] net: marvell: Allow drivers to be built with COMPILE_TEST Florian Fainelli
` (2 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
In preparation for allowing CONFIG_MVNETA_BM to build with COMPILE_TEST,
provide an inline stub for mvebu_mbus_get_dram_win_info().
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/linux/mbus.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/mbus.h b/include/linux/mbus.h
index 2931aa43dab1..0d3f14fd2621 100644
--- a/include/linux/mbus.h
+++ b/include/linux/mbus.h
@@ -82,6 +82,7 @@ static inline int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size,
}
#endif
+#ifdef CONFIG_MVEBU_MBUS
int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr);
void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
@@ -97,5 +98,12 @@ int mvebu_mbus_init(const char *soc, phys_addr_t mbus_phys_base,
size_t mbus_size, phys_addr_t sdram_phys_base,
size_t sdram_size);
int mvebu_mbus_dt_init(bool is_coherent);
+#else
+static inline int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target,
+ u8 *attr)
+{
+ return -EINVAL;
+}
+#endif /* CONFIG_MVEBU_MBUS */
#endif /* __LINUX_MBUS_H */
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v4 4/5] net: marvell: Allow drivers to be built with COMPILE_TEST
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
` (2 preceding siblings ...)
2016-11-17 19:19 ` [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info Florian Fainelli
@ 2016-11-17 19:19 ` Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 5/5] net: dsa: mv88e6xxx: Select IRQ_DOMAIN Florian Fainelli
2016-11-18 18:54 ` [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers David Miller
5 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
All Marvell Ethernet drivers actually build fine with COMPILE_TEST with
a few warnings. We need to add a few HAS_DMA dependencies to fix linking
failures on problematic architectures like m32r.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/marvell/Kconfig | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
index 2664827ddecd..d74d4e6f0b34 100644
--- a/drivers/net/ethernet/marvell/Kconfig
+++ b/drivers/net/ethernet/marvell/Kconfig
@@ -5,7 +5,7 @@
config NET_VENDOR_MARVELL
bool "Marvell devices"
default y
- depends on PCI || CPU_PXA168 || MV64X60 || PPC32 || PLAT_ORION || INET
+ depends on PCI || CPU_PXA168 || MV64X60 || PPC32 || PLAT_ORION || INET || COMPILE_TEST
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
@@ -18,7 +18,8 @@ if NET_VENDOR_MARVELL
config MV643XX_ETH
tristate "Marvell Discovery (643XX) and Orion ethernet support"
- depends on (MV64X60 || PPC32 || PLAT_ORION) && INET
+ depends on (MV64X60 || PPC32 || PLAT_ORION || COMPILE_TEST) && INET
+ depends on HAS_DMA
select PHYLIB
select MVMDIO
---help---
@@ -55,7 +56,8 @@ config MVNETA_BM_ENABLE
config MVNETA
tristate "Marvell Armada 370/38x/XP network interface support"
- depends on PLAT_ORION
+ depends on PLAT_ORION || COMPILE_TEST
+ depends on HAS_DMA
select MVMDIO
select FIXED_PHY
---help---
@@ -77,7 +79,8 @@ config MVNETA_BM
config MVPP2
tristate "Marvell Armada 375 network interface support"
- depends on MACH_ARMADA_375
+ depends on MACH_ARMADA_375 || COMPILE_TEST
+ depends on HAS_DMA
select MVMDIO
---help---
This driver supports the network interface units in the
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v4 5/5] net: dsa: mv88e6xxx: Select IRQ_DOMAIN
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
` (3 preceding siblings ...)
2016-11-17 19:19 ` [PATCH net-next v4 4/5] net: marvell: Allow drivers to be built with COMPILE_TEST Florian Fainelli
@ 2016-11-17 19:19 ` Florian Fainelli
2016-11-18 18:54 ` [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers David Miller
5 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2016-11-17 19:19 UTC (permalink / raw)
To: netdev
Cc: davem, mw, arnd, gregory.clement, Shaohui.Xie, andrew,
Florian Fainelli
Some architectures may not define IRQ_DOMAIN (like m32r), fixes
undefined references to IRQ_DOMAIN functions.
Fixes: dc30c35be720 ("net: dsa: mv88e6xxx: Implement interrupt support.")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/mv88e6xxx/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/mv88e6xxx/Kconfig b/drivers/net/dsa/mv88e6xxx/Kconfig
index 486668813e15..1aaa7a95ebc4 100644
--- a/drivers/net/dsa/mv88e6xxx/Kconfig
+++ b/drivers/net/dsa/mv88e6xxx/Kconfig
@@ -1,6 +1,7 @@
config NET_DSA_MV88E6XXX
tristate "Marvell 88E6xxx Ethernet switch fabric support"
depends on NET_DSA
+ select IRQ_DOMAIN
select NET_DSA_TAG_EDSA
select NET_DSA_TAG_DSA
help
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info
2016-11-17 19:19 ` [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info Florian Fainelli
@ 2016-11-18 8:32 ` Gregory CLEMENT
0 siblings, 0 replies; 8+ messages in thread
From: Gregory CLEMENT @ 2016-11-18 8:32 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, davem, mw, arnd, Shaohui.Xie, andrew
Hi Florian,
On jeu., nov. 17 2016, Florian Fainelli <f.fainelli@gmail.com> wrote:
> In preparation for allowing CONFIG_MVNETA_BM to build with COMPILE_TEST,
> provide an inline stub for mvebu_mbus_get_dram_win_info().
Actually the set of SoCs supporting mbus is more reduce than MVEBU. You
can have a look on 434cec62a6d7 ("bus: mvebu-mbus: Provide stub function
for mvebu_mbus_get_io_win_info()"), PLAT_ORION seems the good option.
Thanks,
Gregory
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> include/linux/mbus.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/mbus.h b/include/linux/mbus.h
> index 2931aa43dab1..0d3f14fd2621 100644
> --- a/include/linux/mbus.h
> +++ b/include/linux/mbus.h
> @@ -82,6 +82,7 @@ static inline int mvebu_mbus_get_io_win_info(phys_addr_t phyaddr, u32 *size,
> }
> #endif
>
> +#ifdef CONFIG_MVEBU_MBUS
> int mvebu_mbus_save_cpu_target(u32 __iomem *store_addr);
> void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
> void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
> @@ -97,5 +98,12 @@ int mvebu_mbus_init(const char *soc, phys_addr_t mbus_phys_base,
> size_t mbus_size, phys_addr_t sdram_phys_base,
> size_t sdram_size);
> int mvebu_mbus_dt_init(bool is_coherent);
> +#else
> +static inline int mvebu_mbus_get_dram_win_info(phys_addr_t phyaddr, u8 *target,
> + u8 *attr)
> +{
> + return -EINVAL;
> +}
> +#endif /* CONFIG_MVEBU_MBUS */
>
> #endif /* __LINUX_MBUS_H */
> --
> 2.9.3
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
` (4 preceding siblings ...)
2016-11-17 19:19 ` [PATCH net-next v4 5/5] net: dsa: mv88e6xxx: Select IRQ_DOMAIN Florian Fainelli
@ 2016-11-18 18:54 ` David Miller
5 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-11-18 18:54 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, mw, arnd, gregory.clement, Shaohui.Xie, andrew
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 17 Nov 2016 11:19:09 -0800
> This patch series allows building the Freescale and Marvell Ethernet
> network drivers with COMPILE_TEST.
Thanks for doing this work, this kind of thing helps me a lot.
Series applied, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-18 18:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 19:19 [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 1/5] net: gianfar_ptp: Rename FS bit to FIPERST Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 2/5] net: fsl: Allow most drivers to be built with COMPILE_TEST Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 3/5] bus: mvebu-bus: Provide inline stub for mvebu_mbus_get_dram_win_info Florian Fainelli
2016-11-18 8:32 ` Gregory CLEMENT
2016-11-17 19:19 ` [PATCH net-next v4 4/5] net: marvell: Allow drivers to be built with COMPILE_TEST Florian Fainelli
2016-11-17 19:19 ` [PATCH net-next v4 5/5] net: dsa: mv88e6xxx: Select IRQ_DOMAIN Florian Fainelli
2016-11-18 18:54 ` [PATCH net-next v4 0/5] net: Enable COMPILE_TEST for Marvell & Freescale drivers David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).