[GIT PULL] bug fix for devicetree memory parsing

2014-07-06 Thread Grant Likely
Hi Linus, Can you pull this bug fix into your tree please? Thanks, g. The following changes since commit a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee: Linux 3.16-rc2 (2014-06-21 19:02:54 -1000) are available in the git repository at: git://git.secretlab.ca/git/linux tags/dt-for-linus for you

[PATCH] of/platform: Fix of_platform_device_destroy iteration of devices

2014-07-04 Thread Grant Likely
, and drivers are responsible for getting rid of any child devices that weren't created by of_platform_populate. Signed-off-by: Grant Likely Cc: Pawel Moll Cc: Pantelis Antoniou --- drivers/of/platform.c | 32 +--- include/linux/of.h | 1 + in

Re: [PATCH] of: Transactional DT support.

2014-06-25 Thread Grant Likely
On Wed, 25 Jun 2014 12:20:16 -0700, Dan Malek wrote: > > On Jun 25, 2014, at 7:48 AM, Pantelis Antoniou > wrote: > > >>> +int of_transaction_commit(struct of_transaction *oft); > >> > >> How about of_transaction_apply()? > >> > > > > Sure. > > LOL! Panto, you give in too easily :) > > An

Re: [PATCH 5/6] OF: Utility helper functions for dynamic nodes

2014-06-25 Thread Grant Likely
On Tue, 24 Jun 2014 10:10:01 +0200, Alexander Sverdlin wrote: > Hi Pantelis, Grant, > > On 23/06/14 20:33, Ioan Nicu wrote: > >>> On 22/06/14 11:40, ext Pantelis Antoniou wrote: > Introduce helper functions for working with the live DT tree, > all of them related to dynamically adding/

Re: [PATCH 2/6] OF: Add [__]of_find_node_by_full_name

2014-06-24 Thread Grant Likely
On Mon, 23 Jun 2014 21:00:39 +0300, Pantelis Antoniou wrote: > Hi Guenter, > > On Jun 23, 2014, at 8:58 PM, Guenter Roeck wrote: > > > On 06/22/2014 02:40 AM, Pantelis Antoniou wrote: > >> __of_find_node_by_full_name recursively searches for a matching node > >> with the given full name without

Re: [PATCHv2] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-24 Thread Grant Likely
On Thu, 19 Jun 2014 23:33:27 -0400 (EDT), Nicolas Pitre wrote: > On Thu, 19 Jun 2014, Laura Abbott wrote: > > > The common early_init_dt_add_memory_arch takes the base and size > > of a memory region as u64 types. The function never checks if > > the base and size can actually fit in a phys_addr

[PATCH 1/4] of: Create of_console_check() for selecting a console specified in /chosen

2014-06-18 Thread Grant Likely
s the of_device_is_stdout_path() API since it is unused. Signed-off-by: Grant Likely Tested-by: Sascha Hauer --- drivers/of/base.c | 23 +-- include/linux/of.h | 6 +++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 8368d96

[PATCH 3/4] arm/versatile: Add the uart as the stdout device.

2014-06-18 Thread Grant Likely
Add a stdout-path property to the Versatile devicetree so that automatic console selection works without needing a console= line on the kernel command line. Signed-off-by: Grant Likely --- arch/arm/boot/dts/versatile-ab.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot

[PATCH 4/4] tty: Update hypervisor tty drivers to use core stdout parsing code.

2014-06-18 Thread Grant Likely
The evh_bytechan, hvc_opal and hvc_vio drivers all open code the parsing of the stdout node in the device tree. This patch simplifies the driver by removing the duplicated functionality. Signed-off-by: Grant Likely --- drivers/of/base.c | 5 - drivers/tty/ehv_bytechan.c | 43

[PATCH 2/4] of: Enable console on serial ports specified by /chosen/stdout-path

2014-06-18 Thread Grant Likely
enable the console device, which is what this patch does. With this change applied, a device tree platform can be booted without any console= parameters on the command line and the kernel will still be able to determine its console. Tested on QEMU Versatile model and i.MX Signed-off-by: Grant

[PATCH 0/4] of Automatic console registration cleanups

2014-06-18 Thread Grant Likely
I posted this series a 1.5 months ago as an RFC. I'm going to put it in my tree for merging in v3.17. This series cleans up the selection of default console devices when using the device tree. The device tree defines a way of specifying the console by using a "stdout-path" property in the /chosen

Re: BUG: Bad page state in process swapper pfn:00000

2014-06-17 Thread Grant Likely
On Thu, Jun 12, 2014 at 3:51 AM, Laura Abbott wrote: > On 6/11/2014 12:19 PM, Geert Uytterhoeven wrote: >> Hi Laura, >> >> On Wed, Jun 11, 2014 at 7:32 PM, Laura Abbott wrote: >>> On 6/11/2014 4:40 AM, Geert Uytterhoeven wrote: With current mainline, I get an early crash on r8a7791/koelsch:

Re: [RFC PATCH] OF: fix of_find_node_by_path() assumption that of_allnodes is root

