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: 7912981 Return-Path: X-Original-To: patchwork-linux-omap@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 84DE0BEEE5 for ; Wed, 23 Dec 2015 14:54:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 434D5203B0 for ; Wed, 23 Dec 2015 14:54:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 707A8203A4 for ; Wed, 23 Dec 2015 14:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755771AbbLWOyi (ORCPT ); Wed, 23 Dec 2015 09:54:38 -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 Received: by mail-wm0-f48.google.com with SMTP id p187so151649807wmp.0; Wed, 23 Dec 2015 06:54:35 -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> 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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, --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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,