From patchwork Thu Dec 24 14:00:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 7917961 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 E174EBEEE5 for ; Thu, 24 Dec 2015 14:01:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97AF52060A for ; Thu, 24 Dec 2015 14:01:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADF952052F for ; Thu, 24 Dec 2015 14:01:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812AbbLXOBi (ORCPT ); Thu, 24 Dec 2015 09:01:38 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38779 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358AbbLXOB3 (ORCPT ); Thu, 24 Dec 2015 09:01:29 -0500 Received: by mail-wm0-f45.google.com with SMTP id l126so185541212wml.1; Thu, 24 Dec 2015 06:01:28 -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=t48S4tQdGnYlw3xotPs+7hofmkyjOzgi1zOZD48ggtE=; b=Up4Nw+nZuZcqDI2VFS3Vr5bgjizk3BChC3NtT2cvuiqZjlAlZc4P6tvZcbkoSmpqss Krfc1NZMZOlZB9p7K+Bd4CduMZv3bfRzLwS0e+S0000aiaV0mTzdkQnUcEV5lOwb/Nhj Vh8vHgesD7ROtZ0VOLPFAMuze850NMW4M+pGYm9L1qLH/9njU//lJje7Q0/+XfCNiHea YwYkTO/is37gpoWw7DgMqwAo9oDwCluGE+5xihT2quj57AxkoO9RTMls5Zj0Pl0COUIl CnkB0gcL4+gvUTuAEwao4LDds0+oK4utKVhFNFp8DaBCC04nSApP9h/eCArfN0wDQInw sIBA== X-Received: by 10.28.92.17 with SMTP id q17mr38797482wmb.40.1450965687618; Thu, 24 Dec 2015 06:01:27 -0800 (PST) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id wf8sm9442165wjb.45.2015.12.24.06.01.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Dec 2015 06:01:27 -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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Ivaylo Dimitrov Subject: [PATCH 3/3] OMAP: RX51: save ATAGS data in the early boot stage Date: Thu, 24 Dec 2015 16:00:58 +0200 Message-Id: <1450965658-2675-4-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450965658-2675-1-git-send-email-ivo.g.dimitrov.75@gmail.com> References: <1450965658-2675-1-git-send-email-ivo.g.dimitrov.75@gmail.com> 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 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 --- 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..594eefe 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -17,6 +17,7 @@ #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 there + */ +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,