2014-06-14 Thread Grant Likely
On Fri, Jun 13, 2014 at 4:06 PM, Grant Likely wrote: > On Fri, Jun 13, 2014 at 2:52 PM, Rob Herring wrote: >> On Fri, Jun 13, 2014 at 12:53 AM, Frank Rowand >> wrote: >>> From: Frank Rowand >>> >>> Pantelis Antoniou reports that of_find_node_by_path(

Re: [RFC PATCH] OF: fix of_find_node_by_path() assumption that of_allnodes is root

2014-06-13 Thread Grant Likely
nder if this could have any other unintended side-effects on > of_attach_node's behavior. Given that I'm going to replace the custom list with list_head which makes this problem go away, I think this solution is fine. Acked-by: Grant Likely g. > > Rob > >> >> Sig

Re: [RFC 0/5] of: Automatic console registration cleanups

2014-06-12 Thread Grant Likely
On Wed, 11 Jun 2014 20:28:31 -0500, Rob Herring wrote: > On Fri, Mar 28, 2014 at 11:08 AM, Grant Likely > wrote: > > Hi all, > > > > This is a series that I've been playing with over the last few days to > > clean up the selection of default console devices

Re: [PATCH 0/9] i2c: Relax mandatory I2C ID table passing (+ some creep)

2014-06-07 Thread Grant Likely
> - I already have the full support from the maintainer of these drivers > =;-) Aside from patch 7/9 and the comment I made about struct device vs. struct i2c_client in the API, I think this series looks good. You can add my acks to 1-6 and 8-9. Number 7 is nacked. Acked-by: Grant L

Re: [PATCH 7/7] OF/ACPI/I2C: Add generic match function for the aforementioned systems

2014-06-07 Thread Grant Likely
On Fri, 6 Jun 2014 13:36:53 +0100, Lee Jones wrote: > On Fri, 06 Jun 2014, Mark Brown wrote: > > > On Thu, Jun 05, 2014 at 04:55:09PM +0100, Lee Jones wrote: > > > On Thu, 05 Jun 2014, Grant Likely wrote: > > > > > > I still think the way to do it

Re: [PATCH 3/9] i2c: Match using traditional OF methods, then by vendor-less compatible strings

2014-06-07 Thread Grant Likely
On Fri, 6 Jun 2014 16:52:26 +0100, Lee Jones wrote: > This function provides a single call for all I2C devices which need to > match firstly using traditional OF means i.e by of_node, then if that > fails we attempt to match using the supplied I2C client name with a > list of supplied compatible

Re: [PATCH 3/7] i2c: Add the ability to match device to compatible string without an of_node

2014-06-07 Thread Grant Likely
On Fri, 6 Jun 2014 09:10:26 +0100, Lee Jones wrote: > On Thu, 05 Jun 2014, Grant Likely wrote: > > > On Wed, 4 Jun 2014 13:09:52 +0100, Lee Jones wrote: > > > A great deal of I2C devices are currently matched via DT node name, and > > > as such the compatible nam

Re: [PATCH 1/9] i2c: Add pointer dereference protection to i2c_match_id()

2014-06-07 Thread Grant Likely
aves > the way for other, similar code trimming. > > Acked-by: Grant Likely > Signed-off-by: Lee Jones > --- > drivers/i2c/i2c-core.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c >

Re: [PATCH 7/9] of/device: Allow I2C devices to OF match without supplying an OF node

2014-06-07 Thread Grant Likely
On Fri, 6 Jun 2014 16:52:30 +0100, Lee Jones wrote: > The I2C framework supplies a means for devices to be registered without > the requirement for platform_data, DT or ACPI. The current solution is > that every single I2C device in the kernel is forced to supply a > normally empty/sparse I2C ID

Re: 答复: [PATCH] ARM64:DMI: Add smbios/dmi support on arm64

2014-06-06 Thread Grant Likely
On Fri, 6 Jun 2014 01:57:42 +, liyi 00215672 wrote: > Please see below: > > -邮件原件- > 发件人: Mark Rutland [mailto:mark.rutl...@arm.com] > 发送时间: 2014年6月5日 23:34 > 收件人: Yi Li > 抄送: ard.biesheu...@linaro.org; Catalin Marinas; Will Deacon; Sudeep > Ho

Re: [PATCH 7/7] OF/ACPI/I2C: Add generic match function for the aforementioned systems

2014-06-05 Thread Grant Likely
On Thu, Jun 5, 2014 at 4:55 PM, Lee Jones wrote: > On Thu, 05 Jun 2014, Grant Likely wrote: >> On Thu, Jun 5, 2014 at 11:37 AM, Lee Jones wrote: >> > On Thu, 05 Jun 2014, Grant Likely wrote: >> > >> >> On Wed, 4 Jun 2014 13:09:56 +0100, Lee Jones &

Re: [PATCH 3/7] i2c: Add the ability to match device to compatible string without an of_node

2014-06-05 Thread Grant Likely
On Wed, 4 Jun 2014 13:09:52 +0100, Lee Jones wrote: > A great deal of I2C devices are currently matched via DT node name, and > as such the compatible naming convention of ',' has gone > somewhat awry - some nodes don't supply one, some supply an arbitrary > string and others the correct device n

Re: [PATCH 7/7] OF/ACPI/I2C: Add generic match function for the aforementioned systems

