Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4564877yba; Tue, 30 Apr 2019 00:02:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvUkPjWUyN3x/2hTOas+EglyMf/GmLqaF+K1Ke03+TYL1XsCJTn0Gr3Vcz/PevsxYXc8y5 X-Received: by 2002:a62:e90b:: with SMTP id j11mr67418974pfh.118.1556607774453; Tue, 30 Apr 2019 00:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556607774; cv=none; d=google.com; s=arc-20160816; b=c03tG7gpUTyJvD1DyClxMeTQ9cxPLgQ/evgSBxKj8CadZgSH189xT9PkSMJwkQgOVv MVStBLs3zqXXvzGP/IThu5vXeMvAH3ld97I1owS7kvuT1Nap4MFR5F7ykgMcu23YFDvl Sn0eiLJ82cVerBHgiuxcAUbmNlSbczVA5aXqkOug821BP4grfSh3vvCyWyAg+XdGdoXS XR2J8AdvJfsX2IpQpk/ebuES0NMGYsq3YVB9ygsKwg+jHIIYOhd2eTXVAuVd49HKC2Rn T3yakMvovcg1r+uEudwRPix3cI8bLjiud2PQ2rTJdiCn43p13HHC+/pJesV+KgfZL50q ra4w== 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:ironport-sdr:ironport-sdr :dkim-signature; bh=UOfUPtWrDTbNrEB9Y6438vOJotfyW5F+w8ArQ3Z8rSY=; b=oXsVzrbroIY63e4Hu+IAu4RRsoJZgxUQKYNk4s7EFkeKh81zuY3LKcThEltgRaaVVC 2JHQS9QCvbSXC2TihHobpzbVWIsY4I5vBUCSEZhwykIg21muHrVtHjfksrMkuWEEkUw5 ejIdajTjAwnFPy5uXqt+vn2H7TKazevSTmMTQIFXgGsIIzFm9mu6QOyM3LYgZjXHD9EH 9qwbVpouNiuhzXrveUoTjpAZk6hx9hZpZshKnqXIyAbELJHEyMtxzNR6tqwf6Hp2BUJ2 f+FUmdUSuVWpvcAkM2VviTjqKkSIjFYqq61XiTEn1SwQBV++exPYp+TAbU/hTnC4U0nt tIPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=jrPz5vGN; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si35053156plt.28.2019.04.30.00.02.38; Tue, 30 Apr 2019 00:02:54 -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=@wdc.com header.s=dkim.wdc.com header.b=jrPz5vGN; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbfD3HBm (ORCPT + 99 others); Tue, 30 Apr 2019 03:01:42 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:16122 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbfD3HBm (ORCPT ); Tue, 30 Apr 2019 03:01:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1556607702; x=1588143702; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=8n6EaeW48PrrWrI6O68nRWKHHFqtIgZH5h/jIZE2emA=; b=jrPz5vGNw7hmJ6AcOtUOnTqcTX3tnS/LqU7CiXxB2imH+bad4eecxwQm VjE9oCo1dY92dQQYrlpw7m0xFxBQf1jwNon+wMeDbLRB6gOylxYjgKz1F PzmeNJ+YHRj+uokiBaa02G86mjiowqzRRA8EhyragTMcPIp7XLP5+H8iv /kbdcgbPC7yMrXs+1pW0G7VD4v+88EOO/Vk8kKXBP/gfXz8hS7q3m92I7 qOO19qsvsqwJgXY2pahE99ot+YVqupmzVvohjsPyl85Gz7Z5YeDckPaGg Bg4VUwOcBIOq8jSz2XEEvrcuapGf0SAJ4KSvGghKF0LYrCVFehFpiY0B+ g==; X-IronPort-AV: E=Sophos;i="5.60,412,1549900800"; d="scan'208";a="107145493" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Apr 2019 15:01:42 +0800 IronPort-SDR: bruMh6I6csUkEXfbQIX4ByDBVCcXqcYIgJFYD8hNRfD5ONENELPfeOoemW7N8cbhekGex0vUIL pL+WNTdAAkf5EkBBwE36sC4o17r34OveMiXA5PyLIFyMhWqVReq9iJ6V5qbsEn904UuFbpG3w3 aQNf56ly3FxOG+n2wMIGbwxrHwReXlb0Y+V17I89tLBAc7p4U/uSYeOAN8MCTGx1oVeEW17Br7 T/Jbl/EKvXYqAviQHsmdJZHK6KRrVWCENTOtoTpPNl8V5ZsfipIlH7dva7t1vp2HTwlYsDwBNz ow2pml8bjbl0MNxUoxI9eLcH Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 29 Apr 2019 23:40:11 -0700 IronPort-SDR: V8FpbIILrmZlEWNywzIIeFQ6p3eKpRlWYNxEzYReZWV47Wtf3woyAd35c375i1ie32Y5Z6Qcnx Q1dfbi/+PngtaitPYuYIcAVPrRNhXuBHYMvZD8R6ie0fFh4jo8hJd5IlJk8QkI10eAkph3MELg kmi6oF4sMx6rNn1Tj5pRNWwXqHSEJEhRHUjcKhjk/JEz0ydelWS7hhkZOiOqk0R2IyFkW6HpYt XV4NbsSbbdewTu1FvOHFupBDCe68lDQTAMaax0CVsvI3a5w0LYtNNBB5T+31zE0GcbutkfZ8lK PJI= Received: from ind005306.ad.shared (HELO [10.86.55.35]) ([10.86.55.35]) by uls-op-cesaip02.wdc.com with ESMTP; 30 Apr 2019 00:01:41 -0700 Subject: Re: [PATCH v3 3/3] clk: sifive: add a driver for the SiFive FU540 PRCI IP block To: Paul Walmsley Cc: "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-clk@vger.kernel.org" , "devicetree@vger.kernel.org" , Paul Walmsley , Albert Ou , Stephen Boyd , "Wesley W . Terpstra" , Michael Turquette , Palmer Dabbelt , Megan Wachs References: <20190411082733.3736-2-paul.walmsley@sifive.com> <20190411082733.3736-4-paul.walmsley@sifive.com> <256b9312-4740-e7b1-84ac-c0cc1ff4bc77@wdc.com> From: Atish Patra Message-ID: <67a4a4b6-e0d7-efc2-c318-a1138cddc9c7@wdc.com> Date: Tue, 30 Apr 2019 00:01:40 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/29/19 11:20 PM, Paul Walmsley wrote: > Hi Atish, > > On Sat, 27 Apr 2019, Atish Patra wrote: > >> On 4/11/19 1:28 AM, Paul Walmsley wrote: >>> Add driver code for the SiFive FU540 PRCI IP block. This IP block >>> handles reset and clock control for the SiFive FU540 device and >>> implements SoC-level clock tree controls and dividers. > > [...] > >>> +static const struct of_device_id sifive_fu540_prci_of_match[] = { >>> + { .compatible = "sifive,fu540-c000-prci", }, >> >> All the existing unleashed devices have prci clock compatible string as >> "sifive,aloeprci0" or "sifive,ux00prci0". Should it be added to maintain >> backward compatibility? > > As you note, just adding the old (unreviewed) compatible string isn't > enough. > >> Even after adding the compatible string (just for my testing purpose), I get >> this while booting. >> >> [ 0.104571] sifive-fu540-prci 10000000.prci: expected only two parent >> clocks, found 1 >> [ 0.112460] sifive-fu540-prci 10000000.prci: could not register clocks: -22 >> [ 0.119499] sifive-fu540-prci: probe of 10000000.prci failed with error -22 >> >> Looking at the DT entries, your DT patch has >> >> + prci: clock-controller@10000000 { >> + compatible = "sifive,fu540-c000-prci"; >> + reg = <0x0 0x10000000 0x0 0x1000>; >> + clocks = <&hfclk>, <&rtcclk>; >> + #clock-cells = <1>; >> + }; >> >> >> while current DT from FSBL >> (https://github.com/sifive/freedom-u540-c000-bootloader/blob/master/fsbl/ux00_fsbl.dts) >> >> prci: prci@10000000 { >> compatible = "sifive,aloeprci0", "sifive,ux00prci0"; >> reg = <0x0 0x10000000 0x0 0x1000>; >> reg-names = "control"; >> clocks = <&refclk>; >> #clock-cells = <1>; >> }; >> >> This seems to be the cause of error. It looks like this patch needs a complete >> different DT (your DT patch) than FSBL provides. > > That's right. That old data was completely out of tree and unreviewed. > It's part of the reason why we're going through the process of posting DT > data to the kernel and devicetree lists and getting that data reviewed: > > https://lore.kernel.org/linux-riscv/20190411084242.4999-1-paul.walmsley@sifive.com/ > >> This means everybody must upgrade the FSBL to use your DT patch in their >> boards once this driver is merged. Is this okay? > > People can continue to use the out-of-tree DT data if they want. They'll > just have to continue to patch their kernels to add out-of-tree drivers, > as they do now. > There were some concerns about the breaking the existing setup in the past. > Otherwise, if people want to use the upstream PRCI driver in the upstream > kernel, then it's necessary to use DT data that aligns with what's in the > upstream binding documentation. > Personally, it makes sense to me. I am okay with upgrading FSBL to update the DT once the patches are in mainline. In fact, I used to do that for topology patch series. This will help to add any new DT entry in future as well. However, if SiFive can share a prebuilt FSBL image for everybody to upgrade, that would be very helpful. Regards, Atish > > - Paul >