From patchwork Wed Oct 18 07:43:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 116233 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp5771619qgn; Wed, 18 Oct 2017 00:43:58 -0700 (PDT) X-Received: by 10.84.240.3 with SMTP id y3mr13605103plk.22.1508312637911; Wed, 18 Oct 2017 00:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508312637; cv=none; d=google.com; s=arc-20160816; b=DlKffyuvejgTY0BxAZGlLomQLP/aIzjt1zzSrkU1oRkcn40qTvQC0BQpgzcMs2Y4gT kxulYLiXo9VKf6kDDMv2FxNPlgtrJXzNm30wIvZLWgAiTyrvjSUJgvmledP+i/Me9PIw zchcJE9sBtM5xGLpW+ZxCFYAj9qF9LeMSxCr2R8AzDqebNuWuNR5h1v0d4l56Dbljjg/ tVQPSGy2ly/XG6RBEkuatUS9ICyWKjh+cGkQWrXOJvD4nfWjfWOLAfXBbHDmjbxdQ92K B2Kr+otpEVLV/SO0Yz3JPsFgkQtHAKszQa3JtXA4pLX5WKgsm3g5JGoJvx2avUertIUE 8KdQ== 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=kpFud0LQjgoPAtDOYyMUvNQB/MolGmOgLSCNqVPClZM=; b=H/dwV/Oj1qn3SQlOlCYMMobrvlNTRuWcwWDOzbPuMmaPFuydHkQ3rywAAjQEr6JU7d FIhUefgGx4K8lRokjsAAZZJUfGEMVio2cfVg9wzbonJVk0MUAJRwgWcKLPXU2A+FvizP CDZ191ASko/hOb3pD9Ly2BIwztYK80u9LJavRHykSWLl0o4zM0zyCaIHo/8EcVMoC6Jl BBwNppka3jTsxCZk7pHk0wphHb2SlDthuIU5hY/heus7os6/H2HN1j1i2+j8/+IjnzzH 5AX8fYn7u40N3fwDln/1vyFwzDooM6vmbMbwZX64THyvivySPuYTfMRYvDQyXW4hNJ+n siXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B7uId+QV; 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 bf6si4600794plb.240.2017.10.18.00.43.57; Wed, 18 Oct 2017 00:43:57 -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=B7uId+QV; 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 S1762416AbdJRHny (ORCPT + 27 others); Wed, 18 Oct 2017 03:43:54 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:46609 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbdJRHnx (ORCPT ); Wed, 18 Oct 2017 03:43:53 -0400 Received: by mail-wr0-f172.google.com with SMTP id l1so4015763wrc.3 for ; Wed, 18 Oct 2017 00:43:52 -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=kpFud0LQjgoPAtDOYyMUvNQB/MolGmOgLSCNqVPClZM=; b=B7uId+QVspKknqDiicWl+5gC4yX6LnfYV2NuOhLmXaQ2Qmx2x1XUAzBRpyIjLjEglY 427ldL7a9QvJfmxWL6BZnicvvJHRgbvPWmmI+j0MuH1V2HP06LU2VsfyeTRdiMPMW1jJ XzGhBQQWe51nWmqczFX4GNSa3khnSski105mU= 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=kpFud0LQjgoPAtDOYyMUvNQB/MolGmOgLSCNqVPClZM=; b=VACbzKkEnyboXeZInFYEKR6BOlXHFJjMirxti5YoMR4LxBTDWb3tasQ7VFlmikaPMY w6dsESF5OSlMZq9hgXboHiLqIpPBb8LOBqo6/HpSK2mqfYWBdCGxOdQ0QvQCiHXpZpNC Hw62UnwELH0fIDXoO61IhJioZGH9G6qQTqR6NOHcG2cZp417lFtdsLPM9MghaIBB1nGk YjgdlArlrjAOnJ73hrgqa1ZF0kKhQMbifj1WyfPQK8RXhTbYSr9jQplEVlDpi2SRk5Mg BDT7GMJo8ro0hr7yvsBbMTfWSkC0nDulVbNTCxDct4R7aj4sZlJzCc/iT1wVxQCYoGB2 6YjQ== X-Gm-Message-State: AMCzsaWUSq96ksgPDxJcvttke+jokfKRDAM+SiG3DPaWCO4NXACziYXc 2jkB5PHlgSXhgq9DKwa19NUtvQ== X-Google-Smtp-Source: ABhQp+Q4snS1NNoSXzXi6GKNAoF3WDoM1j1Il37BMPVPxbDQ4+PrVGVEZe/aECqnFRsj/BxCkSXjmw== X-Received: by 10.223.196.221 with SMTP id o29mr5830855wrf.210.1508312632224; Wed, 18 Oct 2017 00:43:52 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.78.118]) by smtp.gmail.com with ESMTPSA id v78sm7855063wmv.48.2017.10.18.00.43.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Oct 2017 00:43:51 -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 Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v5 0/4] stm32 clocksource driver rework Date: Wed, 18 Oct 2017 09:43:30 +0200 Message-Id: <1508312614-27750-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 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 (4): 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-stm32.c | 229 ++++++++++++++++++-------------------- 4 files changed, 112 insertions(+), 182 deletions(-) -- 2.7.4