Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299918 > unrolled thread

[PATCH] fsl/fman: allow modular build

Started byArnd Bergmann <arnd@arndb.de>
First post2016-01-01 15:00 +0100
Last post2016-01-05 04:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] fsl/fman: allow modular build Arnd Bergmann <arnd@arndb.de> - 2016-01-01 15:00 +0100
    Re: [PATCH] fsl/fman: allow modular build David Miller <davem@davemloft.net> - 2016-01-05 04:00 +0100

#1299918 — [PATCH] fsl/fman: allow modular build

FromArnd Bergmann <arnd@arndb.de>
Date2016-01-01 15:00 +0100
Subject[PATCH] fsl/fman: allow modular build
Message-ID<qM8pj-39E-1@gated-at.bofh.it>
ARM allmodconfig fails because of the addition of the FMAN driver:

drivers/built-in.o: In function `dtsec_restart_autoneg':
binder.c:(.text+0x173328): undefined reference to `mdiobus_read'
binder.c:(.text+0x173348): undefined reference to `mdiobus_write'
drivers/built-in.o: In function `dtsec_config':
binder.c:(.text+0x173d24): undefined reference to `of_phy_find_device'
drivers/built-in.o: In function `init_phy':
binder.c:(.text+0x1763b0): undefined reference to `of_phy_connect'
drivers/built-in.o: In function `stop':
binder.c:(.text+0x176014): undefined reference to `phy_stop'
drivers/built-in.o: In function `start':
binder.c:(.text+0x176078): undefined reference to `phy_start'

The reason is that the driver uses PHYLIB, but that is a loadable
module here, and fman itself is built-in.

This patch makes it possible to configure fman as a module as well
so we don't change the status of PHYLIB in an allmodconfig kernel,
and it adds a 'select PHYLIB' statement to ensure that phylib is
always built-in when fman is.

The driver uses "builtin_platform_driver(fman_driver);", which means
it cannot be unloaded, but it's still possible to have it as a loadable
module that gets loaded once and never removed.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5adae51a64b8 ("fsl/fman: Add FMan MURAM support")

diff --git a/drivers/net/ethernet/freescale/fman/Kconfig b/drivers/net/ethernet/freescale/fman/Kconfig
index 66b729692b48..79b7c84b7869 100644
--- a/drivers/net/ethernet/freescale/fman/Kconfig
+++ b/drivers/net/ethernet/freescale/fman/Kconfig
@@ -1,7 +1,8 @@
 config FSL_FMAN
-	bool "FMan support"
+	tristate "FMan support"
 	depends on FSL_SOC || COMPILE_TEST
 	select GENERIC_ALLOCATOR
+	select PHYLIB
 	default n
 	help
 		Freescale Data-Path Acceleration Architecture Frame Manager

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1301246

FromDavid Miller <davem@davemloft.net>
Date2016-01-05 04:00 +0100
Message-ID<qNq0O-3Xh-11@gated-at.bofh.it>
In reply to#1299918
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 01 Jan 2016 14:55:24 +0100

> ARM allmodconfig fails because of the addition of the FMAN driver:
> 
> drivers/built-in.o: In function `dtsec_restart_autoneg':
> binder.c:(.text+0x173328): undefined reference to `mdiobus_read'
> binder.c:(.text+0x173348): undefined reference to `mdiobus_write'
> drivers/built-in.o: In function `dtsec_config':
> binder.c:(.text+0x173d24): undefined reference to `of_phy_find_device'
> drivers/built-in.o: In function `init_phy':
> binder.c:(.text+0x1763b0): undefined reference to `of_phy_connect'
> drivers/built-in.o: In function `stop':
> binder.c:(.text+0x176014): undefined reference to `phy_stop'
> drivers/built-in.o: In function `start':
> binder.c:(.text+0x176078): undefined reference to `phy_start'
> 
> The reason is that the driver uses PHYLIB, but that is a loadable
> module here, and fman itself is built-in.
> 
> This patch makes it possible to configure fman as a module as well
> so we don't change the status of PHYLIB in an allmodconfig kernel,
> and it adds a 'select PHYLIB' statement to ensure that phylib is
> always built-in when fman is.
> 
> The driver uses "builtin_platform_driver(fman_driver);", which means
> it cannot be unloaded, but it's still possible to have it as a loadable
> module that gets loaded once and never removed.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 5adae51a64b8 ("fsl/fman: Add FMan MURAM support")

Applied, sorry I didn't catch this but nobody else was even attempting
to review that huge patch series so I did the best that I could... :-/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web