Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4168057pxb; Tue, 25 Jan 2022 05:02:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1B2USVVBC68JEwLNCHgdfHB/xhEGPQmvlm2N+OXre7Z3u26wimz7XQIDg9FTA2O9TmIZc X-Received: by 2002:a17:90a:2ec4:: with SMTP id h4mr3456669pjs.173.1643115758920; Tue, 25 Jan 2022 05:02:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643115758; cv=none; d=google.com; s=arc-20160816; b=LmbYROjefVjv3axtUBCcpQTWDvD+R1CmKwOfOXTRTKbxdx2b1s5IKfyiVHFFtpvMM7 Sg5raik2qNTeTw072xdRmYuWc+pGNaYUT/VH4xXNTur01WHkDqUR+rd7877VBfQhvwvF BZGR6ugUlDSSFFyT5kAWJn6xbQhHXVTl//4FIcZ8E6e8lx8xi/kmVCLgKGr3RXp+lxaN Zse0PJlh5g2blEu3aKaQms9Haf3hOBXKpOvBUkJ4U8uyYDaafnSRpQs9d1njVf+4oGgs pI6M7L36tcWI49TadojZb79X9iMP07fI58f/jcLcXCgiEjNC9J5aX48T/fV5RjkaC2Gl lXAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Q7mV3YPkDTpLlzaq3MI5lIbLoZ+JtkdLz/QZzbIHnCs=; b=cGI9H6K8IgZXHOPnpBwYVrV8QY8+DtMFYvVNQd+zdxELo+Fb1tM1yZ9BvNezZynZS4 nmpXPIt5UmdQKYvLuyx9cTX8sItkJl22Zn/BSEEUzdYCH4Z5pHELaUlub4gXYBU/HlMu afCcmiqh/BnEmmj9WYu9GIJw+vRq5HyWk/VhJfhYVoeVxhE7fN7nqTMKgnaFwsd2Dq0o cK2kmbFMFv4rHsrzgg7wqH1Ppasb+eH51bvogCTxPRKQ/R4ocrirEx+YnWGsLyMqvQa8 m2notkMmLDk/ulktZDXY5LbdHtodJpFxRtXp+/0EVoHP2w8EHjAOSgnF80PXOAmBqbB1 qXyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si214765pjq.106.2022.01.25.05.02.24; Tue, 25 Jan 2022 05:02:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1454591AbiAYJAD (ORCPT + 99 others); Tue, 25 Jan 2022 04:00:03 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:58964 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1454072AbiAYI5j (ORCPT ); Tue, 25 Jan 2022 03:57:39 -0500 X-UUID: e33269ee137d4a2697bd0e03ca372c62-20220125 X-UUID: e33269ee137d4a2697bd0e03ca372c62-20220125 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 403616336; Tue, 25 Jan 2022 16:57:34 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 25 Jan 2022 16:57:33 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 25 Jan 2022 16:57:31 +0800 From: Yong Wu To: Joerg Roedel , Rob Herring , "Matthias Brugger" , Will Deacon CC: Robin Murphy , Krzysztof Kozlowski , Tomasz Figa , , , , , , , Hsin-Yi Wang , , , , , , "AngeloGioacchino Del Regno" , , , , Subject: [PATCH v4 05/35] iommu/mediatek: Remove clk_disable in mtk_iommu_remove Date: Tue, 25 Jan 2022 16:56:04 +0800 Message-ID: <20220125085634.17972-6-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220125085634.17972-1-yong.wu@mediatek.com> References: <20220125085634.17972-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the commit b34ea31fe013 ("iommu/mediatek: Always enable the clk on resume"), the iommu clock is controlled by the runtime callback. thus remove the clk control in the mtk_iommu_remove. Otherwise, it will warning like: echo 14018000.iommu > /sys/bus/platform/drivers/mtk-iommu/unbind [ 51.413044] ------------[ cut here ]------------ [ 51.413648] vpp0_smi_iommu already disabled [ 51.414233] WARNING: CPU: 2 PID: 157 at */v5.15-rc1/kernel/mediatek/ drivers/clk/clk.c:952 clk_core_disable+0xb0/0xb8 [ 51.417174] Hardware name: MT8195V/C(ENG) (DT) [ 51.418635] pc : clk_core_disable+0xb0/0xb8 [ 51.419177] lr : clk_core_disable+0xb0/0xb8 ... [ 51.429375] Call trace: [ 51.429694] clk_core_disable+0xb0/0xb8 [ 51.430193] clk_core_disable_lock+0x24/0x40 [ 51.430745] clk_disable+0x20/0x30 [ 51.431189] mtk_iommu_remove+0x58/0x118 [ 51.431705] platform_remove+0x28/0x60 [ 51.432197] device_release_driver_internal+0x110/0x1f0 [ 51.432873] device_driver_detach+0x18/0x28 [ 51.433418] unbind_store+0xd4/0x108 [ 51.433886] drv_attr_store+0x24/0x38 [ 51.434363] sysfs_kf_write+0x40/0x58 [ 51.434843] kernfs_fop_write_iter+0x164/0x1e0 Fixes: b34ea31fe013 ("iommu/mediatek: Always enable the clk on resume") Reported-by: Hsin-Yi Wang Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno --- drivers/iommu/mtk_iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 6ccfd7bac9df..ec2c387abf60 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -921,7 +921,6 @@ static int mtk_iommu_remove(struct platform_device *pdev) list_del(&data->list); - clk_disable_unprepare(data->bclk); device_link_remove(data->smicomm_dev, &pdev->dev); pm_runtime_disable(&pdev->dev); devm_free_irq(&pdev->dev, data->irq, data); -- 2.18.0