[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [Patch] Generalize wdt.h by removing hardcoded device
From: |
Senthil Kumar Selvaraj |
Subject: |
Re: [avr-libc-dev] [Patch] Generalize wdt.h by removing hardcoded device names |
Date: |
Sun, 19 Oct 2014 14:17:28 +0530 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Oct 14, 2014 at 03:35:44PM +0530, Senthil Kumar Selvaraj wrote:
> On Sat, Oct 11, 2014 at 10:35:45AM +0200, Joerg Wunsch wrote:
> > As Senthil Kumar Selvaraj wrote:
> >
> > > The attached patch to wdt.h gets rid of the huge device specific
> > > conditional branches for wdt_enable and wdt_disable.
> >
> > That's cool. The current state of affairs used to be a continued
> > cause for being forgotten upon adding a new devices.
> >
> > > I do see bigger code at -O0 though. Is that an acceptable tradeoff?
> >
> > For wdt_enable/wdt_disable, yes, it is. Only wdt_reset() must be
> > kept as short as possible, but as this translates directly into
> > one assembly instruction, that's not an issue.
> Ok.
>
> I've recreated the patch with s/inline/__inline__,
> s/always_inline/__always_inline__ and a const declaration for the
> wdt_enable parameter.
>
> Could someone please apply the patch? I don't have commit access.
>
> Regards
> Senthil
>
> ChangeLog
>
> 2014-10-06 Senthil Kumar Selvaraj <address@hidden>
> Georg-Johann Lay <address@hidden>
>
> * include/avr/wdt.h: Generalize implementation of wdt_enable and
> wdt_disable based on arch and addressability of _WD_CONTROL_REG.
>
Committed as rev #2454.
Regards
Senthil