Received: by 10.223.185.116 with SMTP id b49csp1931416wrg; Thu, 22 Feb 2018 05:37:32 -0800 (PST) X-Google-Smtp-Source: AH8x226unNVF7F4zqnySwX6oUVaqV1gmcNT0vDBsHIsmentz0eGipOMq9Q24JpckJ87Lj+pT9Q3b X-Received: by 10.98.64.146 with SMTP id f18mr7034942pfd.30.1519306652588; Thu, 22 Feb 2018 05:37:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519306652; cv=none; d=google.com; s=arc-20160816; b=Y/JyDydtsfmk02BL7BqaUV33Cp2RCyF2H+zTmCoYMsRLBNJfHvNI8mm1nH9ZIQ01ox EVJ4Tup8lxPOxra7Zm3yZpnd8SDcOULPk5lV4by3rPxgpKdJGEtAelxWtdC6m54Sz8Z2 S7I2Zp/rVitUCsyDud/2YnXwCwM8h0/oY9uun9WW5iNkSxnmW+IDPzKysasEaNAz4jZB vCYH638tVgpwctNajKc/SJ3fT6ILTNmtL1+UJCJx9D9ziFL8DUHwWm/fACybbp6yXDJ2 b1u3fe1Amtl2z6KVwhdoEIq1qxih6NFKmr4Z6hXbmI/HNKS0kSKzLetETOYjWyUicSxC 57ZA== 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=xYThbqC2budEVdViyJHCQJxkWrwPF5iYK/X50f4yTGw=; b=WKVuMzRGG6Ip1qQQZqaj05TD0YoQ5H90WYfWmQ/fasdMCwjjeg9bX/qoh2Nr/km8bO dFWBHauepnU2H8/fJnFzEtmpPg7ktptPiSAtMiqOzec4ZaSlsHyyCSA1eHKkWkcAw/bO 6fCPg+IBmIZ2LkF9Od/3oyofvrq33lgc7TwwxEdtD+K2xgxmiNzX3IyJw67CIXKnvf/P Ibc6a2XoG+l1F/M5AouTg5SwAuQ4m4the8OzPFsHO2/ZBz+ICnzxgcHml6f98nGDqJ6m k4ONZL4exOKOq0q+TexZR0aQkytAy+sNS2vumCLZMXCwZv5p215vqqR/p76ZyEw07PCn TNUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=zeosclOd; 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 b86si59573pfd.345.2018.02.22.05.37.18; Thu, 22 Feb 2018 05:37:32 -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=zeosclOd; 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 S932583AbeBVNgk (ORCPT + 99 others); Thu, 22 Feb 2018 08:36:40 -0500 Received: from mail-ot0-f171.google.com ([74.125.82.171]:37320 "EHLO mail-ot0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932555AbeBVNgh (ORCPT ); Thu, 22 Feb 2018 08:36:37 -0500 Received: by mail-ot0-f171.google.com with SMTP id e64so4607905ote.4 for ; Thu, 22 Feb 2018 05:36:37 -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=xYThbqC2budEVdViyJHCQJxkWrwPF5iYK/X50f4yTGw=; b=zeosclOdmeSa9b3wRWd4+ZV8ReV4XhzX4SztPejsyiacPaorCvDdFqzZJAKmztlrzP i4kINYjixCROo1KeOQ7ckLkTA9M8m7hAwI9gj8dPwkA+YIvcEZVFaDAChrbXP4AiWi9I e6FnfRYIkNKPsgxRFanA/GMSkJyYtI0M50IrdGt0VatmSs9BZgD8C38uBy/pEGl5Gglw uCuG9QgHdBv/M5A2Ri6raZBwteiK26Y//Vh7qaDZ3+ZS04NVpjW/OgTvdxFv8C2e0BSj pLPsxY0CIA/idRmEUaod1qa5x7MXkM8mblADgpZF6diVbmDOBSTuGbZYO1zvpHic4giz Qb1A== 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=xYThbqC2budEVdViyJHCQJxkWrwPF5iYK/X50f4yTGw=; b=U60FCG4wxDhw4ohzHXR+UvzEFlYyjLpNLGWLqIoqVGAr8ZsZDVSlT2Yy0sa7C6twIW 46m6eY11mE8YEsJFE0pYvn8XDlBwqTGOjaDx39JyUv2RiM/dzzqAeDfrKPqvbsuRh7R+ /g+9WslX1SFUzyqpQIy7sLEFgJEIT95HWBmHn5IPRtFmLNy288xzBAkrVbHhzaixg8Eb ARMbLVLrCa09cH6pAPmpZx7HjG5Dsft801QCFqiiRXtqFOmgZRDHgAwUP1b30D7WvtnF rr6yfBNevrLLxZHEKc5mgepnswMAadgAhe4UPVaN9mAocYgk70OsD83fuqVROaM8QZ0u pTfA== X-Gm-Message-State: APf1xPDgMqhh5BHMQyxfyY5an+tiIfBKpkbtpJzkF5O/v5/D7vDiSY07 1JV445NpXs1MbP7MKh86H0tiHx11h/J4UmxtBuMZvA== X-Received: by 10.157.17.234 with SMTP id y39mr4794591oty.158.1519306597297; Thu, 22 Feb 2018 05:36:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.45.2 with HTTP; Thu, 22 Feb 2018 05:36:36 -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: Thu, 22 Feb 2018 14:36:36 +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:46 GMT+01:00 Bartosz Golaszewski : > 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 It's not that. Not only anyway as it doesn't fix anything, I'm getting the exact same panics. I tried to play with various settings, like initializing the platform driver later in the boot sequence etc. but haven't yet figured out what's going on. Bart