[PATCH] mmc: sdhci-pxa: Add device tree support

haojian.zhuang at gmail.com haojian.zhuang at gmail.com
Thu Jun 14 12:15:23 EST 2012


On , Chris Ball <cjb at laptop.org> wrote:
> Hi Zhangfei,



> On Tue, Jun 12 2012, zhangfei gao wrote:

> > On Wed, Jun 13, 2012 at 3:05 AM, Chris Ball cjb at laptop.org> wrote:


> How do you feel about having the compatible node say "sdhci-pxav3"
> instead of "mrvl,pxav3-mmc"? I used the mrvl prefix because it fits
> in with the rest of your existing DT, but it seems like it would be
> better to name the driver directly. The DTs here live inside the
> source tree, so we're not depending on anyone else's terminology.

> If you're okay with sdhci-pxav{2,3} in compatible, I'll include that
> in v2 of the patch with the rest of your fixes.

Compatible node could be "mrvl,pxav3-mmc" or "mrvl,sdhci-pxav3". It's
depend on your choice. I prefer to use vendor name in compatible property.
And we could avoid naming conflict.

+ if (of_find_property(np, "non-removable", NULL))
+ pdata->flags |= PXA_FLAG_CARD_PERMANENT;
+
+ of_property_read_u32(np, "bus-width", &bus_width);
+ if (bus_width == 8)
+ pdata->flags |= PXA_FLAG_SD_8_BIT_CAPABLE_SLOT;
+
+ of_property_read_u32(np, "clk-delay-cycles", &clk_delay_cycles);
+ if (clk_delay_cycles > 0)
+ pdata->clk_delay_cycles = clk_delay_cycles;
+

These properties should be "mrvl,non-removable", "mrvl,bus-width",
"mrvl,clk-delay-cycles". Since it's mentioned in
Documentations/devicetree/booting-without-of.txt. "It is recommended
that if you add any "custom" property whose name may clash with
standard defined ones, you prefix them with your vendor name and
a comma."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120614/0b5a0a48/attachment.html>


More information about the devicetree-discuss mailing list