Received: by 10.223.185.116 with SMTP id b49csp952463wrg; Fri, 23 Feb 2018 09:19:11 -0800 (PST) X-Google-Smtp-Source: AH8x226A0VhIDzp+SE9uk9QiWBsu3gXwLxZZEcwoLeN9ZEBSBeusSAlRc4TPVlFs9akeo0NbvkPW X-Received: by 10.99.96.200 with SMTP id u191mr1999380pgb.252.1519406351109; Fri, 23 Feb 2018 09:19:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519406351; cv=none; d=google.com; s=arc-20160816; b=KE4yMFyHXtrddGYP6vC0SUMb7gruoS3coY0FKMP/1GBKxCQOKsNPurcQgGj6bKVmJn vHINErjLXw0v2bww13UWB9YtJYFgqL1JU/vrcymHnGn0oG60eVNhgJheZV87GwZ5OOnm 8jolR8e4E/gMFy0a5+YOSZ/sJiWtgT73Ea73TsEj6Snqb8XdcNQgyQwCKKUK/wf2pUsv fDJ0w/lUzUrFs7VU93a1rypmf5To9xIEQJagRiA2BLZj9f6HxaZ/Z8bdtdHXqLoFg0+v EzVbJOTjpPfEkNhIOLXupCUJSRMygv4tL2Jmx2tfoXGrmWt0miauRIiRU/WLh6zxFtmt w/CQ== 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 :arc-authentication-results; bh=VCtpbE6jXe4z+t9aRa9BWVdBGVNk+RqteuusGfGY4A0=; b=IFDZ9BL5G5SV7wQjepwONc+AgwyLgioOSV+BGmMUIXHNkbLmNl/QSI24AOAkBxTzEX bIRTzuCVyobmtdrOKjGlGjgskC2GNM29ofVlzTbvDSuoCjgnB8FRQebjrTqLf+eoApUt PYnYTtek9L2wS3D2DGohVe/RNRHaLBsGxVWXyMOdZ8gJr1eR8UopmiuU0aCm1T1KPPk3 KkGlqN3HmvA1J51TTuY6k85r7E7kd1JA4xlHldkprciFzI70LA0VZTCP1+YSgcmC+Hdi 41ThJD1AwaHD3wS+ehHQJCtx5QOPil4nUuH3ofhY7WN4pdnrbMCE66XjduiHitBhi5Mm fv+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3-v6si2147873plo.32.2018.02.23.09.18.56; Fri, 23 Feb 2018 09:19:11 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbeBWRQU (ORCPT + 99 others); Fri, 23 Feb 2018 12:16:20 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:59925 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751402AbeBWRQT (ORCPT ); Fri, 23 Feb 2018 12:16:19 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 6F2BF2087E; Fri, 23 Feb 2018 18:16:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.free-electrons.com (Postfix) with ESMTPSA id 23E0A20124; Fri, 23 Feb 2018 18:16:06 +0100 (CET) From: Alexandre Belloni To: Daniel Lezcano Cc: Thomas Gleixner , Nicolas Ferre , Boris Brezillon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Date: Fri, 23 Feb 2018 18:15:52 +0100 Message-Id: <20180223171558.7037-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series gets back on the TCB drivers rework. It introduces a new driver to handle the clocksource and clockevent devices. As a reminder, this is necessary because: - the current tcb_clksrc driver is probed too late to be able to be used at boot and we now have SoCs that don't have a PIT. They currently are not able to boot a mainline kernel. - using the PIT doesn't work well with preempt-rt because its interrupt is shared (in particular with the UART and their interrupt flags are incompatible) - the current solution is wasting some TCB channels The plan is to get this driver upstream, then convert the TCB PWM driver to be able to get rid of the tcb_clksrc driver along with atmel_tclib. changes in v3: - use SPDX tag in include/soc/at91/atmel_tcb.h - rework option selection to make the clocksource option silent Main changes in v2: - use direct IO instead of regmap when accessing channel specific registers to avoid the regmap locking - implement suspend/resume Alexandre Belloni (6): ARM: at91: add TCB registers definitions clocksource/drivers: Add a new driver for the Atmel ARM TC blocks clocksource/drivers: atmel-pit: make option silent ARM: at91: Implement clocksource selection ARM: configs: at91: use new TCB timer driver ARM: configs: at91: unselect PIT arch/arm/configs/at91_dt_defconfig | 2 +- arch/arm/configs/sama5_defconfig | 2 +- arch/arm/mach-at91/Kconfig | 25 ++ drivers/clocksource/Kconfig | 13 +- drivers/clocksource/Makefile | 3 +- drivers/clocksource/timer-atmel-tcb.c | 608 ++++++++++++++++++++++++++++++++++ include/soc/at91/atmel_tcb.h | 216 ++++++++++++ 7 files changed, 865 insertions(+), 4 deletions(-) create mode 100644 drivers/clocksource/timer-atmel-tcb.c create mode 100644 include/soc/at91/atmel_tcb.h -- 2.16.1