mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Yann Sionneau <ysionneau@kalray.eu>
To: barebox@lists.infradead.org
Subject: mci: SDHC generic driver? refactor dove-sdhci?
Date: Fri, 8 Feb 2019 16:49:09 +0100	[thread overview]
Message-ID: <05f625c3-e8ab-157c-2c48-d82d5fc5953a@kalray.eu> (raw)

Hello,

I've written a driver for snps,dw-mshc, which is compatible with SDHC spec.

Basically I've just copy pasted the dove-sdhci.c one and modified a few 
lines to add:

* support for host_v4 mode

* 64 bit addressing

* 64-bit SDMA

* PIO mode

* Support for 10-bit clock divider (max divider of 2046 instead of 256)

Chosing between SDMA and PIO is done with Kconfig defines at compile 
time. It's either one or the other.

Since snps,dw-mshc and dove-sdhci share the same code, because both 
respect SDHC spec I would propose to rename dove-sdhci.c into sdhci.c 
and remove all dove mentions inside.

Then write a dove-sdhci.c which registers via the sdhci generic layer 
and same thing for dw-mshc.

This allows lot of code sharing between SDHC compatible devices and also 
eases a lot the writing of new drivers.

Would that be OK?

Thanks!

Best regards,

-- 

Yann


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-02-08 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 15:49 Yann Sionneau [this message]
2019-02-11  8:48 ` Sascha Hauer

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=05f625c3-e8ab-157c-2c48-d82d5fc5953a@kalray.eu \
    --to=ysionneau@kalray.eu \
    --cc=barebox@lists.infradead.org \
    /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