From patchwork Mon Oct 21 13:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1180621 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y6qVlZdk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46xdPJ5x3Xz9sP6 for ; Tue, 22 Oct 2019 00:52:35 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5E937C21DFD; Mon, 21 Oct 2019 13:51:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6BB2CC21DAF; Mon, 21 Oct 2019 13:51:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A45E5C21E49; Mon, 21 Oct 2019 13:50:50 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by lists.denx.de (Postfix) with ESMTPS id 2F1BFC21C50 for ; Mon, 21 Oct 2019 13:50:48 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id w14so21070613qto.9 for ; Mon, 21 Oct 2019 06:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wMYAjr0GkiY8UNCB9gpB9yQ/0oqsfTdsEOmU1yloiog=; b=Y6qVlZdkmcctCPAClSLPNH7JETqiI15irzISJIDZhio0GPUAMez6Zf1DXHjvNI3wqA VoQiEPR4hkCsO4P8Uhb+17mL3FJON52s6SqiYm1IogD3LcJMi1TbHK7p0cAepWt8GDZD L33ruM6ZETNg2acLJNBi2f653J40lDJg78i2LPLZgWRvQdlirt/PELcHsVjLW8jEh8aG NRL3ybmSCoT6Rv5oYLKmKJSEm/9+4G1Cgwy8sRlOXN1lwYT5A/Hoo/pSR3yzub8wGQ6d itrxioq3havSq0ydnBR+E93zkFU4N9etDy5GZ0lXUIvCZ3wHiC4bTNMnyEZhY7C/XjV9 mX5Q== 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:in-reply-to :references; bh=wMYAjr0GkiY8UNCB9gpB9yQ/0oqsfTdsEOmU1yloiog=; b=pBau5JcuVU9sbur8Dd4GOV7H9Damqr+VxOkKvoEPU3Mn4/8REtsCrQGyI9iP1POQ8j RpGI7zCbpPsbxOI9CNix3dfgV10XYeZLTotAWhrXUbji3HOXXl+yw7+I01k0boF/Q4cx BBERkwTBiAae5PsTERp8Zrobu/KMn/czZofowduw8nvIUTUl1ystYXpDMkifv5427plG X46eIzy/aEPxfHsMlQ2DN7ykRUvhHYxttviE6U/Vi+yzIZoPWatfNd40wiOiPi2piYB2 MyAiQasBEQY5H/JvacMqbGkZ0i85XVu0ftrjW6D9qb1BuOJ+ApPFYTwya4YsT78peaqk 6MwA== X-Gm-Message-State: APjAAAXqw74EcIDXwA0GcdcmDWzBGTK767fZlc4I/yantEl/R2NvRbrz C29LNK9R+VqfsqcL4v46TRg= X-Google-Smtp-Source: APXvYqxSSLST1g4xNuPyN9t/F5p3WAi0FXIfd2cB9VHez701J1e27lSZexHRqp8cSu4EZYcI7hjt4w== X-Received: by 2002:ac8:545:: with SMTP id c5mr13405072qth.375.1571665847036; Mon, 21 Oct 2019 06:50:47 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:99::3]) by smtp.gmail.com with ESMTPSA id 92sm7934125qte.30.2019.10.21.06.50.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 06:50:46 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Mon, 21 Oct 2019 10:50:31 -0300 Message-Id: <20191021135034.18677-4-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191021135034.18677-1-festevam@gmail.com> References: <20191021135034.18677-1-festevam@gmail.com> Cc: u-boot@lists.denx.de, uboot-imx@nxp.com Subject: [U-Boot] [PATCH 4/7] mx7ulp: scg: Remove unnused scg_a7_apll_init() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" scg_a7_apll_init() is not called anywhere, so remove such dead code Signed-off-by: Fabio Estevam --- arch/arm/include/asm/arch-mx7ulp/scg.h | 1 - arch/arm/mach-imx/mx7ulp/scg.c | 61 -------------------------- 2 files changed, 62 deletions(-) diff --git a/arch/arm/include/asm/arch-mx7ulp/scg.h b/arch/arm/include/asm/arch-mx7ulp/scg.h index 531d8f3a95..b79bde338f 100644 --- a/arch/arm/include/asm/arch-mx7ulp/scg.h +++ b/arch/arm/include/asm/arch-mx7ulp/scg.h @@ -331,7 +331,6 @@ u32 decode_pll(enum pll_clocks pll); void scg_a7_rccr_init(void); void scg_a7_spll_init(void); void scg_a7_ddrclk_init(void); -void scg_a7_apll_init(void); void scg_a7_firc_init(void); void scg_a7_nicclk_init(void); void scg_a7_sys_clk_sel(enum scg_sys_src clk); diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c index 819c90af6c..c7bb7a1c66 100644 --- a/arch/arm/mach-imx/mx7ulp/scg.c +++ b/arch/arm/mach-imx/mx7ulp/scg.c @@ -949,67 +949,6 @@ void scg_a7_ddrclk_init(void) /* Clock source is System OSC <<0 */ #define SCG1_APLL_CFG_CLKSRC_NUM ((0x0) << SCG_PLL_CFG_CLKSRC_SHIFT) -/* - * A7 APLL = 24MHz / 1 * 22 / 1 / 1 = 528MHz, - * system PLL is sourced from APLL, - * APLL clock source is system OSC (24MHz) - */ -#define SCG1_APLL_CFG_NUM_24M_OSC (SCG1_APLL_CFG_POSTDIV2_NUM | \ - SCG1_APLL_CFG_POSTDIV1_NUM | \ - (22 << SCG_PLL_CFG_MULT_SHIFT) | \ - SCG1_APLL_CFG_PFDSEL_NUM | \ - SCG1_APLL_CFG_PREDIV_NUM | \ - SCG1_APLL_CFG_BYPASS_NUM | \ - SCG1_APLL_CFG_PLLSEL_NUM | \ - SCG1_APLL_CFG_CLKSRC_NUM) - -/* PFD0 Freq = A7 APLL(528MHz) * 18 / 27 = 352MHz */ -#define SCG1_APLL_PFD0_FRAC_NUM (27) - - -void scg_a7_apll_init(void) -{ - u32 val = 0; - - /* Disable A7 Auxiliary PLL */ - val = readl(&scg1_regs->apllcsr); - val &= ~SCG_APLL_CSR_APLLEN_MASK; - writel(val, &scg1_regs->apllcsr); - - /* Gate off A7 APLL PFD0 ~ PDF4 */ - val = readl(&scg1_regs->apllpfd); - val |= 0x80808080; - writel(val, &scg1_regs->apllpfd); - - /* ================ A7 APLL Configuration Start ============== */ - /* Configure A7 Auxiliary PLL */ - writel(SCG1_APLL_CFG_NUM_24M_OSC, &scg1_regs->apllcfg); - - /* Enable A7 Auxiliary PLL */ - val = readl(&scg1_regs->apllcsr); - val |= SCG_APLL_CSR_APLLEN_MASK; - writel(val, &scg1_regs->apllcsr); - - /* Wait for A7 APLL clock ready */ - while (!(readl(&scg1_regs->apllcsr) & SCG_APLL_CSR_APLLVLD_MASK)) - ; - - /* Configure A7 APLL PFD0 */ - val = readl(&scg1_regs->apllpfd); - val &= ~SCG_PLL_PFD0_FRAC_MASK; - val |= SCG1_APLL_PFD0_FRAC_NUM; - writel(val, &scg1_regs->apllpfd); - - /* Un-gate A7 APLL PFD0 */ - val = readl(&scg1_regs->apllpfd); - val &= ~SCG_PLL_PFD0_GATE_MASK; - writel(val, &scg1_regs->apllpfd); - - /* Wait for A7 APLL PFD0 clock being valid */ - while (!(readl(&scg1_regs->apllpfd) & SCG_PLL_PFD0_VALID_MASK)) - ; -} - /* SCG1(A7) FIRC DIV configurations */ /* Disable FIRC DIV3 */ #define SCG1_FIRCDIV_DIV3_NUM ((0x0) << SCG_FIRCDIV_DIV3_SHIFT)