From patchwork Wed Feb 10 18:23:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 8273871 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 5590EBEEE5 for ; Wed, 10 Feb 2016 18:25:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 392842038F for ; Wed, 10 Feb 2016 18:25:49 +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 607C32021A for ; Wed, 10 Feb 2016 18:25:48 +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 1aTZQg-0002Hf-Cz; Wed, 10 Feb 2016 18:23:54 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTZQd-0002B7-Hw for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2016 18:23:52 +0000 Received: by mail-wm0-x244.google.com with SMTP id c200so5917736wme.0 for ; Wed, 10 Feb 2016 10:23:30 -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=1ci+dnwdIPu0/XpwmXpgUSHxjgeu8XOw6OWAItuktJk=; b=E3NQH4auus+sMzdLuXi4/Fzyf3O8lnem1yr8bR1G0wuqyKqAL4MmKPkK3z9x1e4skB eIZcqoyVNe6hGuBr+Cc/cGzTWmoHqpJYGg3Z7nbvpQ9kt/NtrLVnTWXrFUfdsKa7EbfU 3yVlJARpSXBsJ2WUf0AIG+xrsJ1DTU717Dahsj7GhVBUvw+dijmbx4+iWQVC0UinZH/O IVK8sHw1dXOvSmaLB0NwgngUvbl/+boCO3KKB6q75Ih+PI+ckGEsf3TqoF0mtCGpCInj Z7V2ojr0chO/HGoSP0pSTnPmtnttQrrrqtC47zELUX3PmHXHpsEIvjVRWrPV7SpWZZHq J33A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1ci+dnwdIPu0/XpwmXpgUSHxjgeu8XOw6OWAItuktJk=; b=aJc13NZXK54QD8uwOiz1HvYYy3QHp4sJFkIGzZVlw1wZTtqohjjH1uBXHZ2kjS36mO mLhKGVNiHwuQtQb8ziUrCCbIVymQ+hee1K6GM/4oZUGhWc5kcb2coP0oSK3g2ZbxV3jj FqpH/M1DcsgHa5anSH3HCbZm08VWcRT511N4WHCTgxoUuAFJ6m5ttraWzVYhDz0/yF0u LL/J1ZBPVI/JwQS6I8yNzWuO6Bf2Tsl43qVk4wIQmhfzbRmCPznMiOQRX99rUsQwB8mx DZetyG0t9sRn+TqRr4qddLh2+UinWFVvmQ1a0XgVwkA2psnmXYpisnUJPyQOfd1uIAIB AV0A== X-Gm-Message-State: AG10YOSj+vcwp0mjXCTs9IDXj6mhpeOp8Ihm0RovrUrtl26Z7Mf8Thw307DvYc0f99O/PA== X-Received: by 10.194.104.198 with SMTP id gg6mr38906297wjb.84.1455128609730; Wed, 10 Feb 2016 10:23:29 -0800 (PST) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id u9sm10004085wmd.4.2016.02.10.10.23.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Feb 2016 10:23:28 -0800 (PST) From: Ivaylo Dimitrov To: tony@atomide.com, linux@arm.linux.org.uk Subject: [PATCH v1] ARM: RX51: Set system_rev from ATAGS Date: Wed, 10 Feb 2016 20:23:02 +0200 Message-Id: <1455128582-25669-1-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <20160209161659.GJ19432@atomide.com> References: <20160209161659.GJ19432@atomide.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160210_102351_791582_BE460FAB X-CRM114-Status: GOOD ( 14.32 ) 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 , arnd@arndb.de, linux-kernel@vger.kernel.org, pali.rohar@gmail.com, linux-omap@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.3 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 This fixed a regression with DT boot compared to legacy boot. Signed-off-by: Ivaylo Dimitrov --- arch/arm/mach-omap2/board-generic.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 8098272..bab814d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -18,6 +18,7 @@ #include #include +#include #include "common.h" @@ -77,12 +78,31 @@ static const char *const n900_boards_compat[] __initconst = { NULL, }; +/* Set system_rev from atags */ +static void __init rx51_set_system_rev(const struct tag *tags) +{ + const struct tag *tag; + + if (tags->hdr.tag != ATAG_CORE) + return; + + for_each_tag(tag, tags) { + if (tag->hdr.tag == ATAG_REVISION) { + system_rev = tag->u.revision.rev; + break; + } + } +} + /* 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)); + const struct tag *tags = (const struct tag *)(PAGE_OFFSET + 0x100); + + save_atags(tags); + rx51_set_system_rev(tags); omap_reserve(); }