Re: Boot interface for device trees on ARM

2010-06-08 Thread Jeremy Kerr
Hi Nicolas, > > If we're planning to keep the machine IDs around (even if they are now > > per- SoC), I'd like to know what would be left using them. The only > > thing that I can see that we currently use is io_pg_offset for the > > DEBUG_LL builds, and that isn't a convincing case to keep them.

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 12:41:47PM -0600, Grant Likely wrote: [...] > >> This is a common pattern. > > > > This can't be true because it produces ugly casts and fragile > > code all over the place -- which is exactly what everybody > > tries to avoid in the kernel. > > Fragile? How? &var[1] *alw

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
On Tue, Jun 8, 2010 at 10:46 AM, Anton Vorontsov wrote: > On Tue, Jun 08, 2010 at 10:02:49AM -0600, Grant Likely wrote: >> On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov >> wrote: >> > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: >> > [...] >> >> +     dev = kzalloc(sizeof(*dev

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 10:02:49AM -0600, Grant Likely wrote: > On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov > wrote: > > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: > > [...] > >> +     dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), > >> GFP_KERNEL); > >>      

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
On Tue, Jun 8, 2010 at 9:57 AM, Anton Vorontsov wrote: > On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: > [...] >> +     dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), >> GFP_KERNEL); >>       if (!dev) >>               return NULL; >> - >>       dev->dev.of_node = of_

Re: [PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Anton Vorontsov
On Tue, Jun 08, 2010 at 08:26:43AM -0600, Grant Likely wrote: [...] > + dev = kzalloc(sizeof(*dev) + (sizeof(struct resource) * i), GFP_KERNEL); > if (!dev) > return NULL; > - > dev->dev.of_node = of_node_get(np); > dev->dev.dma_mask = &dev->archdata.dma_mask; >

[PATCH 4/6] of/device: Merge of_platform_bus_probe()

2010-06-08 Thread Grant Likely
Merge common code between PowerPC and microblaze. This patch merges the code that scans the tree and registers devices. The functions merged are of_platform_bus_probe(), of_platform_bus_create(), and of_platform_device_create(). This patch also move the of_default_bus_ids[] table out of a Microb

[PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

2010-06-08 Thread Grant Likely
When allocating a platform_device to represent an OF node, also allocate space for the resource table and populate it with IRQ and reg property information. This change is in preparation for merging the of_platform_bus_type with the platform_bus_type so that existing platform_driver code can retri

[PATCH 5/6] of: Merge of_device_alloc

2010-06-08 Thread Grant Likely
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely CC: Michal Simek CC: Grant Likely CC: Benjamin Herrenschmidt CC: Stephen Rothwell CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org CC: devicetree-discuss@lists.ozlabs.org --- arch/microblaze/include

[PATCH 3/6] of: Modify of_device_get_modalias to be passed struct device

2010-06-08 Thread Grant Likely
Now that the of_node pointer is part of struct device, of_device_get_modalias could be used on any struct device that has the device node pointer set. This patch changes of_device_get_modalias to accept a struct device instead of a struct of_device. Signed-off-by: Grant Likely CC: Michal Simek

[PATCH 2/6] of/device: merge of_device_uevent

2010-06-08 Thread Grant Likely
Merge common code between powerpc and microblaze Signed-off-by: Grant Likely CC: Michal Simek CC: Wolfram Sang CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: microblaze-ucli...@itee.uq.edu.au CC: linuxppc-...@ozlabs.org --- arch/microblaze/include/asm/of_device.h |3 -- arch/microbl

[PATCH 1/6] of: Use full node name in resource structures

2010-06-08 Thread Grant Likely
Resource names appear in human readable output, so when extracting IRQ and address resources from a device tree node, use the full node name to give proper context in places like /proc/iomem. Signed-off-by: Grant Likely CC: Michal Simek CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: micro

[PATCH 0/6] OF device code merges and improvements

2010-06-08 Thread Grant Likely
These patches merge more common of_device code between microblaze and powerpc and some other miscellaneous improvement in preparation for the merge of of_platform_bus_type with platform_bus_type. These patches are based on top of the IRQ and address code merge which I posted earlier. If you want

[PATCH 5/5] of/address: restrict 'no-ranges' kludge to powerpc

2010-06-08 Thread Grant Likely
Certain Apple machines don't use the ranges property correctly, but the workaround should not be applied on other architectures. This patch disables the workaround for non-powerpc architectures. Signed-off-by: Grant Likely CC: Stephen Rothwell CC: Benjamin Herrenschmidt CC: linuxppc-...@lists.