From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932384AbbB0P4g (ORCPT ); Fri, 27 Feb 2015 10:56:36 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:38624 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754960AbbB0P4M (ORCPT ); Fri, 27 Feb 2015 10:56:12 -0500 From: Pali =?utf-8?q?Roh=C3=A1r?= To: Andreas =?utf-8?q?F=C3=A4rber?= Subject: Re: [PATCH] ARM: /proc/cpuinfo: DT: Add support for Revision Date: Fri, 27 Feb 2015 16:56:09 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-46-generic; KDE/4.14.2; x86_64; ; ) Cc: Rob Herring , Ivaylo Dimitrov , Russell King , Tony Lindgren , Sebastian Reichel , Will Deacon , "linux-kernel@vger.kernel.org" , Pavel Machek , "linux-arm-kernel@lists.infradead.org" References: <1403110464-29646-1-git-send-email-pali.rohar@gmail.com> <201501262009.45854@pali> <54C6C0FA.10401@suse.de> In-Reply-To: <54C6C0FA.10401@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2245916.2shJC8gHVe"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201502271656.09698@pali> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nextPart2245916.2shJC8gHVe Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Monday 26 January 2015 23:34:34 Andreas F=C3=A4rber wrote: > Am 26.01.2015 um 20:09 schrieb Pali Roh=C3=A1r: > > diff --git a/arch/arm/kernel/devtree.c > > b/arch/arm/kernel/devtree.c index 11c54de..9946c1b 100644 > > --- a/arch/arm/kernel/devtree.c > > +++ b/arch/arm/kernel/devtree.c >=20 > [...] >=20 > > @@ -204,6 +206,8 @@ static const void * __init > > arch_get_next_mach(const char *const **match) > >=20 > > const struct machine_desc * __init > > setup_machine_fdt(unsigned int dt_phys) { > > =20 > > const struct machine_desc *mdesc, *mdesc_best =3D NULL; > >=20 > > + unsigned long dt_root; > > + const u32 *prop; > >=20 > > #ifdef CONFIG_ARCH_MULTIPLATFORM > > =20 > > DT_MACHINE_START(GENERIC_DT, "Generic DT based system") > >=20 > > @@ -215,17 +219,16 @@ const struct machine_desc * __init > > setup_machine_fdt(unsigned int dt_phys) > >=20 > > if (!dt_phys || > > !early_init_dt_verify(phys_to_virt(dt_phys))) > > =09 > > return NULL; > >=20 > > + dt_root =3D of_get_flat_dt_root(); > >=20 > > mdesc =3D of_flat_dt_match_machine(mdesc_best, > > arch_get_next_mach); > > =09 > > if (!mdesc) { > > =09 > > const char *prop; >=20 > Probably the use of two differently typed variables of name > "prop" in this function is not intentional? >=20 =46ixed in PATCH v2. > Regards, > Andreas >=20 > > int size; > >=20 > > - unsigned long dt_root; > >=20 > > early_print("\nError: unrecognized/unsupported " > > =09 > > "device tree compatible list:\n[ "); > >=20 > > - dt_root =3D of_get_flat_dt_root(); > >=20 > > prop =3D of_get_flat_dt_prop(dt_root, "compatible",=20 &size); > > while (size > 0) { > > =09 > > early_print("'%s' ", prop); > >=20 > > @@ -246,5 +249,10 @@ const struct machine_desc * __init > > setup_machine_fdt(unsigned int dt_phys) > >=20 > > /* Change machine number to match the mdesc we're using */ > > __machine_arch_type =3D mdesc->nr; > >=20 > > + /* Set system revision from DT */ > > + prop =3D of_get_flat_dt_prop(dt_root, "revision", NULL); > > + if (prop) > > + system_rev =3D fdt32_to_cpu(*prop); > > + > >=20 > > return mdesc; > > =20 > > } >=20 > [snip] =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart2245916.2shJC8gHVe Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAlTwk5kACgkQi/DJPQPkQ1JxWQCeJGmXCgbqpg9svdiqY4EitLl2 H7YAoMG/tcauGslldIjdKXwmAZ4P54iP =Tx63 -----END PGP SIGNATURE----- --nextPart2245916.2shJC8gHVe--