Re: [PATCH] watchdog: it87_wdt: add IT8782_ID

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

 



The specification says the default value of WDT Timeout Enable bit is 0 (enable);
maybe it's better to ensure the bit is set to 0 in case it was set to other values
before Linux boots.


On 16/10/9 23:11, Guenter Roeck wrote:
> On Sun, Oct 09, 2016 at 09:03:12PM +0800, Liu Qishuai wrote:
>> Updated patch to disabled CIR probing on IT878x chips. (IT8783 has this issue too)
>>
>> Signed-off-by: Liu Qishuai <lqs@xxxxxx>
>>
> 
> Looks better. One question - on IT8782, bit 7 of the control register (LDN 7,
> 0x71) is defined as "WDT Timeout Enable(WTE)". Setting the bit to 1 disables
> the timeout.
> 
> Does this bit have to be cleared to 0 for the watchdog to work ?
> 
> Thanks,
> Guenter
> 
>>
>> diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c
>> index e54839b..a911cae 100644
>> --- a/drivers/watchdog/it87_wdt.c
>> +++ b/drivers/watchdog/it87_wdt.c
>> @@ -13,7 +13,7 @@
>>   *
>>   *	Support of the watchdog timers, which are available on
>>   *	IT8702, IT8712, IT8716, IT8718, IT8720, IT8721, IT8726,
>> - *	IT8728 and IT8783.
>> + *	IT8728, IT8782 and IT8783.
>>   *
>>   *	This program is free software; you can redistribute it and/or
>>   *	modify it under the terms of the GNU General Public License
>> @@ -87,6 +87,7 @@
>>  #define IT8721_ID	0x8721
>>  #define IT8726_ID	0x8726	/* the data sheet suggest wrongly 0x8716 */
>>  #define IT8728_ID	0x8728
>> +#define IT8782_ID	0x8782
>>  #define IT8783_ID	0x8783
>>
>>  /* GPIO Configuration Registers LDN=0x07 */
>> @@ -606,6 +607,7 @@ static int __init it87_wdt_init(void)
>>  {
>>  	int rc = 0;
>>  	int try_gameport = !nogameport;
>> +	int try_cir = !nocir;
>>  	u8  chip_rev;
>>  	int gp_rreq_fail = 0;
>>
>> @@ -634,9 +636,14 @@ static int __init it87_wdt_init(void)
>>  	case IT8720_ID:
>>  	case IT8721_ID:
>>  	case IT8728_ID:
>> +		max_units = 65535;
>> +		try_gameport = 0;
>> +		break;
>> +	case IT8782_ID:
>>  	case IT8783_ID:
>>  		max_units = 65535;
>>  		try_gameport = 0;
>> +		try_cir = 0;
>>  		break;
>>  	case IT8705_ID:
>>  		pr_err("Unsupported Chip found, Chip %04x Revision %02x\n",
>> @@ -676,7 +683,7 @@ static int __init it87_wdt_init(void)
>>  	}
>>
>>  	/* If we haven't Gameport support, try to get CIR support */
>> -	if (!nocir && !test_bit(WDTS_USE_GP, &wdt_status)) {
>> +	if (try_cir && !test_bit(WDTS_USE_GP, &wdt_status)) {
>>  		if (!request_region(CIR_BASE, 8, WATCHDOG_NAME)) {
>>  			if (gp_rreq_fail)
>>  				pr_err("I/O Address 0x%04x and 0x%04x already in use\n",
--
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