linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Petr Tesarik <ptesarik@suse.com>
Cc: stefan.wahren@i2se.com, Florian Fainelli <f.fainelli@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Scott Branden <sbranden@broadcom.com>,
	linux-pm@vger.kernel.org, sboyd@kernel.org,
	Ray Jui <rjui@broadcom.com>,
	mturquette@baylibre.com, Oliver Neukum <oneukum@suse.com>,
	rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
	Eric Anholt <eric@anholt.net>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org, viresh.kumar@linaro.org,
	linux-clk@vger.kernel.org, mbrugger@suse.de,
	ssuloev@orpaltech.com
Subject: Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb
Date: Tue, 21 May 2019 14:18:53 +0200	[thread overview]
Message-ID: <b757047cc0151bee57749415a53989309a9fa590.camel@suse.de> (raw)
In-Reply-To: <20190521141456.46f6d4a7@ezekiel.suse.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1680 bytes --]

On Tue, 2019-05-21 at 14:14 +0200, Petr Tesarik wrote:
> On Tue, 21 May 2019 13:39:31 +0200
> Nicolas Saenz Julienne <nsaenzjulienne@suse.de> wrote:
> 
> > Hi Oliver, thanks for the review.
> > 
> > On Mon, 2019-05-20 at 14:43 +0200, Oliver Neukum wrote:
> > > On Mo, 2019-05-20 at 12:47 +0200, Nicolas Saenz Julienne wrote:  
> > > > + * For more information on the firmware interface check:
> > > > + * 
> > > > https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface
> > > > + */
> > > > +struct bcm2835_firmware_prop {
> > > > +       u32 id;
> > > > +       u32 val;
> > > > +       u32 disable_turbo;
> > > > +} __packed;  
> > > 
> > > Hi,
> > > 
> > > technically we are not in arch and those fields have a defined
> > > endianness.
> > >   
> > 
> > Well I set it as packed since it's 'sent' through a memory mapped firmware
> > interface. Hence the need for the structure format to be fixed. So I guessed
> > we're safer with it, as I'm not 100% sure what the different compilers are
> > going to do with it (although it's very likely it'll stay the same). BTW
> > this
> > will be built both for arm & arm64.
> 
> I believe that's not the point Oliver was trying to make. You should
> use __le32 instead of u32.
> 
> That's because u32 means "host byte order" and this code is not located
> under arch/, so host endianness is unknown, but the mailbox interface
> requires little-endian.
> 
> It's nit-picking, and that's why Oliver writes 'technically'; there is
> probably no way this firmware interface could be used on a big-endian
> CPU...

Understood, thanks for the clarification.

Regards,
Nicolas


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-05-21 12:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 10:47 [RFC v2 0/5] cpufreq support for the Raspberry Pi Nicolas Saenz Julienne
2019-05-20 10:47 ` [RFC v2 1/5] clk: bcm2835: set CLK_GET_RATE_NOCACHE on CPU clocks Nicolas Saenz Julienne
2019-05-20 11:42   ` Stefan Wahren
2019-05-20 10:47 ` [RFC v2 2/5] clk: bcm2835: set pllb_arm divisor as readonly Nicolas Saenz Julienne
2019-05-20 11:43   ` Stefan Wahren
2019-05-20 10:47 ` [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb Nicolas Saenz Julienne
2019-05-20 12:11   ` Stefan Wahren
2019-05-20 12:14     ` Stefan Wahren
2019-05-21 12:40     ` Stefan Wahren
2019-05-21 15:47       ` Nicolas Saenz Julienne
2019-05-21 21:43         ` Stefan Wahren
2019-05-23  8:51           ` Nicolas Saenz Julienne
2019-05-20 12:43   ` Oliver Neukum
2019-05-21 11:39     ` Nicolas Saenz Julienne
2019-05-21 12:14       ` Petr Tesarik
2019-05-21 12:18         ` Nicolas Saenz Julienne [this message]
2019-05-20 10:47 ` [RFC v2 4/5] dts: bcm2837: add per-cpu clock devices Nicolas Saenz Julienne
2019-05-20 12:19   ` Stefan Wahren
2019-05-21 11:40     ` Nicolas Saenz Julienne
2019-05-20 10:47 ` [RFC v2 5/5] cpufreq: add driver for Raspbery Pi Nicolas Saenz Julienne
2019-05-20 10:51   ` Viresh Kumar
2019-05-20 12:30   ` Stefan Wahren
2019-05-20 10:51 ` [RFC v2 0/5] cpufreq support for the Raspberry Pi Viresh Kumar
2019-05-21 12:02   ` Nicolas Saenz Julienne

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=b757047cc0151bee57749415a53989309a9fa590.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=mbrugger@suse.de \
    --cc=mturquette@baylibre.com \
    --cc=oneukum@suse.com \
    --cc=ptesarik@suse.com \
    --cc=rjui@broadcom.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=ssuloev@orpaltech.com \
    --cc=stefan.wahren@i2se.com \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).