From patchwork Thu Dec 24 16:37:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 7919691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 015DC9F32E for ; Thu, 24 Dec 2015 16:43:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 336D52052D for ; Thu, 24 Dec 2015 16:43:09 +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 75C7F20529 for ; Thu, 24 Dec 2015 16:43:08 +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 1aC8xU-0004KX-SL; Thu, 24 Dec 2015 16:41:44 +0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aC8x4-00045K-Bz for linux-arm-kernel@lists.infradead.org; Thu, 24 Dec 2015 16:41:19 +0000 Received: by mail-wm0-x22c.google.com with SMTP id l126so186741683wml.0 for ; Thu, 24 Dec 2015 08:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=72ZEVdJQ416f+m3+Jz+/TU68aI8c0nKmbtsgoAz1Odc=; b=zWF+JTpIhov6bTj4ilK+UvZQdGeuOddA0Fp1Eq7pF+881VO7fdRnnX3/pewUAV2H83 KhzacG7Wo8sfuWusVvcU9FcQ5+Sz/EF/U+VowxlnYeqA5K0a/7aO3djo1Wt5LPkXaWTE 0gxu3f1rGWAK0d1Uq2+r9F6Q/AwSNvMnLxDbFJYXPouRxecq3GYsHJZ4JiFoqiCrDTWD 9M/b93VlVJv3vcvvHiiquOYjBVCB1IsHzg2C4AgKTcXR1wQ7wfl5bXvhx34yhZUEQA6g NBUYyvmjj5rqDDx3lDHt7y+MpieHU0YAgVGhVqPSijrO8KGIv5InyBOVI+H+hbwYeL1n BrRQ== X-Received: by 10.194.117.163 with SMTP id kf3mr40797255wjb.139.1450975256749; Thu, 24 Dec 2015 08:40:56 -0800 (PST) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id dl8sm42225778wjb.29.2015.12.24.08.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Dec 2015 08:40:56 -0800 (PST) From: Ivaylo Dimitrov To: linux@arm.linux.org.uk, tony@atomide.com, nicolas.pitre@linaro.org, arnd@arndb.de, pali.rohar@gmail.com Subject: [PATCH 2/2] OMAP: RX51: save ATAGS data in the early boot stage Date: Thu, 24 Dec 2015 18:37:56 +0200 Message-Id: <1450975076-7411-3-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450975076-7411-1-git-send-email-ivo.g.dimitrov.75@gmail.com> References: <20151224153536.GJ30871@n2100.arm.linux.org.uk> <1450975076-7411-1-git-send-email-ivo.g.dimitrov.75@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151224_084118_745567_7FAD605E X-CRM114-Status: GOOD ( 12.65 ) 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: Ivaylo Dimitrov , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Nokia N900 (RX51) legacy userspace needs various ATAGS passed by the bootloader (boot reason, device serial, boot mode, various GPIO swithes, etc). Save that data early enough in the boot process, so it can be exported later in /proc/atags Signed-off-by: Ivaylo Dimitrov Tested-by: Pali Rohár Acked-by: Tony Lindgren --- arch/arm/mach-omap2/board-generic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 04a56cc..8098272 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -16,6 +16,7 @@ #include #include +#include #include #include "common.h" @@ -76,8 +77,17 @@ static const char *const n900_boards_compat[] __initconst = { NULL, }; +/* 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)); + omap_reserve(); +} + 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,