From: Arnd Bergmann <arnd@arndb.de>
To: dinguyen@altera.com
Cc: dinh.linux@gmail.com, mturquette@linaro.org,
rob.herring@calxeda.com, pawel.moll@arm.com,
mark.rutland@arm.com, ian.campbell@citrix.com, cjb@laptop.org,
jh80.chung@samsung.com, tgih.jun@samsung.com,
devicetree@vger.kernel.org, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv4 1/4] arm: dts: Add support for SD/MMC on SOCFPGA
Date: Thu, 5 Dec 2013 22:08:38 +0100 [thread overview]
Message-ID: <201312052208.38342.arnd@arndb.de> (raw)
In-Reply-To: <1386263677-7733-2-git-send-email-dinguyen@altera.com>
On Thursday 05 December 2013, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
>
> Re-use the "rockchip,rk2928-dw-mshc" binding that will support SD/MMC on
> Altera's SOCFPGA platform.
>
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> ---
> v3: Re-use "rockchip,rk2928-dw-mshc" binding
> v3: none
> v2: none
> ---
> arch/arm/boot/dts/socfpga.dtsi | 11 +++++++++++
> arch/arm/boot/dts/socfpga_arria5.dtsi | 12 ++++++++++++
> arch/arm/boot/dts/socfpga_cyclone5.dtsi | 12 ++++++++++++
> arch/arm/boot/dts/socfpga_vt.dts | 12 ++++++++++++
> 4 files changed, 47 insertions(+)
>
> diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
> index f936476..3d9f01b 100644
> --- a/arch/arm/boot/dts/socfpga.dtsi
> +++ b/arch/arm/boot/dts/socfpga.dtsi
> @@ -469,6 +469,17 @@
> cache-level = <2>;
> };
>
> + mmc: dwmmc0@ff704000 {
> + compatible = "rockchip,rk2928-dw-mshc";
> + reg = <0xff704000 0x1000>;
> + interrupts = <0 139 4>;
> + fifo-depth = <0x400>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + clocks = <&l4_mp_clk>, <&sdmmc_clk>;
> + clock-names = "biu", "ciu";
> + };
I think it's great that you can reuse the existing driver, but I'd recommend
using a generic compatible string here in addition to one that identifies
your specific implementation. You can list "rockchip,rk2928-dw-mshc" as
well, but that is probably not necessary.
What I'd expect to see here is either
compatible = "altr,socfpga-dw-mshc", "rockchip,rk2928-dw-mshc", "snps,dw-mshc";
or
compatible = "altr,socfpga-dw-mshc", "rockchip,rk2928-dw-mshc", "snps,dw-mshc";
It's probably not too late to generalize the SDMMC_CMD_USE_HOLD_REG
handling, which is currently the only difference between the generic
"snps,dw-mshc" and the newer "rockchip,rk2928-dw-mshc" variant.
It's quite likely that all implementations should actually set
SDMMC_CMD_USE_HOLD_REG (if both rockchips and altera set it) and you
don't need to have any distinction in the dw_mmc-pltfm.c driver at all.
If it's actually needed on some but not others, you could add a binary
DT property to tell the driver about it rather than keying it off of
the compatible string. If it's needed only on older (or only on newer)
versions of the dw-mshc design, it could be encoded as a version in the
string, such as "snps,dw-mshc-1.234".
Arnd
next prev parent reply other threads:[~2013-12-05 21:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 17:14 [PATCHv4 0/4] socfpga: Enable SD/MMC support dinguyen
2013-12-05 17:14 ` [PATCHv4 1/4] arm: dts: Add support for SD/MMC on SOCFPGA dinguyen
2013-12-05 21:08 ` Arnd Bergmann [this message]
2013-12-05 22:10 ` Dinh Nguyen
2013-12-06 0:47 ` Arnd Bergmann
2013-12-05 17:14 ` [PATCHv4 2/4] clk: socfpga: Add a hook for SD/MMC driver to control CIU clock settings dinguyen
2013-12-05 20:57 ` Arnd Bergmann
2013-12-10 14:08 ` Dinh Nguyen
2013-12-10 18:15 ` Arnd Bergmann
2013-12-12 21:45 ` Dinh Nguyen
2013-12-05 17:14 ` [PATCHv4 3/4] mmc: dw_mmc-socfpga: Remove the SOCFPGA specific platform for dw_mmc dinguyen
2013-12-05 17:14 ` [PATCHv4 4/4] ARM: socfpga_defconfig: enable SD/MMC support dinguyen
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=201312052208.38342.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=cjb@laptop.org \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@altera.com \
--cc=dinh.linux@gmail.com \
--cc=ian.campbell@citrix.com \
--cc=jh80.chung@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=tgih.jun@samsung.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).