Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4537902yba; Mon, 29 Apr 2019 23:22:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmjYIMUlGU6DPPYTK3SmAgQ1L1DygdA/sGZ7RNdVMR9Vde9vwthae/megmhx9vY+meAe2G X-Received: by 2002:aa7:814e:: with SMTP id d14mr68832991pfn.101.1556605360283; Mon, 29 Apr 2019 23:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556605360; cv=none; d=google.com; s=arc-20160816; b=pOcmX3ogIU6SuQBbGkV2RQV4qu37enAoiIoJKCA6avY2sivdQ4e3MOB6A8EwACHM14 PRvzwysQ+c2ioIqOBkwx9sCgThpUwOWO/svTERgSLPapdE458MTFwEFvmug2uq0liMg2 PCR4V4tM10qWtI7ZNrKpzNQKjRUr+N12qZkpIvxo9QBrH9pfVFRWeVRoiW3lD830u/rL nia3461HK5TkbRBILyn4+KixR8zaoikFQYI2ayy8pq77xv+hgQ0lF6kaWYsbtUgqPvAy 6VqG94gio3gLNU46o+plaHHl63eal+GF9A4nEpD2maXPNQyaMtamndd0Hch+ILJb3drq qQFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=AV9ZTDDQcqZfQOAe4qT7E6y4JoSwEYhZS+A0aSnML+s=; b=o17dFz/EVjKgQ6KsFvKkvG+RZgkLJxob1V1vNtBMXXZf5J8j9UmK2FvA/qzGWkD0ya so275mDG0AQtxw2zguuHR+Qu5+2WxjVut4xTqaGdA68LHQ/AKuHuml7IxykCN6P08Of9 mjReN4ANK82+SVjekrs3HRKJSdQbTekU00gzPO6S14sZTz7M3EhIbPLaXK/Tnqha9tPJ HRZO4tyBVF8+M6+vdlciNjsjdjJJw/61TbYJqTq4O2XwxkG3yg493udja7WJljddNQJL Q7gxTCEcNCoQdK+6Uo5abgmk6QMrao4vaANfLvMd6C9utLvS9ImU2n22Wu7NGke96oNA yDrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ZV5D5lv7; 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 r12si17292093pli.103.2019.04.29.23.22.25; Mon, 29 Apr 2019 23:22:40 -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=pass header.i=@sifive.com header.s=google header.b=ZV5D5lv7; 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 S1726369AbfD3GU3 (ORCPT + 99 others); Tue, 30 Apr 2019 02:20:29 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:55028 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726357AbfD3GU2 (ORCPT ); Tue, 30 Apr 2019 02:20:28 -0400 Received: by mail-it1-f193.google.com with SMTP id a190so2874019ite.4 for ; Mon, 29 Apr 2019 23:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=AV9ZTDDQcqZfQOAe4qT7E6y4JoSwEYhZS+A0aSnML+s=; b=ZV5D5lv7eg1gyd5O6CJUMoMHBVvq2u/J+sCgxVwj6ybz2prZuez6tDOWXyJvseqqkr rk8o/IZDvwanTWSyqZJzkmRHFdO3SxjxNOYlC03qHde8Dytq4GaJWkoTiBd3mNxxLjVC fbhU25q+UCIxArF7Ul6wjlFrFJLHoiXWpSO6WLmP3JY3I+L7HVx4Vf++usyiXWWqKSdX kzSQUxn1Mln3B+Hh4t9Dtxzk35DOM/lJzAKzkAtqgdJTrgfuVv6CvbiJQYlGv/kTKYCz cSedb2oBBkwXyqS1e3uop4Kx0YnI0HnjikQUbMXUB92QCMiOG6ugiB3w88DjZZ7nvcOZ UuTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=AV9ZTDDQcqZfQOAe4qT7E6y4JoSwEYhZS+A0aSnML+s=; b=p6sKo+/P/R8iZrtce2E2UUdd/ba9kudj5eoAwkLfqbZHioyiwHzYxNLi4+bmTuXxVT 5o41cmfOwt7yijSZZpcwM0EeOa2+TcohlKi2qTpq3GewjmWCciaAsg48wiGUUz4c9iSm rNy/HzGi5WvAriWrPz0jxCcQ3k63Eb9SIwA/YFYoeYJVac7Gxg/kBIdsyOfEC/Yf2VJR vw1rjXVBvM+oCkDV1ziwie1lJc/H4kQmguDEuoO6wgXS170r6Tiko39pU8j5NIE7YeT6 0fpCrbMgFfgc23sJffRp95TDImdgc+qrFhBy89KLvbA2H5QTQiqb1RM4mtd1TYwxjvSA giGQ== X-Gm-Message-State: APjAAAW6fWdT5+n/4LzCVt/opyARyAMMTXxHSVq0oHFd7bYVC4Fd4rJP nsyIXevNqw6wz6ryBztyAl3arw== X-Received: by 2002:a24:d003:: with SMTP id m3mr2198104itg.132.1556605227707; Mon, 29 Apr 2019 23:20:27 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id e4sm7828414iof.62.2019.04.29.23.20.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Apr 2019 23:20:26 -0700 (PDT) Date: Mon, 29 Apr 2019 23:20:26 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Atish Patra cc: Paul Walmsley , "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 Subject: Re: [PATCH v3 3/3] clk: sifive: add a driver for the SiFive FU540 PRCI IP block In-Reply-To: <256b9312-4740-e7b1-84ac-c0cc1ff4bc77@wdc.com> Message-ID: References: <20190411082733.3736-2-paul.walmsley@sifive.com> <20190411082733.3736-4-paul.walmsley@sifive.com> <256b9312-4740-e7b1-84ac-c0cc1ff4bc77@wdc.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. - Paul