aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint/lp_gpio.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-05-24 11:06:49 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-11-25 23:38:36 +0100
commitc593999a0ad9b9f19c8171f6229faa191d055491 (patch)
tree0759809b866a346d98870803a6ad5aceb4905149 /src/southbridge/intel/lynxpoint/lp_gpio.h
parent7820c77f2c118d604d0acfce8deb40536cae3121 (diff)
lynxpoint: Enable extra 16 IOAPIC entries for GPIO PIRQ
LynxPoint-LP has an additional 16 entries in the IOAPIC that can be assigned to specific GPIOs when they are configured as PIRQ. The maximum redirection entries field in the IOAPIC needs to be set to 0x27 when this is enabled. Additionally specific GPIOs need to be routed to PIRQ so they interrupt via the IOAPIC instead of the GPIO IRQ 14/15. Change-Id: Ie587e1d203422ff6fb7fc5056d20a5ae66720991 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56620 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/4203 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/southbridge/intel/lynxpoint/lp_gpio.h')
-rw-r--r--src/southbridge/intel/lynxpoint/lp_gpio.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/southbridge/intel/lynxpoint/lp_gpio.h b/src/southbridge/intel/lynxpoint/lp_gpio.h
index d9927dc975..f1b2717423 100644
--- a/src/southbridge/intel/lynxpoint/lp_gpio.h
+++ b/src/southbridge/intel/lynxpoint/lp_gpio.h
@@ -93,6 +93,11 @@
#define GPIO_RESET_PWROK 0
#define GPIO_RESET_RSMRST 1
+/* pirq route to io-apic */
+
+#define GPIO_PIRQ_APIC_MASK 0
+#define GPIO_PIRQ_APIC_ROUTE 1
+
#define LP_GPIO_END \
{ .conf0 = GPIO_LIST_END }
@@ -128,6 +133,11 @@
.owner = GPIO_OWNER_GPIO, \
.irqen = GPIO_IRQ_ENABLE }
+#define LP_GPIO_PIRQ \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT, \
+ .owner = GPIO_OWNER_GPIO, \
+ .pirq = GPIO_PIRQ_APIC_ROUTE }
+
#define LP_GPIO_OUT_HIGH \
{ .conf0 = GPIO_MODE_GPIO | GPIO_DIR_OUTPUT | GPO_LEVEL_HIGH, \
.owner = GPIO_OWNER_GPIO, \
@@ -147,6 +157,7 @@ struct pch_lp_gpio_map {
u8 irqen;
u8 reset;
u8 blink;
+ u8 pirq;
} __attribute__ ((packed));
/* Configure GPIOs with mainboard provided settings */