Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5892704ybg; Tue, 22 Oct 2019 09:52:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoJyYINe0BAsjVFEFHpnYu+t8JtBlrtQ7xQvCjuHJMcspRxyK4yo9c8cI010aqCcbRMgUv X-Received: by 2002:a50:ce06:: with SMTP id y6mr32391599edi.259.1571763160594; Tue, 22 Oct 2019 09:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571763160; cv=none; d=google.com; s=arc-20160816; b=iPNUxJSzjPcVSiJdadaQhmNXteKNoOTdJwrnh9M1Pf9Axm4BFVczvcTPO1VzUK3TU3 r1JLTeexCHGtlLOryooP5Ahv2m7hrvKx1klzN+tdVHwNxrP8Ny2tBAThlqB8ZDmwryle AUGS4zqSwI0bKPwtj0KuuwPmm0flmRG2ETm6ZaKpjJlWdBpd7zlQFf8+OuxLDv8sXqDC Aag5rly23B4sjKrx8eYGhFhZBgKR4QH0ysmMwpKMLmkTPBawUkVjSGsYNYnolcxFqpy0 ITK5h+7BZ5VE5NzKNgU+9Q6qRVIhhS7krUB2DKOYk36wd92UZWYfgW5X3WCXw2ndBNw1 N/Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=w5XlEtrbdOrIGpjin13PfHgfa8sv1IaZwJ0pyTIfej8=; b=tWeT9YehJ278rGy2KZBWA+cg5I2K9Ty6Y5F8KC6T9bFAy0C9NyDPA5W6/7eg0pYnZc gf1L6MIcFBDT61JvbvGJSxAPVflnHranbvQ9fPMOp8dihbPFF9FTHasbP+tubv6eLvsN crCXgkVVpK86a98ZSIYtcqYjN0H3qY6CQVX/GnBIeGTAdiXuA6uQMdtOLpGJoHS+40Vu eVkvwDHITT7eUyqEXJ8/8w0HNSBgiYsw/OHcES/egQd2tIhdFoW0omoEjTKbcAEM6MTf SEFIScT+gMbsN7OfR/GL+0O3BB6dSRbVX9wJhhCMmm2lTBKpSq5FvZ6CnT+qOJZ76vJ2 8rAA== ARC-Authentication-Results: i=1; mx.google.com; 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 u11si2576842eda.235.2019.10.22.09.52.16; Tue, 22 Oct 2019 09:52: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; 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 S1732150AbfJVPCH (ORCPT + 99 others); Tue, 22 Oct 2019 11:02:07 -0400 Received: from muru.com ([72.249.23.125]:38870 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfJVPCH (ORCPT ); Tue, 22 Oct 2019 11:02:07 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 51D4180FA; Tue, 22 Oct 2019 15:02:40 +0000 (UTC) Date: Tue, 22 Oct 2019 08:02:02 -0700 From: Tony Lindgren To: "H. Nikolaus Schaller" Cc: Rob Herring , David Airlie , Daniel Vetter , Mark Rutland , =?utf-8?Q?Beno=C3=AEt?= Cousson , dri-devel , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-omap , Discussions about the Letux Kernel , kernel@pyra-handheld.com Subject: Re: [PATCH 1/7] dt-bindings: gpu: pvrsgx: add initial bindings Message-ID: <20191022150202.GJ5610@atomide.com> References: <20191021172557.GB5610@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * H. Nikolaus Schaller [191021 18:08]: > > > Am 21.10.2019 um 19:25 schrieb Tony Lindgren : > > > > * H. Nikolaus Schaller [191021 15:46]: > >>> Am 21.10.2019 um 17:07 schrieb Rob Herring : > >>> On Fri, Oct 18, 2019 at 1:46 PM H. Nikolaus Schaller wrote: > >>>> +Optional properties: > >>>> +- timer: the timer to be used by the driver. > >>> > >>> Needs a better description and vendor prefix at least. > >> > >> I am not yet sure if it is vendor specific or if all > >> SGX implementations need some timer. > >> > >>> > >>> Why is this needed rather than using the OS's timers? > >> > >> Because nobody understands the current (out of tree and > >> planned for staging) driver well enough what the timer > >> is doing. It is currently hard coded that some omap refer > >> to timer7 and others use timer11. > > > > Just configure it in the driver based on the compatible > > value to keep it out of the dts. It's best to stick to > > standard bindings. > > IMHO leads to ugly code... Since the timer is not part of > the SGX IPR module but one of the OMAP timers it is sort > of hardware connection that can be chosen a little arbitrarily. > > This is the main reason why I think adding it to a device tree > source so that a board that really requires to use a timer > for a different purpose, can reassign it. This is not possible > if we hard-code that into the driver by scanning for > compatible. In that case the driver must check board compatible > names... > > But if we gain a better understanding of its role in the driver > (does it really need a dedicated timer and for what and which > properties the timer must have) we can probably replace it. Well how about just leave out the timer from the binding for now, and just carry a patch for it until it is known if/why it's really needed? If it's needed, yeah I agree a timer property should be used. > >>>> +- img,cores: number of cores. Defaults to <1>. > >>> > >>> Not discoverable? > >> > >> Not sure if it is. This is probably available in undocumented > >> registers of the sgx. > > > > This too, and whatever non-standrd other properities > > you might have. > > Here it is a feature of the SGX IPR of the SoC, i.e. > describes that the hardware has one or two cores. Here you can have a standard dts binding by putting this into driver struct of_device_id match .data. Then when somebody figures out how to read that from the hardware, it can be just dropped. Regards, Tony