Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9716206pxu; Tue, 29 Dec 2020 03:08:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxra+ziwPySOYj08ntG7OOp8omshx6klyfloTkoZkD/lNgRMGW2KKSqpTTxf38bGO+uF4/M X-Received: by 2002:a17:906:f949:: with SMTP id ld9mr39522421ejb.401.1609240119681; Tue, 29 Dec 2020 03:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609240119; cv=none; d=google.com; s=arc-20160816; b=L4zQTSr0zKVPqlW8VQdjXWUmSdK67scUVAbBbmYWIsCmXb3CWO1dBIf2lCPdB0KJyU 1unaLszfW+CdEI8gkI9i+Ih/B3AJX2rmgCoQ+wGPVNrxuG6UFrozt70LUx2kgoiH0k10 hl0wPeoVkZVBq9JM2uhJsLPdWZloTva5sNBMLXojo3e0ZMmsg/Qk/CbDzy9bdrOy9ySX Nwtuki38awRK1tEf8UQ1xmxsMtfQB4ixsNJEnrOUYo6vAjZbtZF0iYTQl/ugyxqJnxW5 HaoW29TdDVW9FdFYuLs5pDbvdZyl38KPD9mc9eoYlWdTsCzCVPqFQ3uA0DqrDvyqR/Co p/fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=zfneozaYhu5jrm9Q37fk5lPpqTHzSi4uBaXsfUw6RZ4=; b=BWpeJUWPtsvrmxZaSKeRKqeZ9pX48SA2OxA4k/EaNj7NxpQPcfVovxIfXT6XtgtLLu EuSN8KYpetgKHFbUbF58RMioXs6Iuke5LBwS/z5vHx3HtNq89c/WHXYEWCN132RAukhM yi5a5Tr2/XdgKpfMH9mT/qjmlEufXTAbr55CdMdlm5yUkXnHfDRFdDXp7S6WkTU748R7 qQT8FiEAplBkQ5eD0vlzoGQvCkGFBBQNeVm/cEmz0Izd7p8VpKmociaqT90NJpuzBgo0 rI3f7oEIs3rrYkIlv2o4aEEeUkuRVZYVIH8GKPThmwg27c4xa2saKfPjaF6ArH2XhMKv 1VYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=X+VtajVV; 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=pass (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 f5si20161545ejd.332.2020.12.29.03.08.17; Tue, 29 Dec 2020 03:08:39 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=X+VtajVV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgL2LHN (ORCPT + 99 others); Tue, 29 Dec 2020 06:07:13 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:6801 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726209AbgL2LHM (ORCPT ); Tue, 29 Dec 2020 06:07:12 -0500 X-UUID: 75617dd10cbf41aa8a8aa93cbb70916a-20201229 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=zfneozaYhu5jrm9Q37fk5lPpqTHzSi4uBaXsfUw6RZ4=; b=X+VtajVVr1i7nGvkkzSQLloRasRFyxUOGpUfSdJxREgqwpZ6gmOhtWoJJ3oDds8qijzQAZYPbFcgZI1opp22jBsXFvJZF3Ce3vrTlunQ2pI9h/dr0Y+Rf6uo0+vAjcXB0uUgv0BCx4+lWDNQKG8BxsWZXoRh3qzhiS48DW9gRKY=; X-UUID: 75617dd10cbf41aa8a8aa93cbb70916a-20201229 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 794393449; Tue, 29 Dec 2020 19:06:28 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 29 Dec 2020 19:06:18 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 29 Dec 2020 19:06:18 +0800 Message-ID: <1609239977.26323.292.camel@mhfsdcap03> Subject: Re: [PATCH v5 18/27] iommu/mediatek: Add power-domain operation From: Yong Wu To: Tomasz Figa CC: Joerg Roedel , Matthias Brugger , Rob Herring , Will Deacon , Robin Murphy , , , Nicolas Boichat , , , , Evan Green , Tomasz Figa , , , Krzysztof Kozlowski , , Date: Tue, 29 Dec 2020 19:06:17 +0800 In-Reply-To: References: <20201209080102.26626-1-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: D6856EB35728775B524D669116D09ECF5C09C39014423CFC3B03E7EB5EA35C712000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTEyLTIzIGF0IDE3OjM2ICswOTAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4g T24gV2VkLCBEZWMgMDks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