From patchwork Sun Aug 11 18:30:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 1145362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oVUdInEt"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46670664kPz9sNm for ; Mon, 12 Aug 2019 04:33:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbfHKSdR (ORCPT ); Sun, 11 Aug 2019 14:33:17 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54523 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfHKSdQ (ORCPT ); Sun, 11 Aug 2019 14:33:16 -0400 Received: by mail-wm1-f67.google.com with SMTP id p74so10231352wme.4; Sun, 11 Aug 2019 11:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8/Bml7WQofU6xEmk9woWoZ9hyJMjPfyaxuZGqKSQtw=; b=oVUdInEt67eTaZ5xCaP6Chx0Kdccq1NX2TTzBf1vJCSYiegdUeNkHExiqF1N90QYhI H9YtHDoqaPG0BgQB23EX6O7al2AxuUH/l0aENRMc15GzSfHvKE5nwUPUhAEdSXokOeMA bLZI2XLXT9Su3EnwUaod0U/mGPgV4NyNQ+bsv8XEJl/JjQo15hm48PjJHQaR0rufExXK TgIPmh3N91lqXgoyBMDSL7q/H8eCdHsJhqaQtn44FYtG3vJFNF5zQk8e5oTTPTMQlQhP TB7OAQYk+34/HzJiEuJV9egqKXtV8rcv1MRgEhVkz4qvPFxGawCytDMPEE9fB22xxEOz nuOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8/Bml7WQofU6xEmk9woWoZ9hyJMjPfyaxuZGqKSQtw=; b=SE8RPKMhL/x/Igx3jaZenXT3AktsffaU5H3ahy8ivTOKVOR7mXdPHYMhW8CUu9p4Nu /c9QLaHA7l/QJV+YBc2r1USMFsbXqhAlxnXl5R0A7aOu5GZJficZNs+2vTQR76N9AT9n 47GgtpoRREDQQgS4ISgm+xi7PzHCT9N2FkbYEW37c3fyx3nZG7uKcb/eWZNGOPi1SqgY LCfab7bijD3aTSXg0trGtBVE5M0wQ+3yhW6Vb0PcS2kQmST6SGb5lZBriX4m/1i6EGHJ DWRWkvA21RgkxAiSts1v/YaPawmZU4xmpZ7LSWu6Z6i0pS0a0ap5k5TzT7JQC85DupUB 0Sqg== X-Gm-Message-State: APjAAAXYR7/fldeOcoWi0N32w36hw5PNCzWrMrZ67b99dgrpB8NAQE6W VMxO++5YxjT9ZmuZAmC6/Hw= X-Google-Smtp-Source: APXvYqwudgFggXfkbvd9H9ZngRxpG3yFbLN44zVRoq5yraE7Q3twPzyuHjbkbk5mA1q55StvWOCJEg== X-Received: by 2002:a1c:9d8c:: with SMTP id g134mr3486164wme.174.1565548394335; Sun, 11 Aug 2019 11:33:14 -0700 (PDT) Received: from localhost.localdomain ([94.29.34.218]) by smtp.gmail.com with ESMTPSA id c19sm6824340wml.13.2019.08.11.11.33.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Aug 2019 11:33:13 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] irqchip/tegra: Remove everything related to COP Date: Sun, 11 Aug 2019 21:30:43 +0300 Message-Id: <20190811183044.13925-1-digetx@gmail.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org There is no point in touching of the COP (ARM7TDMI auxiliary boot/firmware CPU) because COP's interrupts should be related only to an old multimedia firmware that is not applicable to the upstream kernel. Hence let's remove everything related to the COP, for consistency. Signed-off-by: Dmitry Osipenko --- drivers/irqchip/irq-tegra.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c index e1f771c72fc4..14dcacc2ad38 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -33,11 +33,6 @@ #define ICTLR_CPU_IER_CLR 0x28 #define ICTLR_CPU_IEP_CLASS 0x2C -#define ICTLR_COP_IER 0x30 -#define ICTLR_COP_IER_SET 0x34 -#define ICTLR_COP_IER_CLR 0x38 -#define ICTLR_COP_IEP_CLASS 0x3c - #define TEGRA_MAX_NUM_ICTLRS 6 static unsigned int num_ictlrs; @@ -68,8 +63,6 @@ static const struct of_device_id ictlr_matches[] = { struct tegra_ictlr_info { void __iomem *base[TEGRA_MAX_NUM_ICTLRS]; #ifdef CONFIG_PM_SLEEP - u32 cop_ier[TEGRA_MAX_NUM_ICTLRS]; - u32 cop_iep[TEGRA_MAX_NUM_ICTLRS]; u32 cpu_ier[TEGRA_MAX_NUM_ICTLRS]; u32 cpu_iep[TEGRA_MAX_NUM_ICTLRS]; @@ -144,11 +137,6 @@ static int tegra_ictlr_suspend(void) /* Save interrupt state */ lic->cpu_ier[i] = readl_relaxed(ictlr + ICTLR_CPU_IER); lic->cpu_iep[i] = readl_relaxed(ictlr + ICTLR_CPU_IEP_CLASS); - lic->cop_ier[i] = readl_relaxed(ictlr + ICTLR_COP_IER); - lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS); - - /* Disable COP interrupts */ - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); /* Disable CPU interrupts */ writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); @@ -175,11 +163,6 @@ static void tegra_ictlr_resume(void) writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); writel_relaxed(lic->cpu_ier[i], ictlr + ICTLR_CPU_IER_SET); - writel_relaxed(lic->cop_iep[i], - ictlr + ICTLR_COP_IEP_CLASS); - writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); - writel_relaxed(lic->cop_ier[i], - ictlr + ICTLR_COP_IER_SET); } local_irq_restore(flags); } From patchwork Sun Aug 11 18:30:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 1145361 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eOY3VzXA"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4667061tG0z9sNk for ; Mon, 12 Aug 2019 04:33:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbfHKSdU (ORCPT ); Sun, 11 Aug 2019 14:33:20 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38997 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbfHKSdR (ORCPT ); Sun, 11 Aug 2019 14:33:17 -0400 Received: by mail-wm1-f65.google.com with SMTP id u25so9865482wmc.4; Sun, 11 Aug 2019 11:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0FOh3HP7shWLzeniqP1aypDXeCQyKvXxAbR2O18zZaM=; b=eOY3VzXADfTLo/eG8DBsl8a/U4xgurPylkOx3UmChVv+9NLjq0HxTt61HhuzavxLB5 e/89Uy/dCtxYcaPyBErCf2Z9RvAjGSOvEnf68WOUkUSS554wmQk9HPXWFkjs5RtUKiwU ZPvzLoOWQLPEKjoV6PohL8l3/jM37VKcHD2q4BBfRlc1LtQDDeFP5asj3/Ghmt7Hq0ma nUd9P57bYOon5mSRp7Ov8usWMl3XeWk4VxaOH/YgkgbbRz4qVurbIh8FujYMhQWXR5gZ 1c3aFdXcrTlDvyVA60e7cZiqNQhr1WgcwgAxnzvRPANp17ClDUHEId788yuxsaqbI65z UFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0FOh3HP7shWLzeniqP1aypDXeCQyKvXxAbR2O18zZaM=; b=HtrujEPZ2VfkNdomIlLuLNbQSAr83KhstMXbuzKzxe4oix0jVVlE1PUdUVnIWlb/Ku YBTqgAJ6HB3vE+gMjVXzqx4Kkphg8XeOzLNEgzX+T9vrEvW2BVMH0H7CCStUdSzvKt1z UmHlRZA4TwaDluSzui6rDEbEaZBzhb/XBeyhHbtq13zksRhMuSVLhGbu0NIN817r9yJx Uxm4d++JBmmY6iyOu2QqS9HgZ5YalUnSJhXN47zQUQLeghjqxtrarlN8jiRO4I4gK0/U Y84PFfJhKPW/GFDV+gZPkop8euKfDR3WY1oelj2fGDmYc6div94CMdvdPw5acVeG0xMr 9tvw== X-Gm-Message-State: APjAAAW/1NiF8Voqp3paE/xFNNC6VfTsMqns4FH66O+KjfecrR2d75Fd CVCA9YiDZVRzwrPgXngekTg= X-Google-Smtp-Source: APXvYqy9wy2MvxkO/h/qLbFmcjDGAPdY8z62l4SD8FqhyUagBvgOyIxQvSiD78Cj8gvYMdqCSdvaKQ== X-Received: by 2002:a05:600c:144:: with SMTP id w4mr9691692wmm.94.1565548395516; Sun, 11 Aug 2019 11:33:15 -0700 (PDT) Received: from localhost.localdomain ([94.29.34.218]) by smtp.gmail.com with ESMTPSA id c19sm6824340wml.13.2019.08.11.11.33.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Aug 2019 11:33:15 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] irqchip/tegra: Clean up coding style Date: Sun, 11 Aug 2019 21:30:44 +0300 Message-Id: <20190811183044.13925-2-digetx@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190811183044.13925-1-digetx@gmail.com> References: <20190811183044.13925-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Make coding style to conform to the kernel's standard by fixing checkpatch warnings about "line over 80 characters". Signed-off-by: Dmitry Osipenko --- drivers/irqchip/irq-tegra.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/irqchip/irq-tegra.c b/drivers/irqchip/irq-tegra.c index 14dcacc2ad38..f829a5990dae 100644 --- a/drivers/irqchip/irq-tegra.c +++ b/drivers/irqchip/irq-tegra.c @@ -74,7 +74,7 @@ static struct tegra_ictlr_info *lic; static inline void tegra_ictlr_write_mask(struct irq_data *d, unsigned long reg) { - void __iomem *base = (void __iomem __force *)d->chip_data; + void __iomem *base = lic->base[d->hwirq / 32]; u32 mask; mask = BIT(d->hwirq % 32); @@ -142,7 +142,8 @@ static int tegra_ictlr_suspend(void) writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR); /* Enable the wakeup sources of ictlr */ - writel_relaxed(lic->ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET); + writel_relaxed(lic->ictlr_wake_mask[i], + ictlr + ICTLR_CPU_IER_SET); } local_irq_restore(flags); @@ -222,7 +223,6 @@ static int tegra_ictlr_domain_alloc(struct irq_domain *domain, { struct irq_fwspec *fwspec = data; struct irq_fwspec parent_fwspec; - struct tegra_ictlr_info *info = domain->host_data; irq_hw_number_t hwirq; unsigned int i; @@ -235,13 +235,9 @@ static int tegra_ictlr_domain_alloc(struct irq_domain *domain, if (hwirq >= (num_ictlrs * 32)) return -EINVAL; - for (i = 0; i < nr_irqs; i++) { - int ictlr = (hwirq + i) / 32; - + for (i = 0; i < nr_irqs; i++) irq_domain_set_hwirq_and_chip(domain, virq + i, hwirq + i, - &tegra_ictlr_chip, - (void __force *)info->base[ictlr]); - } + &tegra_ictlr_chip, NULL); parent_fwspec = *fwspec; parent_fwspec.fwnode = domain->parent->fwnode; @@ -312,7 +308,6 @@ static int __init tegra_ictlr_init(struct device_node *node, "%pOF: Found %u interrupt controllers in DT; expected %u.\n", node, num_ictlrs, soc->num_ictlrs); - domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32, node, &tegra_ictlr_domain_ops, lic);