Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp724400ybn; Wed, 2 Oct 2019 05:18:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwlmOEsVxX1RF2a4v7F5WvAtqJArNqjGk8zS81OOUV1jzxDHuRniRq2rJCxbBW1Mj9xi2C X-Received: by 2002:a05:6402:3066:: with SMTP id bs6mr3348840edb.127.1570018699338; Wed, 02 Oct 2019 05:18:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570018699; cv=pass; d=google.com; s=arc-20160816; b=YhD153PrlyIDcv2uircIxAxeLDvYQ2GjHEPfQQ/PIWAC6T5JJ8DYylyOFueEPp6zXH tgXDDE9ofkXR5mTd45PKEfXqUnjvOqz3ZB0C7VGpEj+16jymLPQwZYZqi3VV+2aOUbJf 6T+fa4+//SagKFEfAF4+ph/IhJmGtEQ8J4wv0Qb6lzDZbLItoi7Ge0Ad8XRKTGh3Z5eG EauJKxzgv+J+okzt+vznashAg+3RjW3ODKr4Q7UxbVkm1otoiQgBth7xc7c2Sqa7e/d5 NeYRJD5SnC/oVqfQvZRISI7nSh9Q8Cdl0p5Hk7F+mKr3ll6uQfezuBulouyeFSiyFNnu CJqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:domainkey-signature; bh=0cOK+cCuE1Fm3ThR/+IxH46twN3ONpZGwZBDUH3l7AU=; b=GoJV5JZNGGEtkoCKkXCpEfSM2PDG/kWYuwsJChDx1dPkOddU8VjnjS/qlCAA6yamev FvxOVtZ/D6w9RDxifgJ8+c1TfXqVcxgRKgWaebqlXxjpfD9gvreS/77jRQ8Sx6/8TTQk QGbf4pfCzJTEeLzHOUX87fYO3l/ElnusRSuxAvDjh59COgIMI/88jjfrs8VOP5mCy9Uy L/iyRVYSuLcaW3Ewd7BB80BzkI8gYyAo/9Uw6IcZ4wy0KLiVMHHEs/3Tjk9JJG7vGtwr fGzAjZ+j/za/NcbQ1qBcmJOzcHOqB7RPYWwaBYpZYcJW9hhBxoQbi89TUzxbbyFv861K seFg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zoho.com header.s=zm2019 header.b=DsHgUQ3f; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zoho.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si10611824edx.302.2019.10.02.05.17.54; Wed, 02 Oct 2019 05:18:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zoho.com header.s=zm2019 header.b=DsHgUQ3f; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zoho.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728150AbfJBL0g (ORCPT + 99 others); Wed, 2 Oct 2019 07:26:36 -0400 Received: from sender4-pp-o94.zoho.com ([136.143.188.94]:25404 "EHLO sender4-pp-o94.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728142AbfJBL0g (ORCPT ); Wed, 2 Oct 2019 07:26:36 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1570015546; cv=none; d=zoho.com; s=zohoarc; b=S+Diuivf9rBULn+rSoS7mERM4LMaiizJjZz4mrCMSESe6Zcw4qpUyhWIfm2eUKmeh2s+8jJ7LNo8roGUwKhJRJ/Q9GNA31En6GsO3ntUL/0IR13hST0vfNWHPhSA09ZtUoiShopwGTcqbyyeXPzYxg7xpw2BED+LVI7Vmo4PfDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570015546; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=0cOK+cCuE1Fm3ThR/+IxH46twN3ONpZGwZBDUH3l7AU=; b=O9WwAiGi5zY/yn6vaFx01n6Ty3bLJBUcuofY53Vb7ajLyvDa67jYWTTgYV6TtdcGHyLoJ2iLZhMxW1R7slws8YfnEyA5RldtgWMzv86/GtW9vTorNm7GzQKrIFlgw54314D5UM8R+FZ3gP+oqLCJr3PYL59mcvV5McFs/54T3e4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=neZnW3dofdATJogiikKQhWOECZC2bwnmjJOdX7Vemsv7xOzi1Zkf2DD67veTsd7Vbq8M2CNnm4eL epMg/8G0r3fAu2pFljEvbnq10C2+mMgsC1cUOnFVQQLhqVDTAkIH DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1570015546; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=2678; bh=0cOK+cCuE1Fm3ThR/+IxH46twN3ONpZGwZBDUH3l7AU=; b=DsHgUQ3fq/Deg+zaEyD5fzc95KDi21lAzR87TXoaFrHSA6mZTCsOGbsg0gINUdAv gXzFia1xOa2wmlqSRMdE5HVfkuEhYygrDUn95bEaNtDFIxuhjnq3Pp/23623HdngLx3 7JeZ7tgFY+6kaCSwafSMQuJi6fzWkOCcTnV0bt9E= Received: from zhouyanjie-virtual-machine.localdomain (171.221.113.164 [171.221.113.164]) by mx.zohomail.com with SMTPS id 1570015546320105.9573534034023; Wed, 2 Oct 2019 04:25:46 -0700 (PDT) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, paul.burton@mips.com, gregkh@linuxfoundation.org, jason@lakedaemon.net, syq@debian.org, marc.zyngier@arm.com, rfontana@redhat.com, armijn@tjaldur.nl, allison@lohutok.net, paul@crapouillou.net Subject: [PATCH 1/5 v5] irqchip: ingenic: Drop redundant irq_suspend / irq_resume functions Date: Wed, 2 Oct 2019 19:25:21 +0800 Message-Id: <1570015525-27018-2-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1570015525-27018-1-git-send-email-zhouyanjie@zoho.com> References: <1548517123-60058-1-git-send-email-zhouyanjie@zoho.com> <1570015525-27018-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil The same behaviour can be obtained by using the IRQCHIP_MASK_ON_SUSPEND flag on the IRQ chip. Signed-off-by: Paul Cercueil --- drivers/irqchip/irq-ingenic.c | 24 +----------------------- include/linux/irqchip/ingenic.h | 14 -------------- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 include/linux/irqchip/ingenic.h diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c index f126255..06fa810 100644 --- a/drivers/irqchip/irq-ingenic.c +++ b/drivers/irqchip/irq-ingenic.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -50,26 +49,6 @@ static irqreturn_t intc_cascade(int irq, void *data) return IRQ_HANDLED; } -static void intc_irq_set_mask(struct irq_chip_generic *gc, uint32_t mask) -{ - struct irq_chip_regs *regs = &gc->chip_types->regs; - - writel(mask, gc->reg_base + regs->enable); - writel(~mask, gc->reg_base + regs->disable); -} - -void ingenic_intc_irq_suspend(struct irq_data *data) -{ - struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); - intc_irq_set_mask(gc, gc->wake_active); -} - -void ingenic_intc_irq_resume(struct irq_data *data) -{ - struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); - intc_irq_set_mask(gc, gc->mask_cache); -} - static struct irqaction intc_cascade_action = { .handler = intc_cascade, .name = "SoC intc cascade interrupt", @@ -127,8 +106,7 @@ static int __init ingenic_intc_of_init(struct device_node *node, ct->chip.irq_mask = irq_gc_mask_disable_reg; ct->chip.irq_mask_ack = irq_gc_mask_disable_reg; ct->chip.irq_set_wake = irq_gc_set_wake; - ct->chip.irq_suspend = ingenic_intc_irq_suspend; - ct->chip.irq_resume = ingenic_intc_irq_resume; + ct->chip.flags = IRQCHIP_MASK_ON_SUSPEND; irq_setup_generic_chip(gc, IRQ_MSK(32), 0, 0, IRQ_NOPROBE | IRQ_LEVEL); diff --git a/include/linux/irqchip/ingenic.h b/include/linux/irqchip/ingenic.h deleted file mode 100644 index 1465588..0000000 --- a/include/linux/irqchip/ingenic.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2010, Lars-Peter Clausen - */ - -#ifndef __LINUX_IRQCHIP_INGENIC_H__ -#define __LINUX_IRQCHIP_INGENIC_H__ - -#include - -extern void ingenic_intc_irq_suspend(struct irq_data *data); -extern void ingenic_intc_irq_resume(struct irq_data *data); - -#endif -- 2.7.4