Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755683AbbGEL41 (ORCPT ); Sun, 5 Jul 2015 07:56:27 -0400 Received: from smtp3a.wifcom.cz ([37.157.193.67]:40307 "EHLO smtp.wifcom.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752411AbbGEL4U (ORCPT ); Sun, 5 Jul 2015 07:56:20 -0400 X-Greylist: delayed 1979 seconds by postgrey-1.27 at vger.kernel.org; Sun, 05 Jul 2015 07:56:20 EDT Message-ID: <55982685.70201@cdi.cz> Date: Sat, 04 Jul 2015 20:31:33 +0200 From: Martin Devera User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Subject: bug in ARM/LPC32XX eth init code / probably OF related Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-Wif-ss: () Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 45 Hi, I compiled vanilla 4.1.1 for LPC3240 MPU without loadable module support. I created own dts and board .c source: static void __init lpc3250_machine_init(void) { __raw_writel(0x1600 ,LPC32XX_GPIO_P_MUX_SET); // SSP0 __raw_writel(1<<6 , io_p2v(0x40028004)); // ETH unreset lpc32xx_serial_init(); of_platform_populate(NULL, of_default_bus_match_table, lpc32xx_auxdata_lookup, NULL); } All seems to be ok, only ETH doesn't work. I found the problem - Micrel PHY driver is inited later than lpc_eth driver and it doesn't bind to the eth. I solved it by ugly hack - set status="disabled" for eth in dts and adding: static struct of_device_id __initdata of_ids[] = { { .compatible = "nxp,lpc-eth" },{} }; static void __init devik_late_init(void) // errorchecking omited { struct device_node *np; np = of_find_compatible_node(NULL, NULL, "nxp,lpc-eth"); struct property *p = of_find_property(np,"status",NULL); of_remove_property(np,p); of_node_clear_flag(np, OF_POPULATED); of_platform_bus_probe(np,of_ids,NULL); } Other solutiuon is to make it module a load later (we prefer no modules here), or editing lpc_eth.c to register in device_initcall_sync. Is there some better solution for the bug ? devik -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/