Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1968218ybt; Thu, 2 Jul 2020 19:41:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFn8fgXejge/VmjO+w85fStb4Bs0yz1V/EjiuAlb8F+24/dEHu3vy7yJHRedW+fqf7QaRa X-Received: by 2002:a50:d0dc:: with SMTP id g28mr36845000edf.169.1593744102263; Thu, 02 Jul 2020 19:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593744102; cv=none; d=google.com; s=arc-20160816; b=cenOvv1W4JPQIJcLQZDKGYVnOhX073uK+6jDjOEVnUTmRSWoMmbwwJ19xOTEvC8auz fivluuwLXJkC+aQ5i2YN18lAriwgXR+uJC1jEkWsxRqSu1g/sO6Lj0nk3P3p4Z35yJEG 77LzwBxj4PqDLQFoQQjREIcB9k/kirhImiEprXh1DLOV/SHShHWOXkh8iIriPitu9UA6 nW9TS8ISUwMB6ScmGeffAfBE2OZ7luHYz5GpunvcobimULbY6ZHnOcvEuBdlu5d9e8x2 ee83DIBol384ybQ0Q7OGewa2j2w9Jvr6OxBVBCdN9O7RQEEiZsHcNYHxYd5UwT8K843h TDIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=ubghZLeTNlicdHeDwlIOfrhXL375GKduXj/VbUzsdHM=; b=XXvVbH3dgRY4/vNvJbJEGFyjmBdZjWHoErlvfILBbptIKKp4land2+wdXe1vWG4EZK 7+7TLkEgzuWPcuuuf7TZmeTH1nNcOAenOr8jKDZ3kub+bxAi+p4Mr38nUa2+M5VoQ4a8 EIbZ8yh1LB7XYgXSD77ycTFn4axH2+y1I/WJB4T/n1UmUH6aGBwottCDhZxyhsV96og/ fjtGv4yicGcGvObV6QKGPpXq/SZQFuyP9alK1JzVinYNZXpbu0RPhvEz6d/90u8+xeRV sOSSaj8ghMEMBK2duyvZiyMUTgiGcLGLNGnCaLzl6AFGE+nKdwbFHZ2wx+p6R2p6DCGA 8kQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=rU+Qxowk; 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 a2si7986387edb.243.2020.07.02.19.41.19; Thu, 02 Jul 2020 19:41:42 -0700 (PDT) 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=rU+Qxowk; 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 S1726151AbgGCCjW (ORCPT + 99 others); Thu, 2 Jul 2020 22:39:22 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:29315 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726098AbgGCCjV (ORCPT ); Thu, 2 Jul 2020 22:39:21 -0400 X-UUID: 64a3eedf2d8f47b0872f0ccf7b813178-20200703 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=ubghZLeTNlicdHeDwlIOfrhXL375GKduXj/VbUzsdHM=; b=rU+Qxowk3TNvO24jARAFD+TWLBTgDwEBgBXZ9wvMsf9Xh+LEkqpXi6+chqUa2OGMuJZey3YxnNxq7o1XY8YN4zjuL62B6DALbw2qLRh5OYwq/kwnijl7fo1wn1aPQA2XFM3IfwjjrCe5vxdvez9e7l4uDn74v/GMWyfN+uwCPMg=; X-UUID: 64a3eedf2d8f47b0872f0ccf7b813178-20200703 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 901121176; Fri, 03 Jul 2020 10:39:16 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Jul 2020 10:39:13 +0800 Received: from [10.15.20.246] (10.15.20.246) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Jul 2020 10:39:13 +0800 Message-ID: <1593743885.22738.2.camel@mbjsdccf07> Subject: Re: [PATCH v5 04/10] iommu/mediatek: Setting MISC_CTRL register From: chao hao To: Matthias Brugger CC: Joerg Roedel , Rob Herring , "Yong Wu" , Evan Green , , , , , , , FY Yang , Chao Hao Date: Fri, 3 Jul 2020 10:38:05 +0800 In-Reply-To: References: <20200629071310.1557-1-chao.hao@mediatek.com> <20200629071310.1557-5-chao.hao@mediatek.com> <0e9ceba8-0cc4-44a1-148c-1c9a6b3844ce@gmail.com> <1593514398.2581.7.camel@mbjsdccf07> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 3EE8F4A8513308CBFB404D0FBB6A79928236E6EF658504C0F5CE61D2EE0CAC8E2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTA3LTAxIGF0IDE2OjU4ICswMjAwLC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