From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>,
Andre Przywara <andre.przywara@arm.com>
Cc: u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: FIXUP! sunxi: mmc: Improve reset procedure
Date: Tue, 25 Mar 2025 17:13:46 +0100 [thread overview]
Message-ID: <2772552.mvXUDI8C0e@jernej-laptop> (raw)
In-Reply-To: <20250325142737.1702796-1-andre.przywara@arm.com>
Dne torek, 25. marec 2025 ob 15:27:37 Srednjeevropski standardni čas je Andre Przywara napisal(a):
> Hi Jernej,
>
> what do you think about this solution the A10 compilation problem?
> That looks like a simple change, somewhat half of the way to the proper
> solution.
> If you agree, I'd squash that into your patch, then push it for U-Boot
> next.
Sure, I'm all for it. Sorry for missing this, it seems so obvious now.
Best regards,
Jernej
>
> Cheers,
> Andre
>
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> drivers/mmc/sunxi_mmc.c | 10 +++++-----
> drivers/mmc/sunxi_mmc.h | 4 ++++
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
> index 31dbfb10c59..951e6acd34d 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -449,23 +449,23 @@ out:
> return error;
> }
>
> -static void sunxi_mmc_reset(struct sunxi_mmc *regs)
> +static void sunxi_mmc_reset(void *regs)
> {
> /* Reset controller */
> - writel(SUNXI_MMC_GCTRL_RESET, ®s->gctrl);
> + writel(SUNXI_MMC_GCTRL_RESET, regs + SUNXI_MMC_GCTRL);
> udelay(1000);
>
> if (IS_ENABLED(CONFIG_SUN50I_GEN_H6) || IS_ENABLED(CONFIG_SUNXI_GEN_NCAT2)) {
> /* Reset card */
> - writel(SUNXI_MMC_HWRST_ASSERT, ®s->hwrst);
> + writel(SUNXI_MMC_HWRST_ASSERT, regs + SUNXI_MMC_HWRST);
> udelay(10);
> - writel(SUNXI_MMC_HWRST_DEASSERT, ®s->hwrst);
> + writel(SUNXI_MMC_HWRST_DEASSERT, regs + SUNXI_MMC_HWRST);
> udelay(300);
>
> /* Setup FIFO R/W threshold. Needed on H616. */
> writel(SUNXI_MMC_THLDC_READ_THLD(512) |
> SUNXI_MMC_THLDC_WRITE_EN |
> - SUNXI_MMC_THLDC_READ_EN, ®s->thldc);
> + SUNXI_MMC_THLDC_READ_EN, regs + SUNXI_MMC_THLDC);
> }
> }
>
> diff --git a/drivers/mmc/sunxi_mmc.h b/drivers/mmc/sunxi_mmc.h
> index 9d55904c213..bc313dcabe0 100644
> --- a/drivers/mmc/sunxi_mmc.h
> +++ b/drivers/mmc/sunxi_mmc.h
> @@ -12,6 +12,10 @@
>
> #include <linux/types.h>
>
> +#define SUNXI_MMC_GCTRL 0x000
> +#define SUNXI_MMC_HWRST 0x078
> +#define SUNXI_MMC_THLDC 0x100
> +
> struct sunxi_mmc {
> u32 gctrl; /* 0x00 global control */
> u32 clkcr; /* 0x04 clock control */
>
prev parent reply other threads:[~2025-03-25 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 6:12 [PATCH] sunxi: mmc: Improve reset procedure Jernej Skrabec
2025-03-25 1:16 ` Andre Przywara
2025-03-25 13:39 ` Andre Przywara
2025-03-25 14:27 ` FIXUP! " Andre Przywara
2025-03-25 16:13 ` Jernej Škrabec [this message]
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=2772552.mvXUDI8C0e@jernej-laptop \
--to=jernej.skrabec@gmail.com \
--cc=andre.przywara@arm.com \
--cc=jh80.chung@samsung.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.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