mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
ACPI/IRQ: Add interrupt mode to IRQ connection
Read flags (polarity/trigger) from MADT and add information to 'Irq_connection' arguments. Issue #390
This commit is contained in:
committed by
Norman Feske
parent
4a1b545770
commit
ff0c7825e4
@ -24,13 +24,17 @@ namespace Genode {
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* \param irq physical interrupt number
|
||||
* \param irq physical interrupt number
|
||||
* \param trigger interrupt trigger (e.g., level/edge)
|
||||
* \param polarity interrupt trigger polarity (e.g., low/high)
|
||||
*/
|
||||
Irq_connection(unsigned irq)
|
||||
Irq_connection(unsigned irq,
|
||||
Irq_session::Trigger trigger = Irq_session::TRIGGER_UNCHANGED,
|
||||
Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED)
|
||||
:
|
||||
Connection<Irq_session>(
|
||||
session("ram_quota=4K, irq_number=%u", irq)),
|
||||
|
||||
session("ram_quota=4K, irq_number=%u, irq_trigger=%u, irq_polarity=%u",
|
||||
irq, trigger, polarity)),
|
||||
Irq_session_client(cap())
|
||||
{ }
|
||||
};
|
||||
|
@ -28,6 +28,17 @@ namespace Genode {
|
||||
|
||||
struct Irq_session : Session
|
||||
{
|
||||
|
||||
/**
|
||||
* Interrupt trigger
|
||||
*/
|
||||
enum Trigger { TRIGGER_UNCHANGED = 0, TRIGGER_LEVEL, TRIGGER_EDGE };
|
||||
|
||||
/**
|
||||
* Interrupt trigger polarity
|
||||
*/
|
||||
enum Polarity { POLARITY_UNCHANGED = 0, POLARITY_HIGH, POLARITY_LOW };
|
||||
|
||||
static const char *service_name() { return "IRQ"; }
|
||||
|
||||
virtual ~Irq_session() { }
|
||||
|
Reference in New Issue
Block a user