mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 04/15] ARM: Add arm64 pbl udelay
Date: Thu, 21 Mar 2019 23:41:16 -0700	[thread overview]
Message-ID: <CAHQ1cqGwj+JybkwKhH9AK51NOpeaoGyfk+cW7-med+bM0H1FBw@mail.gmail.com> (raw)
In-Reply-To: <20190320081607.prrfhjc7cgrzskns@pengutronix.de>

On Wed, Mar 20, 2019 at 1:16 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> On Tue, Mar 19, 2019 at 11:12:19AM -0700, Andrey Smirnov wrote:
> > On Wed, Mar 13, 2019 at 3:27 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > >
> > > PBL often needs a way to udelay execution. Since we have a generic timer
> > > in ARMv8 we can implement a generic udelay.
> > >
> >
> > Now that get_cntpct() and get_cntfrq() are implemented for ARMv7 we
> > can probably extend this to both ARMv8 and ARMv7.
>
> Yes, we could do this. The problem is that this works only on ARMv7
> cores that have this timer. What about the others? PBL code that depends
> on udelay() can then only run on these cores. Arguably we already have
> this problem when I introduce the symbol for ARMv8, but it probably gets
> worse when we start using udelay in more places in PBL.
> Any idea for a way to implement a udelay for the older cores?
>

Yeah, throwing ARMv4 and ARMv5 into the mix does complicate this. The
only solution that I can think of so far, would be to keep udealy() a
static inline, header-only function and then strategically include
that header in places that we know are ARMv7 only. As for ARMv4 and
v5, I can't think of a universal way of implementing a delay function,
so there's probably not much that we can do there.

Anyway, my original message was just a suggestion, having this
function even for just ARMv8 is an improvement already.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-03-22  6:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13  9:41 [PATCH 00/15] barebox Layerscape support Sascha Hauer
2019-03-13  9:41 ` [PATCH 01/15] mci: imx-esdhc: Actually enable cache snooping Sascha Hauer
2019-03-13  9:41 ` [PATCH 02/15] Add Freescale QUICC Engine firmware support Sascha Hauer
2019-03-13  9:41 ` [PATCH 03/15] net: Add Freescale FMan ethernet support Sascha Hauer
2019-03-13  9:41 ` [PATCH 04/15] ARM: Add arm64 pbl udelay Sascha Hauer
2019-03-19 18:12   ` Andrey Smirnov
2019-03-20  8:16     ` Sascha Hauer
2019-03-22  6:41       ` Andrey Smirnov [this message]
2019-03-13  9:41 ` [PATCH 05/15] esdhc-xload: Add support for Layerscape Sascha Hauer
2019-03-13  9:41 ` [PATCH 06/15] watchdog: imx: Add register accessor functions Sascha Hauer
2019-03-13  9:41 ` [PATCH 07/15] watchdog: imx: Add big endian register access support Sascha Hauer
2019-03-13  9:41 ` [PATCH 08/15] scripts: Add Layerscape image tool Sascha Hauer
2019-03-13  9:41 ` [PATCH 09/15] i2c: i.MX: Add layerscape support Sascha Hauer
2019-03-13  9:41 ` [PATCH 10/15] ddr: fsl: Add Freescale ddr driver Sascha Hauer
2019-03-13  9:41 ` [PATCH 11/15] ARM: Add basic Layerscape support Sascha Hauer
2019-03-13  9:41 ` [PATCH 12/15] clk: Add Layerscape clk support Sascha Hauer
2019-03-13  9:42 ` [PATCH 13/15] ARM: Layerscape: Add LS1046a RDB board support Sascha Hauer
2019-03-13  9:42 ` [PATCH 14/15] ARM: Layerscape: Add TQ TQMLS1046a " Sascha Hauer
2019-03-13  9:42 ` [PATCH 15/15] ARM: Add layerscape_defconfig 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=CAHQ1cqGwj+JybkwKhH9AK51NOpeaoGyfk+cW7-med+bM0H1FBw@mail.gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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