Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4353030pxk; Wed, 30 Sep 2020 00:11:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHSlYWhLzyGuwmBSOChw7z/W6arxARsOr53vqttqTidxVC8uZuVo+l+7Hzsko7WKil0xTJ X-Received: by 2002:a50:8d57:: with SMTP id t23mr1248099edt.308.1601449905256; Wed, 30 Sep 2020 00:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601449905; cv=none; d=google.com; s=arc-20160816; b=AOSK8wWwJHPeNZMEfM10L7GwANDxMGYFsN9YsrbPquWq2HkSVuk3Wi28QtxuBRxoKQ E0mB/7uWChsjlQkFO2NBQcmFaZ8dZwhQrSSc8ZEqgTryEZZi3srq9w47YjCMaWI/AaYu aXJAo2ec/JXqt3rbxpqT1eR8KV1pVj+hzxDAgCEJRmu0uCOCgZJBoK0KRCnpDEC617Ez p57UiBh2hTfO5qC5fNZ2G24+gOUsStIaAe1qbWg8tI2e49mti27D/nAJiHTmKRB8KxP5 zvf3j5JUI3YccpMedwb0zyRYYmh68j9WZdS7sTsuJIwC+fQz9HsshLftZOcCc9uHE++R wIUg== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=JcmdGf1tbwWxv9BVjsAg+AHjaleWPK/+Qqe58lDd1XI=; b=iM16P0ACAK816AkpOhrRTGe1EnActFteG9xvg9a9AlvPd/UykbzYVhVvDYZi0qLpcz EX0whqlgU7k0uPNo3AjWlSLgihnf1C/QprxZkAEelwGu0xt+tuLYxMp2CMjtUvkP8D7p +bSDoQB954RKLERs5I6XcVeQsJbF9ACuZZvJv4fevf1ZnWwWmNdyvFvIF/IfzJ2oe6h6 8d+PqBOpQxbQcqS9NRSSDDnVYw+708T5e38hoTGSJQD0taS8d2gTkroA42shAnymFwKj TXu3N/+0h9zDyY6KH8ZWum0OETKfbXvbEoCtn8fTqa9KpIbhXm/4oAsFhUMFroANCr1I DXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oYVnmnPa; 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 d10si441701edp.364.2020.09.30.00.11.21; Wed, 30 Sep 2020 00:11:45 -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=oYVnmnPa; 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 S1727781AbgI3HJq (ORCPT + 99 others); Wed, 30 Sep 2020 03:09:46 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:50577 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725440AbgI3HJq (ORCPT ); Wed, 30 Sep 2020 03:09:46 -0400 X-UUID: 037e6f42bcc0412c9290e78684c34370-20200930 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=JcmdGf1tbwWxv9BVjsAg+AHjaleWPK/+Qqe58lDd1XI=; b=oYVnmnPaCrIgu9+zcuVNPUi3Jl470Fw0IiRZqMAi2rbmVPB4xIl62ZIAUbRnKKKTuK0EDJavhozqV2qvlgFaehWPoKsff/P8lZgbCBr96hk2OdZzBpDXExQ8Siy6qEu1ba+CG9G8mnR7hYzedb8dBReeMCQYyrMicTGj8LgJXqw=; X-UUID: 037e6f42bcc0412c9290e78684c34370-20200930 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1768970375; Wed, 30 Sep 2020 15:09:41 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Sep 2020 15:09:39 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Sep 2020 15:09:39 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Krzysztof Kozlowski , Will Deacon CC: Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Greg Kroah-Hartman , Subject: [PATCH v3 13/24] iommu/mediatek: Add device link for smi-common and m4u Date: Wed, 30 Sep 2020 15:06:36 +0800 Message-ID: <20200930070647.10188-14-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200930070647.10188-1-yong.wu@mediatek.com> References: <20200930070647.10188-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CDE450FF0684FFB6D676A5EEF365F04D0BFE5E2C3181397D656404828B20D2812000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SW4gdGhlIGxhc3Rlc3QgU29DLCBNNFUgaGFzIGl0cyBzcGVjaWFsIHBvd2VyIGRvbWFpbi4gdGh1 cywgSWYgdGhlIGV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