Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1840775pxa; Sun, 2 Aug 2020 23:45:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6cZy39TK2r0MmCnMURjSPDIQ5Vp/ZZjgCqR10kHlZwtbbFCX5EucB6ShUu/q1oGkwVVq7 X-Received: by 2002:aa7:da46:: with SMTP id w6mr10877752eds.7.1596437121413; Sun, 02 Aug 2020 23:45:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596437121; cv=none; d=google.com; s=arc-20160816; b=0hc7LzS/r5DlqJcIW+C6t2M0iYBGkDo0yhEQmgc/qfJmT8co0wSn2QyTs39BeayUFL JjrZ8w/Ucp6GTCqHTU7yvrbroQ/YGg5nbrBdOgw+XdVOzuy17fnham0Zh97WahvDlRAE DFQ0n5CnZE13AncP4ItM2JVvgS9ThGZJktlQQOGl3gSedi8CVEm4jxAsiNZc7i2RldJf 6pT9k8seGnA5ZrJ9Q/2rYpXrdQ+WNSZubuOnTZYJSfq2MaJesUMVJefdWdhMlE85Lfrm 2fD/LvZbGFW/ag1SSLYkiUwhxYFmIZxdA1hSoMpjnG3EuUTDDLa8Ld8x6mQ9VCqeoffT iwlw== 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=12BHCE2vfEXwwIMIMyUnGPJn1q3j4PEk4JE0VxRfC5M=; b=ignUv+igdlRChGtALyBoVFVVz2VPD7Zt80uq0Pt8G0wNHj3h8SRoVqxpzjRj4tTC2Q Fb7hTbIrw1aaioG4JVYmC/ktyWT2PJm27Q/o6hnsfdlDAsKPaX7raI1UAE0VT39t/2NU AJ24JP/0W2/hvr8WfDkcLO+47pjRRhpeUkZVW3NE0dugoU31ME4lgFKQ/0vGWAxhvVV0 WSM2B5GsVvCgHM+dOka2w7d7EG9zKWfpe1Kxle6mNY4yaMl2EfJeyRX4NgKELghqQhta dbZB4tbK8KvJOGm/FsFwgELL1gj2xhv1zGz2CPhRbDduYwFSm2HkAhfGZYZgMe2EBlq+ op9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=k1bV+uth; 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 h14si9744779eds.339.2020.08.02.23.44.58; Sun, 02 Aug 2020 23:45:21 -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=k1bV+uth; 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 S1728407AbgHCGXL (ORCPT + 99 others); Mon, 3 Aug 2020 02:23:11 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:37343 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725965AbgHCGXJ (ORCPT ); Mon, 3 Aug 2020 02:23:09 -0400 X-UUID: 6c3b5506e7c946888370b3420ff7006b-20200803 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=12BHCE2vfEXwwIMIMyUnGPJn1q3j4PEk4JE0VxRfC5M=; b=k1bV+uthV83tZTeDOlxtCXzcGBG2i8py4srHEYhHbsSysHrphW2vOuqE/I+vZNvgd4DkJ0whU2T7069WmUzODtNe2h9ZtxMW2YAu6aCmofI7BtqtCswGbW4fsRB/xCohdhgMH+ZsTo3VmEDXDT99IXK2bcyQ2TvZ1lZh8dMdW4Q=; X-UUID: 6c3b5506e7c946888370b3420ff7006b-20200803 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 1288114947; Mon, 03 Aug 2020 14:23:03 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 3 Aug 2020 14:23:00 +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; Mon, 3 Aug 2020 14:23:01 +0800 From: Mark-PK Tsai To: CC: , , , , , , , , , , Subject: [PATCH 1/2] irqchip: irq-mt58xx: Add mt58xx interrupt controller support Date: Mon, 3 Aug 2020 14:22:13 +0800 Message-ID: <20200803062214.24076-2-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200803062214.24076-1-mark-pk.tsai@mediatek.com> References: <20200803062214.24076-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 QWRkIG10NTh4eCBpbnRlcnJ1cHQgY29udHJvbGxlciBzdXBwb3J0IHVzaW5nIGhpZXJhcmNoeSBp cnENCmRvbWFpbi4NCg0KU2lnbmVkLW9mZi1ieTogTWFyay1QSyBUc2FpIDxtYXJrLXBrLnRzYWlA bWVkaWF0ZWsuY29tPg0KLS0tDQogZHJpdmVycy9pcnFj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