Skip to contentSkip to conversation

ucc_geth: migrate ucc_geth to phylib

PATCH In review Kim Phillips 1 participant 1 message Apr 13, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/7 ucc_geth: migrate ucc_geth to phylib

migrate ucc_geth to use the common phylib code.

There are several side effects from doing this:

o deprecate 'interface' property specification present in some old device tree source files in
favour of a split 'max-speed' and 'interface-type' description to appropriately match definitions in include/linux/phy.h. Note that 'interface' property is still honoured if max-speed or interface-type are not present (backward compatible).
o compile-time CONFIG_UGETH_HAS_GIGA is eliminated in favour of probe time speed derivation logic.
o adjust_link streamlined to only operate on maccfg2 and upsmr.r10m, instead of reapplying static initial values related to the interface-type.
o Addition of UEC MDIO of_platform driver requires platform code add 'mdio' type to id list
prior to calling of_platform_bus_probe (separate patch).
o ucc_struct_init introduced to reduce ucc_geth_startup complexity.

---
includes support for RGMII-ID

please consider for 2.6.22

 drivers/net/Kconfig         |    4 -
 drivers/net/Makefile        |    2 +-
 drivers/net/ucc_geth.c      |  814 ++++++++++++++-----------------------------
 drivers/net/ucc_geth.h      |  108 +------
 drivers/net/ucc_geth_mii.c  |  279 +++++++++++++++
 drivers/net/ucc_geth_mii.h  |  100 ++++++
 drivers/net/ucc_geth_phy.c  |  785 -----------------------------------------
 drivers/net/ucc_geth_phy.h  |  217 ------------
 include/linux/fsl_devices.h |   39 --
 9 files changed, 659 insertions(+), 1689 deletions(-)
 create mode 100644 drivers/net/ucc_geth_mii.c
 create mode 100644 drivers/net/ucc_geth_mii.h
 delete mode 100644 drivers/net/ucc_geth_phy.c
 delete mode 100644 drivers/net/ucc_geth_phy.h
drivers/net/Kconfig +0 -4
index 7ac0546..8c7be7f 100644
@@ -2296,10 +2296,6 @@ config UGETH_TX_ON_DEMOND
 	bool "Transmit on Demond support"
 	depends on UCC_GETH
 
-config UGETH_HAS_GIGA
-	bool
-	depends on UCC_GETH && PPC_MPC836x
-
 config MV643XX_ETH
 	tristate "MV-643XX Ethernet support"
 	depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MV64360 || MOMENCO_OCELOT_3 || (PPC_MULTIPLATFORM && PPC32)
drivers/net/Makefile +1 -1
index 33af833..d961e0e 100644
@@ -18,7 +18,7 @@ gianfar_driver-objs := gianfar.o \
 		gianfar_sysfs.o
 
 obj-$(CONFIG_UCC_GETH) += ucc_geth_driver.o
-ucc_geth_driver-objs := ucc_geth.o ucc_geth_phy.o
+ucc_geth_driver-objs := ucc_geth.o ucc_geth_mii.o
 
 #
 # link order important here
drivers/net/ucc_geth.c +271 -543

1,095 lines not on this page · raw message

drivers/net/ucc_geth.h +8 -100

163 lines not on this page · raw message

drivers/net/ucc_geth_mii.c new file +279 -0

279 lines not on this page · raw message

drivers/net/ucc_geth_mii.h new file +100 -0

100 lines not on this page · raw message

drivers/net/ucc_geth_phy.c deleted +0 -785

785 lines not on this page · raw message

drivers/net/ucc_geth_phy.h deleted +0 -217

217 lines not on this page · raw message

include/linux/fsl_devices.h +0 -39
index abb64c4..73710d6 100644
@@ -120,44 +120,5 @@ struct fsl_spi_platform_data {
 	u32	sysclk;
 };
 
-/* Ethernet interface (phy management and speed)
-*/
-enum enet_interface {
-	ENET_10_MII,		/* 10 Base T,   MII interface */
-	ENET_10_RMII,		/* 10 Base T,  RMII interface */
-	ENET_10_RGMII,		/* 10 Base T, RGMII interface */
-	ENET_100_MII,		/* 100 Base T,   MII interface */
-	ENET_100_RMII,		/* 100 Base T,  RMII interface */
-	ENET_100_RGMII,		/* 100 Base T, RGMII interface */
-	ENET_1000_GMII,		/* 1000 Base T,  GMII interface */
-	ENET_1000_RGMII,	/* 1000 Base T, RGMII interface */
-	ENET_1000_TBI,		/* 1000 Base T,   TBI interface */
-	ENET_1000_RTBI		/* 1000 Base T,  RTBI interface */
-};
-
-struct ucc_geth_platform_data {
-	/* device specific information */
-	u32			device_flags;
-	u32			phy_reg_addr;
-
-	/* board specific information */
-	u32			board_flags;
-	u8			rx_clock;
-	u8			tx_clock;
-	u32			phy_id;
-	enum enet_interface	phy_interface;
-	u32			phy_interrupt;
-	u8			mac_addr[6];
-};
-
-/* Flags related to UCC Gigabit Ethernet device features */
-#define FSL_UGETH_DEV_HAS_GIGABIT		0x00000001
-#define FSL_UGETH_DEV_HAS_COALESCE		0x00000002
-#define FSL_UGETH_DEV_HAS_RMON			0x00000004
-
-/* Flags in ucc_geth_platform_data */
-#define FSL_UGETH_BRD_HAS_PHY_INTR		0x00000001
-				/* if not set use a timer */
-
 #endif /* _FSL_DEVICE_H_ */
 #endif /* __KERNEL__ */
Signature · 1 line
1.5.0.1