From patchwork Tue Jun 11 14:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1113952 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="KMGmhSkt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45NYcB1C7gz9sNf for ; Wed, 12 Jun 2019 01:20:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B5226C22163; Tue, 11 Jun 2019 15:17:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4794BC22127; Tue, 11 Jun 2019 15:17:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AC45DC2211A; Tue, 11 Jun 2019 14:53:47 +0000 (UTC) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by lists.denx.de (Postfix) with ESMTPS id 610BCC21E2C for ; Tue, 11 Jun 2019 14:53:44 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id b7so187352pls.6 for ; Tue, 11 Jun 2019 07:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rAuLjhYGsqoY1vVGPKew7EBTf/gbRxPk/ChOgOW0AfY=; b=KMGmhSktzuAwQxzN94ULtZ7qcEWW6jKFoZIl2z8lx3WPFlyFq7E7v0kxmU4PCQ4xbs Kg96A92+UhoI7vsI6sopnUKCJE4O1/d2Af5O46Vo6Myx9qOl9ZBX23f5cS5xUmefctn7 OOLVuw7AgFM7uh1NkiYoy95KVFbEJjlxQehFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rAuLjhYGsqoY1vVGPKew7EBTf/gbRxPk/ChOgOW0AfY=; b=pHHDrMz4LpObnIlAU0x8rOkmxhkzigJiKUHId0ilpKFb2BsH1DvNykVIc1FRun4oY8 LmrWXZLIScnbvTrWdRdJX3nVdFKZfL3QqPmvvxwk3ZTi5Zr2eQPzv8hFDJ5e7bPU/2h8 k9l8bLkPTbf6uEHeRn3yJ5ZPl+QicLFEVdUbXRPVB9KnEfAWA1cXvJp0iUGYpbB7/OQl u0lzQDa/0O1oSDmKTlykLq+FBEs3k7/t5taLNdrp6LnzaClB67AD/7t/aPZjBmYCzSf8 OcrrSLIKGRdAxuzUg2DQL+f0Aaumz85jg7h1PYZou4JFPmb4ZTDG/goCYTo/R+dwWb0Q 6yvA== X-Gm-Message-State: APjAAAUKoWNjU+13JmFF3eYf2Rt/cwu8wWcB9ndKZMD1n+Bogh8YL5OE 9jdvfFQRFeVxUv9D53T4fkQxjg== X-Google-Smtp-Source: APXvYqxyjLrP8yJhJX3x7JIag0w+F2Tvkd9kSGspeyMIZg34zy1zIhv891u08D2YmV0lVfPWRhokaA== X-Received: by 2002:a17:902:4181:: with SMTP id f1mr73641857pld.22.1560264823015; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id e9sm16206208pfn.154.2019.06.11.07.53.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 07:53:42 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Date: Tue, 11 Jun 2019 20:20:31 +0530 Message-Id: <20190611145135.21399-29-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190611145135.21399-1-jagan@amarulasolutions.com> References: <20190611145135.21399-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Cc: linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, gajjar04akash@gmail.com Subject: [U-Boot] [PATCH 28/92] ram: rk3399: Handle pctl_cfg return type X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add proper return type handling of pctl_cfg with meaningful print statement. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 6bf8dce6e0..fab7515b2d 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -1120,6 +1120,7 @@ static int sdram_init(struct dram_info *dram, unsigned char dramtype = sdram_params->base.dramtype; unsigned int ddr_freq = sdram_params->base.ddr_freq; int channel; + int ret; debug("Starting SDRAM initialization...\n"); @@ -1139,9 +1140,10 @@ static int sdram_init(struct dram_info *dram, if (channel >= sdram_params->base.num_channels) continue; - if (pctl_cfg(chan, channel, sdram_params) != 0) { - printf("pctl_cfg fail, reset\n"); - return -EIO; + ret = pctl_cfg(chan, channel, sdram_params); + if (ret < 0) { + printf("%s: pctl config failed\n", __func__); + return ret; } /* LPDDR2/LPDDR3 need to wait DAI complete, max 10us */