From patchwork Thu Feb 11 23:23:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 12084353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFD40C433E0 for ; Thu, 11 Feb 2021 23:24:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75C4364E2E for ; Thu, 11 Feb 2021 23:24:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75C4364E2E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nigauri.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vGcFL4PKZK3bk6TpUIsPPAh55q9ngfg58E5zVzd3w64=; b=M9j4R6rc9ll7+IPj52ujuBiWzN 8t5hFcWD9wPz4wC+j7YLSg1/ZrW/fdTyU1BR4FML4T9oAC56qRxNlZx4+M4d/k42bDbI0J+h6nXM4 w1JJhU0BfIgqSKv8x1bs9eS5OyAi/KfvRxIwDP2eC0w2b7WonN7BR0uWcw/HGvbYSjIQCWb5Cr0hI s/bTwmr+eLkIuM/T2ZXcFRd72/yPTv5h8+h3XMmvWjypCion3moR7DzFI/HhQlcvC843uieFvSX3f N6QwplgMaw8cbl/deYMQp160dlyVAG5AA9qqndZqi31AJBOCQCDMwjxkWb9jULoEqOh8eQOry46t4 FnFFsMYA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALJD-0001QL-T0; Thu, 11 Feb 2021 23:23:39 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lALJB-0001PL-3q for linux-arm-kernel@lists.infradead.org; Thu, 11 Feb 2021 23:23:38 +0000 Received: by mail-pf1-x435.google.com with SMTP id z6so4707197pfq.0 for ; Thu, 11 Feb 2021 15:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nigauri-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zqBCSSFJIhHF6mjcZ7fmqgxUEpSaw4N1jsjJo/ZPjGw=; b=TgqgZOqfrY0JD3ysR2WC3kpRZhZiISli54XzZBtMkJk4Z8Baxhn/g8GWeDejPnffaY lCknkxQe9p+dh6kzz3HY1yi6dVoZMgbqWx7qP+nQxIP4zIZRO7DrMx8fVNObE23QvZfH h7Unn/YIXPKdOqJ9QW2UDN2T5TyvV2At8nNoBQv0dWUSJK9A3KnH+T0KfBHKgDswodLV GyWlHRA6eLEX3hkjDwR76Kf9eFQP9QV4hzcHrnAWEhXcrOUrF6LPTtnHlHwsA2t6L55i 1B7lBjIIXPCQNLiPOFiMbbR3IdpgPTBp6xi6c2mqBbHRwZVIdDwrfBcEPgbWe8JB9+g0 1i9Q== 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:mime-version :content-transfer-encoding; bh=zqBCSSFJIhHF6mjcZ7fmqgxUEpSaw4N1jsjJo/ZPjGw=; b=JUc3SN0I3MikUGocKzgRiZpMVHeulBHLlhPcSpsqbYVvXf8ehk0H9CBDUUWQGbws/L mftIgfsi4zjP4hUsYlOCGWllDgsp9ouZ29fTXYuZhsgahsKM1JiZRy/69ZBv3Cvcd3gw 97+9feWKC2Ige3O9X8ehUncAz+VVf4QLJ/NnkDR3/66+E9i+buPjavUaUGfE4KrkOwTu +0j2nMCu1WswgLtivO/HzJb1PWqNx3iuS9g22WG2L8Q9kZpWYWVsRcH4tBA1+3eiAH6M 68lwbUFCyDlrv6BMoV0w/lh1w5vBpo2SVCY8tr3qPqu6xvYlWyWtbivFhpDwqN9k4cAs V6sw== X-Gm-Message-State: AOAM531Q7QJT3rTmyoVKlIXc8Usv+g+Ku3UpsF30IsMKCIa/NcD1yIzn xn/ZseGOjJUjYEI4Nq6XItnu X-Google-Smtp-Source: ABdhPJweNcl4d5RhhucbFAW/OiNgOVlCInhF00rKKs7TlPfX+6u2z+HzwllqmpkaeWOP+X9fO5yOOA== X-Received: by 2002:a65:6096:: with SMTP id t22mr477353pgu.66.1613085814986; Thu, 11 Feb 2021 15:23:34 -0800 (PST) Received: from localhost ([2405:6581:5360:1800:7285:c2ff:fec2:8f97]) by smtp.gmail.com with ESMTPSA id f18sm5893049pjq.53.2021.02.11.15.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 15:23:34 -0800 (PST) From: Nobuhiro Iwamatsu To: michal.simek@xilinx.com Subject: [PATCH v2] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) Date: Fri, 12 Feb 2021 08:23:12 +0900 Message-Id: <20210211232312.2082334-1-iwamatsu@nigauri.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210211_182337_206297_0C737AED X-CRM114-Status: GOOD ( 14.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nobuhiro Iwamatsu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx: Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE). Any driver who want to communicate with PMC using EEMI APIs use the functions provided for each function. This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also modify the documentation for this driver. Fixes: 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs") Signed-off-by: Nobuhiro Iwamatsu --- v2: Added the comment pointed out by Michal. Documentation/driver-api/xilinx/eemi.rst | 27 +----------------------- include/linux/firmware/xlnx-zynqmp.h | 5 ----- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst index 9dcbc6f18d75df..53416d25d309a8 100644 --- a/Documentation/driver-api/xilinx/eemi.rst +++ b/Documentation/driver-api/xilinx/eemi.rst @@ -19,32 +19,7 @@ device to issue or respond to power management requests. EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC. The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops structure. Any driver who want to communicate with PMC using EEMI APIs -can call zynqmp_pm_get_eemi_ops(). - -Example of EEMI ops:: - - /* zynqmp-firmware driver maintain all EEMI APIs */ - struct zynqmp_eemi_ops { - int (*get_api_version)(u32 *version); - int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out); - }; - - static const struct zynqmp_eemi_ops eemi_ops = { - .get_api_version = zynqmp_pm_get_api_version, - .query_data = zynqmp_pm_query_data, - }; - -Example of EEMI ops usage:: - - static const struct zynqmp_eemi_ops *eemi_ops; - u32 ret_payload[PAYLOAD_ARG_CNT]; - int ret; - - eemi_ops = zynqmp_pm_get_eemi_ops(); - if (IS_ERR(eemi_ops)) - return PTR_ERR(eemi_ops); - - ret = eemi_ops->query_data(qdata, ret_payload); +use the functions provided for each function. IOCTL ------ diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 2a0da841c942f6..4ef77deaf7918c 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -355,11 +355,6 @@ int zynqmp_pm_read_pggs(u32 index, u32 *value); int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype); int zynqmp_pm_set_boot_health_status(u32 value); #else -static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) -{ - return ERR_PTR(-ENODEV); -} - static inline int zynqmp_pm_get_api_version(u32 *version) { return -ENODEV;