From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDDBEC04AB4 for ; Tue, 21 May 2019 12:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C89121773 for ; Tue, 21 May 2019 12:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727950AbfEUMS5 (ORCPT ); Tue, 21 May 2019 08:18:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:46484 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726692AbfEUMS4 (ORCPT ); Tue, 21 May 2019 08:18:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 586D4ABD4; Tue, 21 May 2019 12:18:55 +0000 (UTC) Message-ID: Subject: Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb From: Nicolas Saenz Julienne To: Petr Tesarik Cc: Oliver Neukum , stefan.wahren@i2se.com, Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt , mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, linux-rpi-kernel@lists.infradead.org, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 21 May 2019 14:18:53 +0200 In-Reply-To: <20190521141456.46f6d4a7@ezekiel.suse.cz> References: <20190520104708.11980-1-nsaenzjulienne@suse.de> <20190520104708.11980-4-nsaenzjulienne@suse.de> <1558356237.12672.3.camel@suse.com> <46004f242c2618a185445630580116c772455613.camel@suse.de> <20190521141456.46f6d4a7@ezekiel.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-Hgwp9Ctbw+KDH82tk7Jk" User-Agent: Evolution 3.32.2 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-Hgwp9Ctbw+KDH82tk7Jk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-05-21 at 14:14 +0200, Petr Tesarik wrote: > On Tue, 21 May 2019 13:39:31 +0200 > Nicolas Saenz Julienne wrote: >=20 > > Hi Oliver, thanks for the review. > >=20 > > 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: =20 > > > > + * For more information on the firmware interface check: > > > > + *=20 > > > > https://github.com/raspberrypi/firmware/wiki/Mailbox-property-inter= face > > > > + */ > > > > +struct bcm2835_firmware_prop { > > > > + u32 id; > > > > + u32 val; > > > > + u32 disable_turbo; > > > > +} __packed; =20 > > >=20 > > > Hi, > > >=20 > > > technically we are not in arch and those fields have a defined > > > endianness. > > > =20 > >=20 > > Well I set it as packed since it's 'sent' through a memory mapped firmw= are > > interface. Hence the need for the structure format to be fixed. So I gu= essed > > 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). BT= W > > this > > will be built both for arm & arm64. >=20 > I believe that's not the point Oliver was trying to make. You should > use __le32 instead of u32. >=20 > 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. >=20 > 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 --=-Hgwp9Ctbw+KDH82tk7Jk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAlzj7K0ACgkQlfZmHno8 x/4XSgf/dX+SRWpz1Yfel/oXn5vJOOTYCsXlSCJYpWE0gv6LT/WuRPch0Zo7Z6Rz veT2xjkMaccOr+FHdkDbFNjkqO/WjZzvwPtZmGs0T+mSqBbVua/PMVIryY8XvpNL KzP/8x8P+Yq3Q9HtiuNf1uHiSKs8xe82uqNmdVLDenuqijJdSTEqKmJ+IqX+uK13 eNHSu8qIF1Z6hIveCrfI841fypd/VXaerf+oWxGnmV4YAPvqSx9mAqHZd1RPZUaK qNOo/QE5KPrx2uqBmx/gNw3n0NHhgyU03SGaZnDuDDzvOlAHpPO2u3jBrqrXJJts prXi/m6LkrKFPFK2IBXYEjzf7Gc52Q== =krKa -----END PGP SIGNATURE----- --=-Hgwp9Ctbw+KDH82tk7Jk--