Received: by 10.213.65.68 with SMTP id h4csp3716959imn; Tue, 3 Apr 2018 09:32:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Z0+pfi/Xucrc4acdH9RiWCbWUCnCuHPw5KdP+vOtRKH787gLUyPPq5EPYRWOQAhjtOQIs X-Received: by 10.99.138.202 with SMTP id y193mr9576864pgd.224.1522773140472; Tue, 03 Apr 2018 09:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522773140; cv=none; d=google.com; s=arc-20160816; b=n/yhWNdfUYykQkaTiLzLYHHjsbfg1lw+UTzJ/Odnzc0ICLzYR80IiH2RMB4fCyF4z+ mLP98cRi0uDwOD3J+Uq/xQRg28qIJqmCLyLg7FrjIk7vZOL22rGuTzLlQ4D5ZnPIpkRs zKUKwRT+K814pggtiS2uf4vnG//GttEcU9FdXhvHTxdCwSy3c6Vo0UzfW+wF0PD6B7Db GV2iUAyGR+42LxCUxY5DmgaC9+x8OVeLHwO7TOtYjTh2nBq9D0o7Ll684uUo7bly/mSY 5OowyxlOz7iL9oLitJ1JVC3u3S5egsoaBzXYew1n0zJ9jDlVtrB7UUh708y2Uz5XUFla Wuvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=5fzCWmmqB/Hpi4vFsD948XNWUesWGgWfaB+xUTNzSYs=; b=f4Gon8S+XysDjHJ0J4JFFGVov3CzOKY713T02Mi7YTI6M0K5hH562tve0dJDq+SoY6 +HKbLCZpodGuHYNK9Ot6/zoOqtL80npXYNUzHrGmNvK7kZK0ou1TKMPpgbCBGkNN098l ZcS5WqOjlP3dGDUFTtHK3bgiZ4iRFoF84qjgC/4iDI/gFbwKK/5MDgYs96Rm2ME6V6/p zxDuV9fqz5o6Bw2/egDbbNBdZ4kMxWf5TYXxbQHPndrf8cerMq01wSAcUrhn1ZLcsDu1 trZHx2NsDn5ISDHZWBdG5xnXX8vR/hJBhSYaZ4j4VRqDtf3WTSfRURwXgieeoWR6Sv/3 C39g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=czmB2+c5; 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 m185si2410661pfc.396.2018.04.03.09.32.05; Tue, 03 Apr 2018 09:32:20 -0700 (PDT) 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=fail header.i=@lechnology.com header.s=default header.b=czmB2+c5; 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 S1752774AbeDCQai (ORCPT + 99 others); Tue, 3 Apr 2018 12:30:38 -0400 Received: from vern.gendns.com ([206.190.152.46]:57396 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbeDCQaf (ORCPT ); Tue, 3 Apr 2018 12:30:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5fzCWmmqB/Hpi4vFsD948XNWUesWGgWfaB+xUTNzSYs=; b=czmB2+c5jEHyYKrCX+QDGttgDi bWqrOhPHE0iZ16cukZ/FjjaT7loNRBYvdChiPaWW1dn+Qqz25clsu24EktpQ2cxBA5tYzU2aDkYg0 wH987RPzrXJVFcBiWruzIc8B4XEJ4r+Sgp9C3mK0qVm6xG6eH4Z1aOX0KhAUfV1C8DxuAE+9f2yRF hHYPorfEEPBoiTpiwrpDE7Anm2VVullB3asG/roHPg4mObXvLC8qZUD1hbfABdcV4SLkzH0OxNj27 5cKf/WcugV50zIzFoxSoI6kaiq4m8m6ZkKi+wIq7qcBt+DxA5+ZswUfqfRBdjVkMl8kPpTwXNar8u 5hiLGDgA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:44928 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1f3OpM-001aM8-UN; Tue, 03 Apr 2018 12:30:33 -0400 Subject: Re: [PATCH v8 25/42] ARM: davinci: dm644x: add new clock init using common clock framework To: Sekhar Nori , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , linux-kernel@vger.kernel.org References: <1521168778-27236-1-git-send-email-david@lechnology.com> <1521168778-27236-26-git-send-email-david@lechnology.com> <333f49c7-bafd-8e2d-65e9-7d1aff4836de@ti.com> From: David Lechner Message-ID: <43c266b8-c023-a1b4-c751-bd46c2fb910d@lechnology.com> Date: Tue, 3 Apr 2018 11:30:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <333f49c7-bafd-8e2d-65e9-7d1aff4836de@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/03/2018 05:26 AM, Sekhar Nori wrote: > On Friday 16 March 2018 08:22 AM, David Lechner wrote: >> +static struct resource dm644x_pll1_resources[] = { >> + { >> + .start = DAVINCI_PLL1_BASE, >> + .end = DAVINCI_PLL1_BASE + SZ_4K - 1, > > The .end should be DAVINCI_PLL1_BASE + SZ_1K - 1, otherwise it prevents > PLL2 from getting registered. > >> + .flags = IORESOURCE_MEM, >> + }, >> +}; >> + >> +static struct platform_device dm644x_pll1_device = { >> + .name = "dm644x-pll1", >> + .id = -1, >> + .resource = dm644x_pll1_resources, >> + .num_resources = ARRAY_SIZE(dm644x_pll1_resources), >> +}; >> + >> +static struct resource dm644x_pll2_resources[] = { >> + { >> + .start = DAVINCI_PLL2_BASE, >> + .end = DAVINCI_PLL2_BASE + SZ_4K - 1, > > And this too should be fixed, else it prevents the PSC from getting > registered. > >> + .flags = IORESOURCE_MEM, >> + }, >> +}; > > With these fixed, I still had to enable 'clk_ignore_unused' on DM644x > EVM to get to NFS boot. I think root of the problem is that pm_runtime() > APIs are not working in the legacy boot mode. > > This can be seen even on the DA850 LCDK in legacy boot. pm_genpd_summary > in debugfs shows all domains are off and there are no devices registered > under the "da850-psc1: emac" domain. NFS mounting still works on the > DA850 LCDK because clk_summary shows enable and prepare count of 4 for > emac. Not sure how that's happening. But on DM644x EVM, the emac clock > enable count is 0. > > Still looking at whats going wrong here. I am testing your v8 branch > with clk-davinci branch from clk-next merged to get the fixes Stephen made. > In legacy mode, genpd is not being used. I didn't see any mechanism for genpd lookup without device tree. So, we are still relying on the matching in arch/arm/mach-davinci/pm_domain.c. I suspect we need to fix the clock lookups in drivers/clk/davinci/psc-dm644x.c. LPSC_CLKDEV2(emac_clkdev, NULL, "davinci_emac.1", "fck", "davinci_mdio.0"); NULL might need to be changed to "fck" to be picked up by pm matching and "davinci_emac.1" should be verified that it matches the actual EMAC device name.