Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1002975pxa; Wed, 19 Aug 2020 23:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjo+s3IPTbsbGd96onZwB/5s7qkBfuvUS9G4aiVZPF4dM4w7jNwTPg9fwGtj++oAtOkQpM X-Received: by 2002:aa7:c513:: with SMTP id o19mr1381092edq.327.1597903745941; Wed, 19 Aug 2020 23:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597903745; cv=none; d=google.com; s=arc-20160816; b=V2foHYe3Nzp2BVBHp58cLTsvuSd6eief+2sd5aGekRzdV++vawcqrYVY0vMsfZKkz2 6GWL531pHVp9vR4wi7RSiCskqVePoxzrCuo66Sp0msWY6ugbS9GVu94/9IjUjl9j2HMO xyX6rNZ32bbuxKJ+TSFyHIvQSCwkWOsUBJvR0J81K7G4ATcGBDqU5Pibc6TZofE6YEq+ zq4/ur/NRwYPbsL6dhpaPHQU5TENgHO4iVZbOm+izqG1qr/06FAVI3w1EIkXFt/WKdF8 d2e5uUFZpQtQ0lgc3yUdbIqJJS3+b0VnlGHdQsuy+0m1XEhTj+Pyf7M7W2xSi+ORhLKl nOtA== 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=lFMgkncXYg8bkldshCfDIPngk3zXG9Y53QOyLpXvSOU=; b=bcutXKn6dZOr74TWZm/j8EYA41ZwBQ/pI6u0e7yoEJORSZf7TNGflqhtMt6/mBlFkK PMC6cNXFvGWXnL+qk5wgY20i/MRrRSMAj0flAg8piZJ4xWDseZ+5NaWfx7XdXiItHc8t JxoOWuWMAguOknhA51gj8wtebxJUGRAy2rlelC+F8030I1u+fvIOctnILKU1UbqQodP+ vJ+eWyADFSJ8k2FhwlarNzis0xVq9GTGFcNKg3AyGrUU5xXLseevqM6Kg2CTRcImLjD9 CB7cqxqWNkvSKUk50nXXoU0Ag2QaA5rCeMd95CZopx91zSxelwViSgi9cOeI14Ml8ICL kroQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=c9Zm+P15; 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 f6si812568edu.604.2020.08.19.23.08.42; Wed, 19 Aug 2020 23:09:05 -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=c9Zm+P15; 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 S1727794AbgHTGHI (ORCPT + 99 others); Thu, 20 Aug 2020 02:07:08 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:19751 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726738AbgHTGFm (ORCPT ); Thu, 20 Aug 2020 02:05:42 -0400 X-UUID: 7579fbe64d4448ad846b3f4afec627f4-20200820 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=lFMgkncXYg8bkldshCfDIPngk3zXG9Y53QOyLpXvSOU=; b=c9Zm+P15w1SFwRylrc2EVhmOP+lYvcKIynNdHhrcKcjdfM8KT7jkCJuV8lTnxpZzjmQi5eMABQnAiDB45HL6qpszn9m3rm+FqpaV0Gncg5mmO2bGrm7Eo1HlOjqboXbGu1/MYDmUtXNmotmLKwnR15zo/XXyL5Yg0Ya8pewxAIA=; X-UUID: 7579fbe64d4448ad846b3f4afec627f4-20200820 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 731242442; Thu, 20 Aug 2020 14:05:36 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 14:05:35 +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, 20 Aug 2020 14:05:34 +0800 From: Yongqiang Niu To: CK Hu , Philipp Zabel , Rob Herring , Matthias Brugger CC: David Airlie , Daniel Vetter , Mark Rutland , , , , , , Yongqiang Niu Subject: [PATCH v1 04/21] mtk-mmsys: add mt8192 mmsys support Date: Thu, 20 Aug 2020 14:04:01 +0800 Message-ID: <1597903458-8055-5-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597903458-8055-1-git-send-email-yongqiang.niu@mediatek.com> References: <1597903458-8055-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 YWRkIG10ODE5MiBtbXN5cyBzdXBwb3J0DQoNClNpZ25lZC1vZmYtYnk6IFlvbmdxaWFuZyBOaXUg PHlvbmdxaWFuZy5uaXVAbWVkaWF0ZWsuY29tPg0KLS0tDQogZHJpdmVycy9zb2MvbWVkaWF0ZWs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