From patchwork Wed Sep 7 15:34:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9319575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CA6DD601C0 for ; Wed, 7 Sep 2016 15:36:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBE81293DD for ; Wed, 7 Sep 2016 15:36:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0A74293E1; Wed, 7 Sep 2016 15:36:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C67E293DD for ; Wed, 7 Sep 2016 15:36:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhesr-0007Jc-UT; Wed, 07 Sep 2016 15:35:29 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhesI-0005zo-SC for linux-arm-kernel@lists.infradead.org; Wed, 07 Sep 2016 15:34:57 +0000 Received: by mail-wm0-x22f.google.com with SMTP id i204so92781375wma.0 for ; Wed, 07 Sep 2016 08:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fBnHfGoXECT+yvmCcQA2FQySBcuser5bAjQIB4norQM=; b=vFfgDUz50MCFaAu8FcggbhKcxxF9jchvfpaieO58LhTlVWDSVSZBnTPjYu2I0jtNOF kxuQp0bAbLBWtrHyyZ+jB2wgAhawdOUdH0L2mLXcRNQCpIxqrnboRFjrVHJPjcsI98VE k94vpuvumRg57CRPysxu+V3YCcSx05OWwDoWZ7aY+BdvpVc194k4gTt1H6qjPiW/5hDG 41N86g7PwJbMesmNxEhPHsxFk1fYkvQ2FcU06E95HCpHrxaYo6BASmhkzuuWvYhSdvdx rzDnKwOPvvY5VA/nssOI3sqLxnQrCmwNcRz9fEKBl1IVms1iqYOIW6+FyNZt2Iny16N9 xHzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fBnHfGoXECT+yvmCcQA2FQySBcuser5bAjQIB4norQM=; b=RIv25w0JA1NFIBa76NjsTAolPrv9wFRsgTjYjouAT9swItxjsIT8pGl29TDr3nUVvr kzd4CaKx6ts8S4UY0YKM5YEprCDg7lcZyAShseWciPuzd0FfYK8wmx9MtWqrlcMTymFu pOyNQhFVvQkOX7/nmyNr6qT3+hrdf7cRD9HHsxOfj5+lWoDcHxfXA27d5iiyBQ+Ea5W7 CrDc7UuY8sHbg+rVc3eAG74KKpQ+Swa6uN6Aeb0bSYZqV8XcXBewXICJ9yfV0xzIDXii cQQxCJooTfxWR2lG8LuLloO9wd/IQYNBYQCYSNF4VWQd7uj7Fyji3I669aLp4IiiiGmg hrDQ== X-Gm-Message-State: AE9vXwP+eHD/lbNkQkdVZFqaA6YD1wMklCQ4rjZV4JMwI/FLsd39VBNk1Fxq54NZJy746xl/ X-Received: by 10.194.0.73 with SMTP id 9mr15657278wjc.123.1473262474061; Wed, 07 Sep 2016 08:34:34 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id q65sm4838480wmd.24.2016.09.07.08.34.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 08:34:33 -0700 (PDT) From: Neil Armstrong To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sudeep.holla@arm.com Subject: [PATCH v3 3/8] scpi: Do not fail if get_capabilities is not implemented Date: Wed, 7 Sep 2016 17:34:32 +0200 Message-Id: <1473262477-18045-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473262477-18045-1-git-send-email-narmstrong@baylibre.com> References: <1473262477-18045-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160907_083455_207061_384AE0F3 X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko@sntech.de, Neil Armstrong , frank.wang@rock-chips.com, khilman@baylibre.com, linux-amlogic@lists.infradead.org, wxt@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Amlogic SCPI legacy implementation, the GET_CAPABILITIES is not supported, failover by using 0.0.0 version. Signed-off-by: Neil Armstrong --- drivers/firmware/arm_scpi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 9ba1020..6a16100 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -891,6 +891,10 @@ static int scpi_init_versions(struct scpi_drvinfo *info) info->protocol_version = le32_to_cpu(caps.protocol_version); info->firmware_version = le32_to_cpu(caps.platform_version); } + /* Ignore error if not implemented */ + if (scpi_info->is_legacy && ret == -EOPNOTSUPP) + return 0; + return ret; }