Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp974101ybh; Wed, 22 Jul 2020 19:05:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNgVlrt7l9Z0hX7l97d98GKPU9UsXfv+/8Ob7wPCIo3qZnThX8p16Vz8U7BKYLkdjXjVo+ X-Received: by 2002:a05:6402:176e:: with SMTP id da14mr2154036edb.262.1595469939718; Wed, 22 Jul 2020 19:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595469939; cv=none; d=google.com; s=arc-20160816; b=AR0okvZndfT8yTEqSSjSH7lj1fyRZ8MlqQ7CZsdTR3YAH5hFqliOhL3HrKbnOxd/aT CPk3jw8gto5Sh9rfc8ynCanLRQi6FqNWn1hxYoW7PKy/6Umnlw4wehISt9DIZUUlUjTX z/aTNYeDedCjGHKi3q1ZD52+V1PaeBHVQkV9Ubf1+8vACDyRGqMbayvJeNnnG7MbayYq 7PWAlRyv7rEawO21294VRHsm37GyqUjgT4mzVyQEblcuf1uoPpkn95gHOdfkfdPLIWSh iyRo/boyL/oHbz55hMhPJdqTSAZGEupaSKXYzOid5Gbx1IaVAI6VQlndMZS/kxs7mNWE /ADw== 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=Pq8ryqqd1XId2hCe/DQWnyfH74kyeJyUn6djhAqMZkE=; b=Cgb9FnTtNL3wIL2iExdMTX1dn8ZfX0/5whf8QhSvxDBij20nWKAyVKDIWvxhhAg3RK yVNcwQ72Y/zLTVzKJIwEOyAp8SvrP5jOBLp60XvSSq1qlcM/46Hhmc184c/+Bpxe4g2t v1kh/+xEM0jUjKo4M8leeGafBfOQFo2Sykmj9jIoIhwAnqz7H3RELcXkeJBCMpquk2hu z6uxekojG92H2e90Ol7RNssNdoV2FljNQDtmirIhXoQ6N0rPErRDK40e+FtMA6lPD8Nk sACOkiMvrT1y2CkTQC6wp6aK0KXXSXyHK/ew5cT6C7zJbN71jNePLTeY7oHY293yykqa 2vng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Rpnv7C1q; 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 gy14si1095362ejb.313.2020.07.22.19.05.17; Wed, 22 Jul 2020 19:05: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=Rpnv7C1q; 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 S2387742AbgGWCE7 (ORCPT + 99 others); Wed, 22 Jul 2020 22:04:59 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:55301 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387719AbgGWCE5 (ORCPT ); Wed, 22 Jul 2020 22:04:57 -0400 X-UUID: 9fe3f78242694bc08b9c4d08e26b91a1-20200723 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=Pq8ryqqd1XId2hCe/DQWnyfH74kyeJyUn6djhAqMZkE=; b=Rpnv7C1qUA0sc8W5vckBm0I0dtfYW/sVyX25DP3jKiT9jwtGD8Dbs+AcBj4ulNGYX1YHVuHlD1xoz6bMilT5pc9hnpKVvzKxcVtEmUb95d94rqc+2/PAKazaW+YS+AUc99BfZGngyJUryS+oCjdG+bqRgk/HJQTwAE7GgN4ABqo=; X-UUID: 9fe3f78242694bc08b9c4d08e26b91a1-20200723 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 356140134; Thu, 23 Jul 2020 10:04:51 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Jul 2020 10:04:49 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 23 Jul 2020 10:04:39 +0800 From: Yongqiang Niu To: CK Hu , Philipp Zabel , Rob Herring , Matthias Brugger CC: David Airlie , Daniel Vetter , Mark Rutland , , , , , , Yongqiang Niu Subject: [v7, PATCH 3/7] mtk-mmsys: add mt8183 mmsys support Date: Thu, 23 Jul 2020 10:03:14 +0800 Message-ID: <1595469798-3824-4-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1595469798-3824-1-git-send-email-yongqiang.niu@mediatek.com> References: <1595469798-3824-1-git-send-email-yongqiang.niu@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 YWRkIG10ODE4MyBtbXN5cyBzdXBwb3J0DQoNCkZlYXR1cmU6IGRybS9tZWRpYXRlaw0KU2lnbmVk LW9mZi1ieTogWW9uZ3FpYW5nIE5pdSA8eW9uZ3FpYW5nLm5pdUBtZWRpYXR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