From patchwork Wed Dec 23 14:54:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 7912991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 558CFBEEE5 for ; Wed, 23 Dec 2015 14:56:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70B94205D3 for ; Wed, 23 Dec 2015 14:56:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B27EF205B1 for ; Wed, 23 Dec 2015 14:56:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBkod-0001w0-7j; Wed, 23 Dec 2015 14:54:59 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBkob-0001nO-7S for linux-arm-kernel@lists.infradead.org; Wed, 23 Dec 2015 14:54:57 +0000 Received: by mail-wm0-x235.google.com with SMTP id l126so149336002wml.1 for ; Wed, 23 Dec 2015 06:54:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=b8b3KL+IDDrS8Ycq5r+7X+TOYcpKHqIwWRtxNSa5APQ=; b=qPGDx4yT8V8EdkJgU0voyY/psjw1SczFopnonZTNl+v34Xye2RlMK3bIrgJrjouYkO 57B23wBqYb0sHeMFBIyhgpqEx5jzpd28iI2F1cvzQ1B1gJPP8VuH/h/07Bu7cJ6tSo75 miKZNpuItVb3oHygcqgKdmaJxBMouG96BmSA68TTC9LCkFTcbXngiWSbovYnYNJlkGTR Vyx7jLDogcC2wKI+TtaSQc38pbTHbmsD4Q27KviRwpqTcoe4jD8B0Ez956+s0GJSl5Eb yl9QqFsF0NPAe69wBUw2yUGiQ1EjOoXTcBE2qU+uuXCM8vQ7hxLY0V7ggOtEBtqkjuDH r1Tg== X-Received: by 10.28.60.84 with SMTP id j81mr33026216wma.15.1450882475228; Wed, 23 Dec 2015 06:54:35 -0800 (PST) Received: from [192.168.1.10] ([46.249.74.23]) by smtp.googlemail.com with ESMTPSA id da10sm37691848wjb.22.2015.12.23.06.54.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Dec 2015 06:54:34 -0800 (PST) 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> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151223_065457_426805_C898E726 X-CRM114-Status: GOOD ( 15.12 ) X-Spam-Score: -2.5 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , "devicetree@vger.kernel.org" , Laura Abbott , Arnd Bergmann , Tony Lindgren , 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?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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): .init_machine = omap_generic_init, 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,