lkml.org 
[lkml]   [2017]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 3/6] watchdog: iTCO_wdt: Add PMC specific noreboot update api
On Tue, Apr 4, 2017 at 3:24 AM, Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
> In some SoCs, setting noreboot bit needs modification to
> PMC GC registers. But not all PMC drivers allow other drivers
> to memory map their GC region. This could create mem request
> conflict in watchdog driver. So this patch adds facility to allow
> PMC drivers to pass noreboot update function to watchdog
> drivers via platform data.

> /* Set the NO_REBOOT bit: this disables reboots */
> if (p->iTCO_version >= 2) {
> - val32 = readl(p->gcs_pmc);
> - val32 |= no_reboot_bit(p);
> - writel(val32, p->gcs_pmc);
> + if (p->update_noreboot_flag)
> + p->update_noreboot_flag(true);
> + else {
> + val32 = readl(p->gcs_pmc);
> + val32 |= no_reboot_bit(p);
> + writel(val32, p->gcs_pmc);
> + }

What I meant is to introduce helper(s) first and then fix this. Yes, I
understand it might increase work for backporting (if even needed),
but I still think it worth doing.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-04-04 15:49    [W:0.102 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site