Skip to content

Commit

Permalink
ARM: shmobile: lager: phy fixup needs CONFIG_PHYLIB
Browse files Browse the repository at this point in the history
Do not build the phy fixup unless CONFIG_PHYLIB is enabled.

Other than not being useful it is also not possible to link
the code under this condition as phy_register_fixup_for_id(),
mdiobus_read() and mdiobus_write() are absent.

arch/arm/mach-shmobile/built-in.o: In function `lager_ksz8041_fixup':
board-lager.c:(.text+0xb8): undefined reference to `mdiobus_read'
board-lager.c:(.text+0xd4): undefined reference to `mdiobus_write'
arch/arm/mach-shmobile/built-in.o: In function `lager_init':
board-lager.c:(.init.text+0xafc): undefined reference to `phy_register_fixup_for_id'

This problem was introduced by 48c8b96
("ARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup")

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Simon Horman committed Nov 24, 2013
1 parent 6ce4eac commit 6802cdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/arm/mach-shmobile/board-lager.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ static void __init lager_init(void)
{
lager_add_standard_devices();

phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
if (IS_ENABLED(CONFIG_PHYLIB))
phy_register_fixup_for_id("r8a7790-ether-ff:01",
lager_ksz8041_fixup);
}

static const char * const lager_boards_compat_dt[] __initconst = {
Expand Down

0 comments on commit 6802cdc

Please sign in to comment.