Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 749DFC433FE for ; Thu, 20 Oct 2022 22:10:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7AE7484FC7; Fri, 21 Oct 2022 00:10:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C4C7084FC7; Fri, 21 Oct 2022 00:10:34 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 4E17084FB7 for ; Fri, 21 Oct 2022 00:10:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B316D1042; Thu, 20 Oct 2022 15:10:37 -0700 (PDT) Received: from donnerap.arm.com (donnerap.cambridge.arm.com [10.1.197.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CCEFF3F7D8; Thu, 20 Oct 2022 15:10:30 -0700 (PDT) From: Andre Przywara To: Tom Rini , Simon Glass Cc: u-boot@lists.denx.de Subject: [PATCH 0/3] timer: add SP804 DM_TIMER driver (and use it) Date: Thu, 20 Oct 2022 23:10:22 +0100 Message-Id: <20221020221025.2473281-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Some boards were using an ARM SP804 timer IP, but were driving that using hardcoded addresses and input frequencies, using the CONFIG_SYS_TIMER_* macros. This is deprecated and scheduled for removal. This series adds a DM_TIMER compliant SP804 driver in patch 1, and lets the Highbank board use that (patch 3). Since the Highbank DT somewhat hides the timer base fixed-clock inside a subnode, we need some simple-bus like driver in patch 2 to help the driver find the timer frequency. The SP804 driver should be usable by other SoCs using the SP804 timer, but I don't have any to test it there. Cheers, Andre Andre Przywara (3): timer: add SP804 UCLASS timer driver highbank: scan into hb_sregs DT subnodes highbank: switch to use the Arm SP804 DM_TIMER driver arch/arm/Kconfig | 2 + board/highbank/Makefile | 2 +- board/highbank/hb_sregs.c | 45 +++++++++++++++ drivers/timer/Kconfig | 6 ++ drivers/timer/Makefile | 1 + drivers/timer/sp804_timer.c | 108 ++++++++++++++++++++++++++++++++++++ include/configs/highbank.h | 4 -- 7 files changed, 163 insertions(+), 5 deletions(-) create mode 100644 board/highbank/hb_sregs.c create mode 100644 drivers/timer/sp804_timer.c -- 2.25.1