From patchwork Fri Jun 30 20:01:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 13298696 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CDD7BEB64DC for ; Fri, 30 Jun 2023 20:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :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=7HSweBZf+TBPrdq2b0Xy1JYbPfiJU4huVHW1SWIArWU=; b=auDdqMLfCfCF5b lPCANaApgo11st1ct3bp1nznnaqDkf1/bEleA5a74Khc+H+IuqbnNHTFODpQY/H2Gtd4QyFxjN9QD t3hy25IPcnVERWGV8TSOdxX2Qtcg+DAF5UvEheaR7qkTdrwC3IVEMMY8Rnv6erxx5dACQpOWT7Oy7 tqzOTqzj7LNu9r9GX8EfIKBpllW/kOXCpSBYnKu0qluAmd3K/Jwvc6D2mQoj/WhkS+7MWFmOWyY/y 0Lz/zkulz672qgHWynUQVdo9GzlsPQSFActX8AikG57vhKIu0K7p55TAt0BJd23GN+gq1B5Y4MKMd BfKVvXWYpKDqdMEp25CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qFKZQ-004TcK-37; Fri, 30 Jun 2023 20:18:20 +0000 Received: from unicorn.mansr.com ([81.2.72.234]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qFKZF-004TYE-2N for linux-arm-kernel@lists.infradead.org; Fri, 30 Jun 2023 20:18:11 +0000 Received: from raven.mansr.com (raven.mansr.com [IPv6:2001:8b0:ca0d:1::3]) by unicorn.mansr.com (Postfix) with ESMTPS id 55F7C15360; Fri, 30 Jun 2023 21:18:03 +0100 (BST) Received: by raven.mansr.com (Postfix, from userid 51770) id 47FED219FD1; Fri, 30 Jun 2023 21:18:03 +0100 (BST) From: Mans Rullgard To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Ripard Cc: Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 0/3] clocksource: sun5i: clean up and convert to platform driver Date: Fri, 30 Jun 2023 21:01:25 +0100 Message-ID: <20230630201800.16501-1-mans@mansr.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230630_131809_903042_3A5E8E12 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The first two of these patches remove a bunch of duplicated code/data in the sun5i hstimer driver. To keep the diff clearer, the first patch introduces an otherwise pointless struct which is then removed in the second. The third patch converts the driver to a platform_device driver. This is to make it work again on A20 and A31 (I think) where it broke when the ccu driver was changed to a platform driver. I have only tested this on an A20 where the hstimer is registered as expected and can be selected through sysfs. I hope it doesn't break something else. Some additional discussion here: https://lore.kernel.org/linux-clk/20211119033338.25486-4-samuel@sholland.org/ Mans Rullgard (3): clocksource: sun5i: remove duplication of code and data clocksource: sun5i: remove pointless struct clocksource: sun5i: convert to platform device driver drivers/clocksource/timer-sun5i.c | 288 +++++++++++++----------------- 1 file changed, 123 insertions(+), 165 deletions(-) Acked-by: Maxime Ripard