From 7fb517898f69ea008077297617e1035827e29417 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Mon, 27 Nov 2017 15:49:04 +1100 Subject: lpc: Clear pending IRQs at boot When we come in from hostboot the LPC master has the bus reset indicator set. This error isn't handled until the host kernel unmasks interrupts, at which point we get the following suprious error: [ 20.053560375,3] LPC: Got LPC reset on chip 0x0 ! [ 20.053564560,3] LPC[000]: Unknown LPC error Error address reg: 0x00000000 Fix this by clearing the various error bits in the LPC status register before we initalise the skiboot LPC bus driver. Signed-off-by: Oliver O'Halloran Signed-off-by: Stewart Smith --- hw/lpc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hw/lpc.c') diff --git a/hw/lpc.c b/hw/lpc.c index 663bffb..dbb2d4b 100644 --- a/hw/lpc.c +++ b/hw/lpc.c @@ -1176,6 +1176,10 @@ static void lpc_init_chip_p9(struct dt_node *opb_node) /* Mask all interrupts for now */ opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQMASK, 0, 4); + /* Clear any stale LPC bus errors */ + opb_write(lpc, lpc_reg_opb_base + LPC_HC_IRQSTAT, + LPC_HC_IRQ_BASE_IRQS, 4); + /* Default with routing to PSI SerIRQ 0, this will be updated * later when interrupts are initialized. */ -- cgit v1.1