From 24c8c7b88f2271a95289fdf3e9b0c61a3e254ca9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Nov 2009 10:27:57 +0100 Subject: linux-omap 2.6.29: add smsc patches and update overo defconfig --- recipes/linux/linux-omap-2.6.29/overo/defconfig | 62 ++++++--- .../linux/linux-omap-2.6.29/smsc/smsc911x-1.patch | 71 ++++++++++ .../linux/linux-omap-2.6.29/smsc/smsc911x-2.patch | 33 +++++ .../linux/linux-omap-2.6.29/smsc/smsc911x-3.patch | 152 +++++++++++++++++++++ .../linux/linux-omap-2.6.29/smsc/smsc911x-4.patch | 93 +++++++++++++ recipes/linux/linux-omap_2.6.29.bb | 4 + recipes/linux/linux_2.6.24.bb | 12 ++ 7 files changed, 410 insertions(+), 17 deletions(-) create mode 100644 recipes/linux/linux-omap-2.6.29/smsc/smsc911x-1.patch create mode 100644 recipes/linux/linux-omap-2.6.29/smsc/smsc911x-2.patch create mode 100644 recipes/linux/linux-omap-2.6.29/smsc/smsc911x-3.patch create mode 100644 recipes/linux/linux-omap-2.6.29/smsc/smsc911x-4.patch (limited to 'recipes') diff --git a/recipes/linux/linux-omap-2.6.29/overo/defconfig b/recipes/linux/linux-omap-2.6.29/overo/defconfig index 0101ca5099..a4894e2283 100644 --- a/recipes/linux/linux-omap-2.6.29/overo/defconfig +++ b/recipes/linux/linux-omap-2.6.29/overo/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.29-omap1 -# Wed Apr 8 18:20:57 2009 +# Wed Nov 25 10:17:31 2009 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -34,7 +34,7 @@ CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y +# CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y @@ -64,8 +64,7 @@ CONFIG_FAIR_GROUP_SCHED=y CONFIG_USER_SCHED=y # CONFIG_CGROUP_SCHED is not set # CONFIG_CGROUPS is not set -CONFIG_SYSFS_DEPRECATED=y -CONFIG_SYSFS_DEPRECATED_V2=y +# CONFIG_SYSFS_DEPRECATED_V2 is not set CONFIG_RELAY=y # CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y @@ -250,6 +249,7 @@ CONFIG_ARM_THUMBEE=y # CONFIG_CPU_BPREDICT_DISABLE is not set CONFIG_HAS_TLS_REG=y # CONFIG_OUTER_CACHE is not set +CONFIG_ARM_L1_CACHE_SHIFT=6 # # Bus support @@ -273,7 +273,7 @@ CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_HZ=128 CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set -CONFIG_ARCH_FLATMEM_HAS_HOLES=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set CONFIG_SELECT_MEMORY_MODEL=y @@ -649,7 +649,7 @@ CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=m # CONFIG_CHR_DEV_SCH is not set @@ -659,7 +659,7 @@ CONFIG_CHR_DEV_SG=m CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_SCAN_ASYNC=y CONFIG_SCSI_WAIT_SCAN=m # @@ -702,7 +702,7 @@ CONFIG_DUMMY=m # CONFIG_EQUALIZER is not set CONFIG_TUN=m # CONFIG_VETH is not set -CONFIG_PHYLIB=m +CONFIG_PHYLIB=y # # MII PHY device drivers @@ -720,6 +720,7 @@ CONFIG_PHYLIB=m # 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 @@ -728,7 +729,7 @@ CONFIG_MII=y # CONFIG_DM9000 is not set # CONFIG_ENC28J60 is not set # CONFIG_SMC911X is not set -CONFIG_SMSC911X=m +CONFIG_SMSC911X=y # CONFIG_DNET is not set # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set @@ -806,20 +807,22 @@ CONFIG_USB_KC2190=y CONFIG_USB_NET_ZAURUS=m # CONFIG_WAN is not set CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=m CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m CONFIG_PPP_BSDCOMP=m CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -# CONFIG_PPPOL2TP is not set +CONFIG_PPPOL2TP=m # CONFIG_SLIP is not set CONFIG_SLHC=m -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NETCONSOLE=m +# CONFIG_NETCONSOLE_DYNAMIC is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # CONFIG_ISDN is not set # @@ -1187,11 +1190,36 @@ CONFIG_VIDEO_CX2341X=m # CONFIG_VIDEO_SAA5249 is not set # CONFIG_VIDEO_AU0828 is not set # CONFIG_VIDEO_OMAP3 is not set +# CONFIG_VIDEO_OMAP34XX_ISP_RESIZER is not set # CONFIG_SOC_CAMERA is not set CONFIG_V4L_USB_DRIVERS=y CONFIG_USB_VIDEO_CLASS=m CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y -# CONFIG_USB_GSPCA is not set +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_ZC3XX=m CONFIG_VIDEO_PVRUSB2=m CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y @@ -1563,7 +1591,7 @@ CONFIG_USB_EHCI_HCD=y CONFIG_OMAP_EHCI_PHY_MODE=y # CONFIG_OMAP_EHCI_TLL_MODE is not set CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_EHCI_TT_NEWSCHED is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_OHCI_HCD is not set diff --git a/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-1.patch b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-1.patch new file mode 100644 index 0000000000..1efe181872 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-1.patch @@ -0,0 +1,71 @@ +From: 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 +--- + 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 + +-- +To unsubscribe from this list: send the line "unsubscribe netdev" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-2.patch b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-2.patch new file mode 100644 index 0000000000..15b4d04498 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-2.patch @@ -0,0 +1,33 @@ +From: 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 +--- + 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 + +-- +To unsubscribe from this list: send the line "unsubscribe netdev" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-3.patch b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-3.patch new file mode 100644 index 0000000000..0fb7f4f0cc --- /dev/null +++ b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-3.patch @@ -0,0 +1,152 @@ +From: Steve Glendinning + +On LAN9115/LAN9117/LAN9215/LAN9217, external phys are supported. These +are usually indicated by a hardware strap which sets an "external PHY +detected" bit in the HW_CFG register. + +In some cases it is desirable to override this hardware strap and force +use of either the internal phy or an external PHY. This patch adds +SMSC911X_FORCE_INTERNAL_PHY and SMSC911X_FORCE_EXTERNAL_PHY flags so a +platform can indicate this preference via its platform_data. + +Signed-off-by: Steve Glendinning +Acked-by: Sascha Hauer +Tested-by: Sascha Hauer +--- + drivers/net/smsc911x.c | 75 +++++++++++++++++++++++---------------------- + include/linux/smsc911x.h | 2 + + 2 files changed, 40 insertions(+), 37 deletions(-) + +diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c +index f882fd5..c7379f5 100644 +--- a/drivers/net/smsc911x.c ++++ b/drivers/net/smsc911x.c +@@ -368,48 +368,53 @@ out: + return reg; + } + +-/* Autodetects and initialises external phy for SMSC9115 and SMSC9117 flavors. +- * If something goes wrong, returns -ENODEV to revert back to internal phy. +- * Performed at initialisation only, so interrupts are enabled */ +-static int smsc911x_phy_initialise_external(struct smsc911x_data *pdata) ++/* Switch to external phy. Assumes tx and rx are stopped. */ ++static void smsc911x_phy_enable_external(struct smsc911x_data *pdata) + { + unsigned int hwcfg = smsc911x_reg_read(pdata, HW_CFG); + +- /* External phy is requested, supported, and detected */ +- if (hwcfg & HW_CFG_EXT_PHY_DET_) { ++ /* Disable phy clocks to the MAC */ ++ hwcfg &= (~HW_CFG_PHY_CLK_SEL_); ++ hwcfg |= HW_CFG_PHY_CLK_SEL_CLK_DIS_; ++ smsc911x_reg_write(pdata, HW_CFG, hwcfg); ++ udelay(10); /* Enough time for clocks to stop */ + +- /* Switch to external phy. Assuming tx and rx are stopped +- * because smsc911x_phy_initialise is called before +- * smsc911x_rx_initialise and tx_initialise. */ ++ /* Switch to external phy */ ++ hwcfg |= HW_CFG_EXT_PHY_EN_; ++ smsc911x_reg_write(pdata, HW_CFG, hwcfg); + +- /* Disable phy clocks to the MAC */ +- hwcfg &= (~HW_CFG_PHY_CLK_SEL_); +- hwcfg |= HW_CFG_PHY_CLK_SEL_CLK_DIS_; +- smsc911x_reg_write(pdata, HW_CFG, hwcfg); +- udelay(10); /* Enough time for clocks to stop */ ++ /* Enable phy clocks to the MAC */ ++ hwcfg &= (~HW_CFG_PHY_CLK_SEL_); ++ hwcfg |= HW_CFG_PHY_CLK_SEL_EXT_PHY_; ++ smsc911x_reg_write(pdata, HW_CFG, hwcfg); ++ udelay(10); /* Enough time for clocks to restart */ + +- /* Switch to external phy */ +- hwcfg |= HW_CFG_EXT_PHY_EN_; +- smsc911x_reg_write(pdata, HW_CFG, hwcfg); +- +- /* Enable phy clocks to the MAC */ +- hwcfg &= (~HW_CFG_PHY_CLK_SEL_); +- hwcfg |= HW_CFG_PHY_CLK_SEL_EXT_PHY_; +- smsc911x_reg_write(pdata, HW_CFG, hwcfg); +- udelay(10); /* Enough time for clocks to restart */ ++ hwcfg |= HW_CFG_SMI_SEL_; ++ smsc911x_reg_write(pdata, HW_CFG, hwcfg); ++} + +- hwcfg |= HW_CFG_SMI_SEL_; +- smsc911x_reg_write(pdata, HW_CFG, hwcfg); ++/* Autodetects and enables external phy if present on supported chips. ++ * autodetection can be overridden by specifying SMSC911X_FORCE_INTERNAL_PHY ++ * or SMSC911X_FORCE_EXTERNAL_PHY in the platform_data flags. */ ++static void smsc911x_phy_initialise_external(struct smsc911x_data *pdata) ++{ ++ unsigned int hwcfg = smsc911x_reg_read(pdata, HW_CFG); + +- SMSC_TRACE(HW, "Successfully switched to external PHY"); ++ if (pdata->config.flags & SMSC911X_FORCE_INTERNAL_PHY) { ++ SMSC_TRACE(HW, "Forcing internal PHY"); ++ pdata->using_extphy = 0; ++ } else if (pdata->config.flags & SMSC911X_FORCE_EXTERNAL_PHY) { ++ SMSC_TRACE(HW, "Forcing external PHY"); ++ smsc911x_phy_enable_external(pdata); ++ pdata->using_extphy = 1; ++ } else if (hwcfg & HW_CFG_EXT_PHY_DET_) { ++ SMSC_TRACE(HW, "HW_CFG EXT_PHY_DET set, using external PHY"); ++ smsc911x_phy_enable_external(pdata); + pdata->using_extphy = 1; + } else { +- SMSC_WARNING(HW, "No external PHY detected, " +- "Using internal PHY instead."); +- /* Use internal phy */ +- return -ENODEV; ++ SMSC_TRACE(HW, "HW_CFG EXT_PHY_DET clear, using internal PHY"); ++ pdata->using_extphy = 0; + } +- return 0; + } + + /* Fetches a tx status out of the status fifo */ +@@ -824,22 +829,18 @@ static int __devinit smsc911x_mii_init(struct platform_device *pdev, + + pdata->mii_bus->parent = &pdev->dev; + +- pdata->using_extphy = 0; +- + switch (pdata->idrev & 0xFFFF0000) { + case 0x01170000: + case 0x01150000: + case 0x117A0000: + case 0x115A0000: + /* External PHY supported, try to autodetect */ +- if (smsc911x_phy_initialise_external(pdata) < 0) { +- SMSC_TRACE(HW, "No external PHY detected, " +- "using internal PHY"); +- } ++ smsc911x_phy_initialise_external(pdata); + break; + default: + SMSC_TRACE(HW, "External PHY is not supported, " + "using internal PHY"); ++ pdata->using_extphy = 0; + break; + } + +diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h +index 1cbf031..170c76b 100644 +--- a/include/linux/smsc911x.h ++++ b/include/linux/smsc911x.h +@@ -43,5 +43,7 @@ struct smsc911x_platform_config { + /* Constants for flags */ + #define SMSC911X_USE_16BIT (BIT(0)) + #define SMSC911X_USE_32BIT (BIT(1)) ++#define SMSC911X_FORCE_INTERNAL_PHY (BIT(2)) ++#define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) + + #endif /* __LINUX_SMSC911X_H__ */ +-- +1.6.0.6 + +-- +To unsubscribe from this list: send the line "unsubscribe netdev" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-4.patch b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-4.patch new file mode 100644 index 0000000000..8afa06f400 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.29/smsc/smsc911x-4.patch @@ -0,0 +1,93 @@ +From: Steve Glendinning + +Some platforms (for example pcm037) do not have an EEPROM fitted, +instead storing their mac address somewhere else. The bootloader +fetches this and configures the ethernet adapter before the kernel is +started. + +This patch allows a platform to indicate to the driver via the +SMSC911X_SAVE_MAC_ADDRESS flag that the mac address has already been +configured via such a mechanism, and should be saved before resetting +the chip. + +Signed-off-by: Steve Glendinning +Acked-by: Sascha Hauer +Tested-by: Sascha Hauer +--- + drivers/net/smsc911x.c | 30 ++++++++++++++++++++++-------- + include/linux/smsc911x.h | 1 + + 2 files changed, 23 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c +index c7379f5..2f7399e 100644 +--- a/drivers/net/smsc911x.c ++++ b/drivers/net/smsc911x.c +@@ -1748,6 +1748,21 @@ static const struct net_device_ops smsc911x_netdev_ops = { + #endif + }; + ++/* copies the current mac address from hardware to dev->dev_addr */ ++static void __devinit smsc911x_read_mac_address(struct net_device *dev) ++{ ++ struct smsc911x_data *pdata = netdev_priv(dev); ++ u32 mac_high16 = smsc911x_mac_read(pdata, ADDRH); ++ u32 mac_low32 = smsc911x_mac_read(pdata, ADDRL); ++ ++ dev->dev_addr[0] = (u8)(mac_low32); ++ dev->dev_addr[1] = (u8)(mac_low32 >> 8); ++ dev->dev_addr[2] = (u8)(mac_low32 >> 16); ++ dev->dev_addr[3] = (u8)(mac_low32 >> 24); ++ dev->dev_addr[4] = (u8)(mac_high16); ++ dev->dev_addr[5] = (u8)(mac_high16 >> 8); ++} ++ + /* Initializing private device structures, only called from probe */ + static int __devinit smsc911x_init(struct net_device *dev) + { +@@ -1835,6 +1850,12 @@ static int __devinit smsc911x_init(struct net_device *dev) + SMSC_WARNING(PROBE, + "This driver is not intended for this chip revision"); + ++ /* workaround for platforms without an eeprom, where the mac address ++ * is stored elsewhere and set by the bootloader. This saves the ++ * mac address before resetting the device */ ++ if (pdata->config.flags & SMSC911X_SAVE_MAC_ADDRESS) ++ smsc911x_read_mac_address(dev); ++ + /* Reset the LAN911x */ + if (smsc911x_soft_reset(pdata)) + return -ENODEV; +@@ -2015,14 +2036,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) + } else { + /* Try reading mac address from device. if EEPROM is present + * it will already have been set */ +- u32 mac_high16 = smsc911x_mac_read(pdata, ADDRH); +- u32 mac_low32 = smsc911x_mac_read(pdata, ADDRL); +- dev->dev_addr[0] = (u8)(mac_low32); +- dev->dev_addr[1] = (u8)(mac_low32 >> 8); +- dev->dev_addr[2] = (u8)(mac_low32 >> 16); +- dev->dev_addr[3] = (u8)(mac_low32 >> 24); +- dev->dev_addr[4] = (u8)(mac_high16); +- dev->dev_addr[5] = (u8)(mac_high16 >> 8); ++ smsc911x_read_mac_address(dev); + + if (is_valid_ether_addr(dev->dev_addr)) { + /* eeprom values are valid so use them */ +diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h +index 170c76b..b327250 100644 +--- a/include/linux/smsc911x.h ++++ b/include/linux/smsc911x.h +@@ -45,5 +45,6 @@ struct smsc911x_platform_config { + #define SMSC911X_USE_32BIT (BIT(1)) + #define SMSC911X_FORCE_INTERNAL_PHY (BIT(2)) + #define SMSC911X_FORCE_EXTERNAL_PHY (BIT(3)) ++#define SMSC911X_SAVE_MAC_ADDRESS (BIT(4)) + + #endif /* __LINUX_SMSC911X_H__ */ +-- +1.6.0.6 + +-- +To unsubscribe from this list: send the line "unsubscribe netdev" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/recipes/linux/linux-omap_2.6.29.bb b/recipes/linux/linux-omap_2.6.29.bb index 6996416e58..1a0fc51c5a 100644 --- a/recipes/linux/linux-omap_2.6.29.bb +++ b/recipes/linux/linux-omap_2.6.29.bb @@ -169,6 +169,10 @@ SRC_URI_append = " \ file://cache/copy-page-tweak.patch;patch=1 \ file://2.6.29_relocation_1.patch;patch=1 \ file://2.6.29_relocation_2.patch;patch=1 \ + file://smsc/smsc911x-1.patch;patch=1 \ + file://smsc/smsc911x-2.patch;patch=1 \ + file://smsc/smsc911x-3.patch;patch=1 \ + file://smsc/smsc911x-4.patch;patch=1 \ " diff --git a/recipes/linux/linux_2.6.24.bb b/recipes/linux/linux_2.6.24.bb index bfcfb89f7e..7df18dad9c 100644 --- a/recipes/linux/linux_2.6.24.bb +++ b/recipes/linux/linux_2.6.24.bb @@ -11,6 +11,7 @@ DEFAULT_PREFERENCE_ts72xx = "1" DEFAULT_PREFERENCE_oxnas = "1" DEFAULT_PREFERENCE_hipox = "1" DEFAULT_PREFERENCE_cs-e9302 = "1" +DEFAULT_PREFERENCE_smartq5 = "1" PR = "r33" @@ -105,6 +106,17 @@ SRC_URI_append_hipox = " \ file://hipox-sata-module.patch;patch=1 \ " + +SRC_URI_smartq5 = " ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \ + http://ftp.kernel.org/pub/linux/kernel/v2.6/patch-2.6.24.7.bz2;patch=1 \ + file://smartq-gitupdate.diff;patch=1 \ + file://base/0001-Apply-samsung-kernel-patch.patch;patch=1 \ + file://base/0002-Apply-smartq-patch.patch;patch=1 \ + file://base/0003-Apply-cpufreq-patch-from-gqwang.patch;patch=1 \ + file://base/0004-Better-compatibility-with-some-memory-chips.patch;patch=1 \ + file://defconfig \ +" + CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=1 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2" FILES_kernel-image_gesbc-9302 = "" -- cgit 1.2.3-korg