Skip to content

Commit

Permalink
lpc: Enable "new" SerIRQ mode
Browse files Browse the repository at this point in the history
So we don't have to clear the bits on EOI manually. This
works in conjunction with the DD2 test in psi.c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Jun 26, 2017
1 parent 0fe0b6f commit b0db1d7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hw/lpc.c
Expand Up @@ -94,6 +94,7 @@ DEFINE_LOG_ENTRY(OPAL_RC_LPC_SYNC_PERF, OPAL_PLATFORM_ERR_EVT, OPAL_LPC,
#define LPC_HC_IRQSER_START_4CLK 0x00000000
#define LPC_HC_IRQSER_START_6CLK 0x01000000
#define LPC_HC_IRQSER_START_8CLK 0x02000000
#define LPC_HC_IRQSER_AUTO_CLEAR 0x00800000
#define LPC_HC_IRQMASK 0x34 /* same bit defs as LPC_HC_IRQSTAT */
#define LPC_HC_IRQSTAT 0x38
#define LPC_HC_IRQ_SERIRQ0 0x80000000u /* all bits down to ... */
Expand Down Expand Up @@ -621,7 +622,14 @@ static void lpc_setup_serirq(struct lpcm *lpc)
/* Check whether we should enable serirq */
if (mask & LPC_HC_IRQ_SERIRQ_ALL) {
rc = opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQSER_CTRL,
LPC_HC_IRQSER_EN | LPC_HC_IRQSER_START_4CLK, 4);
LPC_HC_IRQSER_EN |
LPC_HC_IRQSER_START_4CLK |
/*
* New mode bit for P9N DD2.0 (ignored otherwise)
* when set we no longer have to manually clear
* the SerIRQs on EOI.
*/
LPC_HC_IRQSER_AUTO_CLEAR, 4);
DBG_IRQ("LPC: SerIRQ enabled\n");
} else {
rc = opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQSER_CTRL,
Expand Down

0 comments on commit b0db1d7

Please sign in to comment.