Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11555786imu; Tue, 1 Jan 2019 01:49:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN6yc3RBs09PnQqA3ozSnEwKEzIZmGG0O54rG4XFnfrVfu0jHTeLkvo+OXVx7caVGOgA886B X-Received: by 2002:a17:902:d202:: with SMTP id t2mr40466151ply.193.1546336184051; Tue, 01 Jan 2019 01:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546336184; cv=none; d=google.com; s=arc-20160816; b=DNnkdea34ppk78aqTvgdjDcpkEbxmjs3b3fbkG4EQWi5EYIhQM9nHJpX7AW+ulYUK0 SqW9TLAXPdjGkdX1VNaZhCl5kLe28RUB5hHG1wNljV8PuecCo9ONbUEkypC8Rn9OSDf7 ODBWe+F46gyOA6o7o2wO8L+IfFZwDonr7lyQE5O50DvNr8MOX8OdoAbMj/LUlw28Lnvu u4d8TNE0HSTvm35O0mlefSopRKZCTHqIn3JSEXKJyk9PqmtLeaLVHMg5QBY25zDjmhk1 SoApL9XUqhIdnLtfEu//1LW7UtoSqL38xDYesR4nzZmZw44ar+Nb4M3DYT1kRPz1EIro WZkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=OMDxjFtlKClUSKj3hXQ1MoovuXSi4R7FLyaZcDaHGk8=; b=HiyxB1oOoix3+iQj2AY6wkqFq96GDq7mbXkOh2bRtteb3pOZLE5bnHbj83WFWeZxaf GJAJsHT5pSFrE77bvkR2IG+K5ie9UZTRI0eImvMiveUYSOrY7F26pgYnNZkdb6/437VR NvE9aAaEhHc7zU/p79BT/ljZwIDrlNoEv5uZbcpvBKlhAsJNvJGtOS2ouFgDTDS+haJc uD9D2QweDul/c9z7kVl4W/0b+6Rp3rZZ9S363UL+SAby9rcgPoIkKb095Z4czkKpT0FD mb/WBVKaKezBgxtLCj6UsF1+csuUJAaNeQXxoSM4GIxna6r/g6BSD0kug+YT2xxwhi7r skYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b128si7464960pfa.283.2019.01.01.01.49.07; Tue, 01 Jan 2019 01:49:44 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728551AbfAAExE (ORCPT + 99 others); Mon, 31 Dec 2018 23:53:04 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:38399 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727370AbfAAExE (ORCPT ); Mon, 31 Dec 2018 23:53:04 -0500 X-UUID: dbc6801cfd184678bb02a869185fa74b-20190101 X-UUID: dbc6801cfd184678bb02a869185fa74b-20190101 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 790189475; Tue, 01 Jan 2019 12:52:58 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 1 Jan 2019 12:52:57 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 1 Jan 2019 12:52:56 +0800 From: Yong Wu To: Joerg Roedel , Greg Kroah-Hartman , Matthias Brugger , Rob Herring CC: Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , , , , Nicolas Boichat Subject: [PATCH 10/13] memory: mtk-smi: Get rid of mtk_smi_larb_get/put Date: Tue, 1 Jan 2019 12:51:13 +0800 Message-ID: <1546318276-18993-11-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1546318276-18993-1-git-send-email-yong.wu@mediatek.com> References: <1546318276-18993-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After adding device_link between the iommu consumer and smi-larb, the pm_runtime_get(_sync) of smi-larb and smi-common will be called automatically. we can get rid of mtk_smi_larb_get/put. CC: Matthias Brugger Signed-off-by: Yong Wu --- drivers/memory/mtk-smi.c | 14 -------------- include/soc/mediatek/smi.h | 20 -------------------- 2 files changed, 34 deletions(-) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 30930e4..a1dc34b 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -123,20 +123,6 @@ static void mtk_smi_clk_disable(const struct mtk_smi *smi) clk_disable_unprepare(smi->clk_apb); } -int mtk_smi_larb_get(struct device *larbdev) -{ - int ret = pm_runtime_get_sync(larbdev); - - return (ret < 0) ? ret : 0; -} -EXPORT_SYMBOL_GPL(mtk_smi_larb_get); - -void mtk_smi_larb_put(struct device *larbdev) -{ - pm_runtime_put_sync(larbdev); -} -EXPORT_SYMBOL_GPL(mtk_smi_larb_put); - static int mtk_smi_larb_bind(struct device *dev, struct device *master, void *data) { diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h index 2b410d2..b993aa2 100644 --- a/include/soc/mediatek/smi.h +++ b/include/soc/mediatek/smi.h @@ -25,26 +25,6 @@ struct mtk_smi_iommu { struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX]; }; -/* - * mtk_smi_larb_get: Enable the power domain and clocks for this local arbiter. - * It also initialize some basic setting(like iommu). - * mtk_smi_larb_put: Disable the power domain and clocks for this local arbiter. - * Both should be called in non-atomic context. - * - * Returns 0 if successful, negative on failure. - */ -int mtk_smi_larb_get(struct device *larbdev); -void mtk_smi_larb_put(struct device *larbdev); - -#else - -static inline int mtk_smi_larb_get(struct device *larbdev) -{ - return 0; -} - -static inline void mtk_smi_larb_put(struct device *larbdev) { } - #endif #endif -- 1.9.1