Re: [PATCH v6 06/36] nds32: Kernel booting and initialization
From: Arnd Bergmann <arnd@arndb.de>
Date: 2018-01-22 09:53:07
Also in:
linux-arch, linux-devicetree, linux-serial, lkml
From: Arnd Bergmann <arnd@arndb.de>
Date: 2018-01-22 09:53:07
Also in:
linux-arch, linux-devicetree, linux-serial, lkml
On Mon, Jan 22, 2018 at 10:49 AM, Greentime Hu [off-list ref] wrote:
2018-01-20 0:41 GMT+08:00 Arnd Bergmann [off-list ref]:
quoted
quoted
This implementation is referenced from openrisc. https://lkml.org/lkml/2017/11/17/228It's correct on openrisc, because that has a reliable cycle counter, and that gets used in its delay function: void __delay(unsigned long cycles) { cycles_t start = get_cycles(); while ((get_cycles() - start) < cycles) cpu_relax(); } In my review comment that you cited, I assumed that nds32 had similar hardware. However, as you explained earlier, the nds32 architecture does not provide a cycle counter and the clocksource resolution is not high enough to be a good replacement, so you have to use the traditional delay calibration.Hi, Arnd: Thank you for your explanation. Will it be ok if I code it like this? config GENERIC_CALIBRATE_DELAY def_bool y
Yes, I think that should be sufficient.
Arnd