diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-07-17 11:32:54 +0930 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-07-17 01:13:16 -0500 |
commit | 1d8793c64b596cfdcc3cf6035a3b4cbe3c341ae9 (patch) | |
tree | 79e5822309463faa9d7763799fe2eb1875a05988 /hw/lpc.c | |
parent | ebc8524a3a457f73083d984296bfd797940a711c (diff) | |
download | skiboot-1d8793c64b596cfdcc3cf6035a3b4cbe3c341ae9.zip skiboot-1d8793c64b596cfdcc3cf6035a3b4cbe3c341ae9.tar.gz skiboot-1d8793c64b596cfdcc3cf6035a3b4cbe3c341ae9.tar.bz2 |
lpc: Silence LPC SYNC no-response error when necessary
Add the ability to silence particular errors from the LPC bus when they
can be expected, particularly:
LPC[000]: Got SYNC no-response error. Error address reg: 0xd001002f
This is necessary on platform exit on some astbmc machines to avoid
unnecessary noise in the msglog.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/lpc.c')
-rw-r--r-- | hw/lpc.c | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -891,6 +891,20 @@ static void lpc_dispatch_reset(struct lpcm *lpc) lpc_setup_serirq(lpc); } +uint32_t lpc_irq_err_mask; + +void lpc_irq_err_mask_sync_no_response(void) +{ + lpc_irq_err_mask |= LPC_HC_IRQ_SYNC_NORESP_ERR; + lwsync(); +} + +static void lpc_irq_err_mask_reset(void) +{ + lpc_irq_err_mask = 0; + lwsync(); +} + static void lpc_dispatch_err_irqs(struct lpcm *lpc, uint32_t irqs) { const char *sync_err = "Unknown LPC error"; @@ -911,8 +925,12 @@ static void lpc_dispatch_err_irqs(struct lpcm *lpc, uint32_t irqs) lpc_dispatch_reset(lpc); if (irqs & LPC_HC_IRQ_SYNC_ABNORM_ERR) sync_err = "Got SYNC abnormal error."; - if (irqs & LPC_HC_IRQ_SYNC_NORESP_ERR) + if (irqs & LPC_HC_IRQ_SYNC_NORESP_ERR) { + if (lpc_irq_err_mask & LPC_HC_IRQ_SYNC_NORESP_ERR) + goto done; + sync_err = "Got SYNC no-response error."; + } if (irqs & LPC_HC_IRQ_SYNC_NORM_ERR) sync_err = "Got SYNC normal error."; if (irqs & LPC_HC_IRQ_SYNC_TIMEOUT_ERR) @@ -940,6 +958,9 @@ static void lpc_dispatch_err_irqs(struct lpcm *lpc, uint32_t irqs) log_simple_error(info, "LPC[%03x]: %s Error address reg: " "0x%08x\n", lpc->chip_id, sync_err, err_addr); + +done: + lpc_irq_err_mask_reset(); } static void lpc_dispatch_ser_irqs(struct lpcm *lpc, uint32_t irqs, |