2014-06-05 Thread Grant Likely
On Thu, Jun 5, 2014 at 11:37 AM, Lee Jones wrote: > On Thu, 05 Jun 2014, Grant Likely wrote: > >> On Wed, 4 Jun 2014 13:09:56 +0100, Lee Jones wrote: >> > Currently this is a helper function for the I2C subsystem to aid the >> > matching of non-standard compatible

Re: [PATCH 7/7] OF/ACPI/I2C: Add generic match function for the aforementioned systems

2014-06-05 Thread Grant Likely
On Thu, 5 Jun 2014 09:20:08 +0100, Lee Jones wrote: > On Thu, 05 Jun 2014, Mika Westerberg wrote: > > On Wed, Jun 04, 2014 at 02:28:20PM +0100, Lee Jones wrote: > > > On Wed, 04 Jun 2014, Mika Westerberg wrote: > > > > On Wed, Jun 04, 2014 at 02:37:42PM +0200, Rafael J. Wysocki wrote: > > > > > On

Re: [PATCH 7/7] OF/ACPI/I2C: Add generic match function for the aforementioned systems

2014-06-05 Thread Grant Likely
On Wed, 4 Jun 2014 13:09:56 +0100, Lee Jones wrote: > Currently this is a helper function for the I2C subsystem to aid the > matching of non-standard compatible strings and devices which use DT > and/or ACPI, but do not supply any nodes (see: [1] Method 4). However, > it has been made more gener

Re: [PATCH 5/7] i2c: Make I2C ID tables non-mandatory for DT'ed and/or ACPI'ed devices

2014-06-05 Thread Grant Likely
7;not' supply the aforementioned table and match on either DT > and/or ACPI match tables instead. > > Signed-off-by: Lee Jones Looks okay to me. I've not applied or tested in any way though. Acked-by: Grant Likely > --- > drivers/i2c/i2c-core.c | 15 +-- >

Re: [PATCH] of/base: Replace alias if it already exists

2014-06-03 Thread Grant Likely
On Tue, 03 Jun 2014 20:09:24 +0300, Ivaylo Dimitrov wrote: > > > On 3.06.2014 12:58, Ivaylo Dimitrov wrote: > > > > > > On 3.06.2014 11:53, Grant Likely wrote: > > > [...] Can you try putting the following into your board dts file > >> and see i

Re: [PATCH 1/2] pci: Add IORESOURCE_BIT entry for PCIe ECAM resources.

2014-06-03 Thread Grant Likely
On Tue, 03 Jun 2014 11:21:10 +0200, Arnd Bergmann wrote: > On Tuesday 03 June 2014 09:44:59 Grant Likely wrote: > > > The reason I think allow an ECAM makes sense in ranges is because it > > > allows for a direct IO read/write to CFG space (w/o any mapping) similar >

Re: [PATCH v2] coccinelle: Check for missing NULL terminators in of_device_id tables

2014-06-03 Thread Grant Likely
up with the pattern initially. > > Cc: Mitchel Humpherys > Cc: Julia Lawall > Cc: Gilles Muller > Cc: Nicolas Palix > Cc: Grant Likely > Cc: Rob Herring > Cc: devicet...@vger.kernel.org > Signed-off-by: Stephen Boyd Looks good to me: Acked-by: Grant Likely > ---

Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()

2014-06-03 Thread Grant Likely
On Mon, 02 Jun 2014 07:48:59 -0700, Kevin Hilman wrote: > Grygorii Strashko writes: > > > Hi All, > > > > On 05/28/2014 12:03 PM, Grant Likely wrote: > > [...] > > >> The bisected patch causes platform_get_irq() to always parse the > >&

Re: [PATCH 3/3] i2c: Make I2C ID tables non-mandatory for DT'ed and/or ACPI'ed devices

2014-06-03 Thread Grant Likely
On Tue, 3 Jun 2014 09:11:09 +0100, Lee Jones wrote: > On Mon, 02 Jun 2014, Grant Likely wrote: > > On Mon, 2 Jun 2014 14:41:03 +0100, Lee Jones wrote: > > > Currently the I2C framework insists on devices supplying an I2C ID > > > table. Many of the devices which

Re: [PATCH] of/base: Replace alias if it already exists

2014-06-03 Thread Grant Likely
On Mon, 02 Jun 2014 19:07:01 +0300, Ivaylo Dimitrov wrote: > > > On 2.06.2014 17:59, Grant Likely wrote: > > On Sun, 1 Jun 2014 15:01:23 +0300, Ivaylo Dimitrov > > wrote: > >> The current code unconditionally adds aliases without check if it already > &g

Re: [PATCH 1/2] pci: Add IORESOURCE_BIT entry for PCIe ECAM resources.

2014-06-03 Thread Grant Likely
On Mon, 2 Jun 2014 13:09:08 -0500, Kumar Gala wrote: > > On Jun 2, 2014, at 11:23 AM, Grant Likely wrote: > > > On Mon, 2 Jun 2014 10:40:30 -0500, Kumar Gala wrote: > >> > >> On Jun 2, 2014, at 10:09 AM, Grant Likely wrote: > >> > >>

Re: [PATCH 1/2] pci: Add IORESOURCE_BIT entry for PCIe ECAM resources.

