Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp183849pxa; Tue, 18 Aug 2020 20:44:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFy8WAgb/Gu4714w9ngSbQvRR6ApCPonoPiQLkTQFTEFWs9Li6yasLFqKvArF3BAnqlvjz X-Received: by 2002:a17:906:817:: with SMTP id e23mr22708628ejd.203.1597808650951; Tue, 18 Aug 2020 20:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597808650; cv=none; d=google.com; s=arc-20160816; b=g+H9E+ExLbVPNQmnXw0LvCHcTLXxVMoVFelU1J3/tNtURuVjgkD5rlwnvXZt0hnjVH 8cEBBdnB6WyrUSx4onQKEP4oJq+2NbSmCssmwj/XmPom2mTCZOVYSQrpVwOqtWX3DUsz 67GHaTkuGEvvBWk0DkLzVOUasVlOz2+1m6EmOoccTG+GnHx+hUMLTmLqEarRIvv7LhN6 JCK4UE9LV+aqxkws7hxhBLOJzlGUBdQHk+vsZBNm0RPlaefM5d9QEOqSRcl1+FwUkLHX FVGG6Vz7g/7gIjMwqnM60kdY59PFqQ3QJFwKyX8Mu2qJgdzUmgm6iONf2VEyjvuNGlw1 iM4A== 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=5pHz7TXNqAJCVq/McfmJ1XJ61fWrhwh4713bOScvi3M=; b=CfKV2tDIfmO1RiMcvUQ9ghozPsUyRv5pnnDG3utzn3bzamaOCAtWcZq6rOgSeMPumb 1g9R50ZW1Q5iW1+0vYN6kdTtNMjcRpMlU3pLlyp9B8xhNXUDBjIa5vXG3nISqyN3GjKc BsKcIK9uauCh84DXyhu4+lVTdSwUK/wf+YjAcNxC9JLAfCTZY1l6ekEybZz/neFpg561 mKNl5X6dzgK1pLJdoBhNT7O/nx7MH8O5AgukOWVr3V2P+kczZunJCBkSsSuxdQyFeAdG hqtNw1jEIxAx30a5FcRRuPBcMWoPlnvamlrcyT24DP1i1Gv9bgajD7gTqiBg//Yti82c 6knQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=rXnENMlo; 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 n7si14012682edt.235.2020.08.18.20.43.47; Tue, 18 Aug 2020 20:44:10 -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=rXnENMlo; 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 S1726809AbgHSDm4 (ORCPT + 99 others); Tue, 18 Aug 2020 23:42:56 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:23967 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726782AbgHSDmy (ORCPT ); Tue, 18 Aug 2020 23:42:54 -0400 X-UUID: 182a3dc4ab7b4156b7ae08abb837b7fd-20200819 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=5pHz7TXNqAJCVq/McfmJ1XJ61fWrhwh4713bOScvi3M=; b=rXnENMlogiXTewcZ1ZF4iYbKvWMTZlU5zkcXZ4qrCHXlLkFgGEAdjCCKftRj0WELoqZIHJkEJvoEY8jIu68WlDinRYpofaC+CHERnxoPLYs7bGWMPPJdIjz4q3GDPZMJuJDA2L2i9H8gY3AtCOmZOj6Zwj6rIRTYxYJBl1e4iW0=; X-UUID: 182a3dc4ab7b4156b7ae08abb837b7fd-20200819 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1064480434; Wed, 19 Aug 2020 11:42:44 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 19 Aug 2020 11:42:43 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 19 Aug 2020 11:42:39 +0800 From: Mark-PK Tsai To: CC: , , , , , , , , , , , Subject: [PATCH 1/2] irqchip: irq-mst: Add MStar interrupt controller support Date: Wed, 19 Aug 2020 11:42:30 +0800 Message-ID: <20200819034231.20726-2-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200819034231.20726-1-mark-pk.tsai@mediatek.com> References: <20200819034231.20726-1-mark-pk.tsai@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 QWRkIE1TdGFyIGludGVycnVwdCBjb250cm9sbGVyIHN1cHBvcnQgdXNpbmcgaGllcmFyY2h5IGly cQ0KZG9tYWluLg0KDQpTaWduZWQtb2ZmLWJ5OiBNYXJrLVBLIFRzYWkgPG1hcmstcGsudHNhaUBt ZWRpYXRlay5jb20+DQotLS0NCiBkcml2ZXJzL2lycWNoaXAvS2Nv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