linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Write to memory-mapped register has actually reached the device
@ 2015-07-22 14:46 Mason
  0 siblings, 0 replies; only message in thread
From: Mason @ 2015-07-22 14:46 UTC (permalink / raw)
  To: linux-arm-kernel

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-22 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 14:46 Write to memory-mapped register has actually reached the device Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).