Title: [8913] trunk/arch/blackfin: Task[#5921] Move PHYINT into mii bus platform data in board file.
Revision
8913
Author
sonicz
Date
2010-06-13 06:49:54 -0400 (Sun, 13 Jun 2010)

Log Message

Task[#5921] Move PHYINT into mii bus platform data in board file.
Move phy interface mode into board file as well.

PHYINT is still disabled in bf537-stamp board, because the interrupt is
not
gnerated properly on bf537-stamp. Michael said the first interrupt
should be triggered manually before everything works expected.

Although PHYINT is defined in bf527-ezkit, bf526-ezbrd and bf518f-ezbrd
boards, it is not actually used by phy driver, because board specific
phy driver can be found in kenrel. Generic phy driver is used instead by
now.

Modified Paths

Diff

Modified: trunk/arch/blackfin/mach-bf518/boards/ezbrd.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf518/boards/ezbrd.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf518/boards/ezbrd.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -87,6 +87,7 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = {
 	P_MII0_ETxD0,
 	P_MII0_ETxD1,
@@ -101,10 +102,32 @@
 	0
 };
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+	{
+		.addr = 2,
+		.irq = IRQ_MAC_PHYINT,
+	},
+	{
+		.addr = 3,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 3,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf518/boards/tcm-bf518.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf518/boards/tcm-bf518.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf518/boards/tcm-bf518.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -81,12 +81,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -273,12 +273,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_RMII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_RMII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf527/boards/ezbrd.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf527/boards/ezbrd.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf527/boards/ezbrd.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -190,12 +190,27 @@
 
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_RMII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_RMII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf527/boards/ezkit.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf527/boards/ezkit.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf527/boards/ezkit.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -362,12 +362,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_RMII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_RMII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/cm_bf537e.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/cm_bf537e.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/cm_bf537e.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -597,12 +597,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/cm_bf537u.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/cm_bf537u.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/cm_bf537u.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -562,12 +562,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/minotaur.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/minotaur.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/minotaur.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -68,12 +68,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/pnav10.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/pnav10.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/pnav10.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -99,12 +99,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_RMII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_RMII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/stamp.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/stamp.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/stamp.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -327,12 +327,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = PHY_POLL, /* IRQ_MAC_PHYINT */
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 

Modified: trunk/arch/blackfin/mach-bf537/boards/tcm_bf537.c (8912 => 8913)


--- trunk/arch/blackfin/mach-bf537/boards/tcm_bf537.c	2010-06-13 10:49:14 UTC (rev 8912)
+++ trunk/arch/blackfin/mach-bf537/boards/tcm_bf537.c	2010-06-13 10:49:54 UTC (rev 8913)
@@ -564,12 +564,27 @@
 #endif
 
 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
+#include <linux/bfin_mac.h>
 static const unsigned short bfin_mac_peripherals[] = P_MII0;
 
+static struct bfin_phydev_platform_data bfin_phydev_data[] = {
+	{
+		.addr = 1,
+		.irq = IRQ_MAC_PHYINT,
+	},
+};
+
+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
+	.phydev_number = 1,
+	.phydev_data = bfin_phydev_data,
+	.phy_mode = PHY_INTERFACE_MODE_MII,
+	.mac_peripherals = bfin_mac_peripherals,
+};
+
 static struct platform_device bfin_mii_bus = {
 	.name = "bfin_mii_bus",
 	.dev = {
-		.platform_data = &bfin_mac_peripherals,
+		.platform_data = &bfin_mii_bus_data,
 	}
 };
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to