All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/9] arm: armv8: add support for boards with broken/unset counter frequency
Date: Wed, 21 Nov 2018 02:06:34 +0100	[thread overview]
Message-ID: <20181121020634.3d59c4df@jawa> (raw)
In-Reply-To: <20181107150441.23383-1-m.szyprowski@samsung.com>

On Wed, 07 Nov 2018 16:04:41 +0100
Marek Szyprowski <m.szyprowski@samsung.com> wrote:

> Some boards use legacy firmware which doesn't properly configure ARM
> architected timer registers. This patch adds a workaround to use the
> defined COUNTER_FREQUENCY instead of reading its value from the timer
> registers.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/cpu/armv8/generic_timer.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv8/generic_timer.c
> b/arch/arm/cpu/armv8/generic_timer.c index c1706dcec1..5ac62a0a32
> 100644 --- a/arch/arm/cpu/armv8/generic_timer.c
> +++ b/arch/arm/cpu/armv8/generic_timer.c
> @@ -15,9 +15,13 @@ DECLARE_GLOBAL_DATA_PTR;
>   */
>  unsigned long get_tbclk(void)
>  {
> +#ifndef COUNTER_FREQUENCY
>  	unsigned long cntfrq;
>  	asm volatile("mrs %0, cntfrq_el0" : "=r" (cntfrq));
>  	return cntfrq;
> +#else
> +	return COUNTER_FREQUENCY;
> +#endif
>  }
>  
>  #ifdef CONFIG_SYS_FSL_ERRATUM_A008585

Have something changed - or there still is no errata for this?

The COUNTER_FREQUENCY is declared in include/configs/tm2.h, but shall
be moved to Kconfig.

Otherwise looks correct.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181121/79d6b639/attachment.sig>

  reply	other threads:[~2018-11-21  1:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181107150113eucas1p27265a2a4fd58f9c1f69a96b5e1fe1fba@eucas1p2.samsung.com>
2018-11-07 15:00 ` [U-Boot] [PATCH 0/9] ARM: Exynos: Add TM2 board support Marek Szyprowski
2018-11-07 15:00   ` [U-Boot] [PATCH 1/9] cmd: itest: add support for .q size specifier Marek Szyprowski
2018-11-21  0:48     ` Lukasz Majewski
2018-11-07 15:00   ` [U-Boot] [PATCH 2/9] gadget: f_thor: properly enable 3rd endpoint defined by the protocol Marek Szyprowski
2018-11-21  0:49     ` Lukasz Majewski
2018-11-07 15:00   ` [U-Boot] [PATCH 3/9] cmd: thor: select DFU subsystem also for 'thor' download tool Marek Szyprowski
2018-11-21  0:51     ` Lukasz Majewski
2018-11-07 15:01   ` [U-Boot] [PATCH 4/9] dfu: mmc: add support for in-partition offset Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  0:56     ` Lukasz Majewski
2018-11-07 15:03   ` [U-Boot] [PATCH 5/9] mmc: dw_mmc: add support for 64bit DMA Marek Szyprowski
2018-11-21  8:52     ` Lukasz Majewski
2018-11-21  8:54       ` Lukasz Majewski
2018-11-07 15:03   ` [U-Boot] [PATCH 6/9] mmc: exynos_dw_mmc: fix compilation on ARM64-based Exynos Marek Szyprowski
2018-11-21  0:59     ` Lukasz Majewski
2018-11-07 15:04   ` [U-Boot] [PATCH 7/9] arm: armv8: add support for boards with broken/unset counter frequency Marek Szyprowski
2018-11-21  1:06     ` Lukasz Majewski [this message]
2018-11-07 15:04   ` [U-Boot] [PATCH 8/9] ARM: Exynos: Add minimal support for ARM 64bit based Exynos5433 SoC Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  1:12     ` Lukasz Majewski
2018-11-07 15:05   ` [U-Boot] [PATCH 9/9] ARM: Exynos: Add Exynos5433 based TM2 board support Marek Szyprowski
2018-11-19 10:23     ` Minkyu Kang
2018-11-21  1:30     ` Lukasz Majewski

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=20181121020634.3d59c4df@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.