From: Rob Herring <robherring2@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rob.herring@calxeda.com, grant.likely@secretlab.ca,
linaro-dev@lists.linaro.org, andriy.shevchenko@intel.com,
patches@linaro.org, devicetree-discuss@lists.ozlabs.org,
spear-devel@list.st.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH Resend V2] dt: add helper function to read u8 & u16 variables & arrays
Date: Sun, 11 Nov 2012 13:42:03 -0600 [thread overview]
Message-ID: <509FFF8B.3010707@gmail.com> (raw)
In-Reply-To: <CAKohpoksQ4ShO_QFAQORO2_oEgNtOeENFnX1C3gN_5POQSGexg@mail.gmail.com>
On 11/11/2012 11:27 AM, Viresh Kumar wrote:
> On 11 November 2012 19:42, Rob Herring <robherring2@gmail.com> wrote:
>> On 11/06/2012 10:22 PM, viresh kumar wrote:
>
>>> cluster0: cluster@0 {
>>> + data1 = <0x50 0x60 0x70>;
>>> + data2 = <0x5000 0x6000 0x7000>;
>>> + data3 = <0x50000000 0x60000000 0x70000000>;
>>
>> So there is a mismatch in our assumptions. You are just truncating
>> 32-bit values. I assumed you were using the 8 and 16 bit sizes that are
>> now supported in dts. I don't think we should just truncate values
>> blindly. We have support for specifying 8 and 16 values now so you
>> should use that and define that as part of a binding.
>
> Sorry couldn't get your point at all :(
> What did you mean by "truncating 32 bit values" and how should we
> tell via DT, that the value passed is 8 bit, 16 bit or 32 bit?
>
You are trying to retrieve an array of 8 or 16-bit values which are
stored as 32-bit values in dtb. Why not define them in the binding as 8
or 16 bit to begin with. Then there is never any ambiguity about their size.
I don't think the size is stored in the dtb. It is only in the dts. You
need to define the size in the binding definitions and use '/bits/'
annotation. With this the data is packed. Then the array function used
should match what the binding defines.
Rob
next prev parent reply other threads:[~2012-11-11 19:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 4:20 [PATCH Resend V2] dt: add helper function to read u8 & u16 variables & arrays Viresh Kumar
[not found] ` <64c5278ebdec503f83e9b7002bf13affb7f3260f.1351225085.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-06 11:08 ` Viresh Kumar
2012-11-06 14:18 ` Rob Herring
[not found] ` <50991C41.50705-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-06 14:39 ` Viresh Kumar
2012-11-07 4:22 ` viresh kumar
[not found] ` <CAOh2x==LNuSFftB1r8cyJ6TOqOVJfExMTUVxKZnS16wL4B8eBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-11 5:04 ` Viresh Kumar
2012-11-11 5:04 ` Viresh Kumar
2012-11-11 14:12 ` Rob Herring
2012-11-11 17:27 ` Viresh Kumar
2012-11-11 19:42 ` Rob Herring [this message]
[not found] ` <509FFF8B.3010707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-12 3:33 ` Viresh Kumar
2012-11-12 3:33 ` Viresh Kumar
2012-11-19 3:54 ` Viresh Kumar
2012-11-19 6:24 ` Rajanikanth HV
[not found] ` <CAB4BAks+eym9+qNZjxwkg7XxJrMwkaYFWGM5_YQk_TzfxyoHaw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-19 6:30 ` Viresh Kumar
2012-11-19 6:30 ` Viresh Kumar
[not found] ` <CAKohpo=U2xss6cZMBKsbLJ4G-AWeEnHz8V-HFw2NKx0fucTK8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-19 6:35 ` Rajanikanth HV
2012-11-19 6:35 ` Rajanikanth HV
2012-11-19 6:41 ` Viresh Kumar
2012-11-19 16:28 ` Stephen Warren
2012-11-19 17:37 ` Viresh Kumar
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=509FFF8B.3010707@gmail.com \
--to=robherring2@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rob.herring@calxeda.com \
--cc=spear-devel@list.st.com \
--cc=viresh.kumar@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.