[<prev] [next>] [day] [month] [year] [list]
Message-ID: <55AFACAF.7020004@free.fr>
Date: Wed, 22 Jul 2015 16:46:07 +0200
From: Mason <slash.tmp@...e.fr>
To: Linux ARM <linux-arm-kernel@...ts.infradead.org>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: Write to memory-mapped register has actually reached the device
Hello everyone,
I'm using an ARMv7 platform (Cortex A9).
The hardware designer said something that confused me: he said
that when a driver writes to a device memory-mapped register,
there is no way to "know" when the write has actually reached
the device, other than to read the value back.
I had been using this kind of code:
static void __iomem *device_base;
device_base = ioremap(DEVICE_ADDR, RANGE);
writel_relaxed(val, device_base + N);
The situation where he said this would bite me is:
write to a device register to clear an interrupt notification
unmask interrupts
The interrupt might fire because the interrupt bit has
not been cleared yet. Does that make any sense?
Should I use writel instead of writel_relaxed in that
situation? Do I really have to read-after-write?
Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists