On Tue, Apr 4, 2017 at 3:24 AM, Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> 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 -- 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