2014-06-02 Thread Grant Likely
On Mon, 2 Jun 2014 10:40:30 -0500, Kumar Gala wrote: > > On Jun 2, 2014, at 10:09 AM, Grant Likely wrote: > > > On Sat, 31 May 2014 20:41:04 +0200, Arnd Bergmann wrote: > >> On Saturday 31 May 2014 01:36:40 Liviu Dudau wrote: > >>> We would like to be abl

Re: [PATCH 3/3] i2c: Make I2C ID tables non-mandatory for DT'ed and/or ACPI'ed devices

2014-06-02 Thread Grant Likely
On Mon, 2 Jun 2014 14:41:03 +0100, Lee Jones wrote: > Currently the I2C framework insists on devices supplying an I2C ID > table. Many of the devices which do so unnecessarily adding quite a > few wasted lines to kernel code. This patch allows drivers a means > to 'not' supply the aforementione

Re: [PATCH 2/3] i2c: Add pointer dereference protection to i2c_match_id()

2014-06-02 Thread Grant Likely
the way for other, similar code trimming. > > Signed-off-by: Lee Jones Seems reasonable. Acked-by: Grant Likely > --- > drivers/i2c/i2c-core.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2

Re: [PATCH 1/3] i2c: Provide 'device type' to 'OF device node' look-up

2014-06-02 Thread Grant Likely
On Mon, 2 Jun 2014 14:41:01 +0100, Lee Jones wrote: > We have a problem. There are lots of I2C device ID tables scattered > around the kernel which are redundant in all Device Tree and/or ACPI > only supported device drivers. After recent discussions it has become > apparent that the only thing

Re: [PATCH 1/2] pci: Add IORESOURCE_BIT entry for PCIe ECAM resources.

2014-06-02 Thread Grant Likely
On Sat, 31 May 2014 20:41:04 +0200, Arnd Bergmann wrote: > On Saturday 31 May 2014 01:36:40 Liviu Dudau wrote: > > We would like to be able to describe PCIe ECAM resources as > > IORESOURCE_MEM blocks while distinguish them from standard > > memory resources. Add an IORESOURCE_BIT entry for this c

Re: [PATCH] of/base: Replace alias if it already exists

2014-06-02 Thread Grant Likely
On Sun, 1 Jun 2014 15:01:23 +0300, Ivaylo Dimitrov wrote: > The current code unconditionally adds aliases without check if it already > exists, so it is not possible to alter an alias, from board DT file for > example. Fix that by replacing an alias if it already exists > Can you describe a mo

Re: [PATCH v5 1/9] OF: Introduce Device Tree resolve support.

2014-05-29 Thread Grant Likely
On Wed, 28 May 2014 15:46:25 +0300, Pantelis Antoniou wrote: > Introduce support for dynamic device tree resolution. > Using it, it is possible to prepare a device tree that's > been loaded on runtime to be modified and inserted at the kernel > live tree. > > Export of of_resolve and bug fix of

Re: [PATCH v5 0/9] Introducing (yet again) Device Tree Overlays

2014-05-29 Thread Grant Likely
On Wed, 28 May 2014 15:46:24 +0300, Pantelis Antoniou wrote: > The following patchset introduces Device Tree overlays, a method > of dynamically altering the kernel's live Device Tree, along with > a generic interface to use it in a board agnostic manner. > > It is against linux-next as of today

Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()

2014-05-28 Thread Grant Likely
Kevin Hilman wrote: >>>> > On Fri, May 23, 2014 at 1:03 AM, Grant Likely >>>> > wrote: >>>> >> On Tue, 20 May 2014 13:42:02 +0300, Grygorii Strashko >>>> >> wrote: >>>> >>> The commit 9ec36cafe43bf835f8f

Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()

2014-05-28 Thread Grant Likely
On Tue, 27 May 2014 19:37:00 -0500, Rob Herring wrote: > On Tue, May 27, 2014 at 3:23 PM, Kevin Hilman wrote: > > On Fri, May 23, 2014 at 1:03 AM, Grant Likely > > wrote: > >> On Tue, 20 May 2014 13:42:02 +0300, Grygorii Strashko >

Re: [PATCH] of: handle NULL node in of_get_next_available_child

2014-05-27 Thread Grant Likely
On Tue, 27 May 2014 10:36:10 -0700, Florian Fainelli wrote: > Hi Grant, > > 2014-05-27 4:19 GMT-07:00 Grant Likely : > > On Fri, 23 May 2014 12:43:11 -0700, Florian Fainelli > > wrote: > >> Add an early check for the node argument in > >> of_get_next_ava

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-27 Thread Grant Likely
On Tue, 27 May 2014 15:24:35 +0300, Pantelis Antoniou wrote: > Hi Grant, > > On May 27, 2014, at 3:12 PM, Grant Likely wrote: > > > On Mon, 26 May 2014 16:42:44 -0700, Guenter Roeck > > wrote: > >> On 05/26/2014 03:36 PM, Sebastian Reichel wrote: > >&

Re: [RFC PATCH 1/9] dt: deps: dtc: Automatically add new property 'dependencies' which contains a list of referenced phandles

2014-05-27 Thread Grant Likely
On Mon, 19 May 2014 14:35:49 +0200, Alexander Holler wrote: > Am 17.05.2014 14:16, schrieb Tomasz Figa: > > >> References to phandles of parent or child nodes will not be added to this > >> property, because this information is already contained in the blob (in the > >> form of the tree itself).

