All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Valentin Haudiquet" <valentin.haudiquet@canonical.com>
Cc: <opensbi@lists.infradead.org>, <troy.mitchell@linux.spacemit.com>,
	"Xianbin Zhu" <xianbin.zhu@linux.spacemit.com>,
	"Anup Patel" <anup@brainfault.org>, "Bo Gan" <ganboing@gmail.com>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Heinrich Schuchardt" <heinrich.schuchardt@canonical.com>
Subject: Re: [PATCH 1/3] platform: generic: spacemit: k3: de-vote cluster power-downs and ungate DMASYS before CCI enable
Date: Tue, 01 Sep 2026 10:25:03 +0800	[thread overview]
Message-ID: <DL3MGCWJZI62.27X6RBQ9HQZLB@linux.spacemit.com> (raw)
In-Reply-To: <20260831200832.404000-2-valentin.haudiquet@canonical.com>


[-- Attachment #1.1: Type: text/plain, Size: 2025 bytes --]

On Mon, Aug 31, 2026 at 10:07 PM +0200, Valentin Haudiquet wrote:
> De-vote power-down for all four clusters and the boot hart's core
> BEFORE enabling CCI.  Also deassert DMASYS reset and enable its clock
> before CCI: the DMA engine sits behind the AIDMA CCI slave interface,
> and if DMASYS is held in reset the CCI busy-wait hangs when enabling
> snoop/DVM on that interface.
>
> @@ -88,10 +113,21 @@ static void spacemit_k3_pre_init(void)
>  	writel((u32)entry, (void *)(unsigned long)C3_RVBADDR_LO_ADDR);
>  	writel((u32)(entry >> 32), (void *)(unsigned long)C3_RVBADDR_HI_ADDR);
>  
> +	/* De-vote all cluster power-downs BEFORE CCI enable. */
> +	spacemit_k3_keep_all_clusters_powered();
> +	spacemit_k3_keep_boot_hart_powered();
> +
> +	/*
> +	 * Deassert DMASYS reset and enable its clock before CCI: the DMA
> +	 * engine sits behind the AIDMA CCI slave interface.  If DMASYS is
> +	 * held in reset or its clock is gated, the CCI busy-wait hangs when
> +	 * enabling snoop/DVM on that interface.
> +	 */
> +	writel(DMASYS_RESET_DEASSERT, (void *)(unsigned long)DMASYS_RESET);
> +	writel(DMASYS_CLK_EN_BIT, (void *)(unsigned long)DMASYS_CLK_EN);
> +
>  	for (i = 0; i < array_size(cci_map); i++)
>  		cci_enable_snoop_dvm_reqs(cci_map, i);
> -
> -	spacemit_k3_keep_boot_hart_powered();

This ordering does not match the vendor OpenSBI implementation we have. It
enables CCI interfaces 0 through 6 before de-voting the cluster power-down
bits, and ungates DMASYS only after CCI setup.

Which slave interface remains change-pending, and what register state did
you observe before these writes? Please also specify the boot firmware and
DT combination used for the test. Since cluster de-voting and DMASYS
ungating are independent changes, they should be tested and justified
separately.

The patch also leaves every cluster de-voted after CCI setup. Is that
required, or should the previous power-down state be restored?

                                            - Troy

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]

[-- Attachment #2: Type: text/plain, Size: 105 bytes --]

-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

  reply	other threads:[~2026-09-01  2:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  9:19 [PATCH v3 0/5] platform: generic: spacemit: add K3 platform support Troy Mitchell
2026-08-27  9:19 ` [PATCH v3 1/5] lib: sbi: select expected trap handler per hart Troy Mitchell
2026-08-31  2:21   ` Alvin Chang
2026-09-01  5:45     ` Troy Mitchell
2026-08-27  9:19 ` [PATCH v3 2/5] platform: generic: spacemit: k1: rename cache flush operation Troy Mitchell
2026-08-27  9:19 ` [PATCH v3 3/5] platform: generic: spacemit: k1: move hart init to nascent hook Troy Mitchell
2026-08-27  9:19 ` [PATCH v3 4/5] platform: generic: spacemit: k1: refactor platform support Troy Mitchell
2026-08-27  9:19 ` [PATCH v3 5/5] platform: generic: spacemit: k3: add " Troy Mitchell
     [not found] ` <20260831200832.404000-1-valentin.haudiquet@canonical.com>
2026-08-31 20:07   ` [PATCH 1/3] platform: generic: spacemit: k3: de-vote cluster power-downs and ungate DMASYS before CCI enable Valentin Haudiquet
2026-09-01  2:25     ` Troy Mitchell [this message]
2026-08-31 20:07   ` [PATCH 2/3] platform: generic: spacemit: k3: override cold_boot_allowed for hart 0 only Valentin Haudiquet
2026-09-01  5:45     ` Troy Mitchell
2026-08-31 20:07   ` [PATCH 3/3] platform: generic: spacemit: k3: wake A100 core 8 for ESOS/RPMI services Valentin Haudiquet
2026-09-01  2:25     ` Troy Mitchell
2026-09-01  5:48   ` [PATCH 0/3] platform: generic: spacemit: k3: follow-up fixes Troy Mitchell
2026-09-02  8:41     ` Bo Gan
2026-09-02  9:38       ` Troy Mitchell
2026-09-02 11:42         ` Valentin Haudiquet
2026-09-01 22:41   ` [PATCH v3 0/5] platform: generic: spacemit: add K3 platform support Bo Gan
2026-09-02  5:51     ` Bo Gan

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=DL3MGCWJZI62.27X6RBQ9HQZLB@linux.spacemit.com \
    --to=troy.mitchell@linux.spacemit.com \
    --cc=anup@brainfault.org \
    --cc=ganboing@gmail.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=opensbi@lists.infradead.org \
    --cc=samuel.holland@sifive.com \
    --cc=valentin.haudiquet@canonical.com \
    --cc=xianbin.zhu@linux.spacemit.com \
    /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.