Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3477106ybt; Tue, 30 Jun 2020 03:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxufXYQou9nD0KBV2YuIteuz3tnXWuGoXSOVAGN7PcNntMS4JkWy/lW/IgntUn3KewQ7KMU X-Received: by 2002:a17:906:2714:: with SMTP id z20mr16712901ejc.469.1593514555296; Tue, 30 Jun 2020 03:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593514555; cv=none; d=google.com; s=arc-20160816; b=SQ7QWeyu73wKppgnEBSdSK/YmNW5s1p2QCk2WMbAMJebffHfa5kVBHkD6A3NeOLIYJ tNEwb86sNZd7af/vlwq+M2jqOOQ1b++b+F/EuUWIIgITHjvjJRQfTkWPC+FhvmFcPyf+ FV5d/xoV0ZaNsbuvepNdioE6lrOg5fobC+WJ507msUgpZGrxJUOL/nTZOoL09Eo1vxUh XgzNyQlUnZcouypPzUYPrdGbVtnV0XEsUgS/ckGvT6gwD006tzyd0sGZmdrxPCF5c8XM hVUuMUHrrpkDzgjxUNitwR91bwbfInn0itckWvoz+iYuvaY7F7HWue6UvXSwRf4xMvkj Zn6w== 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=1frGonLY1z6bSq/H3kT64qvgesRuR+pzmBbHCLpti1k=; b=W/TPh6BzzV9RJIUA9OUxKzw5MMlDth/idMykAhOzHcR86CxT1uX6lWTXAgSfwSs1uW DAGXRBFO0+mkc4/XXmItvtOGONq4NP0ULw+A17OB1NbEWEO1NnDI8ns/1JcE6f4/PEUj cB7RgAWUNgKRrwY9pnjh6pqVhP56phEFlNrKp/EdSP3Uqs6+CkPD+zvLIqLnRhvnKXGF XAcJTMtPvZOlaBEOjn7zf5LybhVFRQMuXWu8YeBn9HUiU4E9FxGMiimg+KsLBIFxqZlr WXUW6HjIuK+ZB/7m2rYdSqgA5EqGXpOsJT5Bb/MOtRVwtYknSchGg1YkpDEoE821vaJM MDdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="W9mu+44/"; 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 dn4si1942087ejc.39.2020.06.30.03.55.32; Tue, 30 Jun 2020 03:55:55 -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="W9mu+44/"; 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 S1732673AbgF3Kye (ORCPT + 99 others); Tue, 30 Jun 2020 06:54:34 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:10632 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729377AbgF3Kyd (ORCPT ); Tue, 30 Jun 2020 06:54:33 -0400 X-UUID: 8652aa4974ec431eb1bd83e81af4e9d5-20200630 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=1frGonLY1z6bSq/H3kT64qvgesRuR+pzmBbHCLpti1k=; b=W9mu+44/QT8bk5uDWHK6tphZBC7tG5n/0s/UHdqvnnuKhI1DUkiq1zr7VrTU5GWDCtxRXEZ5P3t4KKC2zyWsIq60TBWONiIppfF5N/XfBLSIsurpv3akPiUZqApzNdtvxxGtN16GT9BoKim+JBIs4LrJsFcFLUV2QhHakTqB7Gs=; X-UUID: 8652aa4974ec431eb1bd83e81af4e9d5-20200630 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 704726967; Tue, 30 Jun 2020 18:54:27 +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; Tue, 30 Jun 2020 18:54:17 +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; Tue, 30 Jun 2020 18:54:16 +0800 Message-ID: <1593514398.2581.7.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: Tue, 30 Jun 2020 18:53:18 +0800 In-Reply-To: <0e9ceba8-0cc4-44a1-148c-1c9a6b3844ce@gmail.com> References: <20200629071310.1557-1-chao.hao@mediatek.com> <20200629071310.1557-5-chao.hao@mediatek.com> <0e9ceba8-0cc4-44a1-148c-1c9a6b3844ce@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: BAF6CEB1E06926B691EB2968E120FA304DAE48B58E1A3A76D8C81A49D6E53EB22000: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 T24gTW9uLCAyMDIwLTA2LTI5IGF0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