From patchwork Wed Jul 9 20:44:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 33349 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A2AE203F4 for ; Wed, 9 Jul 2014 20:45:39 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf50004093pdb.4 for ; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=8HJoQ0jB9u+Txix3jVLmP+xPK03xTg4r7YpmcXjsIxw=; b=ApUaKzzk0HHJoYUygdRRAXPlVD7PK89MYwrjBJsD46LKUyzg6wFRD6fIex2hNbJGZl KelTl/VUMS7lY7Y8ufXixnOpZyIOTpS6WWgl88EE5EKOJEIKfTKaYUTwYXiBcphkAtbn amWv0Y+Rb3c0j+7hkEkkEACCNaAvvDZd2xce2doQ1BC62ORWDcQWUpe66+rGxaCDkKKd rx0fBPPaj/mWNu5C6hR8XyCagZDReSu8DF1TBl3zy6tqVOUZ6BbhTkLHI9hJugN92FPp 45uYdDmoPn6P8FeTk2qDwm+G7WviYHwie0EWz989B5Z5OxIXpDsJKOVA6cRZsOqzEYY7 VHrQ== X-Gm-Message-State: ALoCoQlsjf+BmUGUnnGaCGmVtKtCDub03/ELebo9kqOcXvF5hRFx+Rp2qHuq3HtTUOMS7k3PQ129 X-Received: by 10.66.216.161 with SMTP id or1mr21808174pac.38.1404938738751; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.205 with SMTP id u71ls2690216qge.52.gmail; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) X-Received: by 10.52.13.98 with SMTP id g2mr1979550vdc.46.1404938738652; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id ah1si10942392vec.13.2014.07.09.13.45.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 13:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id il7so8347833vcb.41 for ; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr41872165vcb.0.1404938738538; Wed, 09 Jul 2014 13:45:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp77023vcb; Wed, 9 Jul 2014 13:45:38 -0700 (PDT) X-Received: by 10.194.222.230 with SMTP id qp6mr51087627wjc.23.1404938737514; Wed, 09 Jul 2014 13:45:37 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id dy2si9619898wib.49.2014.07.09.13.45.36 for ; Wed, 09 Jul 2014 13:45:37 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A9227A77CE; Wed, 9 Jul 2014 22:45:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y9cUL6XOdoFW; Wed, 9 Jul 2014 22:45:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6628AA77CF; Wed, 9 Jul 2014 22:45:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4CDE9A77BF for ; Wed, 9 Jul 2014 22:45:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X5SyKF1kq2Ri for ; Wed, 9 Jul 2014 22:45:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by theia.denx.de (Postfix) with ESMTPS id 97C43A77B4 for ; Wed, 9 Jul 2014 22:45:00 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s69Kivha011880 for ; Wed, 9 Jul 2014 15:44:57 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s69Kivno032391 for ; Wed, 9 Jul 2014 15:44:57 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Jul 2014 15:44:57 -0500 Received: from khorivan.itg.ti.com (incasgf5a_e1_2.itg.ti.com [10.167.216.36]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s69KiqbG005793; Wed, 9 Jul 2014 15:44:56 -0500 From: Ivan Khoronzhuk To: , Date: Wed, 9 Jul 2014 23:44:45 +0300 Message-ID: <1404938689-11379-3-git-send-email-ivan.khoronzhuk@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1404938689-11379-1-git-send-email-ivan.khoronzhuk@ti.com> References: <1404938689-11379-1-git-send-email-ivan.khoronzhuk@ti.com> MIME-Version: 1.0 Cc: hzhang@ti.com Subject: [U-Boot] [U-boot] [Patch 2/6] keystone2: add env option to do unitrd dt fixup X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Murali Karicheri With latest v3.13 kernel, unitrd dt fixup is not needed. However for older kernel versions such as v3.8/v3.10, it is needed. So to work with both, add a u-boot env variable that can be set to do dt fixup for older kernels. Signed-off-by: Murali Karicheri Signed-off-by: Ivan Khoronzhuk --- board/ti/k2hk_evm/board.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/ti/k2hk_evm/board.c b/board/ti/k2hk_evm/board.c index 3333eb0..646ecb3 100644 --- a/board/ti/k2hk_evm/board.c +++ b/board/ti/k2hk_evm/board.c @@ -157,11 +157,14 @@ void ft_board_setup(void *blob, bd_t *bd) u64 size[2]; char name[32], *env, *endp; int lpae, nodeoffset; + int unitrd_fixup = 0; u32 ddr3a_size; int nbanks; env = getenv("mem_lpae"); lpae = env && simple_strtol(env, NULL, 0); + env = getenv("uinitrd_fixup"); + unitrd_fixup = env && simple_strtol(env, NULL, 0); ddr3a_size = 0; if (lpae) { @@ -204,10 +207,11 @@ void ft_board_setup(void *blob, bd_t *bd) fdt_fixup_memory_banks(blob, start, size, nbanks); /* Fix up the initrd */ - if (lpae) { + if (lpae && unitrd_fixup) { u64 initrd_start, initrd_end; u32 *prop1, *prop2; int err; + nodeoffset = fdt_path_offset(blob, "/chosen"); if (nodeoffset >= 0) { prop1 = (u32 *)fdt_getprop(blob, nodeoffset,