Re: [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better

2011-09-07 Thread Tabi Timur-B04825
On Mon, Jan 17, 2011 at 2:25 PM, Scott Wood wrote: > +       for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) { > +               if (p[i * 2] % IRQS_PER_MSI_REG || > +                   p[i * 2 + 1] % IRQS_PER_MSI_REG) { > +                       printk(KERN_WARNING "%s: %s: msi avai

Re: [PATCH 1/2] input: samsung-keypad: Add HAVE_SAMSUNG_KEYPAD config option

2011-09-07 Thread Dmitry Torokhov
Hi Thomas, On Tue, Sep 06, 2011 at 07:25:16PM +0530, Thomas Abraham wrote: > Samsung keyboard driver could be used with platforms using device tree. > So the inclusion of samsung keyboard driver cannot be based on > SAMSUNG_DEV_KEYPAD. A new config option HAVE_SAMSUNG_KEYPAD is added > which devic

[PATCH v2 0/6] Add fdtget and fdtput for access to fdt from build system

2011-09-07 Thread Simon Glass
This patch set adds two new utilities: fdtget for reading properties from a device tree binary file fdtput for updating the device tree binary file These are useful in scripts where configuration or other information must be passed to the running system from the build system or vice versa.

[PATCH v2 4/6] fdtget: Add basic tests

2011-09-07 Thread Simon Glass
This adds a few tests for common use cases. Signed-off-by: Simon Glass --- Changes in v2: - Adjust tests for new fdtget arguments tests/fdtget-runtest.sh | 35 +++ tests/run_tests.sh | 36 +++- tests/tests.sh |

[PATCH v2 1/6] Add utilfdt for common functions

2011-09-07 Thread Simon Glass
This adds a new utility library for performing libfdt operations. Signed-off-by: Simon Glass --- Changes in v2: - Remove util_decode_key - Add utilfdt_decode_type to be used by fdtget/put - Remove limits on device tree binary size utilfdt.c | 120 +++

[PATCH v2 2/6] ftdump: use util_read_fdt

2011-09-07 Thread Simon Glass
Now that we have this function, ftdump should use it too. Signed-off-by: Simon Glass --- Makefile|2 +- Makefile.ftdump |3 ++- ftdump.c| 33 + 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 2172

[PATCH v2 6/6] fdtput: Add basic tests

2011-09-07 Thread Simon Glass
These tests verify the major features. Signed-off-by: Simon Glass --- Changes in v2: - Adjust tests for new fdtput arguments - Add test for multiple strings - Add test for exhausting fdt space tests/fdtput-runtest.sh | 55 +++ tests/run_tests.sh | 73 +++

[PATCH v2 3/6] Add fdtget utility to read property values from device tree

2011-09-07 Thread Simon Glass
This simply utility makes it easy for scripts to read values from the device tree. It is written in C and uses the same libfdt as the rest of the dtc package. What is it for: - Reading fdt values from scripts - Extracting fdt information within build systems - Looking at particular values without

[PATCH v2 5/6] Add new fdtput utility to write values to fdt

2011-09-07 Thread Simon Glass
This simple utility allows writing of values into a device tree from the command line. It aimes to be the opposite of fdtget. What is it for: - Updating fdt values when a binary blob already exists (even though source may be available it might be easier to use this utility rather than sed,

Re: [PATCH 2/2] input: samsung-keypad: Add device tree support

2011-09-07 Thread Dmitry Torokhov
Hi Thomas, On Tue, Sep 06, 2011 at 07:25:17PM +0530, Thomas Abraham wrote: > static int samsung_keypad_is_s5pv210(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > - enum samsung_keypad_type type = > - platform_get_device_id(pdev)->driver_d

Re: [PATCH 1/2] input: samsung-keypad: Add HAVE_SAMSUNG_KEYPAD config option

2011-09-07 Thread Dmitry Torokhov
On Wed, Sep 07, 2011 at 11:22:48AM -0700, Dmitry Torokhov wrote: > Hi Thomas, > > On Tue, Sep 06, 2011 at 07:25:16PM +0530, Thomas Abraham wrote: > > Samsung keyboard driver could be used with platforms using device tree. > > So the inclusion of samsung keyboard driver cannot be based on > > SAMSU

[PATCH v2 0/3] Support character literals

2011-09-07 Thread Anton Staaf
These patches add simple and escaped character literal parsing support to the dtc for cell lists and bytestrings. The first patch refactors the string parsing code in data.c to expose the more primitive character parsing code for use in the later patches. I have left the bytestring support in

[PATCH v2 2/3] dtc: Support character literals in cell lists

2011-09-07 Thread Anton Staaf
With this patch the following property assignment: property = <0x12345678 'a' '\r' 100>; is equivalent to: property = <0x12345678 0x0061 0x000D 0x0064> Signed-off-by: Anton Staaf Cc: Jon Loeliger Cc: David Gibson --- Documentation/dts-format.txt |2 +- Documentation/

[PATCH v2 3/3] dtc: Support character literals in bytestrings

2011-09-07 Thread Anton Staaf
With this patch the following property assignment: property = ['a' 2b '\r']; is equivalent to: property = [61 2b 0d]; Signed-off-by: Anton Staaf Cc: Jon Loeliger Cc: David Gibson --- Documentation/dts-format.txt |5 +++-- dtc-lexer.l | 14 ++ 2 fil

[PATCH v2 1/3] dtc: Refactor character literal parsing code

2011-09-07 Thread Anton Staaf
Move the parsing of hex, octal and escaped characters from data.c to util.c where it can be used for character literal parsing within strings as well as for stand alone C style character literals. Signed-off-by: Anton Staaf Cc: Jon Loeliger Cc: David Gibson --- data.c | 77 +-

Re: [PATCH 1/2] input: samsung-keypad: Add HAVE_SAMSUNG_KEYPAD config option

2011-09-07 Thread Thomas Abraham
Hi Dmitry, On 7 September 2011 23:52, Dmitry Torokhov wrote: > Hi Thomas, > > On Tue, Sep 06, 2011 at 07:25:16PM +0530, Thomas Abraham wrote: >> Samsung keyboard driver could be used with platforms using device tree. >> So the inclusion of samsung keyboard driver cannot be based on >> SAMSUNG_DEV

Re: [PATCH 1/2] input: samsung-keypad: Add HAVE_SAMSUNG_KEYPAD config option

2011-09-07 Thread Thomas Abraham
Hi Dmitry, On 8 September 2011 03:19, Dmitry Torokhov wrote: [...] > BTW, should we do something like below? > > Thanks. > > -- > Dmitry > > Input: samsung-keypad - enable compiling on other platforms > > From: Dmitry Torokhov > > There is nothing in keypad platform definitions that requires >

Re: [PATCH v2 0/3] Support character literals

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 04:15:37PM -0700, Anton Staaf wrote: > These patches add simple and escaped character literal parsing support > to the dtc for cell lists and bytestrings. The first patch refactors the > string parsing code in data.c to expose the more primitive character parsing > code

Re: [PATCH v2 1/3] dtc: Refactor character literal parsing code

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 04:15:38PM -0700, Anton Staaf wrote: > Move the parsing of hex, octal and escaped characters from data.c > to util.c where it can be used for character literal parsing within > strings as well as for stand alone C style character literals. [snip] > +char get_oct_char(const

Re: [PATCH v2 2/3] dtc: Support character literals in cell lists

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 04:15:39PM -0700, Anton Staaf wrote: > With this patch the following property assignment: > > property = <0x12345678 'a' '\r' 100>; > > is equivalent to: > > property = <0x12345678 0x0061 0x000D 0x0064> > > Signed-off-by: Anton Staaf > Cc: Jon Loelig

Re: [PATCH v2 3/3] dtc: Support character literals in bytestrings

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 04:15:40PM -0700, Anton Staaf wrote: > With this patch the following property assignment: > > property = ['a' 2b '\r']; > > is equivalent to: > > property = [61 2b 0d]; So, I still have some reservations about this syntax. It occurred to me: do you actually need

Re: [PATCH 2/2] input: samsung-keypad: Add device tree support

2011-09-07 Thread Thomas Abraham
Hi Dmitry, On 8 September 2011 02:20, Dmitry Torokhov wrote: > Hi Thomas, > > On Tue, Sep 06, 2011 at 07:25:17PM +0530, Thomas Abraham wrote: >>  static int samsung_keypad_is_s5pv210(struct device *dev) >>  { >>       struct platform_device *pdev = to_platform_device(dev); >> -     enum samsung_k

Re: [PATCH v2 0/3] Support character literals

2011-09-07 Thread David Gibson
On Thu, Sep 08, 2011 at 01:18:42PM +1000, David Gibson wrote: > On Wed, Sep 07, 2011 at 04:15:37PM -0700, Anton Staaf wrote: > > These patches add simple and escaped character literal parsing support > > to the dtc for cell lists and bytestrings. The first patch refactors the > > string parsin

Re: [PATCH v2 1/6] Add utilfdt for common functions

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 12:54:15PM -0700, Simon Glass wrote: > This adds a new utility library for performing libfdt operations. > > Signed-off-by: Simon Glass > --- > Changes in v2: > - Remove util_decode_key > - Add utilfdt_decode_type to be used by fdtget/put > - Remove limits on device tree b

Re: [PATCH v2 6/6] fdtput: Add basic tests

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 12:54:20PM -0700, Simon Glass wrote: > These tests verify the major features. Again, fold it into the previous patch. No point having code and tests for the code separate. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbe

Re: [PATCH v2 5/6] Add new fdtput utility to write values to fdt

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 12:54:19PM -0700, Simon Glass wrote: > This simple utility allows writing of values into a device tree from the > command line. It aimes to be the opposite of fdtget. > > What is it for: > - Updating fdt values when a binary blob already exists >(even though source may

Re: [PATCH v2 3/6] Add fdtget utility to read property values from device tree

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 12:54:17PM -0700, Simon Glass wrote: > This simply utility makes it easy for scripts to read values from the device > tree. It is written in C and uses the same libfdt as the rest of the dtc > package. > > What is it for: > - Reading fdt values from scripts > - Extracting f

Re: [PATCH v2 4/6] fdtget: Add basic tests

2011-09-07 Thread David Gibson
On Wed, Sep 07, 2011 at 12:54:18PM -0700, Simon Glass wrote: > This adds a few tests for common use cases. Fold this in with the patch adding fdtget itself. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _