public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 03/11] Exynos542x: Add workaround for ARM errata 798870
Date: Wed, 18 Feb 2015 12:59:48 +0200	[thread overview]
Message-ID: <20150218125948.791dcdc4@i7> (raw)
In-Reply-To: <1424252795-12959-4-git-send-email-akshay.s@samsung.com>

On Wed, 18 Feb 2015 15:16:27 +0530
Akshay Saraswat <akshay.s@samsung.com> wrote:

> This patch adds workaround for ARM errata 798870 which says
> "If back-to-back speculative cache line fills (fill A and fill B) are
> issued from the L1 data cache of a CPU to the L2 cache, the second
> request (fill B) is then cancelled, and the second request would have
> detected a hazard against a recent write or eviction (write B) to the
> same cache line as fill B then the L2 logic might deadlock."
> 
> Signed-off-by: Kimoon Kim <kimoon.kim@samsung.com>
> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Tested-by: Simon Glass <sjg@chromium.org>
> ---
> Changes since v2:
> 	- No change.
> 
> Changes since v1:
> 	- Added Reviewed-by & Tested-by.
> 	- Added space before */ on line # 40.
> 
>  arch/arm/cpu/armv7/exynos/lowlevel_init.c | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/lowlevel_init.c b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
> index e36f2fa..7335a1e 100644
> --- a/arch/arm/cpu/armv7/exynos/lowlevel_init.c
> +++ b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
> @@ -46,6 +46,28 @@ enum {
>  
>  #ifdef CONFIG_EXYNOS5420
>  /*
> + * Set L2ACTLR[7] to reissue any memory transaction in the L2 that has been
> + * stalled for 1024 cycles to verify that its hazard condition still exists.
> + */

Having the ARM errata number mentioned in the comment here would make
the purpose of this code much more clear to anyone looking at it later
in the future.

Also isn't this a general purpose Cortex-A15 r2pX workaround,
also potentially useful for the other non-Exynos SoCs too?

> +void set_l2cache(void)
> +{
> +	uint32_t val;
> +
> +	/* Read MIDR for Primary Part Number */
> +	mrc_midr(val);
> +	val = (val >> 4);
> +	val &= 0xf;
> +
> +	/* L2ACTLR[7]: Enable hazard detect timeout for A15 */
> +	if (val == 0xf) {
> +		mrc_l2_aux_ctlr(val);
> +		val |= (1 << 7);
> +		mcr_l2_aux_ctlr(val);
> +		mrc_l2_ctlr(val);
> +	}
> +}
> +
> +/*
>   * Pointer to this function is stored in iRam which is used
>   * for jump and power down of a specific core.
>   */



-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2015-02-18 10:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18  9:46 [U-Boot] [PATCH v3 00/11] Add support for booting multiple cores Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 01/11] Exynos542x: Config: Add various configs Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 02/11] Exynos542x: CPU: Power down all secondary cores Akshay Saraswat
2015-02-18 11:14   ` Lukasz Majewski
2015-02-18  9:46 ` [U-Boot] [PATCH v3 03/11] Exynos542x: Add workaround for ARM errata 798870 Akshay Saraswat
2015-02-18 10:59   ` Siarhei Siamashka [this message]
2015-02-18  9:46 ` [U-Boot] [PATCH v3 04/11] Exynos542x: Add workaround for ARM errata 799270 Akshay Saraswat
2015-02-18 11:12   ` Siarhei Siamashka
2015-02-18  9:46 ` [U-Boot] [PATCH v3 05/11] Exynos542x: Add workaround for exynos iROM errata Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 06/11] Exynos542x: Change ambiguous function name set_l2cache Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 07/11] Exynos542x: cache: Disable clean/evict push to external Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 08/11] Exynos542x: add L2 control register configuration Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 09/11] Exynos542x: Fix secondary core booting for thumb Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 10/11] Exynos542x: Make A7s boot with thumb-mode U-Boot on warm reset Akshay Saraswat
2015-02-18  9:46 ` [U-Boot] [PATCH v3 11/11] Exynos: Fix L2 cache timings on Exynos5420 and Exynos5800 Akshay Saraswat
  -- strict thread matches above, loose matches on Subject: below --
2015-02-18 12:17 [U-Boot] [PATCH v3 03/11] Exynos542x: Add workaround for ARM errata 798870 Akshay Saraswat

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=20150218125948.791dcdc4@i7 \
    --to=siarhei.siamashka@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox