linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Lina Iyer <ilina@codeaurora.org>,
	tglx@linutronix.de, jason@lakedaemon.net
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	sboyd@codeaurora.org, rnayak@codeaurora.org,
	asathyak@codeaurora.org
Subject: Re: [PATCH RFC 4/4] drivers: irqchip: qcom: add pin information for SDM845
Date: Wed, 24 Jan 2018 14:20:17 +0000	[thread overview]
Message-ID: <2c96f5ec-3e7c-ca04-f265-c4fdc8475db2@arm.com> (raw)
In-Reply-To: <20180123175656.11942-5-ilina@codeaurora.org>

On 23/01/18 17:56, Lina Iyer wrote:
> From: Archana Sathyakumar <asathyak@codeaurora.org>
> 
> Add PDC pin information for SDM845. Interrupts listed are wake up
> sources for the processor, when the processor and GIC are powered down.
> 
> Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
> ---
>  drivers/irqchip/Makefile          |   2 +-
>  drivers/irqchip/qcom-pdc-sdm845.c | 130 ++++++++++++++++++++++++++++++++++++++
>  drivers/irqchip/qcom-pdc.c        |   3 +
>  drivers/irqchip/qcom-pdc.h        |   1 +
>  4 files changed, 135 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/irqchip/qcom-pdc-sdm845.c
> 
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index 280723d83916..0cf8f3feb47f 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -84,4 +84,4 @@ obj-$(CONFIG_QCOM_IRQ_COMBINER)		+= qcom-irq-combiner.o
>  obj-$(CONFIG_IRQ_UNIPHIER_AIDET)	+= irq-uniphier-aidet.o
>  obj-$(CONFIG_ARCH_SYNQUACER)		+= irq-sni-exiu.o
>  obj-$(CONFIG_MESON_IRQ_GPIO)		+= irq-meson-gpio.o
> -obj-$(CONFIG_QCOM_PDC)			+= qcom-pdc.o
> +obj-$(CONFIG_QCOM_PDC)			+= qcom-pdc.o qcom-pdc-sdm845.o
> diff --git a/drivers/irqchip/qcom-pdc-sdm845.c b/drivers/irqchip/qcom-pdc-sdm845.c
> new file mode 100644
> index 000000000000..57d0fb51d5ac
> --- /dev/null
> +++ b/drivers/irqchip/qcom-pdc-sdm845.c
> @@ -0,0 +1,130 @@
> +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 and
> + * only version 2 as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + */
> +
> +#include "qcom-pdc.h"
> +
> +const struct pdc_pin sdm845_data[] = {
> +	{0, 512}, /* rpmh_wake */
> +	{1, 513}, /* ee0_apps_hlos_spmi_periph_irq */
> +	{2, 514}, /* ee1_apps_trustzone_spmi_periph_irq */
> +	{3, 515}, /* secure_wdog_expired */
> +	{4, 516}, /* secure_wdog_bark_irq */
> +	{5, 517}, /* aop_wdog_expired_irq */
> +	{6, 518}, /* qmp_usb3_lfps_rxterm_irq */

[...]

Nice try, but no. This is DT material. Please use the pin number in your
DT, which the driver uses as a hwirq. When it comes to mapping it to the
corresponding GIC SPI, use a per-soc helper that comes from DT too (you
seem to only have two ranges here, so that's pretty easy to do).

> +};
> diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c
> index 9b626e9f3a29..0d54db4e915b 100644
> --- a/drivers/irqchip/qcom-pdc.c
> +++ b/drivers/irqchip/qcom-pdc.c
> @@ -241,6 +241,7 @@ static const struct irq_domain_ops qcom_pdc_ops = {
>  };
>  
>  static const struct of_device_id pdc_table[] = {
> +	{ .compatible = "qcom,pdc-sdm845", .data = sdm845_data, },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, pdc_table);
> @@ -286,3 +287,5 @@ int qcom_pdc_init(struct device_node *node, struct device_node *parent)
>  	iounmap(pdc_base);
>  	return ret;
>  }
> +
> +IRQCHIP_DECLARE(pdc_sdm845, "qcom,pdc-sdm845", qcom_pdc_init);
> diff --git a/drivers/irqchip/qcom-pdc.h b/drivers/irqchip/qcom-pdc.h
> index b5b64390175e..6a9d9f9eb4f1 100644
> --- a/drivers/irqchip/qcom-pdc.h
> +++ b/drivers/irqchip/qcom-pdc.h
> @@ -27,4 +27,5 @@ struct pdc_pin {
>  	irq_hw_number_t hwirq;
>  };
>  
> +extern const struct pdc_pin sdm845_data[];
>  #endif /* __QCOM_PDC_H__ */
> 

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2018-01-24 14:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 17:56 [PATCH RFC 0/4] irqchip: qcom: add support for PDC interrupt controller Lina Iyer
2018-01-23 17:56 ` [PATCH RFC 1/4] drivers: irqchip: pdc: " Lina Iyer
2018-01-24 14:20   ` Marc Zyngier
2018-01-25 18:52     ` Lina Iyer
2018-01-30 17:56     ` Lina Iyer
2018-01-30 18:11       ` Marc Zyngier
2018-01-31 16:24         ` Lina Iyer
2018-01-31 16:46           ` Marc Zyngier
2018-02-01 16:49             ` Lina Iyer
2018-01-23 17:56 ` [PATCH RFC 2/4] dt-bindings/interrupt-controller: pdc: descibe PDC device binding Lina Iyer
2018-01-23 18:09   ` Sudeep Holla
2018-01-23 18:46     ` Lina Iyer
2018-01-24 14:24   ` Marc Zyngier
2018-01-30 15:20   ` Rob Herring
2018-01-23 17:56 ` [PATCH RFC 3/4] drivers: irqchip: pdc: log PDC info in FTRACE Lina Iyer
2018-01-23 18:13   ` Steven Rostedt
2018-01-25 15:45     ` Lina Iyer
2018-01-23 17:56 ` [PATCH RFC 4/4] drivers: irqchip: qcom: add pin information for SDM845 Lina Iyer
2018-01-24 14:20   ` Marc Zyngier [this message]
2018-01-25 18:14     ` Lina Iyer
2018-01-23 18:15 ` [PATCH RFC 0/4] irqchip: qcom: add support for PDC interrupt controller Sudeep Holla
2018-01-23 18:44   ` Lina Iyer
2018-01-24 10:10     ` Sudeep Holla
2018-01-24 17:43       ` Lina Iyer
2018-01-24 17:54         ` Sudeep Holla
2018-01-25 15:54           ` Lina Iyer
2018-01-25 16:39             ` Sudeep Holla
2018-01-25 18:13               ` Lina Iyer
2018-01-25 18:43                 ` Sudeep Holla
2018-01-25 20:05                   ` Lina Iyer
2018-01-26 11:39                     ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c96f5ec-3e7c-ca04-f265-c4fdc8475db2@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=asathyak@codeaurora.org \
    --cc=ilina@codeaurora.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rnayak@codeaurora.org \
    --cc=sboyd@codeaurora.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).