linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ivo.g.dimitrov.75@gmail.com (Ivaylo Dimitrov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] OMAP: RX51: save ATAGS data in the early boot stage
Date: Thu, 24 Dec 2015 18:37:56 +0200	[thread overview]
Message-ID: <1450975076-7411-3-git-send-email-ivo.g.dimitrov.75@gmail.com> (raw)
In-Reply-To: <1450975076-7411-1-git-send-email-ivo.g.dimitrov.75@gmail.com>

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 <ivo.g.dimitrov.75@gmail.com>
---
 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 <linux/of_platform.h>
 #include <linux/irqdomain.h>
 
+#include <asm/setup.h>
 #include <asm/mach/arch.h>
 
 #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,
-- 
1.9.1

  parent reply	other threads:[~2015-12-24 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 14:00 [PATCH 0/3] OMAP: RX51: save atags data to be exported on /proc/atags Ivaylo Dimitrov
2015-12-24 14:00 ` [PATCH 1/3] ARM: ATAGS: move atags.h to include/asm so it can be included by files outside kernel/ Ivaylo Dimitrov
2015-12-24 15:35   ` Russell King - ARM Linux
2015-12-24 16:37     ` [PATCH 0/2] OMAP: RX51: save atags data to be exported on /proc/atags Ivaylo Dimitrov
2015-12-24 16:37       ` [PATCH 1/2] ARM: ATAGS: move save_atags() to include/asm arch/arm/include/asm/setup.h Ivaylo Dimitrov
2015-12-24 17:48         ` Pali Rohár
2015-12-24 18:53           ` Tony Lindgren
2015-12-24 19:02             ` Ivaylo Dimitrov
2016-01-21 22:02               ` Tony Lindgren
2015-12-24 16:37       ` Ivaylo Dimitrov [this message]
2015-12-24 17:49         ` [PATCH 2/2] OMAP: RX51: save ATAGS data in the early boot stage Pali Rohár
2015-12-24 18:56           ` Tony Lindgren
2016-01-01 11:39             ` Ivaylo Dimitrov
2015-12-25  0:56   ` [PATCH 1/3] ARM: ATAGS: move atags.h to include/asm so it can be included by files outside kernel/ kbuild test robot
2015-12-24 14:00 ` [PATCH 2/3] ARM: ATAGS: Fix declaration of function save_atags Ivaylo Dimitrov
2015-12-24 14:00 ` [PATCH 3/3] OMAP: RX51: save ATAGS data in the early boot stage Ivaylo Dimitrov
2015-12-24 15:50 ` [PATCH 0/3] OMAP: RX51: save atags data to be exported on /proc/atags Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450975076-7411-3-git-send-email-ivo.g.dimitrov.75@gmail.com \
    --to=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).