aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@smsc.com>2009-01-07 03:21:29 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-01-21 03:42:25 -0500
commit02da916ae69889f72ca026d759fe521094ba7065 (patch)
tree58b38239ce2cfe60eda381c119baed21fb49aa26
parent90b764916abedbebe62ac41b2e4a3fc3e2b82f9b (diff)
sh: convert magicpanelr2 platform to use smsc911x.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/board-magicpanelr2.c23
-rw-r--r--arch/sh/configs/magicpanelr2_defconfig21
2 files changed, 36 insertions, 8 deletions
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c
index 3de22ccdeb7..0a37c8bfc95 100644
--- a/arch/sh/boards/board-magicpanelr2.c
+++ b/arch/sh/boards/board-magicpanelr2.c
@@ -14,6 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/smsc911x.h>
17#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
18#include <linux/mtd/partitions.h> 19#include <linux/mtd/partitions.h>
19#include <linux/mtd/physmap.h> 20#include <linux/mtd/physmap.h>
@@ -242,7 +243,7 @@ static void __init mpr2_setup(char **cmdline_p)
242 printk(KERN_WARNING "Ethernet not ready\n"); 243 printk(KERN_WARNING "Ethernet not ready\n");
243} 244}
244 245
245static struct resource smc911x_resources[] = { 246static struct resource smsc911x_resources[] = {
246 [0] = { 247 [0] = {
247 .start = 0xa8000000, 248 .start = 0xa8000000,
248 .end = 0xabffffff, 249 .end = 0xabffffff,
@@ -255,11 +256,21 @@ static struct resource smc911x_resources[] = {
255 }, 256 },
256}; 257};
257 258
258static struct platform_device smc911x_device = { 259static struct smsc911x_platform_config smsc911x_config = {
259 .name = "smc911x", 260 .phy_interface = PHY_INTERFACE_MODE_MII,
261 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
262 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
263 .flags = SMSC911X_USE_32BIT,
264};
265
266static struct platform_device smsc911x_device = {
267 .name = "smsc911x",
260 .id = -1, 268 .id = -1,
261 .num_resources = ARRAY_SIZE(smc911x_resources), 269 .num_resources = ARRAY_SIZE(smsc911x_resources),
262 .resource = smc911x_resources, 270 .resource = smsc911x_resources,
271 .dev = {
272 .platform_data = &smsc911x_config,
273 },
263}; 274};
264 275
265static struct resource heartbeat_resources[] = { 276static struct resource heartbeat_resources[] = {
@@ -360,7 +371,7 @@ static void __init set_mtd_partitions(void)
360 371
361static struct platform_device *mpr2_devices[] __initdata = { 372static struct platform_device *mpr2_devices[] __initdata = {
362 &heartbeat_device, 373 &heartbeat_device,
363 &smc911x_device, 374 &smsc911x_device,
364 &flash_device, 375 &flash_device,
365}; 376};
366 377
diff --git a/arch/sh/configs/magicpanelr2_defconfig b/arch/sh/configs/magicpanelr2_defconfig
index 499ed720438..e590085486d 100644
--- a/arch/sh/configs/magicpanelr2_defconfig
+++ b/arch/sh/configs/magicpanelr2_defconfig
@@ -502,13 +502,30 @@ CONFIG_NETDEVICES=y
502# CONFIG_EQUALIZER is not set 502# CONFIG_EQUALIZER is not set
503# CONFIG_TUN is not set 503# CONFIG_TUN is not set
504# CONFIG_VETH is not set 504# CONFIG_VETH is not set
505# CONFIG_PHYLIB is not set 505CONFIG_PHYLIB=y
506
507#
508# MII PHY device drivers
509#
510# CONFIG_MARVELL_PHY is not set
511# CONFIG_DAVICOM_PHY is not set
512# CONFIG_QSEMI_PHY is not set
513# CONFIG_LXT_PHY is not set
514# CONFIG_CICADA_PHY is not set
515# CONFIG_VITESSE_PHY is not set
516CONFIG_SMSC_PHY=y
517# CONFIG_BROADCOM_PHY is not set
518# CONFIG_ICPLUS_PHY is not set
519# CONFIG_REALTEK_PHY is not set
520# CONFIG_FIXED_PHY is not set
521# CONFIG_MDIO_BITBANG is not set
506CONFIG_NET_ETHERNET=y 522CONFIG_NET_ETHERNET=y
507CONFIG_MII=y 523CONFIG_MII=y
508# CONFIG_AX88796 is not set 524# CONFIG_AX88796 is not set
509# CONFIG_STNIC is not set 525# CONFIG_STNIC is not set
510# CONFIG_SMC91X is not set 526# CONFIG_SMC91X is not set
511CONFIG_SMC911X=y 527# CONFIG_SMC911X is not set
528CONFIG_SMSC911X=y
512# CONFIG_IBM_NEW_EMAC_ZMII is not set 529# CONFIG_IBM_NEW_EMAC_ZMII is not set
513# CONFIG_IBM_NEW_EMAC_RGMII is not set 530# CONFIG_IBM_NEW_EMAC_RGMII is not set
514# CONFIG_IBM_NEW_EMAC_TAH is not set 531# CONFIG_IBM_NEW_EMAC_TAH is not set