Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5230639yba; Mon, 13 May 2019 07:31:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe8t1eVlUTjpb96dkrioRAOCAxFQDVEZUlCzhNBDz13VntLFqnSaA/oceHmKANaMMAHy8g X-Received: by 2002:aa7:8d89:: with SMTP id i9mr34143144pfr.77.1557757868334; Mon, 13 May 2019 07:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557757868; cv=none; d=google.com; s=arc-20160816; b=whw+qcc5bvIj2u1d+P7ewTVOkCCY8bb4UfVXPK9owIVZ1yQGjpgLlvaV4EkfxF206i +4oG75CW76ML8mOhbgqwH2RscKUZVbz/SrU6sPCA1dMZ5N1XOZW8a8sPKkhHD6s8Chcq Bd/HRCedxgZcj0AUgFVmIwISkhLkkbcI4AS/Uq0WGFTQQPhLejbxrRxMj6azSoKYNTQ+ y2q4/rWSqYytU/cIOOUAMGY5vaqFTBKAC2BDOpYUqqRbmN6B4fpHMtsffBvQTU+wPbUU nd9SQCVCbToe9d8LJCKfpidWL34whAP4IzxkZtFmfnIlI2nzvQczLq3OIfQjhdzToiim uezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8FLaTD9htTvtftbkGxqy7UQEd+WdiGpfqFwmirkaJ5Q=; b=TFqeJRGMHks2i2fmuzaBaByjOYVKFRujsBSftLT5MgNB/8FSMnu9do3U3iCP9s0cQw yncpVAL+kW6a6MgjscmUVC22+u7gdoh/NECDlH6IRlQ2xIMnGsb48y/Epwl9ND+Cki3G 3uw8PAt9c6SSzCdB1n2rxPfd9/BSzhoFWRNPXfy0cLXY0nL/3muL5FTKjuI149mnHxTl AxXE7pNIpkMLbRIEfdE8Ou8q29rY5HDvUABy4VSYdf0spMujoVLaC7UKAaq7hcjsKBI5 W0KxBPyeUrh9OoKLXQHyknWh0geoN7tDgkqGU9YhJAgYUt/SY5x0AIbhQDjq1VHTxJ8n Vnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RDRBYlI9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si15530491pll.151.2019.05.13.07.30.52; Mon, 13 May 2019 07:31:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RDRBYlI9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729561AbfEMO3q (ORCPT + 99 others); Mon, 13 May 2019 10:29:46 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:37659 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbfEMO3q (ORCPT ); Mon, 13 May 2019 10:29:46 -0400 Received: by mail-ed1-f65.google.com with SMTP id w37so17883857edw.4 for ; Mon, 13 May 2019 07:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8FLaTD9htTvtftbkGxqy7UQEd+WdiGpfqFwmirkaJ5Q=; b=RDRBYlI9hF51P1TuruS4vslT9QoliL1XMSvm4GAbslUC0iiz+rfnep5QSzcC5QSins Mf5FcSIhaYbx4FN/Katdr/4mwHbM1RST11EDiA/gl5mIuq7mgAqBNTKn7SJz6j62/DBc fim/Nae/7qvUejgZFsQul0QaZqY0dzy65gHg+o54a6U76xv/y4wHn/EoOUfzxrBmgUYA 1pm5BTbpyfAE2h+GsyJYQMjtlEoR4/r0NJEeVTC/cD1OJ6B3OTjpRxznRTusO76VS19j spFmZ9gdFYMxENsDKE9FhYe5yhCbqqAEyfIcIcuhkhkB6F7YS7M0NWT5riBO1oMbxz+D jADA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8FLaTD9htTvtftbkGxqy7UQEd+WdiGpfqFwmirkaJ5Q=; b=d1meFhT6eVlgJ2Xa0eGZrwCHUXsGv7ClrZr20cNW82nU3Lhd5G2MdHFCVtB7AlFD/8 a73VDCLTPlndQBFGF9dBheG8SzbT8c46nJkR0QAhsIM/L85DKlalR1q8J1CA/edJFcqh //zQRZJnRE/MK8Jb8JvZ0Rrs+WptbmBI0spYVWJYDlPBtqRnWPxzxjVFuHr6cIasjgVs 5Quh3nGkMnNxxErwuUOOqRiAwVst6m1VYdm5EJkxTd8/nmXZ/PoYC0GxZJtU448j3JxS /5sD6BuSNN6+KKrQmySOAmnHsP0fl99gY51ffWXDZvZOJQkYe+tVGjWEZIor5Y9duuzy bbdQ== X-Gm-Message-State: APjAAAXF2RXDnFroTpZT7jwLbnwFNmIJfg8ISTE8nSTGUQ9RBfVuO/eq DtN62C3Z5D5hLFbnLjDkg1iEDd4Q/IAhg7LD26Q= X-Received: by 2002:a17:906:1249:: with SMTP id u9mr23173207eja.58.1557757783673; Mon, 13 May 2019 07:29:43 -0700 (PDT) MIME-Version: 1.0 References: <1557716049-22744-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1557716049-22744-1-git-send-email-Anson.Huang@nxp.com> From: Daniel Baluta Date: Mon, 13 May 2019 17:29:32 +0300 Message-ID: Subject: Re: [PATCH RESEND 1/2] soc: imx: Add SCU SoC info driver support To: Anson Huang Cc: "catalin.marinas@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "maxime.ripard@bootlin.com" , "agross@kernel.org" , "olof@lixom.net" , "horms+renesas@verge.net.au" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , Leonard Crestez , "marc.w.gonzalez@free.fr" , "dinguyen@kernel.org" , "enric.balletbo@collabora.com" , Aisheng Dong , "robh@kernel.org" , Abel Vesa , "l.stach@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , Daniel Baluta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + > +static u32 imx8qxp_soc_revision(void) > +{ > + struct imx_sc_msg_misc_get_soc_id msg; > + struct imx_sc_rpc_msg *hdr = &msg.hdr; > + u32 rev = 0; > + int ret; > + > + hdr->ver = IMX_SC_RPC_VERSION; > + hdr->svc = IMX_SC_RPC_SVC_MISC; > + hdr->func = IMX_SC_MISC_FUNC_GET_CONTROL; > + hdr->size = 3; > + > + msg.data.send.control = IMX_SC_C_ID; > + msg.data.send.resource = IMX_SC_R_SYSTEM; > + > + ret = imx_scu_call_rpc(soc_ipc_handle, &msg, true); > + if (ret) { > + dev_err(&imx_scu_soc_pdev->dev, > + "get soc info failed, ret %d\n", ret); > + return rev; So you return 0 (rev = 0) here in case of error? This doesn't seem to be right. Maybe return ret?