Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp556928pxa; Wed, 19 Aug 2020 08:40:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIF2H9wsrcLaXyaA67P3vfzIlWj/aFMW4k5mWsUqluo0HRrxmvFGtSJYIyzC7XHOEsJtk4 X-Received: by 2002:a17:906:4157:: with SMTP id l23mr4722356ejk.491.1597851613210; Wed, 19 Aug 2020 08:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597851613; cv=none; d=google.com; s=arc-20160816; b=d86h+vaL2DKboMdfRXnXdf769/pmlxjdG45cS88oErNuedb6V6nOD1lBcAg8pRLc5Z UiDuCwLET2p0HmrJtFemXcz+H/Q5UrjBbm0sXj9XPsixVl2ZvAR0kxwcpI9OdRbQvNwP mPo0oMvmyh76ENB3SXB24FSduKjZW0WGnWzVdjiwHK1LKx5wP7A4Tr25lhPQT0bPIO0r w7uK5YiPx3Gs9Q0qz/ZTXGS7I3wspUHMbUyqEVvs/EAhIDr9TnKG6M6+ASGhIbnRvthj BkXT1mzOBbyarOgEGhxTRPeuR+pt66ygPZGELZXcDkxz3NQ2tkgs7HNDHUkYl6IEKpze 25MA== 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=4qgCAZXCXYXN1cuDSbZSsrcYsE9h1N890w3ZzYe0Wzk=; b=kubTpBTC5ZIVBG+ikgFrNPXzX0jB7Dt46dC81TQkSjfAEBoIAe/S9BlERrrEXuTwDc eCU1yOgZ/qTUZkRP3NnIO7AR2lSbNCReyB4v442ccLtV4Rad8nl/iqFGuWlsbFD190iN EbuQ9A/CDTWGb7JMhe+paEY8NchcW4b97aWAIJ2M5xCtzNYSGDck2w4ypQQy9v0YsNDA VoJhNni1igM9faDtJWPgWxlDlwm8Nf5d0m2lAxnlpmAXC71b/JQkCblSXivV1QGRZULa sphA3JRT/LJ5DaM3RVSsVgHzPl23hqLcFGc1qtpBYby7/jF13TWyM+BOCrGNugK/kFkt Pa2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eQRXa4Wx; 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 va1si15479022ejb.558.2020.08.19.08.39.48; Wed, 19 Aug 2020 08:40:13 -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=eQRXa4Wx; 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 S1728790AbgHSPij (ORCPT + 99 others); Wed, 19 Aug 2020 11:38:39 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:12590 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728705AbgHSPia (ORCPT ); Wed, 19 Aug 2020 11:38:30 -0400 X-UUID: 4fdb3c351832422ea2a235b44158e9fb-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=4qgCAZXCXYXN1cuDSbZSsrcYsE9h1N890w3ZzYe0Wzk=; b=eQRXa4WxyRPiBfC0JntkAen3t6CpwvYdZboE8ofJbNdnyBpCalfyLfkUDIgX2BNsj+rOpBbktKwdeY14KL5M0GJX6kOK1gEIKh7BfDQOFbyM93ml1ZbrPQu9zEdlsynovhCA+LReBzSjr9u+baZQvt0jQXIRW1BRkbXjfjIwVqk=; X-UUID: 4fdb3c351832422ea2a235b44158e9fb-20200819 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 441858192; Wed, 19 Aug 2020 23:38:21 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 19 Aug 2020 23:38:17 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 19 Aug 2020 23:38:17 +0800 From: Mark-PK Tsai To: CC: , , , , , , , , , , , Subject: [PATCH v2 1/2] irqchip: irq-mst: Add MStar interrupt controller support Date: Wed, 19 Aug 2020 23:37:57 +0800 Message-ID: <20200819153757.28993-1-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+DQotLS0NCiBkcml2ZXJzL2lycWNoaXAvS2NvbmZpZy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