From patchwork Mon Oct 24 15:38:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13017721 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 F1C09C38A2D for ; Mon, 24 Oct 2022 15:40:20 +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:References:In-Reply-To: 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: List-Owner; bh=mu1Cc0lqaHsjdabPaQDBBT+so2bnPIWC5VAckaLOGx0=; b=CQUmpsC5iXtLHT P/507THekI6K/uR2flcFJw3wumD0bGztLZv3RX/NLAuoBCqfhoXtYsM00jYKlxLAIOiEm/9tcwBwh tFE6fgRGDrezXpGzwkJsjNJGClnUsIeZQ08S5+R8FvO6DbpGnH2BjtoIqboTQtr2N9ay9MOUozH0D 4WhIdfNFjFng6OktpLezc992LVdOSimokGMw0XegnPkF/IK+N0LIrKO29GRVWOuSAxqeWAcuRC/+f jwKZv3oggk5Z/wJb1mS3ygNJxfv4vxk3+b2WUgEBxlNwczNvaGYcKRMAgUDP9TtSh9iAAiPaEWtr/ HDGpTGb1sJ3qSu+Rt4pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omzXp-0026wg-3q; Mon, 24 Oct 2022 15:39:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omzX8-0026mZ-IR for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2022 15:38:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D3126148C; Mon, 24 Oct 2022 15:38:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FBC5C43470; Mon, 24 Oct 2022 15:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666625913; bh=L8c5GKayylADfUAdeL37/p0TLa+9ODsAQQCP/0C+a3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4swKEqdMKks6DlQ3eZsx+gxQvCUyIlLLYQoSdM129IBmuRlJ8/6nQ5ewds45lv7C CS5yiQ3wSv/cwFd8l2pp3RdxITgaYhESS1mobuFPvSF6gRzewB48TD7gpIFHSokb3L zd4eLbWZcc1yXcyYbUL0iYVOgJcGcKMGKrjR3fJP9+k6xKp7yg2ldVJwN5634n/+BM OVxNSE5gWKtUJLz+9n8Cvyna0P4vDCrnNgEs3GpMIl1c8AdexxxHkI/EUUhyjfmao9 zUAsqHsbBHF3Qw4wWJpujZzYV0w971fFEnR1IfAxfQgwWYCs9rWSXZTMaBMiO1lTH+ vNSNf9R+6Ha7w== From: Arnd Bergmann To: Tony Lindgren , linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 05/10] ARM: omap2: remove APLL control Date: Mon, 24 Oct 2022 17:38:09 +0200 Message-Id: <20221024153814.254652-6-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20221024153814.254652-1-arnd@kernel.org> References: <20221024153814.254652-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221024_083834_732011_B89C2A7A X-CRM114-Status: GOOD ( 12.32 ) 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 From: Arnd Bergmann These functions have no callers and can just be removed. Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap2/cm2xxx.c | 97 ------------------------------- arch/arm/mach-omap2/cm2xxx.h | 5 -- arch/arm/mach-omap2/cm2xxx_3xxx.h | 5 -- 3 files changed, 107 deletions(-) diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c index 0827acb60584..17833e0f22f8 100644 --- a/arch/arm/mach-omap2/cm2xxx.c +++ b/arch/arm/mach-omap2/cm2xxx.c @@ -95,103 +95,6 @@ void omap2xxx_cm_set_dpll_auto_low_power_stop(void) _omap2xxx_set_dpll_autoidle(DPLL_AUTOIDLE_DISABLE); } -/* - * APLL control - */ - -static void _omap2xxx_set_apll_autoidle(u8 m, u32 mask) -{ - u32 v; - - v = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE); - v &= ~mask; - v |= m << __ffs(mask); - omap2_cm_write_mod_reg(v, PLL_MOD, CM_AUTOIDLE); -} - -void omap2xxx_cm_set_apll54_disable_autoidle(void) -{ - _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP, - OMAP24XX_AUTO_54M_MASK); -} - -void omap2xxx_cm_set_apll54_auto_low_power_stop(void) -{ - _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE, - OMAP24XX_AUTO_54M_MASK); -} - -void omap2xxx_cm_set_apll96_disable_autoidle(void) -{ - _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP, - OMAP24XX_AUTO_96M_MASK); -} - -void omap2xxx_cm_set_apll96_auto_low_power_stop(void) -{ - _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE, - OMAP24XX_AUTO_96M_MASK); -} - -/* Enable an APLL if off */ -static int _omap2xxx_apll_enable(u8 enable_bit, u8 status_bit) -{ - u32 v, m; - - m = EN_APLL_LOCKED << enable_bit; - - v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); - if (v & m) - return 0; /* apll already enabled */ - - v |= m; - omap2_cm_write_mod_reg(v, PLL_MOD, CM_CLKEN); - - omap2xxx_cm_wait_module_ready(0, PLL_MOD, 1, status_bit); - - /* - * REVISIT: Should we return an error code if - * omap2xxx_cm_wait_module_ready() fails? - */ - return 0; -} - -/* Stop APLL */ -static void _omap2xxx_apll_disable(u8 enable_bit) -{ - u32 v; - - v = omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); - v &= ~(EN_APLL_LOCKED << enable_bit); - omap2_cm_write_mod_reg(v, PLL_MOD, CM_CLKEN); -} - -/* Enable an APLL if off */ -int omap2xxx_cm_apll54_enable(void) -{ - return _omap2xxx_apll_enable(OMAP24XX_EN_54M_PLL_SHIFT, - OMAP24XX_ST_54M_APLL_SHIFT); -} - -/* Enable an APLL if off */ -int omap2xxx_cm_apll96_enable(void) -{ - return _omap2xxx_apll_enable(OMAP24XX_EN_96M_PLL_SHIFT, - OMAP24XX_ST_96M_APLL_SHIFT); -} - -/* Stop APLL */ -void omap2xxx_cm_apll54_disable(void) -{ - _omap2xxx_apll_disable(OMAP24XX_EN_54M_PLL_SHIFT); -} - -/* Stop APLL */ -void omap2xxx_cm_apll96_disable(void) -{ - _omap2xxx_apll_disable(OMAP24XX_EN_96M_PLL_SHIFT); -} - /** * omap2xxx_cm_split_idlest_reg - split CM_IDLEST reg addr into its components * @idlest_reg: CM_IDLEST* virtual address diff --git a/arch/arm/mach-omap2/cm2xxx.h b/arch/arm/mach-omap2/cm2xxx.h index 004016d7459e..ee0cb40691b2 100644 --- a/arch/arm/mach-omap2/cm2xxx.h +++ b/arch/arm/mach-omap2/cm2xxx.h @@ -46,11 +46,6 @@ extern void omap2xxx_cm_set_dpll_disable_autoidle(void); extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void); -extern void omap2xxx_cm_set_apll54_disable_autoidle(void); -extern void omap2xxx_cm_set_apll54_auto_low_power_stop(void); -extern void omap2xxx_cm_set_apll96_disable_autoidle(void); -extern void omap2xxx_cm_set_apll96_auto_low_power_stop(void); - int omap2xxx_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_id, u8 idlest_shift); extern int omap2xxx_cm_fclks_active(void); diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h index 70944b94cc09..6dfc09383160 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h @@ -93,11 +93,6 @@ static inline u32 omap2_cm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) return omap2_cm_rmw_mod_reg_bits(bits, 0x0, module, idx); } -extern int omap2xxx_cm_apll54_enable(void); -extern void omap2xxx_cm_apll54_disable(void); -extern int omap2xxx_cm_apll96_enable(void); -extern void omap2xxx_cm_apll96_disable(void); - #endif /* CM register bits shared between 24XX and 3430 */