On Sun, Oct 03, 2010 at 11:21:42AM +0200, Mike Hommey wrote:
> On Sun, Oct 03, 2010 at 01:33:23AM +0200, Giel van Schijndel wrote:
>> On Sun, Oct 03, 2010 at 01:14:24AM +0200, Giel van Schijndel wrote:
>>> On Sat, Oct 02, 2010 at 08:42:19PM +0100, Ben Hutchings wrote:
>>>> On Tue, 2010-09-28 at 10:36 +0200, Mike Hommey wrote:
>>>>> I would also be interested in the watchdog support for the same
>>>>> chip,
>>>
>>> That patch does *not* add watchdog support for the Fintek F71889FG
>>> chip, it *only* adds support for the F71808E and the F71882FG.
>>> Additionally a patch for the F71862FG is currently pending review
>>> and inclusion.
>>>
>>> That being said, this driver should be fairly easy to expand to
>>> include support for the F71889FG chip (AFAIK only pin-configuration
>>> should be added, which probably is just a datasheet-reading
>>> exercise). Adding support however would be something I'd suggest
>>> doing across the LKML *first*, then (optionally) backport it later.
>>
>> Heck I gave it a try and attached you'll find a patch to add F71889FG
>> support to the current f71808e_wdt watchdog driver. The reason I
>> haven't send this to the LKML before however, is that I don't have
>> any system with that chip to test it, so please do test it and tell
>> me the results.
>
> I gave a try to your patch, on top of the other ones.
>
> For the kernel team, please note that some of the patches don't apply
> cleanly on 2.6.32, because of some changes in context (mostly
> coding-style changes) that apparently happened between 2.6.32 and the
> various patches landing. I manually edited the patches to make them
> apply properly, please ping me if you want the modified versions. The
> configs also need to be modified to include CONFIG_F71808E_WDT=m.
For the patches cherry-picking 729d273a, 8b6d043 and 96cb4eb (in that
order) will do. 8b6d043 will probably cause a merge-conflict, just
ditch IORESOURCE_WINDOW and you should be able to finish that
cherry-pick.
> Still for the kernel team, applying the release_mutex_region patch
> makes the ABI check script barf with the following changes:
> __devm_release_region module: vmlinux,
> version: 0x969a2a91 -> 0x70191467, export: EXPORT_SYMBOL
> __devm_request_region module: vmlinux,
> version: 0x51144912 -> 0x9e7acb57, export: EXPORT_SYMBOL
> For Giel, it appears the watchdog driver doesn't entirely work:
> It loads fine:
> f71808e_wdt: Found f71889fg watchdog chip, revision 21
> But watchdog-test (as from Documentation/watchdog/src/watchdog-test.c)
> doesn't work and outputs:
> Watchdog device not enabled.
> stracing it shows this:
> open("/dev/watchdog", O_WRONLY) = -1 ENODEV (No such
> device)
Right, it seems that I forgot a single break-statement (causing the
driver to fall through to the undetected part). Attached patch has this
fixed and should work properly.
--
Giel
--
"When all you have is a hammer, everything starts to look like a nail."
-- Abraham Maslow
From c8d5d90e182739da8e5f4ff9ff0163ddde9c66cd Mon Sep 17 00:00:00 2001 From: Giel van Schijndel <me@mortis.eu> Date: Sun, 3 Oct 2010 01:29:17 +0200 Subject: [PATCH] watchdog: f71808e_wdt: add support for the F71889FG --- drivers/watchdog/f71808e_wdt.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 7e5c266..65e5796 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -308,6 +308,12 @@ static int watchdog_start(void) superio_set_bit(watchdog.sioaddr, 0x29, 1); break; + case f71889fg: + /* set pin 40 to WDTRST# */ + superio_outb(watchdog.sioaddr, 0x2b, + superio_inb(watchdog.sioaddr, 0x2b) & 0xcf); + break; + default: /* * 'default' label to shut up the compiler and catch @@ -708,8 +714,10 @@ static int __init f71808e_find(int sioaddr) case SIO_F71882_ID: watchdog.type = f71882fg; break; - case SIO_F71862_ID: case SIO_F71889_ID: + watchdog.type = f71889fg; + break; + case SIO_F71862_ID: /* These have a watchdog, though it isn't implemented (yet). */ err = -ENOSYS; goto exit; -- 1.6.4.4
Attachment:
signature.asc
Description: Digital signature