From patchwork Tue Dec 5 22:17:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 10093941 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 EF1BE6056E for ; Tue, 5 Dec 2017 22:22:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1D6B24B5B for ; Tue, 5 Dec 2017 22:22:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D697428639; Tue, 5 Dec 2017 22:22:15 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 62E5124B5B for ; Tue, 5 Dec 2017 22:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+vded+VKxKxyMPdg3xQ7KjThThq+U9+ArgOTNcgMnSM=; b=PF2aAVHj/WBN4i IhftNtRz9sRFJZxXwkEGLU4l/h840Rkgt/3Fk/eNVLy5Zt1Dmuz3YWQUDzndNsRLg9ReKiNhEraG7 /JHYtZBOBnXP8E6j/moXUusF0djdqcACi6r6A9hCT1xKNHDa0lyVyp+t4v7T3svzvCJ5SFD+bddwB 1M5hZLdt9jQGFSKfwANQSufztzieqY+pht//Ft3+2AuWK6JBTsUaqEVv/fAtvvyDsIoQoREM2Qih6 RAXnDhgxKWpOqRXmD96pLeX+GokLuha9Z92+dLlhq7P30vQCYC9t3ViwFEgueyACyo5hf34I93jTh 1iZZ+c9/rcyzRasLztIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMLbS-0003pz-ME; Tue, 05 Dec 2017 22:22:14 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMLXO-0006zv-Lu; Tue, 05 Dec 2017 22:18:13 +0000 Received: by mail-wm0-x243.google.com with SMTP id g75so4092738wme.0; Tue, 05 Dec 2017 14:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=5JzkPckIblvYVJ/TCVGwOxettBf1ma4sfd+/x/3lmyI=; b=Rn9hjFLPbO5xFh8xgikZXsm8KiSubwNxXNL6oAUO0HiS6lYaoTNn0Ldl9TVwp8A2zU eviCq94N37h0x9PKG+ylT2bBe8/xsBd9t/IhJHqDaJZ5DEEJucerY6AxQasX25thLX3h Vb15M5HDISPw/zDNwTSJLnkQFMRBcKh4NTYtZNQcW9REQIDEBrm9bJKpiCXwD2CDrvEo mDDkSfORXYTnGDFqrsJ0PoltwE84tp4sfOEoYKwbVguFYlKPezkwtcbFchFtOKJNj23k 7K/2+TP6G9f/ak/+vtxGh+96bB0ESOEBF/hvwOz95cKOlxM3TpcZCfFZ/UNtij+87UZo b/jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5JzkPckIblvYVJ/TCVGwOxettBf1ma4sfd+/x/3lmyI=; b=rZ+vC259Mt43o3Iw/QO//zAPoM2qnmnKU/UJDAki0OguEGvAaBSA6LEyAtmz6ubhD2 AR4Mqw/FdIqVBE5X5VZtx+bzK/3UsVnhCekzWzcUaLWl/TtjRwXHaLyqnDQvy/ay6z8C FrTDSFVavg33gdbsfSYSsa4rygqjY34NVyfLz7NR7bjMTLrEQzSXw+gI4e7dkpH0tTwM fq2raqjRaJtHwlDU7tvpFUePkr4dRmfu3N0rOsrY+Q2VeyFsuzblczvHsDvvjr+OsXze 5BCLRqzF4OiYUmFN+aK8nKaHIzyNGQio5tNG8XIS8hy1FS09F7kZVAC9Hy4s7cSgibXG Ypxg== X-Gm-Message-State: AKGB3mLQE3EY+wMXjs75vZvkQXfTPM0FGaIiAEgJjZqqAGE+FqU3q+rC VvciKjvQRrpMXcgdmN58HH8= X-Google-Smtp-Source: AGs4zMYN2zwhUWAlJetIu0zQwcpSBbdt5+6pCMUJi3uS2cTfjUo7Qqv9Y87ioNqjlQISnTKPmqd/4w== X-Received: by 10.28.165.130 with SMTP id o124mr6983049wme.124.1512512261466; Tue, 05 Dec 2017 14:17:41 -0800 (PST) Received: from ?IPv6:2003:ea:8bc0:e400:b595:9d9d:56de:88e3? (p200300EA8BC0E400B5959D9D56DE88E3.dip0.t-ipconnect.de. [2003:ea:8bc0:e400:b595:9d9d:56de:88e3]) by smtp.googlemail.com with ESMTPSA id n129sm1474802wmn.38.2017.12.05.14.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 14:17:40 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 12/12] firmware: arm_scpi: improve info message for pre-1.0 firmware To: Sudeep Holla References: <99220c79-8b35-2978-11d1-6d101ccb6772@gmail.com> Message-ID: <587dc762-ab75-e349-87e7-c3ed0c42cd4a@gmail.com> Date: Tue, 5 Dec 2017 23:17:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <99220c79-8b35-2978-11d1-6d101ccb6772@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171205_141803_814806_3AA4C63A X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , Kevin Hilman 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 legacy pre-1.0 firmware versions so far the following message is printed which may cause some confusion: SCP Protocol 0.0 Firmware 0.0.0 version Therefore replace the message with the following if firmware doesn't provide usable version information: SCP Protocol legacy pre-1.0 firmware Signed-off-by: Heiner Kallweit --- drivers/firmware/arm_scpi.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index bc7055a6..6d7a6c0a 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -1005,12 +1005,21 @@ static int scpi_probe(struct platform_device *pdev) return ret; } - dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", - FIELD_GET(PROTO_REV_MAJOR_MASK, scpi_info->protocol_version), - FIELD_GET(PROTO_REV_MINOR_MASK, scpi_info->protocol_version), - FIELD_GET(FW_REV_MAJOR_MASK, scpi_info->firmware_version), - FIELD_GET(FW_REV_MINOR_MASK, scpi_info->firmware_version), - FIELD_GET(FW_REV_PATCH_MASK, scpi_info->firmware_version)); + if (scpi_info->is_legacy && !scpi_info->protocol_version && + !scpi_info->firmware_version) + dev_info(dev, "SCP Protocol legacy pre-1.0 firmware\n"); + else + dev_info(dev, "SCP Protocol %lu.%lu Firmware %lu.%lu.%lu version\n", + FIELD_GET(PROTO_REV_MAJOR_MASK, + scpi_info->protocol_version), + FIELD_GET(PROTO_REV_MINOR_MASK, + scpi_info->protocol_version), + FIELD_GET(FW_REV_MAJOR_MASK, + scpi_info->firmware_version), + FIELD_GET(FW_REV_MINOR_MASK, + scpi_info->firmware_version), + FIELD_GET(FW_REV_PATCH_MASK, + scpi_info->firmware_version)); scpi_info->scpi_ops = &scpi_ops; ret = devm_device_add_groups(dev, versions_groups);