All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer" <j.neuschaefer@gmx.net>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Eric Anholt" <eric@anholt.net>,
	"Russell King" <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] ARM: Expose Raspberry Pi revision code in /proc/cpuinfo
Date: Tue, 9 Jul 2024 21:56:55 +0200	[thread overview]
Message-ID: <Zo2WB_2szbCLgxNN@probook> (raw)
In-Reply-To: <b1cc367d-6782-4116-b3e7-3dd12e83032e@gmx.net>

On Mon, Jul 08, 2024 at 06:14:01PM +0200, Stefan Wahren wrote:
> Hi Jonathan,
>
> Am 08.07.24 um 01:08 schrieb Jonathan Neuschäfer:
> > Raspberry Pi boards have a "revision code", documented here:
> >
> >    https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes
> AFAIK these revision codes mostly refer to the board and not to the CPU.

True.

> The abuse of /proc/cpuinfo has been rejected in the past and from my
> understanding this applies also in this case.

Alright

> > This patch copies what the downstream kernel does and reads it from the
> > devicetree property /system/linux,revision. This enables some software
> > to work as intended on mainline kernels:
> >
> >    https://github.com/hzeller/rpi-rgb-led-matrix/blob/a3eea997a9254b83ab2de97ae80d83588f696387/lib/gpio.cc#L247
> This is a bad example because the application doesn't really care about
> the kernel and directly access the hardware registers via /dev/mem. A
> proper application would use the dedicated userspace API (GPIO Character
> Device or PWM).

Right

> I would bet that the application does not work with the Raspberry Pi 5.

Probably, yeah.


Jonathan


      reply	other threads:[~2024-07-09 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-07 23:08 [PATCH 0/2] ARM: Expose Raspberry Pi revision code in /proc/cpuinfo Jonathan Neuschäfer
2024-07-07 23:08 ` [PATCH 1/2] dt-bindings: arm: bcm2835: Specify /system/linux,revision property Jonathan Neuschäfer
2024-07-08 14:13   ` Krzysztof Kozlowski
2024-07-09 19:52     ` J. Neuschäfer
2024-10-10 22:51       ` Florian Fainelli
2024-07-07 23:08 ` [PATCH 2/2] ARM: bcm2835: Detect system revision Jonathan Neuschäfer
2024-07-08 16:14 ` [PATCH 0/2] ARM: Expose Raspberry Pi revision code in /proc/cpuinfo Stefan Wahren
2024-07-09 19:56   ` J. Neuschäfer [this message]

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=Zo2WB_2szbCLgxNN@probook \
    --to=j.neuschaefer@gmx.net \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eric@anholt.net \
    --cc=florian.fainelli@broadcom.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=rjui@broadcom.com \
    --cc=robh@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=wahrenst@gmx.net \
    /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.