Skip to content

FDT clean-ups and libfdt support

Rob Herring linux-arm-kernel linux-devicetree linux-metag linux-mips linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest21 patches 12 repliesIn review
  2. v120 patches 15 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21mips: octeon: convert to use unflatten_and_copy_device_treearch/mips/cavium-octeon/setup.c+5 -150 replies
2/21mips: lantiq: copy built-in DTB out of init sectionarch/mips/lantiq/prom.c+1 -120 replies
3/21mips: xlp: copy built-in DTB out of init sectionarch/mips/netlogic/xlp/dt.c+1 -160 replies
4/21mips: ralink: convert to use unflatten_and_copy_device_treearch/mips/ralink/of.c+1 -240 replies
5/21ARM: dt: use default early_init_dt_alloc_memory_archarch/arm/kernel/devtree.c+0 -50 replies
6/21c6x: convert fdt pointers to opaque pointersarch/c6x/kernel/setup.c+2 -21 reply
7/21mips: convert fdt pointers to opaque pointersarch/mips/include/asm/mips-boards/generic.h arch/mips/include/asm/prom.h arch/mips/kernel/prom.c +4 more+13 -150 replies
8/21of/fdt: consolidate built-in dtb section variablesarch/arc/include/asm/sections.h arch/metag/kernel/setup.c arch/mips/include/asm/mips-boards/generic.h +6 more+4 -150 replies
9/21of/fdt: remove some unneeded includesdrivers/of/fdt.c+0 -50 replies
10/21of/fdt: remove unused of_scan_flat_dt_by_pathdrivers/of/fdt.c include/linux/of_fdt.h+0 -700 replies
11/21of/fdt: update of_get_flat_dt_prop in prep for libfdtarch/arc/kernel/devtree.c arch/arm/kernel/devtree.c arch/arm/mach-exynos/exynos.c +16 more+77 -740 replies
12/21of/fdt: Convert FDT functions to use libfdtdrivers/of/Kconfig drivers/of/Makefile drivers/of/fdt.c +1 more+60 -1530 replies
13/21of/fdt: use libfdt accessors for header datadrivers/of/fdt.c include/linux/of_fdt.h+16 -180 replies
14/21of/fdt: create common debugfsarch/microblaze/kernel/prom.c arch/powerpc/kernel/prom.c drivers/of/fdt.c+24 -521 reply
15/21of/fdt: move memreserve and dtb memory reservations into corearch/arm/include/asm/prom.h arch/arm/kernel/devtree.c arch/arm/mm/init.c +3 more+16 -731 reply
16/21of/fdt: fix phys_addr_t related print size warningsdrivers/of/fdt.c+2 -20 replies
17/21of/fdt: introduce of_get_flat_dt_sizedrivers/of/fdt.c include/linux/of_fdt.h+9 -01 reply
18/21powerpc: use libfdt accessors for header dataarch/powerpc/kernel/Makefile arch/powerpc/kernel/prom.c+7 -53 replies
19/21x86: use FDT accessors for FDT blob header dataarch/x86/kernel/devicetree.c+5 -70 replies
20/21of/fdt: convert initial_boot_params to opaque pointerdrivers/of/fdt.c include/linux/of_fdt.h+2 -20 replies
21/21of: push struct boot_param_header and defines into powerpcarch/powerpc/include/asm/prom.h include/linux/of_fdt.h+39 -371 reply

Reviews trailers per patch

4 of 21 patches have a Reviewed-by or Acked-by.

PatchVineet GuptaJames HoganMichal SimekMark SalterBenjamin HerrenschmidtGrant LikelyStephen ChiversCatalin Marinas
SeriesT-b T-b T-b
1/21
2/21
3/21
4/21
5/21
6/21A-b
7/21
8/21A-b A-b
9/21
10/21
11/21
12/21
13/21
14/21T-b
15/21A-b
16/21
17/21
18/21
19/21
20/21
21/21A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/21] FDT clean-ups and libfdt support

From: Rob Herring <[email protected]>

This is a series of clean-ups of architecture FDT code and converts the core FDT code over to using libfdt functions. This is in preparation to add FDT based address translation parsing functions for early console support. This series removes direct access to FDT data from all arches except powerpc.

The current MIPS lantiq and xlp DT code is buggy as built-in DTBs need to be copied out of init section. Patches 2 and 3 should be applied to 3.15.

Changes in v2 are relatively minor. There was a bug in the unflattening code where walking up the tree was not being handled correctly (thanks to Michal Simek). I re-worked things a bit to avoid globally adding libfdt include paths.

A branch is available here[1], and I plan to put into linux-next in a few days. Please test! I've compiled on arm, arm64, mips, microblaze, xtensa, and powerpc and booted on arm and arm64.

Rob

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git libfdt

Rob Herring (21):
mips: octeon: convert to use unflatten_and_copy_device_tree
mips: lantiq: copy built-in DTB out of init section
mips: xlp: copy built-in DTB out of init section
mips: ralink: convert to use unflatten_and_copy_device_tree
ARM: dt: use default early_init_dt_alloc_memory_arch
c6x: convert fdt pointers to opaque pointers
mips: convert fdt pointers to opaque pointers of/fdt: consolidate built-in dtb section variables of/fdt: remove some unneeded includes
of/fdt: remove unused of_scan_flat_dt_by_path of/fdt: update of_get_flat_dt_prop in prep for libfdt of/fdt: Convert FDT functions to use libfdt
of/fdt: use libfdt accessors for header data of/fdt: create common debugfs
of/fdt: move memreserve and dtb memory reservations into core of/fdt: fix phys_addr_t related print size warnings of/fdt: introduce of_get_flat_dt_size
powerpc: use libfdt accessors for header data
x86: use FDT accessors for FDT blob header data of/fdt: convert initial_boot_params to opaque pointer
of: push struct boot_param_header and defines into powerpc

 arch/arc/include/asm/sections.h             |   1 -
 arch/arc/kernel/devtree.c                   |   2 +-
 arch/arm/include/asm/prom.h                 |   2 -
 arch/arm/kernel/devtree.c                   |  34 +--
 arch/arm/mach-exynos/exynos.c               |   2 +-
 arch/arm/mach-vexpress/platsmp.c            |   2 +-
 arch/arm/mm/init.c                          |   1 -
 arch/arm/plat-samsung/s5p-dev-mfc.c         |   4 +-
 arch/arm64/mm/init.c                        |  21 --
 arch/c6x/kernel/setup.c                     |   4 +-
 arch/metag/kernel/setup.c                   |   4 -
 arch/microblaze/kernel/prom.c               |  39 +--
 arch/mips/cavium-octeon/setup.c             |  20 +-
 arch/mips/include/asm/mips-boards/generic.h |   4 -
 arch/mips/include/asm/prom.h                |   6 +-
 arch/mips/kernel/prom.c                     |   2 +-
 arch/mips/lantiq/prom.c                     |  15 +-
 arch/mips/lantiq/prom.h                     |   2 -
 arch/mips/mti-sead3/sead3-setup.c           |   8 +-
 arch/mips/netlogic/xlp/dt.c                 |  19 +-
 arch/mips/ralink/of.c                       |  29 +-
 arch/openrisc/kernel/vmlinux.h              |   2 -
 arch/powerpc/include/asm/prom.h             |  39 +++
 arch/powerpc/kernel/Makefile                |   1 +
 arch/powerpc/kernel/epapr_paravirt.c        |   2 +-
 arch/powerpc/kernel/fadump.c                |   4 +-
 arch/powerpc/kernel/prom.c                  |  78 ++----
 arch/powerpc/kernel/rtas.c                  |   2 +-
 arch/powerpc/mm/hash_utils_64.c             |  22 +-
 arch/powerpc/platforms/52xx/efika.c         |   4 +-
 arch/powerpc/platforms/chrp/setup.c         |   4 +-
 arch/powerpc/platforms/powernv/opal.c       |  12 +-
 arch/powerpc/platforms/pseries/setup.c      |   4 +-
 arch/x86/kernel/devicetree.c                |  12 +-
 arch/xtensa/kernel/setup.c                  |   3 +-
 drivers/of/Kconfig                          |   1 +
 drivers/of/Makefile                         |   2 +
 drivers/of/fdt.c                            | 398 ++++++++++------------------
 drivers/of/of_reserved_mem.c                |   4 +-
 include/linux/of_fdt.h                      |  63 +----
 40 files changed, 280 insertions(+), 598 deletions(-)
Signature · 1 line
1.9.1