From: adharmap@codeaurora.org (Abhijeet Dharmapurikar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] gic: Add set_type callback
Date: Wed, 27 Jan 2010 17:43:45 -0800 [thread overview]
Message-ID: <4B60EBD1.9020005@codeaurora.org> (raw)
In-Reply-To: <20100127231832.GF29665@n2100.arm.linux.org.uk>
Russell King - ARM Linux wrote:
> On Wed, Jan 27, 2010 at 11:32:27AM -0800, adharmap at codeaurora.org wrote:
>> + if (flow_type & (IRQ_TYPE_EDGE_RISING|IRQ_TYPE_EDGE_FALLING)) {
>> + reg_value |= (2<<bit_index);
>> + writel(reg_value, gic_dist_base(irq) + GIC_DIST_CONFIG
>> + + register_index);
>> + __set_irq_handler_unlocked(irq, handle_edge_irq);
>> + }
>> +
>> + if (flow_type & (IRQ_TYPE_LEVEL_HIGH|IRQ_TYPE_LEVEL_LOW)) {
>
> This is actually where things start to get rather sticky - because
> there may well be on-chip inverters between the GIC and external
> peripherals.
Actually the comment in gic_dist_init mentions about configuring SPI's
as level low when the GIC only supports level high. That suggests
presence of an inverter.
>
> Since the GIC can only sense one edge or one level depending on the
> hardware setup, it seems wrong to allow the configuration of both
> high and low levels, and both edges.
Agree, but this change at least lets us configure them as edge/level
triggered.
One solution (a rather easy one) is we simply reject LEVEL_LOW and
EDGE_FALLING and think as if the inverters belong to the peripherals
rather than the GIC.
Please suggest alternative implementation ideas.
next prev parent reply other threads:[~2010-01-28 1:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 19:32 [PATCH 0/5] Arm Gic Changes adharmap at codeaurora.org
2010-01-27 19:32 ` [PATCH 1/5] gic: prevent gic from crossing NR_IRQ adharmap at codeaurora.org
2010-01-27 22:43 ` Russell King - ARM Linux
2010-01-28 13:19 ` Catalin Marinas
2010-01-27 19:32 ` [PATCH 2/5] gic: add callback for mask_ack adharmap at codeaurora.org
2010-01-27 19:32 ` [PATCH 3/5] gic: Add set_type callback adharmap at codeaurora.org
2010-01-27 23:09 ` Russell King - ARM Linux
2010-01-27 23:18 ` Russell King - ARM Linux
2010-01-28 1:43 ` Abhijeet Dharmapurikar [this message]
2010-05-07 10:56 ` Linus Walleij
2010-01-27 19:32 ` [PATCH 4/5] gic: dont disable INT in ack callback adharmap at codeaurora.org
2010-01-27 19:32 ` [RFC PATCH 5/5] gic: initialize interrupts as per argument adharmap at codeaurora.org
2010-01-27 23:29 ` Russell King - ARM Linux
2010-01-28 0:39 ` [PATCH 0/5] Arm Gic Changes Ben Dooks
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=4B60EBD1.9020005@codeaurora.org \
--to=adharmap@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).