mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Sam Ravnborg <sam@ravnborg.org>, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v4 06/14] ARM: at91: sam9263_ll: drop PLL charge pump initialization
Date: Tue, 20 Feb 2024 10:30:52 +0100	[thread overview]
Message-ID: <20240220093100.1539120-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240220093100.1539120-1-a.fatoum@pengutronix.de>

The datasheet[1] described the PLL Charge Pump Current Register in 27.9.17
very sparingly by mandating that 0x10001 is to be written into it.

In the 28-Jan-16 revision of the datasheet the access mode for the
register was changed from Write-only to Read/Write. Indeed reading the
register is possible, but it seems to always return 0, even directly
after write.

Given that code for initializing the PLL charge pumps was added to
AT91Bootsrap only for SAMA5 support and that apparently no adverse effect
was observed on SAM9263 for not doing this for all these years, it follows
that the PLL charge pump has to be already initialized on POR or by BootROM
and we are better off playing it safe and not introducing code in the PMC
setup that didn't exist in Atmel's own AT91Bootstrap.

Therefore drop that line again. There are no upstream boards calling
this function yet anyway, so this should have very limited effect.

[1]: Atmel-6249N-ATARM-SAM9263-Datasheet_14-Mar-16

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-at91/sam9263_ll.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-at91/sam9263_ll.c b/arch/arm/mach-at91/sam9263_ll.c
index 8855a679fdf2..7600391629af 100644
--- a/arch/arm/mach-at91/sam9263_ll.c
+++ b/arch/arm/mach-at91/sam9263_ll.c
@@ -11,9 +11,6 @@ static void sam9263_pmc_init(const struct sam92_pmc_config *config)
 {
 	at91_pmc_init(IOMEM(AT91SAM926X_BASE_PMC), 0);
 
-	/* Initialize PLL charge pump, must be done before PLLAR/PLLBR */
-	at91_pmc_init_pll(IOMEM(AT91SAM926X_BASE_PMC), AT91SAM9_PMC_ICPPLLA | AT91SAM9_PMC_ICPPLLB);
-
 	/* Setting PLL A and divider A */
 	at91_pmc_cfg_plla(IOMEM(AT91SAM926X_BASE_PMC),
 			  AT91_PMC_MUL_(config->mula) |
-- 
2.39.2




  parent reply	other threads:[~2024-02-20  9:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  9:30 [PATCH v4 00/14] ARM: at91: skov-arm9cpu (SAM9263) first stage support Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 01/14] mci: atmel_mci: disable power save mode Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 02/14] mci: atmel_mci: fix zeroing of block length on AT91SAM9263 Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 03/14] ARM: replace ENTRY_FUNCTION_HEAD with ENTRY_FUNCTION_WITHSTACK_HEAD Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 04/14] ARM: at91: use AT91 header instead of generic barebox ARM's Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 05/14] ARM: at91: implement SAM9_ENTRY_FUNCTION Ahmad Fatoum
2024-02-20  9:30 ` Ahmad Fatoum [this message]
2024-02-20  9:30 ` [PATCH v4 07/14] ARM: at91: sam9263_ll: pass AT91_PMC_LL_AT91SAM9263 to PMC functions Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 08/14] ARM: at91: sam9263_ll: refactor MCK switch to PLLA for clarity Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 09/14] ARM: at91: sam9263_ll: support configuration of PLLB Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 10/14] ARM: dts: AT91: skov-arm9cpu: remove barebox environment on NOR Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 11/14] ARM: at91: skov-arm9cpu: Add SD-Card xload support Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 12/14] ARM: at91: skov-arm9cpu: configure SMC for NOR flash use Ahmad Fatoum
2024-02-20  9:30 ` [PATCH v4 13/14] ARM: at91: skov-arm9cpu: configure more appropriate hostname Ahmad Fatoum
2024-02-20  9:31 ` [PATCH v4 14/14] ARM: AT91: skov-arm9cpu: support environment on SD-Card Ahmad Fatoum
2024-02-23  7:32 ` [PATCH v4 00/14] ARM: at91: skov-arm9cpu (SAM9263) first stage support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220093100.1539120-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox