From 9debc26bf3eb8832fc8fa43c1d9a91401b4ae6a1 Mon Sep 17 00:00:00 2001 From: Mao Jinlong Date: Tue, 9 Mar 2021 14:57:44 +0800 Subject: [PATCH] byte-cntr: Configure byte-cntr irq as a wake up irq Configure byte-cntr irq as a wake up irq to ensure that device can wake up from suspend when the etr data reaches to block_size. Change-Id: I526069e582329954cc65b5711645423356e4c69a Signed-off-by: Mao Jinlong --- drivers/hwtracing/coresight/coresight-byte-cntr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-byte-cntr.c b/drivers/hwtracing/coresight/coresight-byte-cntr.c index 3437741dbe9b..3ce6d1e99c12 100644 --- a/drivers/hwtracing/coresight/coresight-byte-cntr.c +++ b/drivers/hwtracing/coresight/coresight-byte-cntr.c @@ -233,6 +233,8 @@ static int tmc_etr_byte_cntr_release(struct inode *in, struct file *fp) if (byte_cntr_data->enable) coresight_csr_set_byte_cntr(byte_cntr_data->csr, 0); + + disable_irq_wake(byte_cntr_data->byte_cntr_irq); mutex_unlock(&byte_cntr_data->byte_cntr_lock); return 0; @@ -329,6 +331,7 @@ static int tmc_etr_byte_cntr_open(struct inode *in, struct file *fp) return -EINVAL; } + enable_irq_wake(byte_cntr_data->byte_cntr_irq); /* IRQ is a '8- byte' counter and to observe interrupt at * 'block_size' bytes of data */