aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/cm_bf527.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2010-06-11 10:44:22 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-25 04:54:25 -0400
commit02460d08930656b3a50381cfb119864efcd4eef9 (patch)
treeaf76f49fbf61b252f9aca181d2911526a7ecc2c6 /arch/blackfin/mach-bf527/boards/cm_bf527.c
parentMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial (diff)
downloadlinux-dev-02460d08930656b3a50381cfb119864efcd4eef9.tar.xz
linux-dev-02460d08930656b3a50381cfb119864efcd4eef9.zip
netdev: bfin_mac: push settings to platform resources
Move all the pin settings out of the Kconfig and into the platform resources (MII vs RMII). This clean up also lets us push out the phy settings so that board porters may control the layout. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/cm_bf527.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 38037c7e125a..2c31af7a320a 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -273,13 +273,35 @@ static struct platform_device dm9000_device = {
#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_mii_bus_data,
+ }
};
static struct platform_device bfin_mac_device = {
.name = "bfin_mac",
- .dev.platform_data = &bfin_mii_bus,
+ .dev = {
+ .platform_data = &bfin_mii_bus,
+ }
};
#endif