Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp908421pxk; Thu, 10 Sep 2020 01:37:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzliRvo0AgLmngQPIGLJMfZcQYjb1z7Ho1Ys7TseICWfT2BlTAyUBZeY0J50MZgzA+TlNP+ X-Received: by 2002:a17:906:b7d1:: with SMTP id fy17mr8034047ejb.391.1599727023764; Thu, 10 Sep 2020 01:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599727023; cv=none; d=google.com; s=arc-20160816; b=JhMKGx1QxtXDi4VnIfLaGcjvHP/dMcfJHHmAhnViUVezLXiJI58tNWfVZe1hpCDqgP yXuhkDIhurVNd3wtTVvyQnuQBJT57wqho2FSElxwY9ICYmy9RdXONhwvvXtAAl3paiQm Ge+FWLLuqF5MJR6DsF25xi4PjbJCJnfs214Z0VFFnrTSfjQDW87uPL7SRcpfTRAFA3iQ C/dpqlr+cotSehrRR3t9dg5XPVtPyOCwU91kJRiU1Upb1AoyvHam2bnkAPJLgmC6tehD F7R+97vrPcRVYxd+0m8fsvAZEMn0t3nb63NTNE9w87Ti1meaKydVFYyG9FJzPZErd6wy LUdA== 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 :in-reply-to:references:mime-version; bh=mt9PYyd/fX4i14alliulbWnG9DDqCVJes0zuF0GtbGo=; b=RuFB9K3UbTs2Oo2SqxcAF/on5tbVW/FfZZGymLe/lQjpveBHsAkrwurVhJnqA2v7ZN 6YbEkNINuuVPyXwVRmQSULlGBZ/wYPybtGSBJpxC4Whg1IrLNbz3hNjonjXZz/BLy3oZ Vy/ZBQ6zZU5OqY9rSBc+Q1NvJRhHuLSP4uKaNx5PSYdlK5jSNJrwqh6jaYkmiep+VFEX Mpe8kVwTZaJyNnU8yEYtxBEabMlg6jvJm/RodUAsP/zg1NWbvg9MRzigmqatj7QYdZfc O26C/yNilAUJT7+SGuaEiaYXFLo9Chub43a5292Sy1eeyBY+DfVSda2RiiQ56TP8zCvZ dXkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si3046806edw.331.2020.09.10.01.36.41; Thu, 10 Sep 2020 01:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730412AbgIJIfn (ORCPT + 99 others); Thu, 10 Sep 2020 04:35:43 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:41855 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730346AbgIJIf2 (ORCPT ); Thu, 10 Sep 2020 04:35:28 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MQNAv-1jtxoT3fNp-00MJBv for ; Thu, 10 Sep 2020 10:35:25 +0200 Received: by mail-qk1-f182.google.com with SMTP id w16so5282053qkj.7 for ; Thu, 10 Sep 2020 01:35:24 -0700 (PDT) X-Gm-Message-State: AOAM5319IjGsy03KVQRBzq5pp13nubRR3sNohpfWotIHAQxqQWOB3Q3n 5RR6SwXG4sR/MluJI467+V5/M/cUh09vbT9XreM= X-Received: by 2002:a05:620a:15a7:: with SMTP id f7mr6388590qkk.3.1599726923765; Thu, 10 Sep 2020 01:35:23 -0700 (PDT) MIME-Version: 1.0 References: <1599693000-25641-1-git-send-email-amit.sunil.dhamne@xilinx.com> In-Reply-To: From: Arnd Bergmann Date: Thu, 10 Sep 2020 10:35:07 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] drivers: soc: xilinx: Call InitFinalize from late_initcall_sync instead of probe To: Michal Simek Cc: Amit Sunil Dhamne , Ard Biesheuvel , Ingo Molnar , gregkh , Matt Fleming , Sudeep Holla , Heiner Kallweit , Kees Cook , Dmitry Torokhov , rajanv@xilinx.com, Linux ARM , "linux-kernel@vger.kernel.org" , tejasp@xilinx.com, Jolly Shah , Rajan Vaja Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:HQSXYbpozuiwc4y7A8dQIjQ87atIhHebv8bWPUI2/elY3E6fLgz /CSH62Tbgdi1Oyd35PxCNk2dxEe0xnTSvErBvHS5mNNn8VMrthrXvTaRDfXHNVCckWDxJc5 mApdd8pq9oDgYYcjRSJzDh4TLTFSY6V+HSctudeiatU38V/JxhB+4a2zBRX03VMFmHcMu7Y D6/z1e1uZXNRc2XBQenWw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:N+f+AmU+nPc=:duuEJUjCczVWwB6ccgW3SG n/SNe8WZ+1Z/6wT9xdNg/RMGoPjraA7exI8fvcI+5/Bho58pxVjTpSUilRNuGlB8pcB0UZu3A 3FtdLgQxgoMlVm+i0ctR2VRBNp5qD1ZsTqMZwXDdthpyeDQEQA3E746zfVI000cqv4CSpyS+g To0+GljcakWFDbDaqp0+iQbMWjdJQW6hpcFJb+0bamDRbMEuaaYtjw2TXvNIyRjV9AAf2rKsN MDxgpM2YChPIzdSrOU113Q56fT64Oednl4uc3ha9qRQYsgoRg9Gid4aRnL2I5nesmvjbB8lww JHeW86pobe1tCd6KdTEZpqf8YOPnHvBvCO7LsltktATDjjBrVJEI8iv/ABvJVlCzP2kMrzSer g1voimqk8gRkA/0DUn04OVCbctI3K3HrYkeg33IwRzFoX8G3osZARwEFw3VJImBE1w2yOgP6S 7cw9ukzIXgax4NVFEHm2rmH1U9F8AU0B12qgGGik5R2vo12BmTpwlGhfnLr2/J+IOAADLhL1b J7OSpM9IXTB8gjsOTVvUsLx0vlYnORWBIigsWDIlTE8y4YX2LV4gcUmSFuf5XzwrC8guI5fDa CHttPHg7gnCGGMxCAbuzS2twVJ96Oy9ymE7YLdcKfn6FQoZJ90KlQBkPawztMxRT6gOO38MRt 8ogFkWoJeujopQQEjergZ27fJrTCRTzhRTJwH3KdKJRVt+sdZqiePWepjBXwQhCbDvrrgrm2I QezK6txDoxxVdwfZHznwySMWSa1tWjap2PmS5i25emo2fE3Ag8WgO7DVVMR0VPOXkIIZNoFmB XZVYZX0XptTVG2M0iaBuCrMwvqocqDDaak/QzFs4Nn29ks7llUDE5tC9OJshbhZCXzbeQ/g5l yPEcaJtlIZJYveW8oAkZMD7uHZtj0CoqmGFZp+L8RkMteSNiGQXbchbwkf9MNBC/uvnWN6CZ2 voarbElWiH6dFaBC0Aft9mjxcYpAXHLWEVTCb+15fodd5dDcORrIC Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 8:50 AM Michal Simek wrote: > > @@ -246,6 +245,23 @@ static int zynqmp_pm_remove(struct platform_device *pdev) > > return 0; > > } > > > > +static int __init do_init_finalize(void) > > +{ > > + struct device_node *np; > > + > > + np = of_find_compatible_node(NULL, NULL, "xlnx,zynqmp"); > > + if (!np) { > > + np = of_find_compatible_node(NULL, NULL, "xlnx,versal"); > > + if (!np) > > + return 0; > > + } > > + of_node_put(np); > > + > > + return zynqmp_pm_init_finalize(); > > +} > > + > > +late_initcall_sync(do_init_finalize); > > + > > static const struct of_device_id pm_of_match[] = { > > { .compatible = "xlnx,zynqmp-power", }, > > { /* end of table */ }, > > > > Arnd: are you fine with this way how to check that it runs on zynqmp or > versal? I might be missing something, but this sounds like the wrong way to do it. There is already a platform driver probed in the presence of the "xlnx,zynqmp-power" node in the same file. Wouldn't it be better to either check for the same node instead of an arbitrarily different set of SoC names, or to make the platform driver itself get registered form the late initcall? Arnd