Skip to contentSkip to conversation

pasemi: Kconfig for mdio_gpio

PATCH Superseded Olof Johansson 2 participants 4 messages Apr 24, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

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
index 64e5525..4b5f137 100644
@@ -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
index e90265f..7ffd43b 100644
@@ -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
#1 lore raw

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 <><
#2 lore raw
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 make PPC_PASEMI_MDIO a 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_MDIO depend on PHYLIB and have the actual network driver select both PPC_PASEMI_MDIO and PHYLIB.

Good points. New patch shortly.

-Olof

#3 lore raw

PATCH v2 1/1 pasemi: Kconfig for gpio_mdio

In reply to Olof Johansson

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 +7 -0
index 64e5525..eb4dbc7 100644
@@ -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
index e90265f..7ffd43b 100644
@@ -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