Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1189586ybm; Sat, 30 May 2020 01:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5u5fVOQPIBLujPnbIzSvziUFE351WgTOh2btbegnjbqRsvOMzXvxeAzhKw0h1BwLl+wNK X-Received: by 2002:a50:fe07:: with SMTP id f7mr10760571edt.315.1590826543890; Sat, 30 May 2020 01:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590826543; cv=none; d=google.com; s=arc-20160816; b=RqnPQZSzEYWEREt27JKGOmLQg1n5eVIEwgJ2W+OvRCOBwvr6ID1s8rxynZuU0qnsre tzigVsUDm7A4cvg/Jk8+T6uRPzh+iviGI2DJOgFVt3hh0/u/HmB8BRU6+YRWG70pPgLm iFCy4abO+9J51evDstvutgg7D3tkAL7V7AEBWujmDjAqpD0LJvtV+hkoNUvVcbyjlgJn tnzjmYrMZbTuN0NmpqVoD6IxXm/TvptJ30eOmjGY0kXyy/gSEnwjW2lQHHO3FoM7j390 zzzo/I2+CLiQG5UtHbxWJQox1XEaYfUX4/03Wg8nRZmhJpOWHUAz4B7pPVXGiW/EmaPh uo5g== 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=QagKBSo8QFwvJ//9sIEJ70vkMyQb9zwTGgIpL4HmXWw=; b=aR88++43wy3avJldC5wkeU7oP27MkI2mRcI8kH5CqZMaMRWzMzYt55qpKM1s0k8wX8 d6DhAj43NFVEiWz/xYYSS2T8bkYj99L1TOAD7rgtZGMmUUx9PwTF4ryzra9TtUuhMW/t Uk9h2uPAIM5QqgsDFTdo07muKqiC17OhH806dfNKE1+Pt9Z845xI+HYO5oqX/NISh6cx f2zAw8vE1NNUHdlqxT/n9dioZvIebnovYV6y40Yxk+GPZbLqpo+4Soc8lxCXTzFTFPUG Di5KWDeeFOJHmr+uxQ1yNvL4/LvAQg13+vfSC7ikAR9eiE5Qb/d3clX2RG374OHB3sW3 DX7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ZIWmh0hg; 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 e22si7253480eje.203.2020.05.30.01.15.20; Sat, 30 May 2020 01:15:43 -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=ZIWmh0hg; 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 S1728907AbgE3INK (ORCPT + 99 others); Sat, 30 May 2020 04:13:10 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:22337 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbgE3INJ (ORCPT ); Sat, 30 May 2020 04:13:09 -0400 X-UUID: f321be2973164b41999d2e448eacb62c-20200530 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=QagKBSo8QFwvJ//9sIEJ70vkMyQb9zwTGgIpL4HmXWw=; b=ZIWmh0hgyzfM47NOPcGg87+tcwnyHfBZRpjX3V0Mr2sSm9gabqs3ADYzeTzJcEj+OZE5Js8DQ8KnwyhG8ACyzTU0vTN5A5IIB024c/9Ift7G37dCznt40QArPsvc58Oa0YXalnE+SldAa2bs9hMPFcbvg+/ejOyK+Rt0QxU0gsE=; X-UUID: f321be2973164b41999d2e448eacb62c-20200530 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 445777656; Sat, 30 May 2020 16:13:06 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 30 May 2020 16:13:03 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 30 May 2020 16:13:03 +0800 From: Yong Wu To: Matthias Brugger , Joerg Roedel , Rob Herring CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , , Nicolas Boichat , Matthias Kaehlcke , , , , , , Subject: [PATCH v4 05/17] memory: mtk-smi: Add device-link between smi-larb and smi-common Date: Sat, 30 May 2020 16:10:06 +0800 Message-ID: <1590826218-23653-6-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> References: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 Tm9ybWFsbHksIElmIHRoZSBzbWktbGFyYiBIVyBuZWVkIHdvcmssIHdlIHNob3VsZCBlbmFibGUg dGhlIHNtaS1jb21tb24NCkhXIHBvd2VyIGFuZCBjbG9jayBmaXJzdGx5Lg0KVGhpcyBwYXRjaCBh ZGRzIGRldmljZS1saW5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