From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756180AbcBHUsM (ORCPT ); Mon, 8 Feb 2016 15:48:12 -0500 Received: from muru.com ([72.249.23.125]:60980 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756046AbcBHUsJ (ORCPT ); Mon, 8 Feb 2016 15:48:09 -0500 Date: Mon, 8 Feb 2016 12:48:06 -0800 From: Tony Lindgren To: Ivaylo Dimitrov Cc: linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, pali.rohar@gmail.com, arnd@arndb.de Subject: Re: [PATCH] ARM: RX51: Set system_rev from ATAGS Message-ID: <20160208204806.GE19432@atomide.com> References: <3663322.UyrB2OmX6o@wuerfel> <1454696102-2214-1-git-send-email-ivo.g.dimitrov.75@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454696102-2214-1-git-send-email-ivo.g.dimitrov.75@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ivaylo Dimitrov [160205 10:17]: Can you please add the "why?" part here? Other than that looks OK to me. And unless people have objections, I'd like to get this merged in as it fixes yet another legacy boot vs DT boot regression. Regards, Tony > Signed-off-by: Ivaylo Dimitrov > --- > arch/arm/mach-omap2/board-generic.c | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c > index 8098272..b91fabe 100644 > --- a/arch/arm/mach-omap2/board-generic.c > +++ b/arch/arm/mach-omap2/board-generic.c > @@ -18,6 +18,7 @@ > > #include > #include > +#include > > #include "common.h" > > @@ -77,12 +78,31 @@ static const char *const n900_boards_compat[] __initconst = { > NULL, > }; > > +/* Set system_rev from atags */ > +static void __init rx51_system_rev(const struct tag *tags) > +{ > + const struct tag *tag; > + > + if (tags->hdr.tag != ATAG_CORE) > + return; > + > + for_each_tag(tag, tags) { > + if (tag->hdr.tag == ATAG_REVISION) { > + system_rev = tag->u.revision.rev; > + break; > + } > + } > +} > + > /* Legacy userspace on Nokia N900 needs ATAGS exported in /proc/atags, > * save them while the data is still not overwritten > */ > static void __init rx51_reserve(void) > { > - save_atags((const struct tag *)(PAGE_OFFSET + 0x100)); > + const struct tag *tags = (const struct tag *)(PAGE_OFFSET + 0x100); > + > + save_atags(tags); > + rx51_system_rev(tags); > omap_reserve(); > } > > -- > 1.9.1 >