On Thursday 14 May 2015 11:52:33 Timur Tabi wrote:
+static int arm_sbsa_wdt_set_timeout(struct watchdog_device *wdev,
unsigned int timeout)
+{
struct arm_sbsa_watchdog_data *data =
container_of(wdev, struct arm_sbsa_watchdog_data, wdev);
uint32_t wor;
wdev->timeout = timeout;
wor = arch_timer_get_cntfrq() * wdev->timeout;
writel(cpu_to_le32(wor), &data->control->wor);
Why the double endianess swap? Are the registers defined to be CPU-endian?
You probably mean le32_to_cpu() here, not the other way round, although the effect is the same.
Arnd