All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	"Discussions about the Letux Kernel"
	<letux-kernel@openphoenux.org>,
	kernel@pyra-handheld.com
Subject: Re: [PATCH 1/7] dt-bindings: gpu: pvrsgx: add initial bindings
Date: Tue, 22 Oct 2019 08:02:02 -0700	[thread overview]
Message-ID: <20191022150202.GJ5610@atomide.com> (raw)
In-Reply-To: <C6CD5A50-7F0A-4F56-ABB9-CAEDF7E47A5D@goldelico.com>

* H. Nikolaus Schaller <hns@goldelico.com> [191021 18:08]:
> 
> > Am 21.10.2019 um 19:25 schrieb Tony Lindgren <tony@atomide.com>:
> > 
> > * H. Nikolaus Schaller <hns@goldelico.com> [191021 15:46]:
> >>> Am 21.10.2019 um 17:07 schrieb Rob Herring <robh+dt@kernel.org>:
> >>> On Fri, Oct 18, 2019 at 1:46 PM H. Nikolaus Schaller <hns@goldelico.com> 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

  reply	other threads:[~2019-10-22 15:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 18:46 [PATCH 0/7] ARM: DTS: OMAP: add child nodes describing the PVRSGX present in some OMAP SoC H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 1/7] dt-bindings: gpu: pvrsgx: add initial bindings H. Nikolaus Schaller
2019-10-21 15:07   ` Rob Herring
2019-10-21 15:45     ` H. Nikolaus Schaller
2019-10-21 17:10       ` Tony Lindgren
2019-10-21 17:25       ` Tony Lindgren
2019-10-21 18:07         ` H. Nikolaus Schaller
2019-10-22 15:02           ` Tony Lindgren [this message]
2019-10-22 15:11             ` H. Nikolaus Schaller
2019-10-22 15:36               ` Tony Lindgren
2019-10-22 16:14                 ` H. Nikolaus Schaller
2019-10-30 16:16   ` Tony Lindgren
2019-10-30 16:16     ` Tony Lindgren
2019-10-30 16:39     ` H. Nikolaus Schaller
2019-10-30 16:39       ` H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 2/7] ARM: DTS: am33xx: add sgx gpu child node H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 3/7] ARM: DTS: am3517: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 4/7] ARM: DTS: omap3: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 5/7] ARM: DTS: omap36xx: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 6/7] ARM: DTS: omap4: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 7/7] ARM: DTS: omap5: " H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191022150202.GJ5610@atomide.com \
    --to=tony@atomide.com \
    --cc=airlied@linux.ie \
    --cc=bcousson@baylibre.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=kernel@pyra-handheld.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.