From: David Lechner <david@lechnology.com>
To: Suman Anna <s-anna@ti.com>, Marc Zyngier <marc.zyngier@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Cc: devicetree@vger.kernel.org,
Grygorii Strashko <grygorii.strashko@ti.com>,
Tony Lindgren <tony@atomide.com>, Sekhar Nori <nsekhar@ti.com>,
linux-kernel@vger.kernel.org, "Andrew F. Davis" <afd@ti.com>,
Lokesh Vutla <lokeshvutla@ti.com>,
Murali Karicheri <m-karicheri2@ti.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH 2/6] irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts
Date: Wed, 17 Jul 2019 12:21:42 -0500 [thread overview]
Message-ID: <5241ecb9-4ab2-b01c-367c-38c554c056c4@lechnology.com> (raw)
In-Reply-To: <54e871a8-dfa4-f65b-5869-d1661144cbf0@ti.com>
On 7/16/19 12:21 PM, Suman Anna wrote:
>>> +static int pruss_intc_probe(struct platform_device *pdev)
>>> +{
>>> + static const char * const irq_names[] = {
>>> + "host0", "host1", "host2", "host3",
>>> + "host4", "host5", "host6", "host7", };
>>> + struct device *dev = &pdev->dev;
>>> + struct pruss_intc *intc;
>>> + struct resource *res;
>>> + struct irq_chip *irqchip;
>>> + int i, irq;
>>> +
>>> + intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
>>> + if (!intc)
>>> + return -ENOMEM;
>>> + platform_set_drvdata(pdev, intc);
>>> +
>>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> + intc->base = devm_ioremap_resource(dev, res);
>>> + if (IS_ERR(intc->base)) {
>>> + dev_err(dev, "failed to parse and map intc memory resource\n");
>>> + return PTR_ERR(intc->base);
>>> + }
>>> +
>>> + dev_dbg(dev, "intc memory: pa %pa size 0x%zx va %pK\n", &res->start,
>>> + (size_t)resource_size(res), intc->base);
>>> +
>>> + mutex_init(&intc->lock);
>>> +
>>> + pruss_intc_init(intc);
>>> +
>>> + irqchip = devm_kzalloc(dev, sizeof(*irqchip), GFP_KERNEL);
>>> + if (!irqchip)
>>> + return -ENOMEM;
>>> +
>>> + irqchip->irq_ack = pruss_intc_irq_ack;
>>> + irqchip->irq_mask = pruss_intc_irq_mask;
>>> + irqchip->irq_unmask = pruss_intc_irq_unmask;
>>> + irqchip->irq_retrigger = pruss_intc_irq_retrigger;
>>> + irqchip->irq_request_resources = pruss_intc_irq_reqres;
>>> + irqchip->irq_release_resources = pruss_intc_irq_relres;
>>> + irqchip->name = dev_name(dev);
>>
>> Should we also set `irqchip->parent_device = dev;` here?
>>
>> I tried it and had to add pm runtime stuff as well, otherwise
>> requesting irqs would fail.
>
> I haven't seen any during my local testing. What sort of failure are you
> seeing?
>
> The clocking for the overall PRUSS module will be handled in either the
> ti-sysc driver for OMAP SoCs or in the pruss platform driver.
>
I was getting -EACCESS bubbling up from rpm_resume() in drivers/base/
power/runtime.c. It was probably a mix of how I set up the device tree
and the dummy PRUSS bus driver I made.
I'm sure it will be fine with a proper PRUSS platform driver.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-07-17 17:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-08 3:52 [PATCH 0/6] Add TI PRUSS Local Interrupt Controller IRQChip driver Suman Anna
2019-07-08 3:52 ` [PATCH 1/6] dt-bindings: irqchip: Add PRUSS interrupt controller bindings Suman Anna
2019-07-08 14:34 ` Andrew F. Davis
2019-07-08 15:59 ` Suman Anna
2019-07-10 17:08 ` David Lechner
2019-07-16 17:07 ` Suman Anna
2019-07-24 16:34 ` Rob Herring
2019-07-24 19:42 ` Suman Anna
2019-07-25 22:27 ` Rob Herring
2019-07-08 3:52 ` [PATCH 2/6] irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts Suman Anna
2019-07-11 16:45 ` David Lechner
2019-07-16 17:21 ` Suman Anna
2019-07-17 17:21 ` David Lechner [this message]
2019-07-17 18:56 ` Suman Anna
2019-07-08 3:52 ` [PATCH 3/6] irqchip/irq-pruss-intc: Add support for shared and invalid interrupts Suman Anna
2019-07-08 3:52 ` [PATCH 4/6] irqchip/irq-pruss-intc: Add helper functions to configure internal mapping Suman Anna
2019-07-11 3:10 ` David Lechner
2019-07-11 22:09 ` David Lechner
2019-07-16 23:29 ` Suman Anna
2019-07-17 17:57 ` David Lechner
2019-07-17 19:04 ` Suman Anna
2019-07-08 3:52 ` [PATCH 5/6] irqchip/irq-pruss-intc: Add API to trigger a PRU sysevent Suman Anna
2019-07-11 20:40 ` David Lechner
2019-07-08 3:52 ` [PATCH 6/6] irqchip/irq-pruss-intc: Add support for ICSSG INTC on K3 SoCs Suman Anna
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=5241ecb9-4ab2-b01c-367c-38c554c056c4@lechnology.com \
--to=david@lechnology.com \
--cc=afd@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=m-karicheri2@ti.com \
--cc=marc.zyngier@arm.com \
--cc=nsekhar@ti.com \
--cc=robh+dt@kernel.org \
--cc=rogerq@ti.com \
--cc=s-anna@ti.com \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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).