Received: by 10.223.185.116 with SMTP id b49csp1048653wrg; Wed, 21 Feb 2018 11:10:38 -0800 (PST) X-Google-Smtp-Source: AH8x226juVd9VmewpkREH28nV8rZrit8Co0LS1Mbrx802w5fa+iXorjLvTirETCPTeQi3gU34Kji X-Received: by 2002:a17:902:590d:: with SMTP id o13-v6mr4025458pli.31.1519240238440; Wed, 21 Feb 2018 11:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519240238; cv=none; d=google.com; s=arc-20160816; b=szpdUjR6AiU4Qn8YYtK+ThBMkm/+2MzKMmoOOvzd9pDpBKXMeW99mPj0q5tBz3Thdw CbGNZ9K2j77KOJPDroeRLbqQWanJCVuCWa2vdiKJI8P4maEYEB+F92Tv2qkqygsTgiNg hTnvXhrq/xCGYQyFFcLG9b4+tK2iysrMBABvqECBW0pAGZ2u29psQX002s/jm/Oaf+pA HnGZ3uwyDERils0yk+pAQiOyef9cp3zhWqyB1/RMoJOhX1FZEhtPgqbkwfeOyYRTPesD JDt5ps6brNG7u0YQdnAr2Q4jkuk0HYr0vRiYu5C+l2ua7oFVDxpGoVeDY+NU5c7OBsvw Oeuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=JV6f6TQwxBQrU3Shhy1wAvCxljscMwYI1HKemteNLJY=; b=TM79MtKjlo485SvUTa8l9gzISG9fF0WH4HJ23UYn8cgPSkm1gcq2Ufa1rCJyPTaCr7 P3YLCSoe+3OsyiyZ/UY3Ci7OU4297W6LbmZ4GwnG6MtmdwjGnhdaey76oV798zne3spy ombp/zXBHZMRA35Kn1+huup098ZrcFVUEGgekgPEoLVe8jjPoWRynn+yhDYXfstzNm/z 9G7PFWxG7f1EuSeR5dWjMH1DO6e9g3k6g7R0qetP7gE9j6MglJqiBgm2DrWbF1Qffa6k o2TdQveMpCHVDlZ8rkgCZV9SHq2Cu6BE3dZbuKUkjNE4zGotHBsDohX0vROK7TM937jS Jv8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=DYVhyhFi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3-v6si3053881pld.86.2018.02.21.11.10.24; Wed, 21 Feb 2018 11:10:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=DYVhyhFi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933237AbeBURqb (ORCPT + 99 others); Wed, 21 Feb 2018 12:46:31 -0500 Received: from mail-oi0-f47.google.com ([209.85.218.47]:37853 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932301AbeBURq3 (ORCPT ); Wed, 21 Feb 2018 12:46:29 -0500 Received: by mail-oi0-f47.google.com with SMTP id f186so1727264oig.4 for ; Wed, 21 Feb 2018 09:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JV6f6TQwxBQrU3Shhy1wAvCxljscMwYI1HKemteNLJY=; b=DYVhyhFipWywpW0UNO6dgjjGFdMr6swxSuvqulGafeMFMB0707Kn2/A4hlhd0Kn+t6 JgSTYnFxp+QKnhrJHoOWnV/vw1//Li+3hVRol2VigD5t48KmCMbvFHB5NcWIFXLihAx2 4LGItaUl+lv/I9XpvCFvFT38tdEtoBCJbAIvL+nzR25jRMEX7YDUmiuRX0taCNj41nok yyiWyEqWMZf9md0FqAt6uICEEcOpcWLxJJOppPfdHfv3Q8GWzOm3SDEDfqQ81v9vTCcq 77tFmeHxe5Vo7PjaNehniW+jXIuHTihEPMSXLltXlstGe8qtondxSMqQC1hF9+JbJwCb z+vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JV6f6TQwxBQrU3Shhy1wAvCxljscMwYI1HKemteNLJY=; b=D/JrlLnRMpt0GY8kHBh3qYn/QSxF4c6M9m8UjKiyYK1TD3TQmPmk8tB2sxlIRRFKf6 KApNQKYdUQcj5CP0u1/mm7xSPq8LFMyoAh5DPl1+Rzu8KX6Pmb8u0bgw0GcoOH08cec2 UPLBdt89y4aXFUtrioWAP7CpJjQ6j7e6ajn3sAfk6myJYe1eH2SHAEhk13eFKgc1eVf1 2PGE3ujBFUEbGwmlZ2p7WtSQ9vms3IS7DmokZjTe8iwwIGV+u12P5XRF9SPAIJEFzA62 YmSUbqskz+icJV9GfYy8FJsiL5TMclYmPDNc2oEMGT5N/Man7j9zpneYEndjMABM/hUA RkOQ== X-Gm-Message-State: APf1xPAhYalFgwI/gjobZ7Lb1C4r6L1sowkEq9NDOrJ5rVibZiR4S8nt zMf+WGn+CpR+AfpNtsPijSkwxszR4Ve1UjjqBHoiLA== X-Received: by 10.202.189.133 with SMTP id n127mr2744394oif.103.1519235188638; Wed, 21 Feb 2018 09:46:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.2 with HTTP; Wed, 21 Feb 2018 09:46:28 -0800 (PST) In-Reply-To: References: <1519071723-31790-1-git-send-email-david@lechnology.com> <6142ab0d-85b1-84da-3a35-bdd8733bebd9@lechnology.com> From: Bartosz Golaszewski Date: Wed, 21 Feb 2018 18:46:28 +0100 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPATCH_v7_00=2F42=5D_ARM=3A_davinci=3A_convert_to_common?= =?UTF-8?Q?_clock_framework=E2=80=8B?= To: David Lechner Cc: linux-clk@vger.kernel.org, devicetree , Linux ARM , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , Bartosz Golaszewski , Adam Ford , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-21 18:05 GMT+01:00 David Lechner : > On 02/21/2018 06:01 AM, Bartosz Golaszewski wrote: >> >> 2018-02-20 19:39 GMT+01:00 David Lechner : >>> >>> On 02/20/2018 07:33 AM, Bartosz Golaszewski wrote: >>>> >>>> >>>> 2018-02-19 21:21 GMT+01:00 David Lechner : >>>>> >>>>> >>>>> This series converts mach-davinci to use the common clock framework. >>>>> >>>>> >>>> >>>> Hi David, >>>> >>>> just some quick results from today's playing with v7. >>>> >>>> I started out with da850-lcdk with my standard rootfs over NFS. I was >>>> not able to boot to console so far. The first problem is that mdio >>>> fails to probe: >>>> >>>> libphy: Fixed MDIO Bus: probed >>>> davinci_mdio 1e24000.mdio: davinci mdio revision 1.5, bus freq 2200000 >>>> davinci_mdio 1e24000.mdio: no live phy, scanning all >>>> davinci_mdio: probe of 1e24000.mdio failed with error -5> After some >>>> digging I noticed that the supplied clock rate differs >>>> between mainline (114000000Hz) vs common-clock-v7 (18000000). Since >>>> we're not setting the rate in mdio, using LPSC_SET_RATE_PARENT would >>>> not help like with lcdc. >>> >>> >>> >>> Can you post the output of this command so that I can see how your >>> clocks are setup: >>> >>> cat /sys/kernel/debug/clk/clk_summary >>> >>> >>>> >>>> After that, the boot just hangs without ever getting to emac's probe. >>> >>> >>> >>> Using your workaround, can you run: >>> >>> cat /sys/kernel/debug/pm_genpd/pm_genpd_summary >>> >>> If you see: >>> 1e27000.clock-controller: emac off-0 >>> >>> then genpd is not working like it is supposed to. You should see >>> something >>> like this for device that are working: >>> 1e27000.clock-controller: uart2 on >>> /devices/platform/soc@1c00000/1d0d000.serial active >>> >>> >>>> >>>> Once I set the emac clock to always enabled (a workaround that was >>>> necessary with v6, but could be dropped with my first >>>> genpd-in-a-separate-driver attempt), I'm getting a rather strange NULL >>>> pointer dereference: >>> >>> >>> >>> I noticed this too when adding the power-domains property to some device >>> tree nodes. This is part of the reason why I didn't add it everywhere. >>> I wasn't able to figure out the cause of this yet. As a work around >>> though, please try removing the power-domains property from the emac >>> and mdio nodes and use your previous workaround of having an always >>> enabled clock. >>> >>> >> >> When I use any of the workarounds I just keep getting more problems >> (e.g. [1] from blk and pinctrl). I only had a couple hours today to >> play with it but it seems to me we have some memory corruption >> somewhere. I'll check the initialization order of all the frameworks >> involved tomorrow. >> >> Best regards, >> Bartosz >> >> [1] https://pastebin.com/75mkkuJL >> > > I wonder if we need to delete all of the __init and __initconst attributes > now that this has been converted to platform devices. > Duh... Of course we do. IIRC everything in the init section gets removed after late_initcall. I'll test that tomorrow. Bart