[PATCH 2/4] watchdog: orion: Use the reference clock on Armada 375 SoC
Andrew Lunn
andrew at lunn.ch
Wed Oct 22 16:59:00 PDT 2014
On Wed, Oct 22, 2014 at 07:41:27PM -0300, Ezequiel Garcia wrote:
> On 10/22/2014 11:02 AM, Andrew Lunn wrote:
> > On Wed, Oct 22, 2014 at 10:34:42AM -0300, Ezequiel Garcia wrote:
> >> The 25 MHz reference clock has better stability so its use is preferred over the
> >> core clock. Changes the Armada 375 clock initialization to use this reference
> >> clock. To ensure the driver is compatible with an old devicetree, also provide
> >> a fallback path which will silently return to the previous behavior.
> >
> > Hi Ezequiel
> >
> > There is now quite a lot of code in orion_wdt.c which is not relevant
> > to Orion5x and Kirkwood. Would it be possible to put some of it inside
> > a #ifdef MACH_MVEBU_V7?
> >
>
> Hum.. I found ifdefs scary, so I tend to avoid them if at all possible.
> Just did a quick hack enclosing all the armada-xxx stuff around #if 0
> and here's the result:
>
> $ ./scripts/bloat-o-meter ~/linux/.builds/mvebu_v7/drivers/watchdog/orion_wdt.o ~/linux/.builds/orion5x/drivers/watchdog/orion_wdt.o
> add/remove: 0/0 grow/shrink: 1/4 up/down: 12/-80 (-68)
> function old new delta
> orion_wdt_probe 732 744 +12
> orion_wdt_get_timeleft 44 40 -4
> orion_enabled 68 60 -8
> orion_start 120 88 -32
> orion_wdt_ping 80 44 -36
Hi Ezequiel
I did a similar test:
size drivers/watchdog/orion_wdt.o-*
text data bss dec hex filename
4428 100 1 4529 11b1 drivers/watchdog/orion_wdt.o-full-fat
2324 100 1 2425 979 drivers/watchdog/orion_wdt.o-skimmed
So for v5 kirkwood/orion5x, there is about 90% overhead from the v7
code, in the text section. This is for -rc1 code, before adding any
more v7 code in this patchset.
I don't think the #ifdef's look that scary.
Andrew
More information about the linux-arm-kernel
mailing list