From mboxrd@z Thu Jan 1 00:00:00 1970 From: haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Subject: Re: Re: [PATCH] mmc: sdhci-pxa: Add device tree support Date: Thu, 14 Jun 2012 02:15:23 +0000 Message-ID: References: <87sjdzxpqr.fsf@octavius.laptop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3627717907685580079==" Return-path: In-Reply-To: <87sjdzxpqr.fsf-DGHOrqG7t0YzNDMTQreKSUB+6BGkLq7r@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Chris Ball , Haojian Zhuang Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Philip Rakity , linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Zhangfei Gao , zhangfei gao List-Id: devicetree@vger.kernel.org --===============3627717907685580079== Content-Type: multipart/alternative; boundary=e89a8ff1c3b8b41ef304c26545d6 --e89a8ff1c3b8b41ef304c26545d6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes On , Chris Ball wrote: > Hi Zhangfei, > On Tue, Jun 12 2012, zhangfei gao wrote: > > On Wed, Jun 13, 2012 at 3:05 AM, Chris Ball cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.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." --e89a8ff1c3b8b41ef304c26545d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On , Chris Ball <cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org> wrote:
> Hi Zhangfei,
&= gt;
>
>
> On Tue, Jun 12 2012, zhangfei gao wrot= e:
>
> > On Wed, Jun 13, 2012 at 3:05 AM, Chris Ball cj= b@laptop.org> wrote:
>
>
> How do you feel abo= ut having the compatible node say "sdhci-pxav3"
> instead= of "mrvl,pxav3-mmc"? =A0I used the mrvl prefix because it fits> in with the rest of your existing DT, but it seems like it would b= e
> better to name the driver directly. =A0The 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,pxa= v3-mmc" or "mrvl,sdhci-pxav3". It's
depend on your= choice. I prefer to use vendor name in compatible property.
And we co= uld avoid naming conflict.

+ if (of_find_property(np, &quo= t;non-removable", NULL))
+ pdata->flags |=3D PXA= _FLAG_CARD_PERMANENT;
+
+ of_property_read_u32(np, "bu= s-width", &bus_width);
+ if (bus_width =3D=3D 8)
+ = pdata->flags |=3D PXA_FLAG_SD_8_BIT_CAPABLE_SLOT;
+
+ of_property_read_u32(np, "clk-delay-cycles", &clk_delay_= cycles);
+ if (clk_delay_cycles > 0)
+ pda= ta->clk_delay_cycles =3D clk_delay_cycles;
+

These prope= rties 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 an= d
a comma." --e89a8ff1c3b8b41ef304c26545d6-- --===============3627717907685580079== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss --===============3627717907685580079==--