Commit 137edc02 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mauro Carvalho Chehab

[media] rc: meson-ir: use readl_relaxed in the interrupt handler

We don't need the memory barriers here and an interrupt handler should
be as fast as possible. Therefore switch to readl_relaxed.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 705aa578
...@@ -85,16 +85,17 @@ static void meson_ir_set_mask(struct meson_ir *ir, unsigned int reg, ...@@ -85,16 +85,17 @@ static void meson_ir_set_mask(struct meson_ir *ir, unsigned int reg,
static irqreturn_t meson_ir_irq(int irqno, void *dev_id) static irqreturn_t meson_ir_irq(int irqno, void *dev_id)
{ {
struct meson_ir *ir = dev_id; struct meson_ir *ir = dev_id;
u32 duration; u32 duration, status;
DEFINE_IR_RAW_EVENT(rawir); DEFINE_IR_RAW_EVENT(rawir);
spin_lock(&ir->lock); spin_lock(&ir->lock);
duration = readl(ir->reg + IR_DEC_REG1); duration = readl_relaxed(ir->reg + IR_DEC_REG1);
duration = FIELD_GET(REG1_TIME_IV_MASK, duration); duration = FIELD_GET(REG1_TIME_IV_MASK, duration);
rawir.duration = US_TO_NS(duration * MESON_TRATE); rawir.duration = US_TO_NS(duration * MESON_TRATE);
rawir.pulse = !!(readl(ir->reg + IR_DEC_STATUS) & STATUS_IR_DEC_IN); status = readl_relaxed(ir->reg + IR_DEC_STATUS);
rawir.pulse = !!(status & STATUS_IR_DEC_IN);
ir_raw_event_store_with_filter(ir->rc, &rawir); ir_raw_event_store_with_filter(ir->rc, &rawir);
ir_raw_event_handle(ir->rc); ir_raw_event_handle(ir->rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment