From patchwork Thu Jan 11 21:34:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10158617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5789460170 for ; Thu, 11 Jan 2018 21:34:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45BE928620 for ; Thu, 11 Jan 2018 21:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39B4928647; Thu, 11 Jan 2018 21:34:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9873128620 for ; Thu, 11 Jan 2018 21:34:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932790AbeAKVeQ (ORCPT ); Thu, 11 Jan 2018 16:34:16 -0500 Received: from mail-ua0-f193.google.com ([209.85.217.193]:46165 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbeAKVeP (ORCPT ); Thu, 11 Jan 2018 16:34:15 -0500 Received: by mail-ua0-f193.google.com with SMTP id u2so2678509uad.13; Thu, 11 Jan 2018 13:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u2eKAksgzyztCYUGLuuS+c883I0Qif8GnvzE7t6floM=; b=IDd9zuTKRzn81JoUWIbx/PZQx2mLa1Re5uXna9JiF0/6dik+23gxEwabvsCmONfX+R wd8eqUE4wO1Z7hOJNpMaZ1dC1ifdNev5MnIedPfZubPg+l2zfzKs/hBm8EWAeK1Bo1y5 /5Cp54/E+E3yP4Xc0b0mnfwjd0/qXKRvzfNcGjC39Jtv/ddqxjc0VT4gbojPnd83YhXX Vs9KK9YI/NnycAZ83+WZoCoqhXPL88fkQr+YXeMR32DiBfeIbs5kc6yckt6mNAxQ0XKl 16ur7kzUiDRv9Xkvk6Ollr5BhPQHXHkC2ebQZFslMyynBCKd8z/pKAhhBeeG5SPEEXcD nyVw== 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=u2eKAksgzyztCYUGLuuS+c883I0Qif8GnvzE7t6floM=; b=Pb5Nvcb0DBi7ysDTFHK58Y58XLbU10zSd0YdxT/iSy3qG20XeJlfzoTTv7iGduGMUP dg6qMrZSpq3LIZLFuuCMoBbcBLi7De1BbKUbuKOapWEo3djvC/OoS6RRU7Wc2j0QkshM 06Y/N9sLG/4UuiqbJmp5gH9IH8txWQxGQhoyC9RXv+Fg8CphNb3hV89pC1V6f0xAjV6x A++p5zD7hXa97jtRjfsQqyHo7MaNwbNldqxittdy7Ouj8q9rjqIE+0zFnVzrhkPT9IGy Trx0oD6tCMSdS3i+VCzP12cS8kgbTkRBr0cP5/CFbYGOxo6vy35QG45t6fXuSIh1ts+C t8AQ== X-Gm-Message-State: AKwxytd9//BxYwMNnYFVyjwqlUhvKMebdRns96SKrqQtM/a992TEpG88 qhsOKix+JMmfx595MArck7F/HgSQyhawK4X6750= X-Google-Smtp-Source: ACJfBovmRKaFQTjaMoZv6XWXR8euc3bOpRVDoaj+FLr+4WDcZ2vKBuZLmC3Mmc2gQ5b7jnzvBeElfW597fQAUpnGFEo= X-Received: by 10.176.80.8 with SMTP id b8mr13205662uaa.63.1515706453478; Thu, 11 Jan 2018 13:34:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.72.109 with HTTP; Thu, 11 Jan 2018 13:34:12 -0800 (PST) In-Reply-To: <5832fd62-16aa-e167-7e52-2ce493e33cdc@lechnology.com> References: <1515377863-20358-1-git-send-email-david@lechnology.com> <1515377863-20358-2-git-send-email-david@lechnology.com> <22409e49-5c14-4068-b137-7535afaf90d7@lechnology.com> <0f90b5f7-f21e-5f81-1154-9a815bbb786d@ti.com> <5aacc350-6236-2e4f-35bb-a681fc9d47e7@ti.com> <40501635-6f5b-20c9-f8bc-d17e26b58426@lechnology.com> <5832fd62-16aa-e167-7e52-2ce493e33cdc@lechnology.com> From: Adam Ford Date: Thu, 11 Jan 2018 15:34:12 -0600 Message-ID: Subject: Re: [PATCH v5 01/44] dt-bindings: clock: Add new bindings for TI Davinci PLL clocks To: David Lechner Cc: Sekhar Nori , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , linux-kernel@vger.kernel.org Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jan 11, 2018 at 3:04 PM, David Lechner wrote: > On 01/11/2018 02:58 PM, Adam Ford wrote: >> >> On Thu, Jan 11, 2018 at 2:04 PM, David Lechner >> wrote: >>> >>> On 01/11/2018 12:50 PM, Adam Ford wrote: >>>> >>>> >>>> On Thu, Jan 11, 2018 at 12:29 PM, David Lechner >>>> wrote: >>>>> >>>>> >>>>> If removing the "clk_ignore_unused" option causes the board to not >>>>> boot, >>>>> then we still have problems that need to be fixed, so please also test >>>>> without this option. >>>> >>>> >>>> >>>> Without this option, it still does not boot. Without device tree it >>>> hangs after: >>>> >>>> [snip] >>>> >>>> NET: Registered protocol family 17 >>>> Loading compiled-in X.509 certificates >>>> console [netcon0] enabled >>>> netconsole: network logging started >>>> davinci_emac davinci_emac.1: using random MAC addr: 5e:38:1a:1f:4f:77 >>>> mmc0: host does not support reading read-only switch, assuming >>>> write-enable >>>> hctosys: unable to open rtc device (rtc0) >>>> mmc0: new high speed SDHC card at address b368 >>>> >>>> >>>> With device tree it hangs after: >>>> >>>> [snip] >>>> mmc0: host does not support reading read-only switch, assuming >>>> write-enable >>>> mmc0: new high speed SDHC card at address b368 >>>> mmcblk0: mmc0:b368 00000 3.75 GiB >>>> mmcblk0: p1 p2 >>>> pca953x 0-0020: 0-0020 supply vcc not found, using dummy regulator >>>> pca953x 0-0020: failed reading register >>>> pca953x: probe of 0-0020 failed with error -121 >>>> console [netcon0] enabled >>>> netconsole: network logging started >>>> davinci_emac 1e20000.ethernet: incompatible machine/device type for >>>> reading mac address >>>> hctosys: unable to open rtc device (rtc0) >>>> >>>> >>> >>> Please try this change: >>> >>> diff --git a/drivers/clk/davinci/psc-da850.c >>> b/drivers/clk/davinci/psc-da850.c >>> index 3fd6b49..a526cc2 100644 >>> --- a/drivers/clk/davinci/psc-da850.c >>> +++ b/drivers/clk/davinci/psc-da850.c >>> @@ -17,7 +17,7 @@ static const struct davinci_psc_clk_info >>> da850_psc0_info[] >>> __initconst = { >>> LPSC(0, 0, tpcc0, pll0_sysclk2, LPSC_ALWAYS_ENABLED), >>> LPSC(1, 0, tptc0, pll0_sysclk2, LPSC_ALWAYS_ENABLED), >>> LPSC(2, 0, tptc1, pll0_sysclk2, LPSC_ALWAYS_ENABLED), >>> - LPSC(3, 0, aemif, pll0_sysclk3, 0), >>> + LPSC(3, 0, aemif, pll0_sysclk3, LPSC_ALWAYS_ENABLED), >>> LPSC(4, 0, spi0, pll0_sysclk2, 0), >>> LPSC(5, 0, mmcsd0, pll0_sysclk2, 0), >>> LPSC(6, 0, aintc, pll0_sysclk4, LPSC_ALWAYS_ENABLED), >>> >>> >>> >>> If that does not work, try adding LPSC_ALWAYS_ENABLED to all of the >>> clocks >>> in this file and then eliminate them one by one until you find which one >>> is >>> preventing boot. >>> >> Unfortunately, that didn't work. I switch all the entries in both >> tables that had a 0 to LPSC_ALWAYS_ENABLED, but no luck booting. >> >>> If it still does not boot, there is a similar DIVCLK_ALWAYS_ENABLED flag >>> in >>> drivers/clk/davinci/pll-da850.c that you can repeat the exercise with. >>> Add >>> DIVCLK_ALWAYS_ENABLED to all of the clocks there and then eliminate it >>> one >>> by one until you find the clock that is causing the problem. >> >> >> Still no good news. I switched all the entries with a 0 to >> DIVCLK_ALWAYS_ENABLED and it still didn't finish booting. >> >> I wonder if Sekhar Nori might have some suggestions. I didn't look at >> the code or try to understand it. I just changed the settings. >>> >>> > > Even if a clock had another flag besides zero, you will need to add > LPSC_ALWAYS_ENABLED by or-ing it with the other flag. > [snip] Thanks for clarifying. I was able to make it work with the following patch: }; If you have an updated patch series with those two fixes, I add my name to the tested-by list. > > [snip] > --- To unsubscribe from this list: send the line "unsubscribe linux-clk" 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/drivers/clk/davinci/psc-da850.c b/drivers/clk/davinci/psc-da850.c index 3b4583d..a76b8682 100644 --- a/drivers/clk/davinci/psc-da850.c +++ b/drivers/clk/davinci/psc-da850.c @@ -25,7 +25,7 @@ static const struct davinci_psc_clk_info da850_psc0_info[] __initconst = { LPSC(9, 0, uart0, pll0_sysclk2, 0), LPSC(13, 0, pruss, pll0_sysclk2, 0), LPSC(14, 0, arm, pll0_sysclk6, LPSC_ALWAYS_ENABLED), - LPSC(15, 1, dsp, pll0_sysclk1, LPSC_FORCE | LPSC_LOCAL_RESET), + LPSC(15, 1, dsp, pll0_sysclk1, LPSC_FORCE | LPSC_LOCAL_RESET | LPSC_ALWAYS_ENABLED), { }