Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752661AbbKWPCz (ORCPT ); Mon, 23 Nov 2015 10:02:55 -0500 Received: from arrakis.dune.hu ([78.24.191.176]:44652 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751408AbbKWPCx (ORCPT ); Mon, 23 Nov 2015 10:02:53 -0500 MIME-Version: 1.0 In-Reply-To: <5651CC3C.5090200@simon.arlott.org.uk> References: <5650BFD6.5030700@simon.arlott.org.uk> <5650C08C.6090300@simon.arlott.org.uk> <5650E2FA.6090408@roeck-us.net> <5650E5BB.6020404@simon.arlott.org.uk> <56512937.6030903@roeck-us.net> <5651CB13.4090704@simon.arlott.org.uk> <5651CC3C.5090200@simon.arlott.org.uk> From: Jonas Gorski Date: Mon, 23 Nov 2015 16:02:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 6/10] watchdog: bcm63xx_wdt: Obtain watchdog clock HZ from "periph" clk To: Simon Arlott Cc: Guenter Roeck , "devicetree@vger.kernel.org" , Ralf Baechle , Thomas Gleixner , Jason Cooper , Marc Zyngier , Kevin Cernekee , Florian Fainelli , Wim Van Sebroeck , Maxime Bizon , Linux Kernel Mailing List , MIPS Mailing List , linux-watchdog@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1561 Lines: 45 Hi, On Sun, Nov 22, 2015 at 3:07 PM, Simon Arlott wrote: > Instead of using a fixed clock HZ in the driver, obtain it from the > "periph" clk that the watchdog timer uses. > > Signed-off-by: Simon Arlott > --- > drivers/watchdog/bcm63xx_wdt.c | 36 +++++++++++++++++++++++++++++++----- > 1 file changed, 31 insertions(+), 5 deletions(-) > > diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c > index 1d2a501..eb5e551 100644 > --- a/drivers/watchdog/bcm63xx_wdt.c > +++ b/drivers/watchdog/bcm63xx_wdt.c > @@ -13,6 +13,7 @@ > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > +#include > #include > #include > #include > @@ -32,11 +33,13 @@ > > #define PFX KBUILD_MODNAME > > -#define WDT_HZ 50000000 /* Fclk */ > +#define WDT_CLK_NAME "periph" @Florian: Is this correct? The comment for the watchdog in 6358_map_part.h and earlier claims that the clock is 40 MHz there, but the code uses 50MHz - is this a bug in the comments or is it a bug taken over from the original broadcom code? I'm sure that the periph clock being 50 MHz even on the older chips is correct, else we'd have noticed that in serial output (where it's also used). Jonas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/