Re: [PATCH v3 4/7] of: configure the platform device dma parameters

2014-05-27 Thread Grant Likely
On Fri, 02 May 2014 11:58:30 +0200, Arnd Bergmann wrote: > On Thursday 01 May 2014 14:12:10 Grant Likely wrote: > > > > I've got two concerns here. of_dma_get_range() retrieves only the first > > > > tuple from the dma-ranges property, but it is perfectly valid f

Re: [PATCH v2 2/2] of: Stop naming platform_device using dcr address

2014-05-27 Thread Grant Likely
On Fri, 23 May 2014 16:07:08 +0200, Arnd Bergmann wrote: > On Friday 23 May 2014 08:36:09 Grant Likely wrote: > > There is now a way to ensure all platform devices get a unique name when > > populated from the device tree, and the DCR_NATIVE code path is broken > > anyway.

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-27 Thread Grant Likely
On Mon, 26 May 2014 16:42:44 -0700, Guenter Roeck wrote: > On 05/26/2014 03:36 PM, Sebastian Reichel wrote: > > Hi, > > > > On Mon, May 26, 2014 at 10:33:03PM +0100, Grant Likely wrote: > >> After thinking about it more, I think it is very likely that removing > &

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-27 Thread Grant Likely
On Mon, 26 May 2014 23:44:41 +0200, Geert Uytterhoeven wrote: > Hi Grant, > > On Mon, May 26, 2014 at 11:33 PM, Grant Likely > wrote: > > After thinking about it more, I think it is very likely that removing > > all the overlays is the correct thing to do in the kexec

Re: [PATCH] of: handle NULL node in of_get_next_available_child

2014-05-27 Thread Grant Likely
On Fri, 23 May 2014 12:43:11 -0700, Florian Fainelli wrote: > Add an early check for the node argument in > of_get_next_available_child() to avoid dereferencing a NULL node pointer > a few lines after. > > CC: Daniel Mack > Signed-off-by: Florian Fainelli Is there a bug that exposed this path

Re: [PATCH] of: mdio: fix compile warning in of_mdiobus_register_phy()

2014-05-27 Thread Grant Likely
variable > ‘max_speed’ [-Wunused-variable]". Thus remove it. > > Signed-off-by: Christian Engelmayer > --- > Compile tested. Applies against branch master in tree > git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git Acked-by: Grant Likely g. > --- > dri

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-26 Thread Grant Likely
On Mon, 26 May 2014 14:55:37 +0300, Pantelis Antoniou wrote: > Hi Grant, > > On May 26, 2014, at 2:23 PM, Grant Likely wrote: > > > On Mon, 26 May 2014 12:57:32 +0200, Geert Uytterhoeven > > wrote: > >> Hi Grant, > >> > >> On Mon, May 26, 2

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-26 Thread Grant Likely
On Mon, 26 May 2014 12:57:32 +0200, Geert Uytterhoeven wrote: > Hi Grant, > > On Mon, May 26, 2014 at 12:48 PM, Grant Likely > wrote: > > On Tue, 20 May 2014 09:38:49 +0200, Geert Uytterhoeven > > wrote: > >> On Tue, May 20, 2014 at 7:50 AM, Grant Likely

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-26 Thread Grant Likely
On Tue, 20 May 2014 09:38:49 +0200, Geert Uytterhoeven wrote: > Hi Grant, > > On Tue, May 20, 2014 at 7:50 AM, Grant Likely > wrote: > >> Why has the overlay system been designed for plugging and unpluging whole > >> overlays? > >> That means the kernel

Re: [PATCH v2 2/2] of: Stop naming platform_device using dcr address

2014-05-26 Thread Grant Likely
On Sat, May 24, 2014 at 5:10 AM, Benjamin Herrenschmidt wrote: > On Fri, 2014-05-23 at 08:36 +0900, Grant Likely wrote: >> There is now a way to ensure all platform devices get a unique name when >> populated from the device tree, and the DCR_NATIVE code path is broken >>

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-23 Thread Grant Likely
On Thu, 22 May 2014 18:14:38 -0700, Frank Rowand wrote: > On 5/21/2014 6:16 PM, Grant Likely wrote: > > On Tue, 20 May 2014 19:41:22 -0700, Frank Rowand > > wrote: > >> On 5/18/2014 2:27 AM, Grant Likely wrote: > >>> On Fri, 16 May 2014 11:54:44 +0100, Grant

[PATCH v2 1/2] of: Ensure unique names without sacrificing determinism

2014-05-23 Thread Grant Likely
number to the end of it. Signed-off-by: Grant Likely Cc: Ezequiel Garcia Cc: Rob Herring --- drivers/of/platform.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index d0009b3614af

[PATCH v2 2/2] of: Stop naming platform_device using dcr address

2014-05-23 Thread Grant Likely
associated ugly #ifdef. The user-visible impact of this patch is that any DCR device on Cell will get a new name in the /sys/devices hierarchy. Signed-off-by: Grant Likely Cc: Rob Herring Cc: Benjamin Herrenschmidt --- arch/powerpc/include/asm/dcr-mmio.h | 4 arch/powerpc/sysdev/dcr.c

