From patchwork Wed Oct 18 12:58:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 116290 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp6034765qgn; Wed, 18 Oct 2017 05:58:38 -0700 (PDT) X-Received: by 10.99.114.4 with SMTP id n4mr14052449pgc.416.1508331518877; Wed, 18 Oct 2017 05:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508331518; cv=none; d=google.com; s=arc-20160816; b=wbkXiZphkunBXatCiXCzQ3+MlZXgUWmRgZJ27NW0B/+t6rdU/xbyPPzD9yOy7aqHZF hj/w/o1R4gf7a+SJ2tPIo91IZamFO6761ya1i8smsvT+p5iXk4JE5zmMrs2WAmUwGCmK MYMTKql7rY1WmsL7ui/Rmif7DIfFuQ2ANBkHsY0WwSx/dQO5Dkv66AAxEOgUGR7jt9gF b3R/x6thxcJo31CeMSFzLlZvRjW9iLKC8mdxcdOY1A3p5n/bSxrN86KuTNuYtVPkFDU4 y67xsb60lnLk4ki9kjCS2Yta7g93T7+UkMgqbesJZd3TuPWvutev0EmxN1PO502wJiE+ 2pMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ruUHZYsI75/tnrkgC8mC4I4O5cDs9PNzyyREh5+YSt4=; b=RSq0d9UqhK5dZmzKNDnt1mjHLnhUJT4mXehfdcH5qzpDO0I3mrxUy54BFBs2nk60BJ 6o6TexgXZywjqIvm0doa4aYYdiZCv47dwEdEiR3E6hFaVKRP1h87j3g9OI5gZ2j+s6MD gEB2T2FEOu0Mevfyb3WH6+8s/aW6hODzl+46PD92MT3h+cd3jpHQSPX0pLlhG0CbxuBO HnpaAb+Fds2P2TSAtZz2OFguCsFWcsO39TF5R3I+KkdyyIXgNVtyagpOWNZHnu3HW4I5 gI6P2iY+9IEKJVOXC3fB157n8e3VnTYo8hR65W9CsEfn8BrPPfGFHP3kjDa5g1aR70Es 8uag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WGcmYIqb; 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 n1si6914790pge.830.2017.10.18.05.58.38; Wed, 18 Oct 2017 05:58:38 -0700 (PDT) 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=WGcmYIqb; 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 S1752359AbdJRM6h (ORCPT + 27 others); Wed, 18 Oct 2017 08:58:37 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43959 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752298AbdJRM6f (ORCPT ); Wed, 18 Oct 2017 08:58:35 -0400 Received: by mail-wr0-f196.google.com with SMTP id p46so4930933wrb.0 for ; Wed, 18 Oct 2017 05:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ruUHZYsI75/tnrkgC8mC4I4O5cDs9PNzyyREh5+YSt4=; b=WGcmYIqbBqgs0M6p8889iXww1U1VDQ3E/3OFdQK0HK5abH8vO66hN6g7/RRFb1e8kk XRkTVJatinLVUJRwExJjVI/KVDYSIj+MzEOS0I1QUPwgCAeZUqEIHRvNDjOQ9CYJDEHU TRIC+TNbzOe4N6xcOvqfCgo9u5yKsnaB0OEXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ruUHZYsI75/tnrkgC8mC4I4O5cDs9PNzyyREh5+YSt4=; b=EJ93ovTpiDJO2jZywyJqVdAs/P6MPrlkGoG9SdPiKOQAkFd/M3rq0nP4w4WdBjQKzG +MllZ086zcVxaT9FVs2MsBA1o7/Qk3fAUMYKwD6oqEcgYMvPc4mZ4yvqBzsEbj4G5xXX 4NBMsBKxUz/wUqKUKkHAdJ0PRkCnKIxc1FCLRXlcC6S3Xx2rQcdlha1Y7tOR7MydIfRN VN1OUiPHd6RwxhrNuYrf0nkgx+50OgvQiYPfXG9/lsjid1VQlmf33bV3Eu/x9GHuT/Qq 0Vf3z0zhKfX4+brlJ3vsWeTn9hLGn6XnROcF8EMKK9PH9eFXe276X9vc1l9bueQsJIGJ OQiw== X-Gm-Message-State: AMCzsaXVT7IkpVDsdHT5K6dB8y+cP/Gkzeq6LpPA0DmmbzxPK+Oka+eD gcjZMdTQ57tK1ktbBHhaw4WylA== X-Google-Smtp-Source: ABhQp+T3v8Egr+O7iF44meexNroibd23EGryNi9MF7gtbUT0mVN+AdyF4AHQt1cY9+sbgFjotX13SQ== X-Received: by 10.223.188.69 with SMTP id a5mr7081195wrh.276.1508331513926; Wed, 18 Oct 2017 05:58:33 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.70.168]) by smtp.gmail.com with ESMTPSA id m23sm14169908wrm.75.2017.10.18.05.58.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Oct 2017 05:58:33 -0700 (PDT) From: Benjamin Gaignard To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, daniel.lezcano@linaro.org, tglx@linutronix.de, ludovic.barre@st.com, julien.thierry@arm.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v6 0/5] stm32 clocksource driver rework Date: Wed, 18 Oct 2017 14:58:21 +0200 Message-Id: <1508331506-23782-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org version 6: - add timer_of_deinit function in core - rework failure cases in probe function version 5: - rebase on top of timer/core branch - rework commit message of the first patch version 4: - split patch in 3 parts - convert code to timer_of - only use 32 bits timers - add clocksource support version 3: - fix comments done by Daniel - use timer_of helper functions version 2: - fix uninitialized variable These patches implements clocksource and clockevent by using only one hardware block. Getting both clock source and events on the same hardware lead to change quite a lot driver code. It also limits usage of clocksource to 32 bits timers because 16 bits ones aren't enough accurate. Thanks to timer_fo helpers this series includes minor clean up in structures, function prototypes and driver name. Since 16 bits timers become useless it also removes them from stm32f4 and stm32f7 devicetree. Increase min delta value to be sure to not have too much interrupts. Benjamin Gaignard (5): timer: add timer_of_deinit function clocksource: stm32: convert driver to timer_of clocksource: stm32: only use 32 bits timers clocksource: stm32: add clocksource support arm: dts: stm32: remove useless clocksource nodes arch/arm/boot/dts/stm32f429.dtsi | 32 ------ arch/arm/boot/dts/stm32f746.dtsi | 32 ------ drivers/clocksource/Kconfig | 1 + drivers/clocksource/timer-of.c | 12 ++ drivers/clocksource/timer-of.h | 3 + drivers/clocksource/timer-stm32.c | 232 +++++++++++++++++++------------------- 6 files changed, 132 insertions(+), 180 deletions(-) -- 2.7.4