From patchwork Wed Apr 3 14:11:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 10883855 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 9191A17E1 for ; Wed, 3 Apr 2019 14:11:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71611288C3 for ; Wed, 3 Apr 2019 14:11:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65A31289F4; Wed, 3 Apr 2019 14:11:53 +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 F059728995 for ; Wed, 3 Apr 2019 14:11:52 +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=3kWU/ixnDcB1e/46BuWWHM7B88xXQRSfylFRghC784k=; b=bzlkHJ1ZjhbUao Vcx+eSI2PIBYfkaS5AiUJhCR4wAh1iAZ+rWU0yQEyo3rlZb0rgrA0SN2Zzn316qa5512UtF2yPOVe NgBJHyRXqGqeOJLPk2Kb/BPvdVVz5wnBY5vvMt+sBwS0y/HlnObnmzdLznI117nq1Ag9DLcNX2vgr EV2zFwy40DwJ5zRQGht5kmvEtBowv+BhEx1+uw7l2MxuTNvRJPgxZ3pVpK5Ap8Wggj4Gjjtvot0Zt eBq2le0JoZ8FpqCMl8uVjRyCmBYZ4zDCCciCO+r6ufOtm5qMN2MHWcZZWNUItdG+vS7duWCMTcaqW 1l8/Y5xLsterpmWHWj9Q==; 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 1hBgcJ-0007I5-A6; Wed, 03 Apr 2019 14:11:51 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBgcG-0007Gw-65 for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2019 14:11:49 +0000 X-Originating-IP: 109.213.83.19 Received: from localhost (alyon-652-1-60-19.w109-213.abo.wanadoo.fr [109.213.83.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5095560007; Wed, 3 Apr 2019 14:11:36 +0000 (UTC) From: Alexandre Belloni To: Daniel Lezcano , Greg Kroah-Hartman Subject: [PATCH 00/12] clocksource: improve Atmel TCB timer driver Date: Wed, 3 Apr 2019 16:11:08 +0200 Message-Id: <20190403141120.32754-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-20190403_071148_426226_002A0F54 X-CRM114-Status: GOOD ( 11.75 ) 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: linux-pwm@vger.kernel.org, Alexandre Belloni , Arnd Bergmann , 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 arre 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 used the reviewed binding and this will allow to get rif of atmel_tclib. Alexandre Belloni (12): ARM: at91: move SoC specific definitions to SoC folder misc: atmel_tclib: drop AVR32 support misc: atmel_tclib: move definitions to header file 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 ARM: configs: at91: unselect PIT misc: atmel_tclib: do not probe already used TCBs clocksource/drivers/timer-atmel-tcb: Use ARRAY_SIZE instead of hardcoded size arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/sama5_defconfig | 1 + arch/arm/mach-at91/Kconfig | 23 ++++ drivers/clocksource/Kconfig | 12 +- drivers/clocksource/Makefile | 2 +- .../{tcb_clksrc.c => timer-atmel-tcb.c} | 123 ++++++++++++------ drivers/misc/Kconfig | 24 ---- drivers/misc/atmel_tclib.c | 37 +----- drivers/pwm/pwm-atmel-tcb.c | 2 +- .../atmel_tc.h => soc/at91/atmel_tcb.h} | 25 +++- 10 files changed, 146 insertions(+), 104 deletions(-) rename drivers/clocksource/{tcb_clksrc.c => timer-atmel-tcb.c} (81%) rename include/{linux/atmel_tc.h => soc/at91/atmel_tcb.h} (95%)