Received: by 10.223.185.116 with SMTP id b49csp5304180wrg; Wed, 7 Mar 2018 09:30:23 -0800 (PST) X-Google-Smtp-Source: AG47ELsvwUuu12YomFdlSHDYEleePEuKyQPjveHueEIUrsEODBh2UJA8aRJIXn+bIzqwZycahAqY X-Received: by 10.98.9.130 with SMTP id 2mr23401380pfj.149.1520443823211; Wed, 07 Mar 2018 09:30:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520443823; cv=none; d=google.com; s=arc-20160816; b=hgv5CHnAaxDfpanqYOsNnNaceRLfEezoa4jB1A9UYkkqnymfVBrIUL7orpeCfgbOpr iSkiC7Rl5k1VXu1OJLjysVHiBRc2qmwyg0Zwm45TUDGbfIfiHv5zl1xDvdlK+ipuFMM6 3mR1rVo6/rZmdhN07OJN5reI1CkfzXbA+IQt+upkHiPGDKXFbp530u/FI2WivZqiSBKL gLMH6oJSkrI81U1fqWoku/zbqU5jF6w/OiA587Djlx5O7EQVKGad8EM0oq0ieXobpO2I zPeIuQ3DNNvrcwcaIPq72sQQnjmOhwynH8awen1cuL7DLW1ywdML8WFi36jh9bVX8aXZ 1glg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=LzEImWxlTrETwptTyVO06xl+YgX/mf5jaUz+noHKN94=; b=znZtaCGiDBLUZB35HMd7T/gk3hyZOXn6rHHuDq503a0A9VBNyj5JlGiIMYia0nzHwI pty5ne5WbvZpwD07lP17vmQ5TfjDlK2Ex/xyGpGd3O/ZOPI7TxFw2HcybUG4ND4twJ8Y OpfFBMKFXOMVOH9+4y8wyuvBm8hp6S9vqgC6uVcOqPZLdzvM/ZFbow8eqLyPPpXLI5IC KaT7zosUl+uJP0iSM8NThg2AH356JVYqxsW57rvpOF7emXDG/u1UHhGt0qAA62EM2AoP MdFGQ1bxuVBZX6eLQy5J/n/OldEXTr4ErZR6KSvHqkSvEj0DxZyO9iQDZxDmrYsA/ysD 659w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fPfzsOj0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13si14026217pfa.294.2018.03.07.09.30.07; Wed, 07 Mar 2018 09:30:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fPfzsOj0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933968AbeCGR23 (ORCPT + 99 others); Wed, 7 Mar 2018 12:28:29 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34585 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933903AbeCGR2Y (ORCPT ); Wed, 7 Mar 2018 12:28:24 -0500 Received: by mail-wr0-f194.google.com with SMTP id o8so3003680wra.1 for ; Wed, 07 Mar 2018 09:28:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LzEImWxlTrETwptTyVO06xl+YgX/mf5jaUz+noHKN94=; b=fPfzsOj0x/G7SfP2xqxRpJEBrGE2wlV52An/FZavUfXRNVP23R8nM9XgivrUV4cOYz SXUXLMoumyzva7743r8y5ol+m3c788FvEt95AAfKevQ0QS7UirM8kSdep9aSV49fulxf PG5lMJboHmCT9XDU4vD4gClAeDI+pQBWUxoVM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LzEImWxlTrETwptTyVO06xl+YgX/mf5jaUz+noHKN94=; b=iDvM8A6b67F+ACs2NgSrt5kLEiJpdctNn2FQYtmtE36PDpIrsron5omSKRfrRTnx53 o0eY4K5LSjuuubIX8mxW2ugImjtqG9w1MTqVnXim6ZLP/TMpDqtrQFJeA5XNApNSSqi4 Dt5Gg8Fyb17xv6ETvh5iFZwwyrQ3EOMOZb2JuloW1Api1wYBN9lsfZL1yHEtETVD228y qZVi55s5cCqR11D7ESRpAWU/NupCnXcptiex3m5WrdkatfmNouAtX9tHcgm0OxaHCfDN 2rKhGEXEIQlwe2oEnAS+ueQlodYpSrDOrvjkL9/kphu0EtZM8UzumXYz5fg5EctKchsG XmGQ== X-Gm-Message-State: APf1xPBwIeXNz4kXYsGcNJoJL/+8OTv+htqPy0iID/xgb2E/PnlrZ+OD WHHg/eAi93/5Y8WbohlsLhL84g== X-Received: by 10.223.152.228 with SMTP id w91mr18863639wrb.74.1520443703148; Wed, 07 Mar 2018 09:28:23 -0800 (PST) Received: from [192.168.1.75] (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.googlemail.com with ESMTPSA id 1sm5608166wmj.35.2018.03.07.09.28.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Mar 2018 09:28:22 -0800 (PST) Subject: Re: [PATCH v4 2/2] clocksource: npcm: add NPCM7xx timer driver To: Tomer Maimon , robh+dt@kernel.org, mark.rutland@arm.com, tglx@linutronix.de, avifishman70@gmail.com, brendanhiggins@google.com, joel@jms.id.au Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org References: <1519655769-25836-1-git-send-email-tmaimon77@gmail.com> <1519655769-25836-3-git-send-email-tmaimon77@gmail.com> From: Daniel Lezcano Message-ID: Date: Wed, 7 Mar 2018 18:28:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1519655769-25836-3-git-send-email-tmaimon77@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tomer, change the subject to: clocksource/drivers/npcm: Add NPCM7xx timer driver On 26/02/2018 15:36, Tomer Maimon wrote: > Add Nuvoton BMC NPCM7xx timer driver. > > the clocksource Enable 24-bit TIMER0 and TIMER1 counters, > while TIMER0 serve as clockevent and TIMER1 serve as clocksource. > > Signed-off-by: Tomer Maimon > Reviewed-by: Brendan Higgins [ ... ] > +config NPCM7XX_TIMER > + bool "NPCM7xx timer driver" if COMPILE_TEST > + depends on HAS_IOMEM > + select CLKSRC_MMIO > + help > + Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx arcithcture, architecture > + While TIMER0 serves as clockevent and TIMER1 serves as clocksource. > + > config CADENCE_TTC_TIMER > bool "Cadence TTC timer driver" if COMPILE_TEST > depends on COMMON_CLK > diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile > index d6dec4489d66..b16c1a2b9e0d 100644 > --- a/drivers/clocksource/Makefile > +++ b/drivers/clocksource/Makefile > @@ -55,6 +55,7 @@ obj-$(CONFIG_CLKSRC_NPS) += timer-nps.o > obj-$(CONFIG_OXNAS_RPS_TIMER) += timer-oxnas-rps.o > obj-$(CONFIG_OWL_TIMER) += owl-timer.o > obj-$(CONFIG_SPRD_TIMER) += timer-sprd.o > +obj-$(CONFIG_NPCM7XX_TIMER) += npcm7xx-timer.o Not mandatory but if you can change to timer-npcm7xx that would be nice. > obj-$(CONFIG_ARC_TIMERS) += arc_timer.o [ ... ] > +static int npcm7xx_clockevent_setnextevent(unsigned long evt, > + struct clock_event_device *clk) npcm7xx_timer_set_next_event() [ ... ] > +static int __init npcm7xx_timer_init(struct device_node *np) > +{ > + struct clk *clk; > + int ret; > + u32 rate; > + > + clk = of_clk_get(np, 0); > + > + if (IS_ERR(clk)) { > + ret = of_property_read_u32(np, "clock-frequency", &rate); > + if (ret) > + return ret; > + } else { > + clk_prepare_enable(clk); > + rate = clk_get_rate(clk); > + npcm7xx_to.of_clk.clk = clk; > + } [ ... ] See comment on DT binding patch 1/2 > +err_timer_of_init: > + if (!IS_ERR(clk)) { > + clk_disable_unprepare(clk); > + clk_put(clk); > + } > + > + return ret; > +} > + > +TIMER_OF_DECLARE(npcm7xx, "nuvoton,npcm750-timer", npcm7xx_timer_init); > + > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog