[PATCH dtc] Makefile: provide separate install targets

2013-07-03 Thread Jeremy Kerr
Currently `make install` will install the binaries, libraries and includes. This change separates the install target into install-bin, install-lib and install-includes, so we have more flexibility, particularly when we're just using libfdt. Signed-off-by: Jeremy Kerr --- Makefile |

Re: [PATCH] dt/flattree: Fix return value of early_init_dt_scan_memory

2011-04-19 Thread Jeremy Kerr
Hi Shawn, > It fixes the return value of funciont early_init_dt_scan_memory on > the success return path. [In general, the changelog should explain why you're making this change, not just re-iterate what the patch does. Does this fix a problem you were seeing?] With regards to this specific patc

Re: [PATCH] drivers/of: use __be32 types for big-endian device tree data

2010-09-13 Thread Jeremy Kerr
Hi Timur, > Does this mean that I should be using be32_to_cpu() whenever I > dereference a pointer to a u32 in the device tree? Currently, I do > this: > > const u32 *iprop; > const u32 num; > iprop = of_get_property(np, ...) > num = *iprop; > > Should I be doing this instead? > > const __be32

[PATCH] drivers/of: use __be32 types for big-endian device tree data

2010-09-13 Thread Jeremy Kerr
Use the sparse annotations so we can keep track of endianness. Signed-off-by: Jeremy Kerr --- drivers/of/address.c |2 +- drivers/of/base.c|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index fcadb72..3a1c7e7

Re: ARM machine specific DT probing

2010-09-12 Thread Jeremy Kerr
Hi David, > Hrm. The trouble with this idea is that it needs some measure of > "specificness of match", I was originally thinking an enum, something to indicate that the match is for a machine or SoC or SoC-family, but that may not be flexible enough. Essentially, all we really need to indicate

Re: ARM machine specific DT probing

2010-09-08 Thread Jeremy Kerr
Hi Nicolas, > What Jeremy did is to add a probe_dt method in the mdesc structure, and > then the core is calling them in sequence until one of them returns > success. > > now, the "compatible" property is explained here: > > http://devicetree.org/Device_Tree_Usage#Understanding_the_compatible_

Re: [RFC PATCH 00/14] Versatile Express device tree port

2010-08-23 Thread Jeremy Kerr
Hi Lorenzo, > > ARM: vexpress: fix typo in addruart > > I'd suggest posting this as a separate fix to linux-arm-kernel. On second thoughts, I'm about to re-post the addruart series, so I've rolled this change into the original patch. Cheers, Jeremy _

Re: [RFC PATCH 00/14] Versatile Express device tree port

2010-08-18 Thread Jeremy Kerr
Hi Lorenzo, > This patchset provides an initial version of device tree enabled kernel on > an ARM Versatile Express board. Awesome, nice work. As Grant has said, most of my patches are now in his tree, and that's probably the best place to work from. There shouldn't be much change required to do

Re: [PATCH] arm/dt: Print machine name after dt probe

2010-07-28 Thread Jeremy Kerr
Hi Grant, > To match the behaviour of mach_type probing > > Signed-off-by: Grant Likely > --- > > Hi Jeremy, > > I've got this patch in my tree. I'm going to squash it into "arm/dt: > probe for platforms via the device tree". Looks good. How do you want to manage the trees from here? Are you

Re: [PATCH] arm/dt: Fix booting non-dt versatile

2010-07-27 Thread Jeremy Kerr
Hi all, > adds works for me on both Versatile (qemu) and Tegra. OK, I'll update my patch. Thanks for that! Cheers, Jeremy ___ devicetree-discuss mailing list devicetree-discuss@lists.ozlabs.org https://lists.ozlabs.org/listinfo/devicetree-discuss

Re: Respinning my test-devicetree branch

2010-07-25 Thread Jeremy Kerr
Hi Grant, > I've respun my test-devicetree branch and dropped a bunch of patches > in preference for ones in your arm-dt branch. Here are my notes as I > was working on it. OK, cool. The patches aren't 100% confirmed yet - Nicolas and I are still chatting about the specifics of machine-id alloca

Re: [PATCH 2/3] of/flattree: Fix crash when device tree absent

2010-07-15 Thread Jeremy Kerr
Hi Grant, > Probably a good idea. We'll need more robust dtb pointer checking > with ARM. I'll do that in a separate patch. I do some checking in the boot path already, so we're safe from getting inital_boot_params set to something bogus anyway. http://kernel.ubuntu.com/git?p=jk/dt/linux-2.6.g

Re: [PATCH 1/3] of/flattree: Use common ALIGN() macro instead of arch specific _ALIGN

2010-07-14 Thread Jeremy Kerr
Hi Grant, > There's no reason to use the powerpc-specific _ALIGN macro in the fdt > code. Replace it with ALIGN() from kernel.h > Been using this for a while, looks good. Acked-By: Jeremy Kerr Cheers, Jeremy ___ devicetree-discus

Re: [PATCH 2/3] of/flattree: Fix crash when device tree absent

2010-07-14 Thread Jeremy Kerr
Hi Grant, > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > index d61fda8..66401bc 100644 > --- a/drivers/of/fdt.c > +++ b/drivers/of/fdt.c > @@ -94,6 +94,8 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node, > break; > } while (1); > > + if (rc) > +

ALSA SoC device tree bindings

2010-06-23 Thread Jeremy Kerr
Hi all, >From some discussions at the previous Ubuntu Developer Summit, I've put up a page on the devicetree.org wiki with the ultimate goal of describing device tree bindings for ALSA System on Chip devices. At this stage, we're just looking at how to structure device in the device tree. The

Re: Request review of device tree documentation

2010-06-13 Thread Jeremy Kerr
hi Ben, > Maybe a paragraph on the new proposed clock binding that Jeremy is > working would be of use btw. Here's one I prepared earlier: http://devicetree.org/ClockBindings :) Cheers, Jeremy ___ devicetree-discuss mailing list devicetree-discuss@

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: Boot interface for device trees on ARM

2010-06-04 Thread Jeremy Kerr
All, > > With this, the kernel can remain largely backward compatible with the > > legacy boot method, requiring _no_ change to the existing code, as the > > ID is sufficient to distinguish between both boot types. The machine > > record remains largely relevant even for a DT boot as the majority

Re: Boot interface for device trees on ARM

2010-05-19 Thread Jeremy Kerr
Nicolas, > Exact. For example, on ARM the machine ID is also used to figure out > the MMU mapping needed to be able to simply be able to debug the very > early assembly boot stage when there isn't even a stack available. I get the impression that this is the only thing that we need the io_pg_off

Re: Boot interface for device trees on ARM

2010-05-17 Thread Jeremy Kerr
Hi Nicolas, > I think that, for the moment, it is best if the bootloader on already > existing subarchitectures where DT is introduced still preserve the > already existing ability to boot using ATAGs. This allows for the > testing and validation of the DT concept against the legacy ATAG metho

Boot interface for device trees on ARM

2010-05-17 Thread Jeremy Kerr
Hi all, As we're getting closer to device tree support on ARM, I'd like to get some input on our proposed boot interface. Basically, I'd like to define how we pass the device tree from the bootloader to the kernel. My current method of doing this is through a new atag. It looks like this:

Re: [RFC PATCH] devicetree: Fix buffer overflow on setting device node name

2010-04-07 Thread Jeremy Kerr
Hi Grant, Thanks, this fixes the overflow for me too. Have applied to my tree and pushed out. If anyone else would like to check out out the patches, my tree is at: http://kernel.ubuntu.com/git?p=jk/dt/qemu.git;a=summary git://kernel.ubuntu.com/jk/dt/qemu.git Cheers, Jeremy _

Re: [RFC PATCH 0/7] QEMU patches to generate FDT from qdevs

2010-04-07 Thread Jeremy Kerr
Hi Grant, > This is an experimental set of patches for populating the flattened > device tree (fdt) data from the actual set of qdevs in the platform. Neat. I've pulled these into my qemu tree, and have updated it to the current qemu master branch too (only a minor change, as qemu_error has been

Re: RFC: ARM Boot standard for passing device tree blob

2010-03-25 Thread Jeremy Kerr
> > > ===Required System State=== > > > *Quiesce all DMA > > > *CPU register contents > > > **r0 = 0 > > > **r1 = Linux machine number (as defined in the ARM Linux machine > > > database) or 0 > > > > 0 is a valid machine number. What is your purpose of passing 0? > > Presumably a machine number

Re: [PATCH 02/11] arm: use generic infrastructure for early params

2010-01-06 Thread Jeremy Kerr
Russell, > This is something which should be separate from the rest of the DT > patch - could we have this as a patch which can be applied to the > current kernel tree please? Sure, patch coming. The first three patches of this series (prefixed with arm:, rather than arm- dt:) are all generic ar

Re: [PATCH 06/11] arm-dt: postpone machine detection until setup_arch with CONFIG_ARM_DEVTREE

2010-01-04 Thread Jeremy Kerr
Hi Ben, > > When we're using CONFIG_ARM_DEVTREE, we need to postpone machine > > detection until later in setup_arch. Because ARM_DEVTREE depends on > > !DEBUG_LL, we don't need the mdesc this early anyway. > > > > We'll add support for ARM_DEVTREE && DEBUG_LL later. > > Why not add a specific ma

[PATCH 3/3] proc_devtree: include linux/of.h

2009-12-22 Thread Jeremy Kerr
Currenly, proc_devtree.c depends on asm/prom.h to include linux/of.h, to provide some device-tree definitions (eg, struct property). Instead, include linux/of.h directly. We still need asm/prom.h for HAVE_ARCH_DEVTREE_FIXUPS. Signed-off-by: Jeremy Kerr --- fs/proc/proc_devtree.c |1 + 1

[PATCH 0/3] Build fixes for test-devicetree

2009-12-22 Thread Jeremy Kerr
Hi all, A small series of patches to fix minor build breakages when compiling gcl's test-devicetree tree on ARM. I've CC-ed lkml & linuxppc-dev for the fs/proc/ changes, but these patches are only applicable to gcl's tree at present. Cheers, Jeremy --- Jeremy Kerr (3)

[PATCH 2/3] of: make set_node_proc_entry private to proc_devtree.c

2009-12-22 Thread Jeremy Kerr
e ordering). Signed-off-by: Jeremy Kerr --- fs/proc/proc_devtree.c |5 +++-- include/linux/of.h |6 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index 7ba79a5..31fc7e0 100644 --- a/fs/proc/proc_devtree.c +++

[PATCH 1/3] of: include linux/proc_fs.h

2009-12-22 Thread Jeremy Kerr
/of/base.c:946: error: implicit declaration of function 'proc_device_tree_update_prop' Add proc_fs.h for these prototypes. Signed-off-by: Jeremy Kerr --- drivers/of/base.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index 974f64e..2dcb7a3 100644 --- a/driv

[PATCH 03/11] arm: export arm_add_memory

2009-12-22 Thread Jeremy Kerr
We'd like to add memory from the device tree, so make arm_add_memory non-static and add a prototype in setup.h Signed-off-by: Jeremy Kerr --- arch/arm/include/asm/setup.h |2 ++ arch/arm/kernel/setup.c |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arc

[PATCH 04/11] arm-dt: Add ATAG_DEVTREE tag

2009-12-22 Thread Jeremy Kerr
We'd like to provide a pointer to the device tree blob through the atags mechanism, so add a tag type containing a physical dtb pointer. We won't need a parser for this, as we'll need to do the devtree parsing a little earlier than other tags. Signed-off-by: Jeremy Kerr --- a

[PATCH 01/11] arm: change command_line to cmd_line, and export it

2009-12-22 Thread Jeremy Kerr
drivers/of/fdt expects a cmd_line symbol, while arm uses command_line. Change to the former and make accessible from setup.h, so that we can share with the fdt code. This means a change in section from .init.data to .data Signed-off-by: Jeremy Kerr --- arch/arm/include/asm/setup.h |6

[PATCH 05/11] arm-dt: Add CONFIG_ARM_DEVTREE

2009-12-22 Thread Jeremy Kerr
Add some basic empty infrastructure for DT support on ARM. Signed-off-by: Jeremy Kerr --- arch/arm/Kconfig| 13 + arch/arm/include/asm/prom.h | 28 arch/arm/kernel/setup.c | 28 3 files changed, 69

[PATCH 09/11] arm-dt: probe for device-tree enabled platforms

2009-12-22 Thread Jeremy Kerr
Add a probe_dt pointer to struct machine_desc, which can be populated by platforms that support discovery via device trees. At setup_arch time, each compiled-in machine_desc with a dt_probe member will be probed. If the probe function returns 1, we have a match. Signed-off-by: Jeremy Kerr

[PATCH 00/11] Device-tree support for ARM

2009-12-22 Thread Jeremy Kerr
;d appreciate any comments, feedback or review. Cheers, Jeremy 1: http://lkml.org/lkml/2009/5/27/446 2: http://git.secretlab.ca/?p=linux-2.6.git;a=shortlog;h=refs/heads/test-devicetree 3: http://kernel.ubuntu.com/git?p=jk/dt/linux-2.6.git;a=summary 4: https://wiki.ubuntu.com/KernelTeam/ARMDeviceTrees

[PATCH 02/11] arm: use generic infrastructure for early params

2009-12-22 Thread Jeremy Kerr
ather than char **, so we need to update the parser functions a little. Signed-off-by: Jeremy Kerr --- arch/arm/include/asm/setup.h | 12 - arch/arm/kernel/setup.c | 62 +++--- arch/arm/kernel/vmlinux.lds.S |3 - arch/arm/mach-footbridge/com

[PATCH 08/11] arm-dt: parse memory info from DT

2009-12-22 Thread Jeremy Kerr
Move the early_init_dt hooks into a new file, and populate the _alloc_memory and _add_memory functions. Signed-off-by: Jeremy Kerr --- arch/arm/kernel/devtree.c | 42 ++ arch/arm/kernel/setup.c | 23 2 files changed, 42 insertions

[PATCH 11/11] arm/versatile: probe via device tree

2009-12-22 Thread Jeremy Kerr
For testing the dt work, define a dt-enabled versatile platform, separate from the existing versatile platform support. Signed-off-by: Jeremy Kerr --- arch/arm/mach-versatile/Kconfig|7 + arch/arm/mach-versatile/Makefile |1 arch/arm/mach-versatile/versatile_dt.c | 129

[PATCH 10/11] arm-dt: parse initrd from device tree

2009-12-22 Thread Jeremy Kerr
Move early_init_dt_setup_initrd_arch to arch/arm/mm/init.c, and populate it to set the properties of the parsed initrd area. Signed-off-by: Jeremy Kerr --- arch/arm/kernel/devtree.c |3 --- arch/arm/mm/init.c| 15 +++ 2 files changed, 15 insertions(+), 3 deletions

[PATCH 06/11] arm-dt: postpone machine detection until setup_arch with CONFIG_ARM_DEVTREE

2009-12-22 Thread Jeremy Kerr
When we're using CONFIG_ARM_DEVTREE, we need to postpone machine detection until later in setup_arch. Because ARM_DEVTREE depends on !DEBUG_LL, we don't need the mdesc this early anyway. We'll add support for ARM_DEVTREE && DEBUG_LL later. Signed-off-by: Jeremy Kerr ---

[PATCH 07/11] arm-dt: parse devtree pointer on boot

2009-12-22 Thread Jeremy Kerr
Add code to parse the device tree pointer from the atags, and an (empty) routine to create an mdesc from the discovered device tree. Split the parsing code in setup_arch to handle both device-tree and tags based machine discovery. Signed-off-by: Jeremy Kerr --- arch/arm/include/asm/devtree.h

Re: [PATCH] of/flattree: use callback to setup initrd from /chosen

2009-12-22 Thread Jeremy Kerr
Hi Michael, > > void early_init_dt_setup_initrd_arch(unsigned long start, > > unsigned long end); > > arch_early_init_dt_setup_initrd() makes more sense to me, but .. _arch has been the general convention for arch-specific hooks in drivers/of/. > > +#ifdef CO

[PATCH] of/flattree: use callback to setup initrd from /chosen

2009-12-22 Thread Jeremy Kerr
start, unsigned long end); The arch-specific code can then setup the initrd however it likes. Compiled on powerpc, with CONFIG_BLK_DEV_INITRD=y and =n. Signed-off-by: Jeremy Kerr --- arch/microblaze/kernel/prom.c | 10 ++ arch/powerpc/kernel

[RFC,PATCH] of/flattree: endian-convert members of boot_param_header

2009-12-14 Thread Jeremy Kerr
The boot_param_header has big-endian fields, so change the types to __be32, and perform endian conversion when we access them. Signed-off-by: Jeremy Kerr --- drivers/of/fdt.c | 18 +- include/linux/of_fdt.h | 20 ++-- 2 files changed, 19 insertions

[RFC,PATCH 1/2] of: use __be32 for cell value accessors

2009-12-13 Thread Jeremy Kerr
Currently, we're using u32 for cell values, and hence assuming host-endian device trees. As we'd like to support little-endian platforms, use a __be32 for cell values, and convert in the cell accessors. Signed-off-by: Jeremy Kerr --- drivers/of/fdt.c |4 ++-- include/

[RFC, PATCH 2/2] of: assume big-endian properties, adding conversions where necessary

2009-12-13 Thread Jeremy Kerr
the sites where we access property values in the common of code. Compiled on powerpc (ppc44x_defconfig & ppc64_defconfig) and arm (fdt support only for now). Signed-off-by: Jeremy Kerr --- drivers/of/base.c| 12 +-- drivers/of/fd

[PATCH] of/flattree: use OF_ROOT_NODE_{SIZE, ADDR}_CELLS DEFAULT for fdt parsing

2009-12-13 Thread Jeremy Kerr
At present we're using hard-coded values for defaults when parsing the FDT. This change uses the #defines instead. Signed-off-by: Jeremy Kerr --- drivers/of/fdt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 40

[RFC,PATCH] of/flattree: Don't assume HAVE_LMB

2009-12-13 Thread Jeremy Kerr
cluded, we need asm/page.h for __va. Signed-off-by: Jeremy Kerr --- drivers/of/fdt.c | 30 +++--- include/linux/of_fdt.h |8 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 941da3f..40716

[RFC,PATCH 0/2] little-endian support in drivers/of

2009-12-13 Thread Jeremy Kerr
ticular the spi, mdio and i2c files have had only a basic check. Of course, comments are most welcome. Cheers, Jeremy --- Jeremy Kerr (2): of: use __be32 for cell value accessors of: assume big-endian properties, adding conversions

[PATCH] of: merge of_find_node_by_phandle

2009-12-09 Thread Jeremy Kerr
Merge common function between powerpc, sparc and microblaze. Code is identical for powerpc and microblaze, but adds a lock (and release) of the devtree_lock on sparc. Currently untested. Signed-off-by: Jeremy Kerr --- v2: update iterator, fix subject, post to arch lists --- arch/microblaze

Re: [PATCH] of/flattree: merge of_find_node_by_phandle

2009-12-09 Thread Jeremy Kerr
> [PATCH] of/flattree: merge of_find_node_by_phandle On second thoughts, this should probably be "of" rather than "of/flattree". Cheers, Jeremy ___ devicetree-discuss mailing list devicetree-discuss@lists.ozlabs.org https://lists.ozlabs.org/listinfo/d

[PATCH] of/flattree: merge of_find_node_by_phandle

2009-12-09 Thread Jeremy Kerr
Merge common function between powerpc, sparc and microblaze. Code is identical for powerpc and microblaze, but adds a lock (and release) of the devtree_lock on sparc. Currently untested. Signed-off-by: Jeremy Kerr --- arch/microblaze/kernel/prom.c | 21 - arch/powerpc

Re: [PATCH 06/11] of/flattree: merge early_init_devtree() and early_init_move_devtree()

2009-12-06 Thread Jeremy Kerr
Hi Grant, > + /* Scan memory nodes and rebuild LMBs */ > + lmb_init(); > + of_scan_flat_dt(early_init_dt_scan_root, NULL); > + of_scan_flat_dt(early_init_dt_scan_memory, NULL); > + > + /* Save command line for /proc/cmdline and then parse parameters */ > + strlcpy(boot_comm