From patchwork Wed May 17 14:05:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 99973 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp229611obb; Wed, 17 May 2017 07:06:24 -0700 (PDT) X-Received: by 10.99.121.200 with SMTP id u191mr3929960pgc.113.1495029984680; Wed, 17 May 2017 07:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495029984; cv=none; d=google.com; s=arc-20160816; b=KoPixEqVse+I3k48F2iJSCI4dxPIBxSVXzxL6QpKxvyCU+i7AU5XUAs/NYCVETCkgH 1CYHS2DNa6pRKroMEkQ+C8I5eifm4QSbPsCDXtU5BMVsuHKawYp1MYJ1Tq2z19c8o5Mj QQ37BR3F6vkbKeL+ftXwtJ8vrOrfufMfckRinVFYQANIMtOSY1jryxSjz/A6tzqWFi6l 1Jgf5t8nbOE01j7VQbcOhEDaKq7XsGYGoVh3zXHFfP0867tp74X+KpdFQhJoeMN0FBaa gYoVOZztHSWMkPcA5G5Ku8o4gwTiuImMDCi1WwE0TWRUQ/SvIT/7nUmcrXtkSPHc4I1T hezQ== 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=H2ztRXcbpTD39VAwuyt6JK4b9T92dDF6/eKbxcB4CBw=; b=V+SwYEthR62jcW7jZGpTlGgqCRdi3TNvC2gBQ/tkxHsicFy61fCSItYxHvB/y5WmzZ OIDIA+h0/Gf9xVOW129q8NWhwnEL4Mdltov/qEkh6jGfKQyEJPKgW1XggBLKQjWPF6dH pOBG6FKSGz9lUsOji9fjjwBtmtq/wUqo7sBo5cJWlZKhcfBQfaZrqtEh08l+1Ge0qMgy vlCMBR+TIRk1JRNsR57/bvOLJy8fliVeiFq9bHMdK2gIFn9PvFgScin39PCsVEX3phBQ dOETRFChqfgrDSdv8s3wa6EuQSKWe889pidY63/+lATa0dVeKk6uhYsFvfNRrRLmpiAW iWEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; 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 x6si2250506pls.120.2017.05.17.07.06.24; Wed, 17 May 2017 07:06:24 -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; 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 S1754508AbdEQOGG (ORCPT + 25 others); Wed, 17 May 2017 10:06:06 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36069 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbdEQOGE (ORCPT ); Wed, 17 May 2017 10:06:04 -0400 Received: by mail-wm0-f42.google.com with SMTP id 70so11786849wmq.1 for ; Wed, 17 May 2017 07:06:03 -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=H2ztRXcbpTD39VAwuyt6JK4b9T92dDF6/eKbxcB4CBw=; b=ji/t5hpHXDsMwIR7PI3fHXuzB3ZF7NMNbglYAMt4OR6Zrm5m2vnMWHXuSJrzqFLcZz /T9sUH2t5sD6yGfAdzR/eqknTmH73IR/QuDE4YFoh9ELFEt7vxLK+Y4WAAyBn9NPl8SE EICaM9Afz9JQ4GOFgQj39Qx0/5MIj49JQnTic= 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=H2ztRXcbpTD39VAwuyt6JK4b9T92dDF6/eKbxcB4CBw=; b=qY4VD/EuQUMCOhHx8SnzPZr+CchXPuMQL+tQ/c0cCfUR7q6HJAkUf6JX+JkA1qGlsj +ipY6L4UGAXMDQvulNiJLuMHKa3E0/4sPJM5SMc5vo6t3Zg3hOMv1N9hrLdmEIB/IsH+ AyFRBgRHFAgEC71xe00k/N0t3I9IfnHQlkQA4folDHV7m1WRRFJiqlxYuzEhUiQf9C9m iAcUvk0DIX0dUI93DUYsiujrzA641IhN/C+znHc8Opd3RYc57d4mRsfA2MduJgmtJ+dT +gdFbtW4VRZM3y/MWLRluxhq1HDL7qDnS+BAOKZB40IdHCTv71N6kxXs/G4rFsTg/0El fg9w== X-Gm-Message-State: AODbwcBQ4jSaE9qNLgr0+q8ENsjHBoN8OLAd8wra+4V802y+xa8Sb6z5 xHyFkhWLAe20YZcx X-Received: by 10.25.77.149 with SMTP id a143mr972588lfb.121.1495029961504; Wed, 17 May 2017 07:06:01 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-3c94db54.014-348-6c756e10.cust.bredbandsbolaget.se. [84.219.148.60]) by smtp.gmail.com with ESMTPSA id 139sm409680ljj.16.2017.05.17.07.05.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 07:06:00 -0700 (PDT) From: Linus Walleij To: Daniel Lezcano , Thomas Gleixner , Joel Stanley , Jonas Jensen Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , linux-kernel@vger.kernel.org, Linus Walleij Subject: [PATCH 0/8] clocksource: Generalize Faraday timer Date: Wed, 17 May 2017 16:05:34 +0200 Message-Id: <20170517140542.20016-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It turns out that the Moxa is using a Faraday IP timer named FTTMR010. This is also what Aspeed's derivative is based on. This series attempts to merge these two drivers into one to get lesser code to maintain. Also it incidentally adds a sched_clock() implementation to the Moxa and Aspeed, which is nice. The patches can also be grabbed from here: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?h=fttmr010 Future ideas include supporting the optional EXTCLK (32kHz clock) and delay timers. This will then get available on all three supported platforms = big win. The patches can be applied as soon as Jonas Jensen and Joel Stanley says they work for them. I have chosen to work on this body of code (rather than the Moxart code) as it is derived from code originally posted by Faraday themselves here: https://lwn.net/Articles/447919/ I hope we can get this to work! Linus Walleij (8): clocksource/drivers/fttmr010: Fix the clock handling clocksource/drivers/fttmr010: Merge FTTMR010 DT bindings clocksource/drivers/fttmr010: Drop Gemini specifics clocksource/drivers/fttmr010: Use state container clocksource/drivers/fttmr010: Switch to use bitops clocksource/drivers/fttmr010: Switch to use TIMER2 src clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 ARM: dts: augment Moxa and Aspeed DTS for FTTMR010 .../devicetree/bindings/timer/faraday,fttmr010.txt | 4 +- .../bindings/timer/moxa,moxart-timer.txt | 19 -- arch/arm/boot/dts/aspeed-g4.dtsi | 7 +- arch/arm/boot/dts/aspeed-g5.dtsi | 6 +- arch/arm/boot/dts/moxart.dtsi | 3 +- arch/arm/mach-aspeed/Kconfig | 2 +- arch/arm/mach-moxart/Kconfig | 2 +- drivers/clocksource/Kconfig | 7 - drivers/clocksource/Makefile | 1 - drivers/clocksource/moxart_timer.c | 256 -------------- drivers/clocksource/timer-fttmr010.c | 377 +++++++++++---------- 11 files changed, 214 insertions(+), 470 deletions(-) delete mode 100644 Documentation/devicetree/bindings/timer/moxa,moxart-timer.txt delete mode 100644 drivers/clocksource/moxart_timer.c -- 2.9.3