Re: [PATCH v1] of/irq: do irq resolution in platform_get_irq_byname()

2014-05-23 Thread Grant Likely
isn't complete because platform_get_irq_byname() > need to be modified the same way. > > Hence, fix it by adding interrupt resolution code at the > platform_get_irq_byname() function too. > > Cc: Russell King > Cc: Rob Herring > Cc: Tony Lindgren > Cc: Grant Like

[PATCH v2 0/2] of: Clean up naming of platform devices

2014-05-23 Thread Grant Likely
This series makes of_device_make_bus_id() more reliable in choosing a unique name and clears out some historical cruft. I've rebased it onto Rob's for-next tree so that it plays well with the removal of of_can_translate_address() -- To unsubscribe from this list: send the line "unsubscribe linux-k

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-21 Thread Grant Likely
} > + raw_spin_unlock_irqrestore(&devtree_lock, flags); > + return np; > + } > + Special case for the root node? Could use a comment, and of_allnodes will already point to the root node so this could simply be: if (strcmp(path, &q

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-21 Thread Grant Likely
On Tue, 20 May 2014 19:41:22 -0700, Frank Rowand wrote: > On 5/18/2014 2:27 AM, Grant Likely wrote: > > On Fri, 16 May 2014 11:54:44 +0100, Grant Likely > > wrote: > >> On Thu, 15 May 2014 19:51:17 -0700, Frank Rowand > >> wrote: > >>> On 5/13/

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-21 Thread Grant Likely
On Tue, 20 May 2014 19:55:45 -0700, Frank Rowand wrote: > On 5/13/2014 7:58 AM, Grant Likely wrote: > > > Make of_find_node_by_path() handle aliases as prefixes. To make this > > > work the name search is refactored to search by path component instead > > > of by

Re: [RFC PATCH] of/irq: do irq resolution in platform_get_irq_byname()

2014-05-19 Thread Grant Likely
On Mon, 19 May 2014 14:57:39 +0200, Thierry Reding wrote: > On Mon, May 19, 2014 at 04:30:59PM +0300, Grygorii Strashko wrote: > [...] > > diff --git a/drivers/of/irq.c b/drivers/of/irq.c > [...] > > /** > > + * of_irq_get_byname - Decode a node's IRQ and return it as a Linux irq > > number > >

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-19 Thread Grant Likely
On Fri, 16 May 2014 13:52:42 +0200, Geert Uytterhoeven wrote: > Hi Grant, > > On Fri, May 16, 2014 at 12:58 PM, Grant Likely > wrote: > > On Thu, 15 May 2014 09:20:24 +0200, Geert Uytterhoeven > > wrote: > >> On Thu, May 15, 2014 at 9:12 AM, Pantelis Anto

Re: [RFC PATCH 2/9] dt: deps: dependency based device creation

2014-05-18 Thread Grant Likely
Hi Tomasz, Thanks for weighing in on this. Thoughts and comments below. On Sat, 17 May 2014 16:24:19 +0200, Tomasz Figa wrote: > Hi, > > On 14.05.2014 16:05, Grant Likely wrote: > > On Mon, 12 May 2014 18:47:53 +0200, Alexander Holler > > wrote: > >> Use the

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-18 Thread Grant Likely
On Fri, 16 May 2014 11:54:44 +0100, Grant Likely wrote: > On Thu, 15 May 2014 19:51:17 -0700, Frank Rowand > wrote: > > On 5/13/2014 7:58 AM, Grant Likely wrote: > > > Make of_find_node_by_path() handle aliases as prefixes. To make this > > > work the name sea

Re: [PATCH 1/3] lib: add glibc style strchrnul() variant

2014-05-16 Thread Grant Likely
On Thu, 15 May 2014 15:19:00 -0700, Frank Rowand wrote: > On 5/13/2014 7:58 AM, Grant Likely wrote: > > The strchrnul() variant helpfully returns a the end of the string > > instead of a NULL if the requested character is not found. This can > > simplify string parsing code

[GIT PULL] Devicetree fixes for v3.15

2014-05-16 Thread Grant Likely
Hi Linus, Please pull the following bug fix branch. Thanks, g. The following changes since commit 14186fea0cb06bc43181ce239efe0df6f1af260a: Merge tag 'locks-v3.15-4' of git://git.samba.org/jlayton/linux (2014-05-13 11:33:09 +0900) are available in the git repository at: git://git.secretl

Re: [RFC PATCH 2/9] dt: deps: dependency based device creation

2014-05-16 Thread Grant Likely
On Wed, 14 May 2014 23:10:39 +0200, Alexander Holler wrote: > Am 14.05.2014 22:06, schrieb Grant Likely: > > On Wed, 14 May 2014 16:49:05 +0200, Alexander Holler > > wrote: > >> Am 14.05.2014 16:05, schrieb Grant Likely: > >>> On Mon, 12 May 2014 18:47:53 +

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-16 Thread Grant Likely
On Thu, 15 May 2014 09:20:24 +0200, Geert Uytterhoeven wrote: > Hi Pantelis, > > On Thu, May 15, 2014 at 9:12 AM, Pantelis Antoniou > wrote: > >> We also need to think about kexec. Kexec works by sucking the live tree > >> out of the kernel and creating a .dtb from it to pass to the new kernel.

Re: [PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-16 Thread Grant Likely
On Thu, 15 May 2014 19:51:17 -0700, Frank Rowand wrote: > On 5/13/2014 7:58 AM, Grant Likely wrote: > > Make of_find_node_by_path() handle aliases as prefixes. To make this > > work the name search is refactored to search by path component instead > > of by full string.

Re: [PATCH 3/3] of: Handle memory@0 node on PPC32 only

2014-05-15 Thread Grant Likely
On Thu, 24 Apr 2014 10:26:42 +0100, Leif Lindholm wrote: > On Wed, Apr 23, 2014 at 02:10:58PM +0100, Grant Likely wrote: > > > Does anyone have a LongTrail DT to hand, and if so does the root have a > > > compatible string? From grepping through the kernel I could only find

Re: [PATCH 2/3] mips: dts: add device_type="memory" where missing

2014-05-15 Thread Grant Likely
On Tue, Apr 22, 2014 at 2:13 PM, Grant Likely wrote: > On Thu, 17 Apr 2014 18:42:00 +0100, Leif Lindholm > wrote: >> A few platforms lack a 'device_type = "memory"' for their memory >> nodes, relying on an old ppc quirk in order to discover its memory. &

Re: [PATCH 1/3] arm: dts: add device_type="memory" for ste-ccu8540

2014-05-15 Thread Grant Likely
On Tue, Apr 22, 2014 at 2:26 PM, Linus Walleij wrote: > On Thu, Apr 17, 2014 at 7:41 PM, Leif Lindholm > wrote: > >> The current .dts for ste-ccu8540 lacks a 'device_type = "memory"' for >> its memory node, relying on an old ppc quirk in order to discover its >> memory. Add this, to permit that

Re: [PATCH] of: fix CONFIG_OF=n prototype of of_node_full_name()

2014-05-15 Thread Grant Likely
On Thu, 15 May 2014 14:44:30 +1000, Stephen Rothwell wrote: > Make the CONFIG_OF=n prototpe of of_node_full_name() mateh the CONFIG_OF=y > version. > > Fixes compile warnings like this: > > sound/soc/soc-core.c: In function 'soc_check_aux_dev': > sound/soc/soc-core.c:1667:3: warning: passing ar

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-15 Thread Grant Likely
Hi Pantelis, Thanks for writing this up. A few responses below... On Thu, 15 May 2014 00:12:17 -0700, Pantelis Antoniou wrote: > On May 14, 2014, at 3:08 AM, Grant Likely wrote: > > On Fri, 4 Apr 2014 15:43:55 +0300, Pantelis Antoniou > > wrote: > > The notification i

Re: [RFC PATCH 2/9] dt: deps: dependency based device creation

2014-05-14 Thread Grant Likely
On Wed, 14 May 2014 16:49:05 +0200, Alexander Holler wrote: > Am 14.05.2014 16:05, schrieb Grant Likely: > > On Mon, 12 May 2014 18:47:53 +0200, Alexander Holler > > wrote: > >> Use the properties named 'dependencies' in binary device tree blobs to

Re: [RFC PATCH 5/9] dt: deps: register drivers based on the initialization order based on DT

2014-05-14 Thread Grant Likely
On Wed, May 14, 2014 at 3:58 PM, Alexander Holler wrote: > Am 14.05.2014 16:13, schrieb Grant Likely: > >> On Mon, 12 May 2014 18:47:56 +0200, Alexander Holler >> wrote: >>> >>> The init system currently calls unknown functions with almost unknown >>

Re: [RFC PATCH 0/9] dt: dependencies (for deterministic driver initialization order based on the DT)

2014-05-14 Thread Grant Likely
On Wed, May 14, 2014 at 4:02 PM, Alexander Holler wrote: > Am 14.05.2014 16:19, schrieb Grant Likely: > > >> Rather than a dtb schema change, for the most common properties (irqs, >> clocks, gpios), we could extract dependencies at boot time. I don't like >> the i

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-14 Thread Grant Likely
On Wed, 14 May 2014 14:11:52 +0200, Michael Stickel wrote: > Hi Grant, > > Am 14.05.2014 12:08, schrieb Grant Likely: > > More generally I am concerned about whether or not overlays > > will introduce corner cases that can never be handled correctly, > > particular

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-14 Thread Grant Likely
On Wed, 14 May 2014 15:03:35 +0200, Geert Uytterhoeven wrote: > On Wed, May 14, 2014 at 12:08 PM, Grant Likely > wrote: > >> +config OF_OVERLAY > >> + bool "OF overlay support" > >> + depends on OF > >> + select OF_DYNAMIC >

Re: [PATCH 0/6] DT early console initialization

2014-05-14 Thread Grant Likely
the path of the serial port. > > This series is dependent on generic earlycon[1], libfdt support[2], and > vmlinux.lds.h clean-ups[3]. The first 2 are in linux-next already. A git > branch is available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git ea

Re: [PATCH 2/6] of: consolidate linker section OF match table declarations

2014-05-14 Thread Grant Likely
ection OF match > table entries which each table declaration can use. > > Cc: Grant Likely > Signed-off-by: Rob Herring Nice! Acked-by: Grant Likely g. > --- > drivers/clocksource/clksrc-of.c | 2 +- > drivers/irqchip/irqchip.h | 7 +++ > include/linux/

Re: [RFC PATCH 0/9] dt: dependencies (for deterministic driver initialization order based on the DT)

2014-05-14 Thread Grant Likely
On Mon, 12 May 2014 18:47:51 +0200, Alexander Holler wrote: > > Hello, > > if I would have to describe the Linux kernels init system (before userspace > starts), it would be like: > Unknown functions with almost unknown functionality are called in an almost > random order. > > That reminded me

Re: [RFC PATCH 5/9] dt: deps: register drivers based on the initialization order based on DT

2014-05-14 Thread Grant Likely
On Mon, 12 May 2014 18:47:56 +0200, Alexander Holler wrote: > The init system currently calls unknown functions with almost unknown > functionality in an almost random order. Correct, we've got a module system. Some would say that is a strength! :-) That said, I don't object to optimizing to the

Re: [RFC PATCH 2/9] dt: deps: dependency based device creation

2014-05-14 Thread Grant Likely
On Mon, 12 May 2014 18:47:53 +0200, Alexander Holler wrote: > Use the properties named 'dependencies' in binary device tree blobs to build > a dependency based initialization order for platform devices and drivers. > > This is done by building a directed acyclic graph using an adjacency list > a

Re: [PATCH v6 05/11] drivers: of: add automated assignment of reserved regions to client devices

2014-05-14 Thread Grant Likely
On Wed, 14 May 2014 10:15:38 +0100, "Jon Medhurst (Tixy)" wrote: > On Sun, 2014-03-02 at 13:40 +0800, Grant Likely wrote: > > On Fri, 28 Feb 2014 14:42:50 +0100, Marek Szyprowski > > wrote: > > > This patch adds code for automated assignment of reserved mem

Re: [PATCH] of/selftest: clean-up of_selftest_platform_populate pass/fail handling

2014-05-14 Thread Grant Likely
On Tue, 13 May 2014 11:18:28 -0500, Rob Herring wrote: > From: Rob Herring > > Move the pass/fail checks into selftest() calls instead of a separate if > condition. Unconditionally calling pass was wrong. > > Signed-off-by: Rob Herring > Cc: Grant Likely A

Re: [PATCH] of: Add of_device_destroy_children() function

2014-05-14 Thread Grant Likely
On Thu, 08 May 2014 18:37:49 +0200, Sylwester Nawrocki wrote: > This patch adds a helper function to unregister devices which > were created by an of_platform_populate() call. The pattern > used here can already be found in multiple drivers. This helper > can now be used instead of repeating simi

Re: [PATCH] of: Add of_device_destroy_children() function

2014-05-14 Thread Grant Likely
On Thu, 8 May 2014 14:33:39 -0600, Jason Gunthorpe wrote: > On Thu, May 08, 2014 at 06:37:49PM +0200, Sylwester Nawrocki wrote: > > This patch adds a helper function to unregister devices which > > were created by an of_platform_populate() call. The pattern > > used here can already be found in m

Re: [PATCH v3 0/7] of: setup dma parameters using dma-ranges and dma-coherent

2014-05-14 Thread Grant Likely
I > > > will > > > post a followup series for Keystone SOC which will use this > > > infrastructure. > > > Linus W also wants to use this for ARM integrator platform dma offset > > > issue. > > > > > > Cc: Greg Kroah-Hartman >

Re: [PATCH v4 2/8] OF: Introduce DT overlay support.

2014-05-14 Thread Grant Likely
On Fri, 4 Apr 2014 15:43:55 +0300, Pantelis Antoniou wrote: > Introduce DT overlay support. > Using this functionality it is possible to dynamically overlay a part of > the kernel's tree with another tree that's been dynamically loaded. > It is also possible to remove node and properties. > > T

[PATCH 0/3] Rework of_find_node_by_path() code

2014-05-13 Thread Grant Likely
This series reworks the of_find_node_by_path() function to search by path component instead of comparing the full path on every node. This makes for a more efficient search and makes it possible to parse things like aliases. This is the second time I'm posting this series. I'm going to apply it to

[PATCH 3/3] of: Add a testcase for of_find_node_by_path()

2014-05-13 Thread Grant Likely
Add a testcase for the find_node_by_path() function to make sure it handles all the valid scenarios. Signed-off-by: Grant Likely --- drivers/of/selftest.c | 39 + drivers/of/testcase-data/tests-phandle.dtsi | 6 - 2 files changed, 44

[PATCH 1/3] lib: add glibc style strchrnul() variant

2014-05-13 Thread Grant Likely
tring will always come back out. Signed-off-by: Grant Likely --- include/linux/string.h | 3 +++ lib/string.c | 15 +++ 2 files changed, 18 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index ac889c5ea11b..d36977e029af 100644 --- a/include/

[PATCH 2/3] of: Make of_find_node_by_path() handle /aliases

2014-05-13 Thread Grant Likely
Signed-off-by: Pantelis Antoniou [grant.likely: Rework to not require allocating at runtime] Acked-by: Rob Herring Signed-off-by: Grant Likely --- drivers/of/base.c | 60 +++ 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/drivers

<    1   2   3   4   5   6   7   8   9   10   >