All of lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Bernhard Beschow <shentey@gmail.com>, philmd@linaro.org
Subject: Re: [PATCH] hw/sd/sdhci: Set reset value of interrupt registers
Date: Thu, 30 Jan 2025 13:46:35 +0100 (CET)	[thread overview]
Message-ID: <3b00eb8b-ae4b-3080-06d6-807553f3c8a3@eik.bme.hu> (raw)
In-Reply-To: <20250115190422.5F0FA4E6030@zero.eik.bme.hu>

On Wed, 15 Jan 2025, BALATON Zoltan wrote:
> The interrupt enable registers are not reset to 0 but some bits are
> enabled on reset. At least some U-Boot versions seem to expect this
> and not initialise these registers before expecting interrupts. The
> numbers in this patch match what QorIQ P1022 has on reset and fix
> U-Boot for this SoC and should not break other drivers that initialise
> (and thus overwrite) these reset values.

Ping?

> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> I've also noticed that the work around marked with an XXX comment near
> line 600 breaks the U-Boot I've tested so I need to disable it:
> if ((s->sdmasysad % boundary_chk) == 0) {
> -        page_aligned = true;
> +//        page_aligned = true;
> }
> What should this hack fix and could it be now removed or somehow
> restricted to cases where it's needed?
>
> hw/sd/sdhci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> index 58375483e3..88eb0bfcb2 100644
> --- a/hw/sd/sdhci.c
> +++ b/hw/sd/sdhci.c
> @@ -303,6 +303,8 @@ static void sdhci_reset(SDHCIState *s)
>     s->data_count = 0;
>     s->stopped_state = sdhc_not_stopped;
>     s->pending_insert_state = false;
> +    s->norintstsen = 0x013f;
> +    s->errintstsen = 0x117f;
> }
>
> static void sdhci_poweron_reset(DeviceState *dev)
>


  reply	other threads:[~2025-01-30 12:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 19:04 [PATCH] hw/sd/sdhci: Set reset value of interrupt registers BALATON Zoltan
2025-01-30 12:46 ` BALATON Zoltan [this message]
2025-02-06 10:00 ` Philippe Mathieu-Daudé
2025-02-06 12:49   ` BALATON Zoltan
2025-02-06 13:20     ` Philippe Mathieu-Daudé
2025-02-06 13:49       ` BALATON Zoltan
2025-02-06 15:05         ` Philippe Mathieu-Daudé
2025-02-09 12:10         ` Bernhard Beschow

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=3b00eb8b-ae4b-3080-06d6-807553f3c8a3@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.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.