* Where to define platform-specific ndelay
@ 2015-07-16 12:41 Mason
0 siblings, 0 replies; only message in thread
From: Mason @ 2015-07-16 12:41 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
arch/arm64 defines ndelay, but arch/arm does not.
With my current setup, ndelay resolves to the generic implementation
from include/linux/delay.h
#ifndef ndelay
static inline void ndelay(unsigned long x)
{
udelay(DIV_ROUND_UP(x, 1000));
}
#define ndelay(x) ndelay(x)
#endif
I want to provide a different implementation for my platform.
Something along the lines of
#define NDELAY_MULT ((2199 * HZ) >> 11)
#define ndelay(n) __const_udelay((n) * NDELAY_MULT)
Where should I put these definitions?
(I don't want to pollute the generic namespace, so it should
probably go inside platform-specific files, such as perhaps
mach-foo/include/mach/timex.h ??)
Although, I'm not sure how it would be supposed to work
with CONFIG_ARCH_MULTIPLATFORM (which is the default, IIUC?)
Regards.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-16 12:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 12:41 Where to define platform-specific ndelay 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).