* [PATCH REPOST 0/5] convert arm platforms to smsc911x @ 2009-01-15 9:07 Steve Glendinning 2009-01-15 9:07 ` [PATCH 1/5] smsc911x: add support for platform-specific irq flags Steve Glendinning 2009-01-19 5:53 ` [PATCH REPOST 0/5] convert arm platforms to smsc911x David Miller 0 siblings, 2 replies; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:07 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning This patchset, intended for 2.6.30, converts all in-tree arm platforms from smc911x to the actively maintained smsc911x driver. I don't have any of these platforms available to me, so I've only been able to compile-test the changes. David Miller is planning to take the smsc911x patches via net-2.6, but I've included them here to make testing easier as the other patches in the set depend on them. This patchset supercedes previous irq_flags patches from me and Stanley Miao. Steve Glendinning (5): smsc911x: add support for platform-specific irq flags smsc911x: register isr as IRQF_SHARED arm: convert pcm037 platform to use smsc911x arm: convert realview platform to use smsc911x arm: convert omap ldp platform to use smsc911x arch/arm/configs/omap_ldp_defconfig | 24 ++++++++++++++- arch/arm/configs/pcm037_defconfig | 23 ++++++++++++++- arch/arm/configs/realview-smp_defconfig | 24 ++++++++++++++- arch/arm/configs/realview_defconfig | 24 ++++++++++++++- arch/arm/mach-mx3/pcm037.c | 22 ++++++++------ arch/arm/mach-omap2/board-ldp.c | 41 +++++++++++++++++---------- arch/arm/mach-realview/core.c | 17 ++++++----- arch/arm/plat-omap/include/mach/board-ldp.h | 4 +- drivers/net/smsc911x.c | 19 +++++++++--- 9 files changed, 151 insertions(+), 47 deletions(-) ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/5] smsc911x: add support for platform-specific irq flags 2009-01-15 9:07 [PATCH REPOST 0/5] convert arm platforms to smsc911x Steve Glendinning @ 2009-01-15 9:07 ` Steve Glendinning 2009-01-15 9:07 ` [PATCH 2/5] smsc911x: register isr as IRQF_SHARED Steve Glendinning 2009-01-19 5:53 ` [PATCH REPOST 0/5] convert arm platforms to smsc911x David Miller 1 sibling, 1 reply; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:07 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning this patch adds support for the platform_device's resources to indicate additional flags to use when registering the irq, for example IORESOURCE_IRQ_LOWLEVEL (which corresponds to IRQF_TRIGGER_LOW). These should be set in the irq resource flags field. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> --- drivers/net/smsc911x.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index f513bdf..3565df1 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1892,9 +1892,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) struct net_device *dev; struct smsc911x_data *pdata; struct smsc911x_platform_config *config = pdev->dev.platform_data; - struct resource *res; + struct resource *res, *irq_res; unsigned int intcfg = 0; - int res_size; + int res_size, irq_flags; int retval; DECLARE_MAC_BUF(mac); @@ -1919,6 +1919,14 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) } res_size = res->end - res->start; + irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + if (!irq_res) { + pr_warning("%s: Could not allocate irq resource.\n", + SMSC_CHIPNAME); + retval = -ENODEV; + goto out_0; + } + if (!request_mem_region(res->start, res_size, SMSC_CHIPNAME)) { retval = -EBUSY; goto out_0; @@ -1935,7 +1943,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) pdata = netdev_priv(dev); - dev->irq = platform_get_irq(pdev, 0); + dev->irq = irq_res->start; + irq_flags = irq_res->flags & IRQF_TRIGGER_MASK; pdata->ioaddr = ioremap_nocache(res->start, res_size); /* copy config parameters across to pdata */ @@ -1968,8 +1977,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) smsc911x_reg_write(pdata, INT_EN, 0); smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF); - retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED, - dev->name, dev); + retval = request_irq(dev->irq, smsc911x_irqhandler, + irq_flags | IRQF_DISABLED, dev->name, dev); if (retval) { SMSC_WARNING(PROBE, "Unable to claim requested irq: %d", dev->irq); -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] smsc911x: register isr as IRQF_SHARED 2009-01-15 9:07 ` [PATCH 1/5] smsc911x: add support for platform-specific irq flags Steve Glendinning @ 2009-01-15 9:07 ` Steve Glendinning 2009-01-15 9:08 ` [PATCH 3/5] arm: convert pcm037 platform to use smsc911x Steve Glendinning 0 siblings, 1 reply; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:07 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning The isr supports shared operation, so register it with the IRQF_SHARED flag to indicate this. This patch also removes the IRQF_DISABLED flag. This driver doesn't need it, and IRQF_DISABLED isn't guaranteed when using shared interrupts. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> --- drivers/net/smsc911x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 3565df1..f882fd5 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1978,7 +1978,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF); retval = request_irq(dev->irq, smsc911x_irqhandler, - irq_flags | IRQF_DISABLED, dev->name, dev); + irq_flags | IRQF_SHARED, dev->name, dev); if (retval) { SMSC_WARNING(PROBE, "Unable to claim requested irq: %d", dev->irq); -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/5] arm: convert pcm037 platform to use smsc911x 2009-01-15 9:07 ` [PATCH 2/5] smsc911x: register isr as IRQF_SHARED Steve Glendinning @ 2009-01-15 9:08 ` Steve Glendinning 2009-01-15 9:08 ` [PATCH 4/5] arm: convert realview " Steve Glendinning 0 siblings, 1 reply; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:08 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> --- arch/arm/configs/pcm037_defconfig | 23 ++++++++++++++++++++++- arch/arm/mach-mx3/pcm037.c | 22 ++++++++++++---------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/arch/arm/configs/pcm037_defconfig b/arch/arm/configs/pcm037_defconfig index 6274745..6e37c77 100644 --- a/arch/arm/configs/pcm037_defconfig +++ b/arch/arm/configs/pcm037_defconfig @@ -465,12 +465,33 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_VETH is not set -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_SMSC_PHY=y +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_AX88796 is not set CONFIG_SMC91X=y # CONFIG_DM9000 is not set +# CONFIG_SMC911X is not set +CONFIG_SMSC911X=y # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 8cea825..64a34f6 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c @@ -24,7 +24,7 @@ #include <linux/mtd/plat-ram.h> #include <linux/memory.h> #include <linux/gpio.h> -#include <linux/smc911x.h> +#include <linux/smsc911x.h> #include <linux/interrupt.h> #include <mach/hardware.h> @@ -64,7 +64,7 @@ static struct imxuart_platform_data uart_pdata = { .flags = IMXUART_HAVE_RTSCTS, }; -static struct resource smc911x_resources[] = { +static struct resource smsc911x_resources[] = { [0] = { .start = CS1_BASE_ADDR + 0x300, .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, @@ -73,22 +73,24 @@ static struct resource smc911x_resources[] = { [1] = { .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), - .flags = IORESOURCE_IRQ, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, }, }; -static struct smc911x_platdata smc911x_info = { - .flags = SMC911X_USE_32BIT, - .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, +static struct smsc911x_platform_config smsc911x_info = { + .flags = SMSC911X_USE_32BIT, + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, + .phy_interface = PHY_INTERFACE_MODE_MII, }; static struct platform_device pcm037_eth = { - .name = "smc911x", + .name = "smsc911x", .id = -1, - .num_resources = ARRAY_SIZE(smc911x_resources), - .resource = smc911x_resources, + .num_resources = ARRAY_SIZE(smsc911x_resources), + .resource = smsc911x_resources, .dev = { - .platform_data = &smc911x_info, + .platform_data = &smsc911x_info, }, }; -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/5] arm: convert realview platform to use smsc911x 2009-01-15 9:08 ` [PATCH 3/5] arm: convert pcm037 platform to use smsc911x Steve Glendinning @ 2009-01-15 9:08 ` Steve Glendinning 2009-01-15 9:08 ` [PATCH 5/5] arm: convert omap ldp " Steve Glendinning 0 siblings, 1 reply; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:08 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> --- arch/arm/configs/realview-smp_defconfig | 24 ++++++++++++++++++++++-- arch/arm/configs/realview_defconfig | 24 ++++++++++++++++++++++-- arch/arm/mach-realview/core.c | 17 +++++++++-------- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig index cd29824..21db4b3 100644 --- a/arch/arm/configs/realview-smp_defconfig +++ b/arch/arm/configs/realview-smp_defconfig @@ -496,13 +496,33 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_VETH is not set -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_SMSC_PHY=y +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_AX88796 is not set CONFIG_SMC91X=y # CONFIG_DM9000 is not set -CONFIG_SMC911X=y +# CONFIG_SMC911X is not set +CONFIG_SMSC911X=y # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig index 7e253f5..9a75c30 100644 --- a/arch/arm/configs/realview_defconfig +++ b/arch/arm/configs/realview_defconfig @@ -490,13 +490,33 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_VETH is not set -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_SMSC_PHY=y +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_AX88796 is not set CONFIG_SMC91X=y # CONFIG_DM9000 is not set -CONFIG_SMC911X=y +# CONFIG_SMC911X is not set +CONFIG_SMSC911X=y # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index bd2aa4f..820ec25 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -28,7 +28,7 @@ #include <linux/clocksource.h> #include <linux/clockchips.h> #include <linux/io.h> -#include <linux/smc911x.h> +#include <linux/smsc911x.h> #include <asm/clkdev.h> #include <asm/system.h> @@ -127,14 +127,15 @@ int realview_flash_register(struct resource *res, u32 num) return platform_device_register(&realview_flash_device); } -static struct smc911x_platdata realview_smc911x_platdata = { - .flags = SMC911X_USE_32BIT, - .irq_flags = IRQF_SHARED, - .irq_polarity = 1, +static struct smsc911x_platform_config smsc911x_config = { + .flags = SMSC911X_USE_32BIT, + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, + .phy_interface = PHY_INTERFACE_MODE_MII, }; static struct platform_device realview_eth_device = { - .name = "smc911x", + .name = "smsc911x", .id = 0, .num_resources = 2, }; @@ -144,8 +145,8 @@ int realview_eth_register(const char *name, struct resource *res) if (name) realview_eth_device.name = name; realview_eth_device.resource = res; - if (strcmp(realview_eth_device.name, "smc911x") == 0) - realview_eth_device.dev.platform_data = &realview_smc911x_platdata; + if (strcmp(realview_eth_device.name, "smsc911x") == 0) + realview_eth_device.dev.platform_data = &smsc911x_config; return platform_device_register(&realview_eth_device); } -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/5] arm: convert omap ldp platform to use smsc911x 2009-01-15 9:08 ` [PATCH 4/5] arm: convert realview " Steve Glendinning @ 2009-01-15 9:08 ` Steve Glendinning 2009-01-15 9:23 ` stanley.miao 2009-01-19 22:35 ` Russell King - ARM Linux 0 siblings, 2 replies; 16+ messages in thread From: Steve Glendinning @ 2009-01-15 9:08 UTC (permalink / raw) To: linux-arm-kernel, netdev Cc: David Miller, Russell King, Stanley Miao, Ian Saturley, Steve Glendinning Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> --- arch/arm/configs/omap_ldp_defconfig | 24 ++++++++++++++- arch/arm/mach-omap2/board-ldp.c | 41 +++++++++++++++++---------- arch/arm/plat-omap/include/mach/board-ldp.h | 4 +- 3 files changed, 50 insertions(+), 19 deletions(-) diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig index b77d054..c164ff2 100644 --- a/arch/arm/configs/omap_ldp_defconfig +++ b/arch/arm/configs/omap_ldp_defconfig @@ -474,14 +474,34 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # CONFIG_VETH is not set -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_SMSC_PHY=y +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_AX88796 is not set # CONFIG_SMC91X is not set # CONFIG_DM9000 is not set # CONFIG_ENC28J60 is not set -CONFIG_SMC911X=y +# CONFIG_SMC911X is not set +CONFIG_SMSC911X=y # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index aa69727..b8810bd 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -22,6 +22,7 @@ #include <linux/spi/spi.h> #include <linux/spi/ads7846.h> #include <linux/i2c/twl4030.h> +#include <linux/smsc911x.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -43,7 +44,7 @@ #define SDP3430_SMC91X_CS 3 -static struct resource ldp_smc911x_resources[] = { +static struct resource ldp_smsc911x_resources[] = { [0] = { .start = OMAP34XX_ETHR_START, .end = OMAP34XX_ETHR_START + SZ_4K, @@ -56,40 +57,50 @@ static struct resource ldp_smc911x_resources[] = { }, }; -static struct platform_device ldp_smc911x_device = { - .name = "smc911x", +static struct smsc911x_platform_config ldp_smsc911x_config = { + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, + .flags = SMSC911X_USE_32BIT, + .phy_interface = PHY_INTERFACE_MODE_MII, +}; + +static struct platform_device ldp_smsc911x_device = { + .name = "smsc911x", .id = -1, - .num_resources = ARRAY_SIZE(ldp_smc911x_resources), - .resource = ldp_smc911x_resources, + .num_resources = ARRAY_SIZE(ldp_smsc911x_resources), + .resource = ldp_smsc911x_resources, + .dev = { + .platform_data = &ldp_smsc911x_config, + }, }; static struct platform_device *ldp_devices[] __initdata = { - &ldp_smc911x_device, + &ldp_smsc911x_device, }; -static inline void __init ldp_init_smc911x(void) +static inline void __init ldp_init_smsc911x(void) { int eth_cs; unsigned long cs_mem_base; int eth_gpio = 0; - eth_cs = LDP_SMC911X_CS; + eth_cs = LDP_SMSC911X_CS; if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { - printk(KERN_ERR "Failed to request GPMC mem for smc911x\n"); + printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); return; } - ldp_smc911x_resources[0].start = cs_mem_base + 0x0; - ldp_smc911x_resources[0].end = cs_mem_base + 0xf; + ldp_smsc911x_resources[0].start = cs_mem_base + 0x0; + ldp_smsc911x_resources[0].end = cs_mem_base + 0xf; udelay(100); - eth_gpio = LDP_SMC911X_GPIO; + eth_gpio = LDP_SMSC911X_GPIO; - ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); + ldp_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); if (omap_request_gpio(eth_gpio) < 0) { - printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", + printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", eth_gpio); return; } @@ -101,7 +112,7 @@ static void __init omap_ldp_init_irq(void) omap2_init_common_hw(); omap_init_irq(); omap_gpio_init(); - ldp_init_smc911x(); + ldp_init_smsc911x(); } static struct omap_uart_config ldp_uart_config __initdata = { diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h index f233996..74e98eb 100644 --- a/arch/arm/plat-omap/include/mach/board-ldp.h +++ b/arch/arm/plat-omap/include/mach/board-ldp.h @@ -32,8 +32,8 @@ extern void twl4030_bci_battery_init(void); #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ -#define LDP_SMC911X_CS 1 -#define LDP_SMC911X_GPIO 152 +#define LDP_SMSC911X_CS 1 +#define LDP_SMSC911X_GPIO 152 #define DEBUG_BASE 0x08000000 #define OMAP34XX_ETHR_START DEBUG_BASE #endif /* __ASM_ARCH_OMAP_LDP_H */ -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] arm: convert omap ldp platform to use smsc911x 2009-01-15 9:08 ` [PATCH 5/5] arm: convert omap ldp " Steve Glendinning @ 2009-01-15 9:23 ` stanley.miao 2009-01-19 22:35 ` Russell King - ARM Linux 1 sibling, 0 replies; 16+ messages in thread From: stanley.miao @ 2009-01-15 9:23 UTC (permalink / raw) To: Steve Glendinning Cc: linux-arm-kernel, netdev, David Miller, Russell King, Ian Saturley This patch should be sent to linux-omap mail list. But linux-omap git tree is still in 2.6.28 and it doesn't have smsc911x driver. Stanley. On Thu, 2009-01-15 at 09:08 +0000, Steve Glendinning wrote: > Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> > --- > arch/arm/configs/omap_ldp_defconfig | 24 ++++++++++++++- > arch/arm/mach-omap2/board-ldp.c | 41 +++++++++++++++++---------- > arch/arm/plat-omap/include/mach/board-ldp.h | 4 +- > 3 files changed, 50 insertions(+), 19 deletions(-) > > diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig > index b77d054..c164ff2 100644 > --- a/arch/arm/configs/omap_ldp_defconfig > +++ b/arch/arm/configs/omap_ldp_defconfig > @@ -474,14 +474,34 @@ CONFIG_NETDEVICES=y > # CONFIG_EQUALIZER is not set > # CONFIG_TUN is not set > # CONFIG_VETH is not set > -# CONFIG_PHYLIB is not set > +CONFIG_PHYLIB=y > + > +# > +# MII PHY device drivers > +# > +# CONFIG_MARVELL_PHY is not set > +# CONFIG_DAVICOM_PHY is not set > +# CONFIG_QSEMI_PHY is not set > +# CONFIG_LXT_PHY is not set > +# CONFIG_CICADA_PHY is not set > +# CONFIG_VITESSE_PHY is not set > +CONFIG_SMSC_PHY=y > +# CONFIG_BROADCOM_PHY is not set > +# CONFIG_ICPLUS_PHY is not set > +# CONFIG_REALTEK_PHY is not set > +# CONFIG_NATIONAL_PHY is not set > +# CONFIG_STE10XP is not set > +# CONFIG_LSI_ET1011C_PHY is not set > +# CONFIG_FIXED_PHY is not set > +# CONFIG_MDIO_BITBANG is not set > CONFIG_NET_ETHERNET=y > CONFIG_MII=y > # CONFIG_AX88796 is not set > # CONFIG_SMC91X is not set > # CONFIG_DM9000 is not set > # CONFIG_ENC28J60 is not set > -CONFIG_SMC911X=y > +# CONFIG_SMC911X is not set > +CONFIG_SMSC911X=y > # CONFIG_IBM_NEW_EMAC_ZMII is not set > # CONFIG_IBM_NEW_EMAC_RGMII is not set > # CONFIG_IBM_NEW_EMAC_TAH is not set > diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c > index aa69727..b8810bd 100644 > --- a/arch/arm/mach-omap2/board-ldp.c > +++ b/arch/arm/mach-omap2/board-ldp.c > @@ -22,6 +22,7 @@ > #include <linux/spi/spi.h> > #include <linux/spi/ads7846.h> > #include <linux/i2c/twl4030.h> > +#include <linux/smsc911x.h> > > #include <mach/hardware.h> > #include <asm/mach-types.h> > @@ -43,7 +44,7 @@ > > #define SDP3430_SMC91X_CS 3 > > -static struct resource ldp_smc911x_resources[] = { > +static struct resource ldp_smsc911x_resources[] = { > [0] = { > .start = OMAP34XX_ETHR_START, > .end = OMAP34XX_ETHR_START + SZ_4K, > @@ -56,40 +57,50 @@ static struct resource ldp_smc911x_resources[] = { > }, > }; > > -static struct platform_device ldp_smc911x_device = { > - .name = "smc911x", > +static struct smsc911x_platform_config ldp_smsc911x_config = { > + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, > + .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, > + .flags = SMSC911X_USE_32BIT, > + .phy_interface = PHY_INTERFACE_MODE_MII, > +}; > + > +static struct platform_device ldp_smsc911x_device = { > + .name = "smsc911x", > .id = -1, > - .num_resources = ARRAY_SIZE(ldp_smc911x_resources), > - .resource = ldp_smc911x_resources, > + .num_resources = ARRAY_SIZE(ldp_smsc911x_resources), > + .resource = ldp_smsc911x_resources, > + .dev = { > + .platform_data = &ldp_smsc911x_config, > + }, > }; > > static struct platform_device *ldp_devices[] __initdata = { > - &ldp_smc911x_device, > + &ldp_smsc911x_device, > }; > > -static inline void __init ldp_init_smc911x(void) > +static inline void __init ldp_init_smsc911x(void) > { > int eth_cs; > unsigned long cs_mem_base; > int eth_gpio = 0; > > - eth_cs = LDP_SMC911X_CS; > + eth_cs = LDP_SMSC911X_CS; > > if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { > - printk(KERN_ERR "Failed to request GPMC mem for smc911x\n"); > + printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); > return; > } > > - ldp_smc911x_resources[0].start = cs_mem_base + 0x0; > - ldp_smc911x_resources[0].end = cs_mem_base + 0xf; > + ldp_smsc911x_resources[0].start = cs_mem_base + 0x0; > + ldp_smsc911x_resources[0].end = cs_mem_base + 0xf; > udelay(100); > > - eth_gpio = LDP_SMC911X_GPIO; > + eth_gpio = LDP_SMSC911X_GPIO; > > - ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); > + ldp_smsc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); > > if (omap_request_gpio(eth_gpio) < 0) { > - printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", > + printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", > eth_gpio); > return; > } > @@ -101,7 +112,7 @@ static void __init omap_ldp_init_irq(void) > omap2_init_common_hw(); > omap_init_irq(); > omap_gpio_init(); > - ldp_init_smc911x(); > + ldp_init_smsc911x(); > } > > static struct omap_uart_config ldp_uart_config __initdata = { > diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h > index f233996..74e98eb 100644 > --- a/arch/arm/plat-omap/include/mach/board-ldp.h > +++ b/arch/arm/plat-omap/include/mach/board-ldp.h > @@ -32,8 +32,8 @@ > extern void twl4030_bci_battery_init(void); > > #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ > -#define LDP_SMC911X_CS 1 > -#define LDP_SMC911X_GPIO 152 > +#define LDP_SMSC911X_CS 1 > +#define LDP_SMSC911X_GPIO 152 > #define DEBUG_BASE 0x08000000 > #define OMAP34XX_ETHR_START DEBUG_BASE > #endif /* __ASM_ARCH_OMAP_LDP_H */ ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] arm: convert omap ldp platform to use smsc911x 2009-01-15 9:08 ` [PATCH 5/5] arm: convert omap ldp " Steve Glendinning 2009-01-15 9:23 ` stanley.miao @ 2009-01-19 22:35 ` Russell King - ARM Linux 2009-01-20 0:30 ` David Miller 1 sibling, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2009-01-19 22:35 UTC (permalink / raw) To: Steve Glendinning Cc: linux-arm-kernel, netdev, David Miller, Stanley Miao, Ian Saturley On Thu, Jan 15, 2009 at 09:08:02AM +0000, Steve Glendinning wrote: > - ldp_smc911x_resources[0].start = cs_mem_base + 0x0; > - ldp_smc911x_resources[0].end = cs_mem_base + 0xf; > + ldp_smsc911x_resources[0].start = cs_mem_base + 0x0; > + ldp_smsc911x_resources[0].end = cs_mem_base + 0xf; Actually, having finally got around to checking whether the smc911x support submitted from the OMAP folk on the LDP board works, I find it doesn't. And the reason it doesn't is that SMC911x wants to claim 256 bytes of space in this resource. With only 16 bytes in the parent resource, that isn't going to work. It looks to me like this is wrong for the SMSC911x driver as well. davem - I can see if I merge a fix for this (once I have confirmation what the fix should be) and push it for -rc, that will make things a little more complicated at your end. Suggest we hold fire on these patches for a few more days. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] arm: convert omap ldp platform to use smsc911x 2009-01-19 22:35 ` Russell King - ARM Linux @ 2009-01-20 0:30 ` David Miller 0 siblings, 0 replies; 16+ messages in thread From: David Miller @ 2009-01-20 0:30 UTC (permalink / raw) To: linux Cc: steve.glendinning, linux-arm-kernel, netdev, stanley.miao, ian.saturley From: Russell King - ARM Linux <linux@arm.linux.org.uk> Date: Mon, 19 Jan 2009 22:35:41 +0000 > davem - I can see if I merge a fix for this (once I have confirmation > what the fix should be) and push it for -rc, that will make things a > little more complicated at your end. Suggest we hold fire on these > patches for a few more days. Ok, I'm going to toss the smsc911x patches from my tree as well. Just resubmit to me and netdev@vger the relevant parts I should take in my tree once this is all sorted out. Thanks! ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-15 9:07 [PATCH REPOST 0/5] convert arm platforms to smsc911x Steve Glendinning 2009-01-15 9:07 ` [PATCH 1/5] smsc911x: add support for platform-specific irq flags Steve Glendinning @ 2009-01-19 5:53 ` David Miller 2009-01-19 8:04 ` stanley.miao 1 sibling, 1 reply; 16+ messages in thread From: David Miller @ 2009-01-19 5:53 UTC (permalink / raw) To: steve.glendinning Cc: linux-arm-kernel, netdev, linux, stanley.miao, ian.saturley From: Steve Glendinning <steve.glendinning@smsc.com> Date: Thu, 15 Jan 2009 09:07:57 +0000 > This patchset, intended for 2.6.30, converts all in-tree arm platforms > from smc911x to the actively maintained smsc911x driver. > > I don't have any of these platforms available to me, so I've only been > able to compile-test the changes. > > David Miller is planning to take the smsc911x patches via net-2.6, but > I've included them here to make testing easier as the other patches in > the set depend on them. > > This patchset supercedes previous irq_flags patches from me and Stanley > Miao. I've applied patches 1 and 2, the smsc911x driver changes. I can pull the platform changes into net-next-2.6 as well if people don't think there will enough conflicts to cause problems. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 5:53 ` [PATCH REPOST 0/5] convert arm platforms to smsc911x David Miller @ 2009-01-19 8:04 ` stanley.miao 2009-01-19 9:22 ` Russell King - ARM Linux 0 siblings, 1 reply; 16+ messages in thread From: stanley.miao @ 2009-01-19 8:04 UTC (permalink / raw) To: David Miller Cc: steve.glendinning, linux-arm-kernel, netdev, linux, ian.saturley On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > From: Steve Glendinning <steve.glendinning@smsc.com> > Date: Thu, 15 Jan 2009 09:07:57 +0000 > > > This patchset, intended for 2.6.30, converts all in-tree arm platforms > > from smc911x to the actively maintained smsc911x driver. > > > > I don't have any of these platforms available to me, so I've only been > > able to compile-test the changes. > > > > David Miller is planning to take the smsc911x patches via net-2.6, but > > I've included them here to make testing easier as the other patches in > > the set depend on them. > > > > This patchset supercedes previous irq_flags patches from me and Stanley > > Miao. > > I've applied patches 1 and 2, the smsc911x driver changes. > > I can pull the platform changes into net-next-2.6 as well > if people don't think there will enough conflicts to cause > problems. I think the platform data had better stay in arm tree. Stanley. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 8:04 ` stanley.miao @ 2009-01-19 9:22 ` Russell King - ARM Linux 2009-01-19 9:53 ` Steve.Glendinning 0 siblings, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2009-01-19 9:22 UTC (permalink / raw) To: stanley.miao Cc: David Miller, steve.glendinning, linux-arm-kernel, netdev, ian.saturley On Mon, Jan 19, 2009 at 04:04:34PM +0800, stanley.miao wrote: > On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > > From: Steve Glendinning <steve.glendinning@smsc.com> > > Date: Thu, 15 Jan 2009 09:07:57 +0000 > > > > > This patchset, intended for 2.6.30, converts all in-tree arm platforms > > > from smc911x to the actively maintained smsc911x driver. > > > > > > I don't have any of these platforms available to me, so I've only been > > > able to compile-test the changes. > > > > > > David Miller is planning to take the smsc911x patches via net-2.6, but > > > I've included them here to make testing easier as the other patches in > > > the set depend on them. > > > > > > This patchset supercedes previous irq_flags patches from me and Stanley > > > Miao. > > > > I've applied patches 1 and 2, the smsc911x driver changes. > > > > I can pull the platform changes into net-next-2.6 as well > > if people don't think there will enough conflicts to cause > > problems. > > I think the platform data had better stay in arm tree. What would be the impact if patches 3 to 5 got merged before 1 and 2? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 9:22 ` Russell King - ARM Linux @ 2009-01-19 9:53 ` Steve.Glendinning 2009-01-19 21:15 ` David Miller 0 siblings, 1 reply; 16+ messages in thread From: Steve.Glendinning @ 2009-01-19 9:53 UTC (permalink / raw) To: Russell King - ARM Linux Cc: David Miller, ian.saturley, linux-arm-kernel, netdev, stanley.miao Russell King - ARM Linux <linux@arm.linux.org.uk> wrote on 19/01/2009 09:22:57: > On Mon, Jan 19, 2009 at 04:04:34PM +0800, stanley.miao wrote: > > On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > > > I've applied patches 1 and 2, the smsc911x driver changes. > > > > > > I can pull the platform changes into net-next-2.6 as well > > > if people don't think there will enough conflicts to cause > > > problems. > > > > I think the platform data had better stay in arm tree. > > What would be the impact if patches 3 to 5 got merged before 1 and 2? It would not break compilation, but it would probably break ethernet support on those three platforms. All 3 platforms pass some combination of IRQF_TRIGGER_LOW | IRQF_SHARED when registering these interrupts. The trigger flag isn't passed through without 1 and IRQF_SHARED isn't specified without 2. I expect register_irq would fail on these platforms without these flags? Steve ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 9:53 ` Steve.Glendinning @ 2009-01-19 21:15 ` David Miller 2009-01-19 21:31 ` Russell King - ARM Linux 0 siblings, 1 reply; 16+ messages in thread From: David Miller @ 2009-01-19 21:15 UTC (permalink / raw) To: Steve.Glendinning Cc: linux, ian.saturley, linux-arm-kernel, netdev, stanley.miao From: Steve.Glendinning@smsc.com Date: Mon, 19 Jan 2009 09:53:54 +0000 > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote on 19/01/2009 > 09:22:57: > > On Mon, Jan 19, 2009 at 04:04:34PM +0800, stanley.miao wrote: > > > On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > > > > I've applied patches 1 and 2, the smsc911x driver changes. > > > > > > > > I can pull the platform changes into net-next-2.6 as well > > > > if people don't think there will enough conflicts to cause > > > > problems. > > > > > > I think the platform data had better stay in arm tree. > > > > What would be the impact if patches 3 to 5 got merged before 1 and 2? > > It would not break compilation, but it would probably break ethernet > support > on those three platforms. That's why I suggested they go where the dependency is for proper functionality. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 21:15 ` David Miller @ 2009-01-19 21:31 ` Russell King - ARM Linux 2009-01-19 22:12 ` David Miller 0 siblings, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2009-01-19 21:31 UTC (permalink / raw) To: David Miller Cc: Steve.Glendinning, ian.saturley, linux-arm-kernel, netdev, stanley.miao On Mon, Jan 19, 2009 at 01:15:17PM -0800, David Miller wrote: > From: Steve.Glendinning@smsc.com > Date: Mon, 19 Jan 2009 09:53:54 +0000 > > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote on 19/01/2009 > > 09:22:57: > > > On Mon, Jan 19, 2009 at 04:04:34PM +0800, stanley.miao wrote: > > > > On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > > > > > I've applied patches 1 and 2, the smsc911x driver changes. > > > > > > > > > > I can pull the platform changes into net-next-2.6 as well > > > > > if people don't think there will enough conflicts to cause > > > > > problems. > > > > > > > > I think the platform data had better stay in arm tree. > > > > > > What would be the impact if patches 3 to 5 got merged before 1 and 2? > > > > It would not break compilation, but it would probably break ethernet > > support > > on those three platforms. > > That's why I suggested they go where the dependency is for > proper functionality. Ok, as I see it, the files with the highest chance of conflicting in this set are the defconfig files. Therefore, may I suggest that the defconfig updates are split from 3-5 and sent via my tree, the remainder via davem's net-next-2.6 tree? ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH REPOST 0/5] convert arm platforms to smsc911x 2009-01-19 21:31 ` Russell King - ARM Linux @ 2009-01-19 22:12 ` David Miller 0 siblings, 0 replies; 16+ messages in thread From: David Miller @ 2009-01-19 22:12 UTC (permalink / raw) To: linux Cc: Steve.Glendinning, ian.saturley, linux-arm-kernel, netdev, stanley.miao From: Russell King - ARM Linux <linux@arm.linux.org.uk> Date: Mon, 19 Jan 2009 21:31:59 +0000 > On Mon, Jan 19, 2009 at 01:15:17PM -0800, David Miller wrote: > > From: Steve.Glendinning@smsc.com > > Date: Mon, 19 Jan 2009 09:53:54 +0000 > > > > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote on 19/01/2009 > > > 09:22:57: > > > > On Mon, Jan 19, 2009 at 04:04:34PM +0800, stanley.miao wrote: > > > > > On Sun, 2009-01-18 at 21:53 -0800, David Miller wrote: > > > > > > I've applied patches 1 and 2, the smsc911x driver changes. > > > > > > > > > > > > I can pull the platform changes into net-next-2.6 as well > > > > > > if people don't think there will enough conflicts to cause > > > > > > problems. > > > > > > > > > > I think the platform data had better stay in arm tree. > > > > > > > > What would be the impact if patches 3 to 5 got merged before 1 and 2? > > > > > > It would not break compilation, but it would probably break ethernet > > > support > > > on those three platforms. > > > > That's why I suggested they go where the dependency is for > > proper functionality. > > Ok, as I see it, the files with the highest chance of conflicting > in this set are the defconfig files. > > Therefore, may I suggest that the defconfig updates are split from 3-5 > and sent via my tree, the remainder via davem's net-next-2.6 tree? That works for me. ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2009-01-20 0:30 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-01-15 9:07 [PATCH REPOST 0/5] convert arm platforms to smsc911x Steve Glendinning 2009-01-15 9:07 ` [PATCH 1/5] smsc911x: add support for platform-specific irq flags Steve Glendinning 2009-01-15 9:07 ` [PATCH 2/5] smsc911x: register isr as IRQF_SHARED Steve Glendinning 2009-01-15 9:08 ` [PATCH 3/5] arm: convert pcm037 platform to use smsc911x Steve Glendinning 2009-01-15 9:08 ` [PATCH 4/5] arm: convert realview " Steve Glendinning 2009-01-15 9:08 ` [PATCH 5/5] arm: convert omap ldp " Steve Glendinning 2009-01-15 9:23 ` stanley.miao 2009-01-19 22:35 ` Russell King - ARM Linux 2009-01-20 0:30 ` David Miller 2009-01-19 5:53 ` [PATCH REPOST 0/5] convert arm platforms to smsc911x David Miller 2009-01-19 8:04 ` stanley.miao 2009-01-19 9:22 ` Russell King - ARM Linux 2009-01-19 9:53 ` Steve.Glendinning 2009-01-19 21:15 ` David Miller 2009-01-19 21:31 ` Russell King - ARM Linux 2009-01-19 22:12 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).