From patchwork Mon Apr 15 15:08:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 10900999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EF1714DB for ; Mon, 15 Apr 2019 15:09:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26DBC26E7B for ; Mon, 15 Apr 2019 15:09:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15F8128113; Mon, 15 Apr 2019 15:09:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A0C9126E7B for ; Mon, 15 Apr 2019 15:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=JKRN5x6pi0kFH664lZup3S9XJnMJKIkLyrEyBkgg4L8=; b=OvWgU/+yyFaYi/ IF1LXsNTmDM2vwbRAvv5E24bxcHp4z6HQ2/hoqHaw6yuHIViTAlZl1w/w0kOvwVOFFhNKR5JQR1ty qi7tR4CVSvPDNDRqflk+7Og4iWW/wz87YUGbyoZr2AWPL/EawQTPKZTh1bHMgm4HWwY6LBUDy+dbS Z2kcBvZXFSX/9CSjJsNw3GubrMZsA0FBa1bgpUd4hkpgXp2k6i2xBkF2sDF1bGJY1pIwyi2Mfely1 PeyeULEj04F2hA+Sx3vmvI78+OOf7j1o/3MNakVfJFuKAjNI+XoV1bD+XLmqh1smRhyBa2r7VXL1/ hIMT6QhOnUG9ozEvElFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG3Ep-0002Cr-SB; Mon, 15 Apr 2019 15:09:39 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG3EU-0001mA-Al for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 15:09:21 +0000 Received: from localhost (alyon-652-1-176-226.w109-212.abo.wanadoo.fr [109.212.207.226]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 0B3D3240015; Mon, 15 Apr 2019 15:09:07 +0000 (UTC) From: Alexandre Belloni To: Daniel Lezcano Subject: [PATCH v2 0/9] clocksource: improve Atmel TCB timer driver Date: Mon, 15 Apr 2019 17:08:47 +0200 Message-Id: <20190415150856.9384-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_080918_560456_330EFA75 X-CRM114-Status: GOOD ( 14.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Alexander Dahl , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This series immproves the Atmel TCB clocksource driver to address the most urgent shortcomings: - 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 an upstream 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). This also happen with the threadedirq command line switch. - there is currently no high resolution sched_clock. The plan is to get those changes upstream as soon as possible as they are fixing real issues that people are facing. There are further changes needed on the clocksource driver to try to stop wasting a TCB channel. The PWM TCB driver will also be changed to actually use the reviewed binding and this will allow to get rid of atmel_tclib. Changes in v2: - collected acks from Thierry and Arnd - dropped most of the atmel_tclib changes that coud be separated. - added a patch from kbuild - dropped the patch removing the PIT from the defconfig - moved the atmel_tcb.h inclusion in drivers/pwm/pwm-atmel-tcb.c as requested by Thierry - stopped using atmel_tcb_config - reworked the irq number parsing to only care for channel 2 Alexandre Belloni (8): ARM: at91: move SoC specific definitions to SoC folder clocksource/drivers/tcb_clksrc: stop depending on atmel_tclib clocksource/drivers/tcb_clksrc: Use tcb as sched_clock ARM: at91: Implement clocksource selection clocksource/drivers/tcb_clksrc: move Kconfig option clocksource/drivers/timer-atmel-pit: rework Kconfig option clocksource/drivers/tcb_clksrc: Rename the file for consistency misc: atmel_tclib: do not probe already used TCBs kbuild test robot (1): clocksource/drivers/timer-atmel-tcb: tc_clksrc_suspend() can be static arch/arm/mach-at91/Kconfig | 23 ++++ drivers/clocksource/Kconfig | 12 +- drivers/clocksource/Makefile | 2 +- .../{tcb_clksrc.c => timer-atmel-tcb.c} | 130 ++++++++++++------ drivers/misc/Kconfig | 24 ---- drivers/misc/atmel_tclib.c | 5 +- drivers/pwm/pwm-atmel-tcb.c | 2 +- .../atmel_tc.h => soc/at91/atmel_tcb.h} | 4 +- 8 files changed, 129 insertions(+), 73 deletions(-) rename drivers/clocksource/{tcb_clksrc.c => timer-atmel-tcb.c} (79%) rename include/{linux/atmel_tc.h => soc/at91/atmel_tcb.h} (99%)