devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hongtao Wu <wuht06@gmail.com>
To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	devicetree@vger.kernel.org, catalin.marinas@arm.com,
	will.deacon@arm.com, linux-arm-kernel@lists.infradead.org,
	shawn.lin@rock-chips.com
Cc: Orson.Zhai@spreadtrum.com, Chunyan.Zhang@spreadtrum.com,
	Jason.Wu@spreadtrum.com
Subject: [RFC PATCH v3 0/3] Add MMC host driver for Spreadtrum SoC
Date: Sat, 15 Aug 2015 00:55:50 +0800	[thread overview]
Message-ID: <1439571353-30165-1-git-send-email-wuht06@gmail.com> (raw)
In-Reply-To: <y>

This patch adds MMC host driver for Spreadtrum SoC.
The following coding style may be not meet kernel coding style.
I am not sure this kind of coding style is better or worse.
1) A macro that represent some bits of a register is added a prefix "__",
    for example:
    #define SDHOST_16_HOST_CTRL_2   0x3E
    #define __TIMING_MODE_SDR12     0x0000
    #define __TIMING_MODE_SDR25     0x0001
    #define __TIMING_MODE_SDR50     0x0002
    I think it is more useful to distinguish a register from a bit of this
    register.
2) A function in order to operate a register is also added a prefix "_".
    If the functions(A) call other function(B), we added a prefix "__" before B,
    for example:
    static inline void _sdhost_enable_int(struct sdhost_host *host, u32 mask)
    {
        __local_writel(mask, host, SDHOST_32_INT_ST_EN);
        __local_writel(mask, host, SDHOST_32_INT_SIG_EN);
    }
    I think this make the relationship of the function call more explicit.

Changes in v3:
- add Spreadtrum MMC DT bindings.
- add MMC nodes in Spreadtrum DT files
- release resources when there is an error or removing MMC host driver.

Changes in v2:
- delete some redundant mdelay()
- add error handling in some functions.

Billows Wu(HongtaoWu) (3):
  mmc: sprd: add MMC host driver for Spreadtrum SoC
  Documentation: add Spreadtrum MMC DT bindings.
  DT: add MMC nodes in Spreadtrum DT files.

 Documentation/devicetree/bindings/mmc/sprd-mmc.txt |   46 +
 arch/arm64/boot/dts/sprd/sc9836-openphone.dts      |   24 +
 arch/arm64/boot/dts/sprd/sharkl64.dtsi             |   44 +
 drivers/mmc/host/Kconfig                           |    6 +
 drivers/mmc/host/Makefile                          |    1 +
 drivers/mmc/host/sprd_sdhost.c                     | 1202 ++++++++++++++++++++
 drivers/mmc/host/sprd_sdhost.h                     |  615 ++++++++++
 drivers/mmc/host/sprd_sdhost_debugfs.c             |  212 ++++
 drivers/mmc/host/sprd_sdhost_debugfs.h             |   27 +
 9 files changed, 2177 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mmc/sprd-mmc.txt
 create mode 100644 drivers/mmc/host/sprd_sdhost.c
 create mode 100644 drivers/mmc/host/sprd_sdhost.h
 create mode 100644 drivers/mmc/host/sprd_sdhost_debugfs.c
 create mode 100644 drivers/mmc/host/sprd_sdhost_debugfs.h

--
1.7.9.5

             reply	other threads:[~2015-08-14 16:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 16:55 Hongtao Wu [this message]
2015-08-14 16:55 ` [RFC PATCH v3 1/3] mmc: sprd: Add MMC host driver for Spreadtrum SoC Hongtao Wu
     [not found]   ` <1439571353-30165-2-git-send-email-wuht06-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-10 13:28     ` Ulf Hansson
2015-09-28  7:18       ` Hongtao Wu
2015-09-28  7:37         ` Shawn Lin
2015-09-28  7:57           ` Hongtao Wu
2015-10-06  9:18         ` Ulf Hansson
2015-10-08 13:37           ` Hongtao Wu
     [not found]             ` <CAG_R4_X3kQj5xSA5KLyu75aqusPNXj0H4Xqx+m+5Sg5cZ15bBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-08 13:54               ` Ulf Hansson
2015-10-09 13:23                 ` Hongtao Wu
2015-08-14 16:55 ` [RFC PATCH v3 2/3] Documentation: Add Spreadtrum MMC DT bindings Hongtao Wu
2015-08-14 16:55 ` [RFC PATCH v3 3/3] DT: Add MMC nodes in Spreadtrum DT files Hongtao Wu
2015-09-10 11:23 ` [RFC PATCH v3 0/3] Add MMC host driver for Spreadtrum SoC Ulf Hansson

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=1439571353-30165-1-git-send-email-wuht06@gmail.com \
    --to=wuht06@gmail.com \
    --cc=Chunyan.Zhang@spreadtrum.com \
    --cc=Jason.Wu@spreadtrum.com \
    --cc=Orson.Zhai@spreadtrum.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=will.deacon@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).