All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jaehoon Chung" <jh80.chung@samsung.com>
To: "'Maxim Kiselev'" <bigunclemax@gmail.com>,
	"'Sean Anderson'" <sean.anderson@seco.com>
Cc: "'Tom Rini'" <trini@konsulko.com>,
	"'Peng Fan'" <peng.fan@nxp.com>,
	"'Marek Vasut'" <marek.vasut+renesas@mailbox.org>,
	"'Paul Barker'" <paul.barker.ct@bp.renesas.com>,
	"'Kever Yang'" <kever.yang@rock-chips.com>,
	"'Peter Geis'" <pgwipeout@gmail.com>,
	"'Oleksandr Suvorov'" <oleksandr.suvorov@foundries.io>,
	"'Stefan Roese'" <sr@denx.de>, <u-boot@lists.denx.de>
Subject: RE: [RFC PATCH v1 1/1] mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC
Date: Wed, 17 Apr 2024 19:50:50 +0900	[thread overview]
Message-ID: <01ca01da90b5$1c787e70$55697b50$@samsung.com> (raw)
In-Reply-To: <CALHCpMhx_ViUXfgPPAHfn4jTp7X9grYCtAxH3pnz1bYjkUAg7Q@mail.gmail.com>

Hi,

> -----Original Message-----
> From: Maxim Kiselev <bigunclemax@gmail.com>
> Sent: Wednesday, April 3, 2024 3:57 AM
> To: Sean Anderson <sean.anderson@seco.com>
> Cc: Tom Rini <trini@konsulko.com>; Peng Fan <peng.fan@nxp.com>; Jaehoon Chung <jh80.chung@samsung.com>;
> Marek Vasut <marek.vasut+renesas@mailbox.org>; Paul Barker <paul.barker.ct@bp.renesas.com>; Kever Yang
> <kever.yang@rock-chips.com>; Peter Geis <pgwipeout@gmail.com>; Oleksandr Suvorov
> <oleksandr.suvorov@foundries.io>; Stefan Roese <sr@denx.de>; u-boot@lists.denx.de
> Subject: Re: [RFC PATCH v1 1/1] mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC
> 
> Hi, Sean
> 
> вт, 2 апр. 2024 г. в 18:39, Sean Anderson <sean.anderson@seco.com>:
> >
> > On 3/30/24 13:59, Maksim Kiselev wrote:
> > > Add support for DesignWare SDHCI host controller on Alibaba TH1520 SoC
> > >
> > > Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
> > > ---
> > > drivers/mmc/Kconfig | 12 +
> > > drivers/mmc/Makefile | 1 +
> > > drivers/mmc/snps_sdhci.c | 464 +++++++++++++++++++++++++++++++++++++++
> > > 3 files changed, 477 insertions(+)
> > > create mode 100644 drivers/mmc/snps_sdhci.c
> > >
> > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> > > index cef05790dd..6936fa0928 100644
> > > --- a/drivers/mmc/Kconfig
> > > +++ b/drivers/mmc/Kconfig
> > > @@ -671,6 +671,18 @@ config MMC_SDHCI_S5P
> > >
> > > If unsure, say N.
> > >
> > > +config MMC_SDHCI_SNPS
> > > + bool "Synopsys DesignWare SDHCI controller"
> > > + depends on MMC_SDHCI
> > > + depends on DM_MMC
> > > + help
> > > + Support for DesignWare SDHCI host controller on Alibaba TH1520 SoC.
> > > + This is a highly configurable and programmable, high performance
> > > + Mobile Storage Host Controller (MSHC) with AXI as the bus interface
> > > + for data transfer.
> > > +
> > > + If unsure, say N.
> > > +
> >
> > Why not use MMC_DW?
> 
> That driver looks completely different. As I notice in the cover letter,
> the MMC_SDHCI_ROCKCHIP driver is closer to TH1520 driver.
> https://lore.kernel.org/u-boot/20240330175948.80931-1-bigunclemax@gmail.com/
> 
> Their IP blocks look very similar.
> Moreover, on Linux, Rockchip SDHCI controllers (ex. rockchip,rk3588-dwcmshc)
> and the TH1520 controller live in the same driver - sdhci-of-dwcmshc.c

Right. I didn't have its TRM. AFAIK, It's a different IP with DW_MMC.

> 
> We could do the same for U-boot. It will require to get rid of Rockchip
> specific defines that come from asm/arch-rockchip/hardware.h.
> And maybe rename the rockchip_sdhci.c driver to sdhci-of-dwcmshc.c.

In u-boot, rochkip_sdhci.c is including the specific rockchip code. (rockchip header..)
So I think that it can be a huge refactoring to use both SoC.

But if it's possible, I think that it can be reusable.

> 
> That's why I mark this series as RFC. So I'm willing to discuss any option.
> 
> > --Sean
> >
> >
> > [Embedded World 2024, SECO SpA]<https://www.messe-
> ticket.de/Nuernberg/embeddedworld2024/Register/ew24517689>
> 
> Cheers,
> Maksim



      reply	other threads:[~2024-04-17 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 17:59 [RFC PATCH v1 0/1] Add TH1520 eMMC/SD controller support Maksim Kiselev
2024-03-30 17:59 ` [RFC PATCH v1 1/1] mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC Maksim Kiselev
2024-04-02 14:47   ` Heinrich Schuchardt
2024-04-02 17:19     ` Maxim Kiselev
2024-04-02 19:08       ` Heinrich Schuchardt
2024-04-02 15:39   ` Sean Anderson
2024-04-02 18:56     ` Maxim Kiselev
2024-04-17 10:50       ` Jaehoon Chung [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='01ca01da90b5$1c787e70$55697b50$@samsung.com' \
    --to=jh80.chung@samsung.com \
    --cc=bigunclemax@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=oleksandr.suvorov@foundries.io \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=peng.fan@nxp.com \
    --cc=pgwipeout@gmail.com \
    --cc=sean.anderson@seco.com \
    --cc=sr@denx.de \
    --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 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.