From patchwork Mon Jul 6 20:26:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 6727661 Return-Path: X-Original-To: patchwork-linux-omap@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 9218B9F40A for ; Mon, 6 Jul 2015 20:28:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4A002014A for ; Mon, 6 Jul 2015 20:27:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7C6C20375 for ; Mon, 6 Jul 2015 20:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756012AbbGFU1w (ORCPT ); Mon, 6 Jul 2015 16:27:52 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:34546 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755450AbbGFU0q (ORCPT ); Mon, 6 Jul 2015 16:26:46 -0400 Received: by wgqq4 with SMTP id q4so150381047wgq.1; Mon, 06 Jul 2015 13:26:45 -0700 (PDT) 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 :mime-version:content-type:content-transfer-encoding; bh=iawjgWHR0XV7qFPa4CiaISRXfOSrxzLKJo9SZT2gePA=; b=nuHWPYl9eFZKZruDFP0KuD/aRkzfT7/aKunCY9gXGgw153i1qTYh0jxW51S0X/rrqO lJpwGXI9fXSHVKjO/wFyRMEx2vrH1k5zSK/slfV7DA2AhYQA8x1dsyef2C9iPdlZMUWv 7l5phLNSZDsWv3/U6TWjptuXgheCFG1uuelBBJnoytHGF6mzDOrPE7PxqTtXluMIAOEi N/9sFG82QEmm7RuVl/mwBRIbbRXClgJEIMT2a6WztXWU6y25ItBdV1j7HM2JLeb/0N2H lllesn4IbfYKnkQNWvBf0OxbTqv0OpgSnou0pTpJ3dGQOm3b3nJ4sbvQoUWuaEshB8R1 jjEA== X-Received: by 10.180.75.198 with SMTP id e6mr44213877wiw.37.1436214405059; Mon, 06 Jul 2015 13:26:45 -0700 (PDT) Received: from Pali-Latitude.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id ck18sm29869344wjb.47.2015.07.06.13.26.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 13:26:44 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Russell King , Laura Abbott , Grant Likely , Rob Herring , Will Deacon , Ivaylo Dimitrov , Sebastian Reichel , Pavel Machek , Tony Lindgren , =?UTF-8?q?Andreas=20F=C3=A4rber?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 2/5] arm: boot: convert ATAG_REVISION to DT "/revision" entry Date: Mon, 6 Jul 2015 22:26:10 +0200 Message-Id: <1436214373-12969-3-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1436214373-12969-1-git-send-email-pali.rohar@gmail.com> References: <1436214373-12969-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 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 When uncompressing kernel image this patch convert ATAG_REVISION structure into DT "/revision" entry. For legacy bootloaders which do not support DT booting there is no other option how to pass ATAG_REVISION into kernel. Signed-off-by: Pali Rohár --- arch/arm/boot/compressed/atags_to_fdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c index 9448aa0..e7e1cc9 100644 --- a/arch/arm/boot/compressed/atags_to_fdt.c +++ b/arch/arm/boot/compressed/atags_to_fdt.c @@ -171,6 +171,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) cpu_to_fdt32(atag->u.mem.size); } + } else if (atag->hdr.tag == ATAG_REVISION) { + setprop_cell(fdt, "/", "revision", atag->u.revision.rev); } else if (atag->hdr.tag == ATAG_INITRD2) { uint32_t initrd_start, initrd_size; initrd_start = atag->u.initrd.start;