Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1114496ybt; Fri, 10 Jul 2020 23:52:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFCicKKG5cxnplcXQl+7WcFiWUGwQIxIq4Z1fuKiSwqoLhjrqOZHuPn8y7k7cIlGQh72hs X-Received: by 2002:aa7:c808:: with SMTP id a8mr80911158edt.259.1594450359097; Fri, 10 Jul 2020 23:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594450359; cv=none; d=google.com; s=arc-20160816; b=tM4x/UyWCbsHuV2bA851HjKAzxYp5/TcHfSs1JlfzkdFJyERKDeQTqcKEPgMtCa4ed dRr8t5xOWwOI/vfBocZwRvgPonCkGB/HF/wtEPMgw0vIuQuH3+aqobEuMyRJtkxWMVmE A9Yd7JrlwKzpH1Qf3DzlYkwJv561dzu6168fnTie2rOM5rO1b0jJA1Iw7IoDjiOIfCtw Xdz8S4H+m9P+rNLvbVcGihaisO3PpnPnIoGOvSPRbS8oDjr/9B9CZTjN8wWaT5bQ6SgW r/H/omfRgTK9qB6c2sloASgp6ZaNaeYYF0ZCwxvAtXnSSopw8mhRXRXZNG+oIc1kvEGn +wpA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=48/UK+pMJVg/hE9P6jxoR496KIP33DCqvBZjUELFnFg=; b=iv4S+98dRYhPP++vOau0leBber3aJ8f7w3ymHWpTLFycJ+IO2ZSJBfnSSV+CARxfyq RUi1CSCJjrLrLb79boh4pcb3ZX9VLefWke7Jk5f0naY7tS0mAiAmSFfQwOWcC0D5HCGi FlZEh0pSjBmSyKfav7tg+/TxElUVYMPupGYAbKNnnmgnC0236bdaRaXZ2EIqKSz885gh JN2cvitWdDSgwKks44GmwayhUlAR4cS7N+yejBWG2iXXeOJtnuv+I17wm91AUmJQ/o1g lSfRsYi5gLR5BUqpgbkDWs9vqqh9DNDmwIowf7wszK1svOPE8E1Sj+St2CHUvegGfWpU TQWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oPAmaX60; 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 w6si1212149edl.341.2020.07.10.23.52.16; Fri, 10 Jul 2020 23:52:39 -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=oPAmaX60; 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 S1728267AbgGKGvY (ORCPT + 99 others); Sat, 11 Jul 2020 02:51:24 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:51578 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728088AbgGKGvX (ORCPT ); Sat, 11 Jul 2020 02:51:23 -0400 X-UUID: 81a0309cd95e433e82dfbc2cf8b1ea1c-20200711 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=48/UK+pMJVg/hE9P6jxoR496KIP33DCqvBZjUELFnFg=; b=oPAmaX60uRSx26koi+eRGvtrdI+O9tYh+fohIAUpS8g5CiG9sBtI1yPgpnyToFlTj72BrGIQao6O8WodtAzpm2SgN1+cv740IwhwMW3WmoHUnyc3w844WY0bqc/ec/DrJE4LlMJI+DuqsfhP/M4GlIiwdYMpg+ZTwD6fGYsOh7M=; X-UUID: 81a0309cd95e433e82dfbc2cf8b1ea1c-20200711 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1958700887; Sat, 11 Jul 2020 14:51:19 +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; Sat, 11 Jul 2020 14:51:15 +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; Sat, 11 Jul 2020 14:51:14 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Subject: [PATCH 10/21] iommu/mediatek: Add device link for smi-common and m4u Date: Sat, 11 Jul 2020 14:48:35 +0800 Message-ID: <20200711064846.16007-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200711064846.16007-1-yong.wu@mediatek.com> References: <20200711064846.16007-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: D5DE7707B4F1FBFA6AF98E44E3207208E81982E452159E1C3B004CE2ACFBD5282000: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 SW4gdGhlIGxhc3Rlc3QgU29DLCBNNFUgaGFzIGl0cyBzcGVjaWFsIHBvd2VyIGRvbWFpbi4gdGh1 cywgSWYgdGhlIGVuZ2luZQ0KYmVnaW4gd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