Re: [PATCH] [v2] watchdog: introduce the ARM64 SBSA watchdog driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux