mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Konstantin Kletschke <konstantin.kletschke@inside-m2m.de>
To: Lucas Stach <dev@lynxeye.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: beaglebone: add delay in lowlevel.c
Date: Fri, 10 Jan 2025 16:16:33 +0100	[thread overview]
Message-ID: <Z4E50e1ZJv15hdq8@hephaistos> (raw)
In-Reply-To: <9c00ffd1332ba38dffc26b0b8967f8327d72e4a0.camel@lynxeye.de>

Hi Lucas,

this is an interesting idea and I did poke around a bit.

On Wed, Jan 08, 2025 at 04:46:22PM +0100, Lucas Stach wrote:

> It would be interesting to know if any of the configured PLLs go out of
> lock again during the time your delay loop runs. I.e. check if any of
> CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_PER or
> CM_IDLEST_DPLL_MPU contain a value other than 0x1.

I inserted this into the delay loop:

static void __udelay(int us)
{
    volatile int i;
        for (i = 0; i < us; i++) {
                (__raw_readl(CM_IDLEST_DPLL_MPU) != 0x1) ? putc_ll('m') : (void)0;
                (__raw_readl(CM_IDLEST_DPLL_CORE) != 0x1) ? putc_ll('c') : (void)0;
                (__raw_readl(CM_IDLEST_DPLL_PER) != 0x1) ? putc_ll('p') : (void)0;
                (__raw_readl(CM_IDLEST_DPLL_DDR) != 0x1) ? putc_ll('d') : (void)0;
        }
}

but none was triggered. Additionaly I tried this instead of the above
before entering the delay loop in beaglebone_sram_init(void):

        while(__raw_readl(CM_IDLEST_DPLL_DDR) != 0x0);
        //while(__raw_readl(CM_IDLEST_DPLL_CORE) != 0x0);
        //while(__raw_readl(CM_IDLEST_DPLL_PER) != 0x0);
        //while(__raw_readl(CM_IDLEST_DPLL_MPU) != 0x0);
        __udelay(3000);

When I suspect the bit being stable I expect to be being trapped so I
booted with a version without this, replaced it with the trap and
rebooted, I did this 4 times for each DDR, CORE, PER and MPU.
If the bit toggles back to zero I would exit the while, delay and boot
normal. So if trapped == no bit toggle. 

Either the putc_ll inserted into the loop did not appear nor the while
trap was left in any case so I suspect this bit is stable at 0x1 for
each type of PLL.


Kind Regards
Konsti



-- 
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@inside-m2m.de
http://www.inside-m2m.de 

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover




  reply	other threads:[~2025-01-10 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 15:01 Konstantin Kletschke
2025-01-08 14:32 ` Sascha Hauer
2025-01-08 15:14   ` Konstantin Kletschke
2025-01-08 15:19     ` Ahmad Fatoum
2025-01-08 15:27       ` Konstantin Kletschke
2025-01-08 15:31         ` Ahmad Fatoum
2025-01-08 15:38           ` Konstantin Kletschke
2025-01-08 15:46     ` Lucas Stach
2025-01-10 15:16       ` Konstantin Kletschke [this message]
2025-01-10  8:32 ` Sascha Hauer
2025-01-08 15:18 Konstantin Kletschke
2025-01-08 15:36 Konstantin Kletschke
2025-01-10  8:32 ` 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=Z4E50e1ZJv15hdq8@hephaistos \
    --to=konstantin.kletschke@inside-m2m.de \
    --cc=barebox@lists.infradead.org \
    --cc=dev@lynxeye.de \
    /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