[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cfa73eee-8ba9-89f2-b218-886ab226a6da@microchip.com>
Date: Thu, 7 Nov 2019 17:10:45 +0000
From: <Eugen.Hristev@...rochip.com>
To: <linux@...ck-us.net>
CC: <wim@...ux-watchdog.org>, <robh+dt@...nel.org>,
<Nicolas.Ferre@...rochip.com>, <alexandre.belloni@...tlin.com>,
<linux-watchdog@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] watchdog: sama5d4_wdt: addition of sam9x60
compatible watchdog
On 07.11.2019 18:41, Guenter Roeck wrote:
> On Thu, Nov 07, 2019 at 12:51:15PM +0000, Eugen.Hristev@...rochip.com wrote:
>>
>>>>
>>>> - if ((wdt->mr & AT91_WDT_WDFIEN) && irq) {
>>>> + irq = irq_of_parse_and_map(dev->of_node, 0);
>>>> + if (!irq) {
>>>> + dev_warn(dev, "failed to get IRQ from DT\n");
>>>> + wdt->need_irq = 0;
>>>
>>> Does it make sense to ignore that ?
>>
>> Hi Guenter,
>>
>> Can you detail what exactly is ignored ?
>>
> The missing interrupt.
Hi,
The interrupt is not mandatory for the work of the watchdog. So, if it's
not available, we must act accordingly: just configure watchdog to reset
the CPU.
If we have an IRQ, we can then act in the 'software-style' watchdog:
trigger an IRQ first and try to allow the system to a safe reboot.
So , it's not ignoring, it's acting accordingly (later on, do not enable
anything irq-related )
>
>>>> +static struct sama5d4_wdt_data sama5d4_config;
>>>> +
>>>> +static struct sama5d4_wdt_data sam9x60_config = {
>>>> + .sam9x60_support = 1,
>>>> +};
>>>
>>> Unless there is reason to believe that there will be other
>>> configuration data, please just assign the flag value directly
>>> to .data and add a variable to struct sama5d4_wdt to access it.
>>> Please make that variable a bool.
>>
>> There will be more configuration data for future products, but not at
>> this moment. Do the change or keep it this way ?
>>
> If not as part of this series, it is better to just assign
> the flag directly. If there are changes coming at a later time
> which indeed need a structure (with more than one object in it),
> that structure can be added at that time.
Ok, I will change it in next version.
Thanks,
Eugen
>
> Guenter
>
>
Powered by blists - more mailing lists