Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756047AbbLWOyj (ORCPT ); Wed, 23 Dec 2015 09:54:39 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37655 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbbLWOyg (ORCPT ); Wed, 23 Dec 2015 09:54:36 -0500 Subject: Re: [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry To: Russell King - ARM Linux , =?UTF-8?Q?Pali_Roh=c3=a1r?= References: <20150713131902.GH26485@atomide.com> <20151129180939.GE30871@n2100.arm.linux.org.uk> <201511300115.12478@pali> <20151130152352.GY2517@atomide.com> <20151130153933.GD29576@pali> <20151215093325.GK13531@pali> <20151215122038.GI30871@n2100.arm.linux.org.uk> Cc: Nicolas Pitre , Tony Lindgren , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, "devicetree@vger.kernel.org" , Laura Abbott , Sebastian Reichel , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , Pavel Machek , Grant Likely , linux-omap@vger.kernel.org, Frank Rowand , =?UTF-8?Q?Andreas_F=c3=a4rber?= From: Ivaylo Dimitrov Message-ID: <567AB5A8.4000505@gmail.com> Date: Wed, 23 Dec 2015 16:54:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151215122038.GI30871@n2100.arm.linux.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1616 Lines: 50 Hi, On 15.12.2015 14:20, Russell King - ARM Linux wrote: > > You could also just save_atags() in there, with a comment saying that > this is a work-around for N900 which needs the ATAGs saved, and this > is allowed in ->reserve as a special exception. > What about this (just to confirm I got the idea correctly, proper patch will follow if that's the case): diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 34ff14b..8916856 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -83,8 +83,25 @@ static const char *const n900_boards_compat[] __initconst = { NULL, }; +#ifdef CONFIG_ATAGS_PROC +extern void save_atags(const struct tag *tags); + +/* 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) +{ + const phys_addr_t __atags_pointer = 0x100; + + save_atags(phys_to_virt(__atags_pointer)); + omap_reserve(); +} +#else +#define rx51_reserve omap_reserve +#endif + DT_MACHINE_START(OMAP3_N900_DT, "Nokia RX-51 board") - .reserve = omap_reserve, + .reserve = rx51_reserve, .map_io = omap3_map_io, .init_early = omap3430_init_early, .init_machine = omap_generic_init, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/