pasemi: Kconfig for mdio_gpio
PATCH 1/1 pasemi: Kconfig for mdio_gpio
arch/powerpc/platforms/pasemi/gpio_mdio.c really depends on CONFIG_PHYLIB. Add a config option for it, allow for it to be disabled if needed and fix the dependency.
arch/powerpc/platforms/pasemi/Kconfig +8 -0
@@ -19,4 +19,12 @@ config PPC_PASEMI_IOMMU help IOMMU support for PA6T-1682M +config PPC_PASEMI_MDIO + depends on PPC_PASEMI + bool "MDIO support via GPIO" + default y + select PHYLIB + help + Driver for MDIO via GPIO on PWRficient platforms + endmenu
arch/powerpc/platforms/pasemi/Makefile +2 -2
@@ -1,2 +1,2 @@ -obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o gpio_mdio.o - +obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o +obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
Review
Quoted 8 lines · Olof Johansson
(quoted diff) +8
-0+config PPC_PASEMI_MDIO +=A0=A0=A0=A0=A0=A0=A0depends on PPC_PASEMI +=A0=A0=A0=A0=A0=A0=A0bool "MDIO support via GPIO" +=A0=A0=A0=A0=A0=A0=A0default y +=A0=A0=A0=A0=A0=A0=A0select PHYLIB +=A0=A0=A0=A0=A0=A0=A0help +=A0=A0=A0=A0=A0=A0=A0 =A0Driver for MDIO via GPIO on PWRficient platforms +
Looks still wrong. I stumbled over the original bug because in fedora, CONFIG_PHYLIB=3Dm. When you make PPC_PASEMI_MDIO a bool, it will force PHYLIB=3Dy, which is potentially undesired.
Can you make this a modular driver (tristate)?
Instead of making it select PHYLIB directly, it might be more straightforward to make PPC_PASEMI_MDIO depend on PHYLIB and have the actual network driver select both PPC_PASEMI_MDIO and PHYLIB.
Arnd <><
Quoted 14 lines · Arnd Bergmann
Review
Quoted 8 lines · Olof Johansson
(quoted diff) +8
-0+config PPC_PASEMI_MDIO +???????depends on PPC_PASEMI +???????bool "MDIO support via GPIO" +???????default y +???????select PHYLIB +???????help +??????? ?Driver for MDIO via GPIO on PWRficient platforms +Looks still wrong. I stumbled over the original bug because in fedora,
CONFIG_PHYLIB=m. When you makePPC_PASEMI_MDIOa bool, it will force PHYLIB=y, which is potentially undesired.
Quoted 6 lines
Can you make this a modular driver (tristate)?
Instead of making it select PHYLIB directly, it might be more straightforward to make
PPC_PASEMI_MDIOdepend on PHYLIB and have the actual network driver select bothPPC_PASEMI_MDIOand PHYLIB.
Good points. New patch shortly.
-Olof
PATCH v2 1/1 pasemi: Kconfig for gpio_mdio
In reply to Olof Johanssonarch/powerpc/platforms/pasemi/gpio_mdio.c really depends on CONFIG_PHYLIB. Add a config option for it, allow for it to be disabled if needed and fix the dependency.
arch/powerpc/platforms/pasemi/Kconfig +7 -0
@@ -19,4 +19,11 @@ config PPC_PASEMI_IOMMU help IOMMU support for PA6T-1682M +config PPC_PASEMI_MDIO + depends on PHYLIB + tristate "MDIO support via GPIO" + default y + help + Driver for MDIO via GPIO on PWRficient platforms + endmenu
arch/powerpc/platforms/pasemi/Makefile +2 -2
@@ -1,2 +1,2 @@ -obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o gpio_mdio.o - +obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o +obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o