From patchwork Mon Feb 15 15:58:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 12088649 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=-16.8 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,USER_AGENT_GIT autolearn=ham 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 C3584C433E0 for ; Mon, 15 Feb 2021 16:00:22 +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 685D364DB1 for ; Mon, 15 Feb 2021 16:00:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 685D364DB1 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=Wea04Xu0jA2wssX5WxvRJ6RJyru2CMXmWrzzt00NQv0=; b=swjlp+8dkbA2lQI+BBbUleZOVh ofXMX9goEp/Y5Mo64OTuHhc3fiG9LeN04wbuJ/kjBNw7CL5slCoCVSu+oepGgp/sVYzkRC+gDP4uQ 6hiNqwB31xcu6y1FU2M+WQdns5bbyGelsHRCtgyoka2JR1NireRYDfyxDXsIukd6yGo2cerTUEgqc REUW2WuEgLFCFH4xAfN7boqSF6ccVC+DSov1Wj1UUgQerho6+6ePkJhda9tyLKWhFCQZ8A0cl1cbC iCwwzXfkY+tF7uSNl14WwKlaZTZbj1vQtGOKpXfkQ35vRi/anuGJVoRRnXoGVb3Vvl1hDQhB4D95d SBC/0gdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBgH4-0005z2-PI; Mon, 15 Feb 2021 15:58:58 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBgH2-0005xy-7L for linux-arm-kernel@lists.infradead.org; Mon, 15 Feb 2021 15:58:57 +0000 Received: by mail-pl1-x635.google.com with SMTP id s16so40090plr.9 for ; Mon, 15 Feb 2021 07:58:55 -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=Bq8rm8oWtZjG4WT4wHmoCnQ9k2UwzRK8jNwPlujWQIg=; b=0p6QMFH76WWGhx0ZKDlf+d6wKYUKSNzl8w7PYaMsrTCMgRZXi9fzSZcaKesq4inmmj EGwG0r/7RwW9+N2HunAjM/7PqatxcrKU3IdRy4OzBeNN/3cgqB0ABzwN+UhCE6lvaTah GU4PvjpdBZtRGt1Qzmi6pl9Z6Rrbqi7DG83Wf/WUQ4F+R3HAU/zC/XQF08XsS9/xZlfI vuOPhuzeDEgySSm/zvAoHbqWxGOV3zsKb6uS2ja3ERDgr25gRO2k9ljiZ8aMLiLuBBX1 CCOyyMsUa42Umox7kDPu7HDMD+2wDCLXhQA/5vZgHb29WwksTwdY17vA9lQmolnAnzue xcAg== 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=Bq8rm8oWtZjG4WT4wHmoCnQ9k2UwzRK8jNwPlujWQIg=; b=hGtQUzwj+JLIWQ3sBZLf1cneVhzs0WDbkPJ5SUOioFby88BkJYUBtuEAnYqjHoNNbC q2Vu+2UjyL51vxZpbmWMtQzE+mLaAZmI7i+4AupQOsfpGzbEaYQUcA7iVap+WwdZhcg2 fHFYTyzpeDoNovr6+tasQs2xoO6rp4S1y271XZEBwOOWn0LqzyzdRedGKz2NZIJQlePK eUENQo3ENtsPt+xqXV/40cT9hA8MnMxCe6vvp7ydLJxpAXTwmH5Jb9COx1+zGj0D10pX 1lzGD8C0/KlPuzPBTW3rSVpEFSZyXJFHtta9iLuCAhgheTJKEFxP3H/6HwM705xqiLoI 13Uw== X-Gm-Message-State: AOAM532OkBTh86E58HfllsVUYe9mFcKFiV39Il9iSueS3lAIPlBoGT6w qW/ii523lTIPwrGEkrpu0uHS X-Google-Smtp-Source: ABdhPJxda0JrWuWRNy8lZns5VXCUvDARjhJmEtBwnw78o/kYKU0vkXzVb9cDgcWpzC0cem7jnCR8hw== X-Received: by 2002:a17:90a:4e84:: with SMTP id o4mr5453793pjh.117.1613404733728; Mon, 15 Feb 2021 07:58:53 -0800 (PST) Received: from localhost ([2405:6581:5360:1800:7285:c2ff:fec2:8f97]) by smtp.gmail.com with ESMTPSA id b25sm19208356pfp.26.2021.02.15.07.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 07:58:53 -0800 (PST) From: Nobuhiro Iwamatsu To: michal.simek@xilinx.com Subject: [PATCH v3] firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) Date: Tue, 16 Feb 2021 00:58:49 +0900 Message-Id: <20210215155849.2425846-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-20210215_105856_298457_AD2BB573 X-CRM114-Status: GOOD ( 15.02 ) 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 --- v3: Update eemi.rst. v2: Added the comment pointed out by Michal. Documentation/driver-api/xilinx/eemi.rst | 31 ++---------------------- include/linux/firmware/xlnx-zynqmp.h | 5 ---- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst index 9dcbc6f18d75df..579cf9a407ac2f 100644 --- a/Documentation/driver-api/xilinx/eemi.rst +++ b/Documentation/driver-api/xilinx/eemi.rst @@ -16,35 +16,8 @@ components running across different processing clusters on a chip or device to communicate with a power management controller (PMC) on a 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); +Any driver who want to communicate with PMC using EEMI APIs 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 c8a18da6906e78..70e19ab34ff1ca 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -416,11 +416,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;