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: 479 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D33363F08F for ; Tue, 11 Jun 2019 16:53:44 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id f1sf9777225pfb.0 for ; Tue, 11 Jun 2019 07:53:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560264823; cv=pass; d=google.com; s=arc-20160816; b=LzCpCvf9Z4sTl9NrSTCx7cXDBPkrrLdaf1Yp4JRYXD+NCLU21rM11F6QWGdTMfjA76 Bm28LDNWD9Px8103rVrXRLL1m96lIbRXi6uKFZkBctxZlSSMmBFywnjTVuihYtASIxHr Hqng53vUXL6IwWeKEGWnwTHaY3Yf6GRaqtmbGYHsNr6eAUXHA/oe8A4wsIRsh5ZwCGt/ AqnM4OG2gOmZb4E8ZgfRnIaXNKH0WEnafSN3OfWSuG2qn08bjlD3g3UTO0r+yAB7aUmq SRiPIuD5SShsbiKjRdi80w/mjWb9/rndXeXHC+xHYDDLlssrSxWdtLWRolTeLk70HBWD bjXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=h4RW9PBSVzjqY12L55Tp57ty6exEULpW7TdWmm8q+TK4STG41YByTg6npBIzugRS1N pUBJhWZXlV3ZlQe8Sc3Lp0T0wNhliRckoex2sCsF+sO60hteHaH1E2fh8HOFZF63pfYJ iPkfrkPfLrI8yTDeHlIVdP1kFz7xYmO+JnEQc3aRr3O3p0MDikCIPXXNqDS4PquTkMEZ w4RmWtZqyS2IrvTr4yH7PiJ0jDrPqVvK9sY4s9d9zNG8ptH78B06Dnt0YATuPuj/dneG uJLr5V2Eub2NzxJX4WuyW+pafOmbOvhdz4RXLlKVmB9pBFolgorEACLl7Gc+Ckeb+w1t U45w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=D+uv2smPEqs3LMmXynke2fYuWb79Qo4XJxxb+sCazztNPQAmWxW1atSg3TaJD0d/kl uYt2pNFeMV3Qm8LP/NfA6fop7ajpwMFtyhIVAsweUfF6eJqStbxpf0Y93xw5oTw1LLMK s30hzbd4wu8d+ze2sd9q6Hi0zXzi/ogh1OJPo= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=NOmc2XYmupp62Vudauc50r9dHYlyDhuGFBv8w+SLVzc=; b=nHin7TvDnDT+ZVdkA9UswhhWluld5vQLguwzgoJdnJUapHVyybU+OC+M4+70go27+U IRuJYV7uG2K/8+p3lffqwCk14L0F3o0CIXJZXCkTk4ATJRGzyKpnVLH+zqKGkkCKBHDQ I8hWyqWuMu2qYNPI9oBSz/LdqDe3R3toO4UpSpW2ZRUufh+eCY8tR4NuqcZdkN94kx5f 8vAHBUCWAbPUQ4vOtXbsiVnUT4xPGo5IJogL29WLLtSIfVedFrSG5xx8gQzuVOJz4meb BzC7RVasV8Wgd4+6PBAkFxpXlrPYFcAytlw+1gTabZbXYlK3QLJn+7gfhbEv+70eiRho SujQ== X-Gm-Message-State: APjAAAVsl3tfeibADPl/JvfkP5+ZYMLtcoTVj81bEPbuRJ1QGine6aFo 3wWjJeyHsLgqNdQfWp3cNHaHnpBk X-Google-Smtp-Source: APXvYqwztmNGRQ/VJdIoame+bvQRfbCr8sMCduioiclvO2MpGfSbd2D+QJd+RV7oPejBY3PZTJtmFA== X-Received: by 2002:a17:902:6902:: with SMTP id j2mr3961948plk.321.1560264823655; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8d:: with SMTP id t13ls4895489plo.13.gmail; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) X-Received: by 2002:a17:902:860c:: with SMTP id f12mr76695998plo.127.1560264823315; Tue, 11 Jun 2019 07:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560264823; cv=none; d=google.com; s=arc-20160816; b=jU9SZHZQk56B2qk9MMGGWR4TJdqSXzNTgZcA3bTdKRleOlKVZd1VMBxC/I9lfqjzjZ KO8RBhmVPULENBkymlvW7mzWPzlG50OTr7Cs00iu/V+9vPn7J/tLbo3Zcl37cNXwgnUO JsoeYOMfUayhHA+BeUTC872ZUzZfjGsRnTMpFiz6EufIePZ2fLoZpq3qRBYq/k6TZ9ps AppCiINUBVLINvf+MRLp8jrSnJWHz3AWsSvAPPnZJqeCSHq1E6lzpRQ577IT5xUvLZVT rs+NzW1YSy2zarTlZE2awInEynVJ/r4xTQV03JtU94RBFAq7DuowRVdITHbgP2t+nf45 W9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rAuLjhYGsqoY1vVGPKew7EBTf/gbRxPk/ChOgOW0AfY=; b=TdsVX3TF5ZvVxXqNFIqXktxOu0xuKLSOUTFBJvsPm6gmPS856QqDl5Z1sGMJivL8lK ITZlV5Xy6h2QScbhOXvnute2n9Ml6hmqgXuZCR0SwDl3+Pd3REHnZpa2bvIimSz3SCge +Fd9H5xj/L4+4enbxg1NEn8eI7fl307HOlMqq80m5PWAao5LpUnGHVbBLvbtQOziO1GY FUu1Ar/dwnx+D5zR/6TBxv2sQUfEYrnQQxKk9EP/QYEXalyRgNCZchWu3u2UzHo6ulEj cgrYX58QEweXiNrJnJTZZlqivb2a8hZ+BB6553wVSvgepyHVITwq+mnL4n4sMnxmSjC1 Y7Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m37sor15543663pla.6.2019.06.11.07.53.43 for (Google Transport Security); Tue, 11 Jun 2019 07:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; 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 Cc: gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 28/92] ram: rk3399: Handle pctl_cfg return type 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 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KMGmhSkt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 */