of: prom.h clean-up and removal
Subsystems (48)
cover of: prom.h clean-up and removal
From: Rob Herring <[email protected]>
This is the second series of clean-up for architecture DT code. The first series is here [1].
As the number of DT enabled architectures has grown, there has been a lot of copy/paste duplication of prom.h. The include ordering for prom.h is complex and has resulted in many implicit includes. This series cleans up prom.h and removes the dependency of prom.h includes in the core DT code on all architectures except sparc. This removes prom.h on several architectures and makes it an architecture specific include on the rest.
Compiled on arm, arm64, microblaze, mips, openrisc, powerpc, sparc, xtensa. Mostly defconfigs and some allyesconfigs. The 0-day builder has also caught some issues.
A branch with both series is available here:git://sources.calxeda.com/kernel/linux.git dt-cleanup
Rob
[1] http://www.spinics.net/lists/devicetree/msg04865.html
Rob Herring (21):
drivers: remove unnecessary prom.h includes
of: remove unnecessary prom.h includes
ARM: keystone: remove unnecessary prom.h include
arm64: remove unnecessary prom.h include
openrisc: remove unnecessary prom.h include
arc: remove unnecessary prom.h includes
hexagon: remove unnecessary prom.h includes
metag: move setup_machine_fdt declaration from prom.h
microblaze: clean-up prom.h implicit includes
drivers: clean-up prom.h implicit includes
mips: add explicit includes of prom.h
x86: add necessary includes for prom.h
of: implement pci_address_to_pio as weak function
of: implement of_node_to_nid as a weak function
of: remove HAVE_ARCH_DEVTREE_FIXUPS
of: move of_address_to_resource and of_iomap declarations from sparc
of: move of_translate_dma_address to of_address.h
powerpc: clean-up include ordering in prom.h
powerpc: add explicit OF includes
of: only include prom.h on sparc
of: remove empty arch prom.h headers
arch/arc/include/asm/prom.h | 14 --------- arch/arc/kernel/devtree.c | 1 - arch/arc/kernel/setup.c | 1 - arch/arm/include/asm/prom.h | 2 -- arch/arm/mach-keystone/platsmp.c | 1 - arch/arm64/include/asm/prom.h | 1 - arch/arm64/mm/init.c | 1 - arch/c6x/include/asm/prom.h | 1 - arch/hexagon/kernel/setup.c | 3 -- arch/metag/include/asm/prom.h | 23 -------------- arch/metag/include/asm/setup.h | 1 + arch/metag/kernel/setup.c | 1 - arch/microblaze/include/asm/prom.h | 39 +----------------------- arch/microblaze/kernel/prom.c | 1 + arch/microblaze/kernel/setup.c | 1 + arch/microblaze/kernel/timer.c | 1 + arch/microblaze/pci/pci-common.c | 1 + arch/mips/include/asm/prom.h | 11 ------- arch/mips/lantiq/prom.c | 1 + arch/mips/mti-sead3/sead3-setup.c | 2 ++ arch/mips/ralink/of.c | 1 + arch/openrisc/include/asm/prom.h | 22 ------------- arch/openrisc/kernel/prom.c | 1 - arch/powerpc/include/asm/prom.h | 33 ++++---------------- arch/powerpc/kernel/epapr_paravirt.c | 1 + arch/powerpc/platforms/512x/clock.c | 1 + arch/powerpc/platforms/512x/pdm360ng.c | 2 ++ arch/powerpc/platforms/82xx/mpc8272_ads.c | 2 ++ arch/powerpc/platforms/82xx/pq2fads.c | 2 ++ arch/powerpc/platforms/83xx/suspend.c | 2 ++ arch/powerpc/platforms/86xx/pic.c | 1 + arch/powerpc/platforms/embedded6xx/flipper-pic.c | 1 + arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 ++ arch/powerpc/platforms/pasemi/gpio_mdio.c | 1 + arch/powerpc/platforms/powermac/pfunc_base.c | 1 + arch/powerpc/platforms/powernv/opal-lpc.c | 1 + arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/platforms/powernv/setup.c | 1 + arch/powerpc/platforms/pseries/hotplug-memory.c | 2 ++ arch/powerpc/sysdev/cpm_common.c | 1 + arch/powerpc/sysdev/fsl_gtm.c | 2 ++ arch/powerpc/sysdev/fsl_pmc.c | 1 + arch/powerpc/sysdev/mpic.c | 8 ++--- arch/powerpc/sysdev/mpic_timer.c | 2 ++ arch/sparc/include/asm/prom.h | 12 -------- arch/x86/include/asm/prom.h | 5 --- arch/x86/kernel/devicetree.c | 11 +------ arch/xtensa/include/asm/prom.h | 6 ---- drivers/ata/sata_fsl.c | 2 ++ drivers/char/bsr.c | 1 + drivers/char/hw_random/pasemi-rng.c | 1 + drivers/cpufreq/pasemi-cpufreq.c | 1 + drivers/crypto/caam/ctrl.c | 3 ++ drivers/crypto/caam/jr.c | 2 ++ drivers/dma/fsldma.c | 2 ++ drivers/edac/cell_edac.c | 1 + drivers/i2c/busses/i2c-mpc.c | 2 ++ drivers/i2c/busses/i2c-powermac.c | 1 + drivers/input/serio/xilinx_ps2.c | 1 + drivers/macintosh/macio_asic.c | 2 ++ drivers/macintosh/rack-meter.c | 2 ++ drivers/macintosh/smu.c | 1 + drivers/macintosh/via-pmu.c | 2 ++ drivers/mtd/nand/fsl_elbc_nand.c | 1 + drivers/mtd/nand/pasemi_nand.c | 2 ++ drivers/net/can/grcan.c | 3 -- drivers/net/can/sja1000/sja1000_of_platform.c | 1 - drivers/net/ethernet/ibm/emac/core.c | 2 ++ drivers/net/ethernet/ibm/emac/mal.c | 1 + drivers/net/ethernet/ibm/emac/rgmii.c | 1 + drivers/net/ethernet/ibm/emac/tah.c | 1 + drivers/net/ethernet/ibm/emac/zmii.c | 1 + drivers/net/ethernet/xilinx/ll_temac_main.c | 1 + drivers/of/address.c | 8 +++++ drivers/of/base.c | 7 +++++ drivers/of/of_pci.c | 1 - drivers/of/of_pci_irq.c | 1 - drivers/of/pdt.c | 1 - drivers/pcmcia/electra_cf.c | 2 ++ drivers/tty/ehv_bytechan.c | 1 + drivers/tty/serial/pmac_zilog.c | 2 ++ drivers/usb/host/ehci-ppc-of.c | 2 ++ drivers/usb/host/ohci-ppc-of.c | 2 ++ fs/proc/proc_devtree.c | 3 -- include/linux/of.h | 13 ++++---- include/linux/of_address.h | 39 +++++++++++++----------- sound/aoa/core/gpio-feature.c | 3 +- sound/aoa/soundbus/i2sbus/core.c | 2 ++ sound/ppc/pmac.c | 2 ++ sound/ppc/tumbler.c | 1 + 90 files changed, 141 insertions(+), 220 deletions(-) delete mode 100644 arch/arc/include/asm/prom.h delete mode 100644 arch/arm64/include/asm/prom.h delete mode 100644 arch/c6x/include/asm/prom.h delete mode 100644 arch/metag/include/asm/prom.h delete mode 100644 arch/openrisc/include/asm/prom.h delete mode 100644 arch/xtensa/include/asm/prom.h
Signature · 1 line
1.8.1.2
PATCH 1/21 drivers: remove unnecessary prom.h includes
From: Rob Herring <[email protected]>
Remove unnecessary prom.h includes in preparation to remove implicit includes of prom.h.
--- drivers/net/can/grcan.c | 3 --- drivers/net/can/sja1000/sja1000_of_platform.c | 1 - 2 files changed, 4 deletions(-)
drivers/net/can/grcan.c +0 -3
@@ -34,10 +34,7 @@#include <linux/io.h> #include <linux/can/dev.h> #include <linux/spinlock.h> -#include <linux/of_platform.h> -#include <asm/prom.h> -#include <linux/of_irq.h> #include <linux/dma-mapping.h>
drivers/net/can/sja1000/sja1000_of_platform.c +0 -1
@@ -44,7 +44,6 @@#include <linux/of_platform.h> #include <linux/of_address.h> #include <linux/of_irq.h> -#include <asm/prom.h> #include "sja1000.h"
Signature · 1 line
1.8.1.2
Marc Kleine-Budde
maintainerRe: [PATCH 01/21] drivers: remove unnecessary prom.h includes
Quoted 10 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Remove unnecessary
prom.hincludes in preparation to remove implicit includes ofprom.h.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>
Applied to linux-can-next/testing, it will be included in my next pull request to David Miller.
tnx,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Re: [PATCH 01/21] drivers: remove unnecessary prom.h includes
Quoted 6 lines · Marc Kleine-Budde
Quoted 5 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Remove unnecessary
prom.hincludes in preparation to remove implicit includes ofprom.h.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Applied to linux-can-next/testing, it will be included in my next pull request to David Miller.
Please don't apply this. The whole series needs to be applied together. This patch is a dependency for the rest of the series.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Marc Kleine-Budde
maintainerRe: [PATCH 01/21] drivers: remove unnecessary prom.h includes
Quoted 13 lines · Rob Herring
Quoted 12 lines · Marc Kleine-Budde
Quoted 10 lines · Rob Herring
From: Rob Herring <[email protected]>
Remove unnecessary
prom.hincludes in preparation to remove implicit includes ofprom.h.Signed-off-by Rob Herring <[email protected]>Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>
Quoted 5 lines
Quoted 2 lines
Applied to linux-can-next/testing, it will be included in my next pull request to David Miller.
Please don't apply this. The whole series needs to be applied together. This patch is a dependency for the rest of the series.
Okay, then add my Acked-by to this patch.
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
PATCH 2/21 of: remove unnecessary prom.h includes
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Remove unnecessary prom.h includes in preparation to make prom.h optional.
--- drivers/of/of_pci_irq.c | 1 - drivers/of/pdt.c | 1 - 2 files changed, 2 deletions(-)
drivers/of/of_pci_irq.c +0 -1
@@ -2,7 +2,6 @@#include <linux/of_pci.h> #include <linux/of_irq.h> #include <linux/export.h> -#include <asm/prom.h> /** * of_irq_map_pci - Resolve the interrupt for a PCI device
drivers/of/pdt.c +0 -1
@@ -22,7 +22,6 @@#include <linux/slab.h> #include <linux/of.h> #include <linux/of_pdt.h> -#include <asm/prom.h> static struct of_pdt_ops *of_pdt_prom_ops__initdata ;
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/21 ARM: keystone: remove unnecessary prom.h include
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove unnecessary prom.h include in preparation to make prom.h optional.
--- arch/arm/mach-keystone/platsmp.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-keystone/platsmp.c +0 -1
@@ -17,7 +17,6 @@#include <linux/io.h> #include <asm/smp_plat.h> -#include <asm/prom.h> #include "keystone.h"
Signature · 1 line
1.8.1.2
PATCH 4/21 arm64: remove unnecessary prom.h include
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove unnecessary prom.h include in preparation to make prom.h optional.
--- arch/arm64/mm/init.c | 1 - 1 file changed, 1 deletion(-)
arch/arm64/mm/init.c +0 -1
@@ -31,7 +31,6 @@#include <linux/sort.h> #include <linux/of_fdt.h> -#include <asm/prom.h> #include <asm/sections.h> #include <asm/setup.h> #include <asm/sizes.h>
Signature · 1 line
1.8.1.2
Re: [PATCH 04/21] arm64: remove unnecessary prom.h include
Quoted 7 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Remove unnecessary
prom.hinclude in preparation to makeprom.hoptional.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 5/21 openrisc: remove unnecessary prom.h include
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove unnecessary prom.h include in preparation to make prom.h optional.
--- arch/openrisc/kernel/prom.c | 1 - 1 file changed, 1 deletion(-)
arch/openrisc/kernel/prom.c +0 -1
@@ -37,7 +37,6 @@#include <linux/memblock.h> #include <linux/of_fdt.h> -#include <asm/prom.h> #include <asm/page.h> #include <asm/processor.h> #include <asm/irq.h>
Signature · 1 line
1.8.1.2
PATCH 6/21 arc: remove unnecessary prom.h includes
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove unnecessary prom.h includes in preparation to remove prom.h.
--- arch/arc/kernel/devtree.c | 1 - arch/arc/kernel/setup.c | 1 - 2 files changed, 2 deletions(-)
arch/arc/kernel/devtree.c +0 -1
@@ -14,7 +14,6 @@#include <linux/memblock.h> #include <linux/of.h> #include <linux/of_fdt.h> -#include <asm/prom.h> #include <asm/clk.h> #include <asm/mach_desc.h>
arch/arc/kernel/setup.c +0 -1
@@ -21,7 +21,6 @@#include <asm/setup.h> #include <asm/page.h> #include <asm/irq.h> -#include <asm/prom.h> #include <asm/unwind.h> #include <asm/clk.h> #include <asm/mach_desc.h>
Signature · 1 line
1.8.1.2
Re: [PATCH 06/21] arc: remove unnecessary prom.h includes
Quoted 6 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Remove unnecessary
prom.hincludes in preparation to removeprom.h.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Cc Vineet Gupta <vgupta-HKixBCOQz3hWk0Htik3J/[email protected]>
Thx for the continued cleanup.
-Vineet
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/21 hexagon: remove unnecessary prom.h includes
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Hexagon does not have a prom.h header, so it is probably broken with CONFIG_OF enabled. In any case, remove unnecessary prom.h include in preparation to make prom.h optional.
--- arch/hexagon/kernel/setup.c | 3 --- 1 file changed, 3 deletions(-)
arch/hexagon/kernel/setup.c +0 -3
@@ -32,9 +32,6 @@#include <asm/hexagon_vm.h> #include <asm/vm_mmu.h> #include <asm/time.h> -#ifdef CONFIG_OF -#include <asm/prom.h> -#endif char cmd_line[COMMAND_LINE_SIZE ];static char default_command_line[COMMAND_LINE_SIZE ]__initdata =CONFIG_CMDLINE ;
Signature · 1 line
1.8.1.2
Re: [PATCH 07/21] hexagon: remove unnecessary prom.h includes
Quoted 30 lines · Rob Herring
From: Rob Herring <[email protected]>
Hexagon does not have a
prom.hheader, so it is probably broken withCONFIG_OFenabled. In any case, remove unnecessaryprom.hinclude in preparation to makeprom.hoptional.--- arch/hexagon/kernel/setup.c | 3 --- 1 file changed, 3 deletions(-)arch/hexagon/kernel/setup.c +0
-3@@ -32,9 +32,6 @@#include <asm/hexagon_vm.h> #include <asm/vm_mmu.h> #include <asm/time.h> -#ifdef CONFIG_OF -#include <asm/prom.h> -#endif char cmd_line[COMMAND_LINE_SIZE ];static char default_command_line[COMMAND_LINE_SIZE ]__initdata =CONFIG_CMDLINE ;Signature · 1 line
1.8.1.2
Signature · 3 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
PATCH 8/21 metag: move setup_machine_fdt declaration from prom.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move setup_machine_fdt out of prom.h and into asm/setup.h in preparation to remove prom.h.
--- arch/metag/include/asm/prom.h | 2 -- arch/metag/include/asm/setup.h | 1 + arch/metag/kernel/setup.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)
arch/metag/include/asm/prom.h +0 -2
@@ -14,10 +14,8 @@#ifndef __ASM_METAG_PROM_H#define __ASM_METAG_PROM_H -#include <asm/setup.h> #define HAVE_ARCH_DEVTREE_FIXUPS -extern struct machine_desc *setup_machine_fdt (void *dt);extern void copy_fdt (void );#endif /* __ASM_METAG_PROM_H */
arch/metag/include/asm/setup.h +1 -0
@@ -3,6 +3,7 @@#include <uapi/asm/setup.h> +extern struct machine_desc *setup_machine_fdt (void *dt);void per_cpu_trap_init (unsigned long );extern void __init dump_machine_table (void );#endif /* _ASM_METAG_SETUP_H */
arch/metag/kernel/setup.c +0 -1
@@ -42,7 +42,6 @@#include <asm/mmu.h> #include <asm/mmzone.h> #include <asm/processor.h> -#include <asm/prom.h> #include <asm/sections.h> #include <asm/setup.h> #include <asm/traps.h>
Signature · 1 line
1.8.1.2
PATCH 9/21 microblaze: clean-up prom.h implicit includes
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
While powerpc is a mess of implicit includes by prom.h, microblaze just copied this and is easily fixed. Add the necessary explicit includes and remove unnecessary includes and other parts from prom.h
--- arch/microblaze/include/asm/prom.h | 28 +--------------------------- arch/microblaze/kernel/prom.c | 1 + arch/microblaze/kernel/setup.c | 1 + arch/microblaze/kernel/timer.c | 1 + arch/microblaze/pci/pci-common.c | 1 + drivers/net/ethernet/xilinx/ll_temac_main.c | 1 + 6 files changed, 6 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/prom.h +1 -27
@@ -11,17 +11,10 @@* as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - -#include <linux/of.h> /* linux/of.h gets to determine #include ordering */ -#ifndef _ASM_MICROBLAZE_PROM_H#define _ASM_MICROBLAZE_PROM_H -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ -#include <linux/types.h> -#include <asm/irq.h> -#include <linux/atomic.h> +#include <linux/of.h> #define HAVE_ARCH_DEVTREE_FIXUPS
@@ -42,23 +35,4 @@ extern unsigned long pci_address_to_pio(phys_addr_t address);#define pci_address_to_pio pci_address_to_pio#endif /* CONFIG_PCI */ -/* Parse the ibm,dma-window property of an OF node into the busno, phys and -* size parameters. -*/ -void of_parse_dma_window (struct device_node *dn,const void *dma_window_prop, -unsigned long *busno,unsigned long *phys,unsigned long *size); - -extern void kdump_move_device_tree (void ); - -#endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ - -/* These includes are put at the bottom because they may contain things -* that are overridden by this file. Ideally they shouldn't be included -* by this file, but there are a bunch of .c files that currently depend -* on it. Eventually they will be cleaned up. */ -#include <linux/of_fdt.h> -#include <linux/of_irq.h> -#include <linux/platform_device.h> -#endif /* _ASM_MICROBLAZE_PROM_H */
arch/microblaze/kernel/prom.c +1 -0
@@ -30,6 +30,7 @@#include <linux/debugfs.h> #include <linux/irq.h> #include <linux/memblock.h> +#include <linux/of_fdt.h> #include <asm/prom.h> #include <asm/page.h>
arch/microblaze/kernel/setup.c +1 -0
@@ -16,6 +16,7 @@#include <linux/initrd.h> #include <linux/console.h> #include <linux/debugfs.h> +#include <linux/of_fdt.h> #include <asm/setup.h> #include <asm/sections.h>
arch/microblaze/kernel/timer.c +1 -0
@@ -15,6 +15,7 @@#include <linux/clk.h> #include <linux/clockchips.h> #include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/cpuinfo.h> #include <linux/cnt32_to_63.h>
arch/microblaze/pci/pci-common.c +1 -0
@@ -29,6 +29,7 @@#include <linux/slab.h> #include <linux/of.h> #include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_pci.h> #include <linux/export.h>
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -0
@@ -36,6 +36,7 @@#include <linux/netdevice.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/of_irq.h> #include <linux/of_mdio.h> #include <linux/of_platform.h> #include <linux/of_address.h>
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 10/21 drivers: clean-up prom.h implicit includes
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Powerpc is a mess of implicit includes by prom.h. Add the necessary explicit includes to drivers in preparation of prom.h cleanup.
--- drivers/ata/sata_fsl.c | 2 ++ drivers/char/bsr.c | 1 + drivers/char/hw_random/pasemi-rng.c | 1 + drivers/cpufreq/pasemi-cpufreq.c | 1 + drivers/crypto/caam/ctrl.c | 3 +++ drivers/crypto/caam/jr.c | 2 ++ drivers/dma/fsldma.c | 2 ++ drivers/edac/cell_edac.c | 1 + drivers/i2c/busses/i2c-mpc.c | 2 ++ drivers/i2c/busses/i2c-powermac.c | 1 + drivers/input/serio/xilinx_ps2.c | 1 + drivers/macintosh/macio_asic.c | 2 ++ drivers/macintosh/rack-meter.c | 2 ++ drivers/macintosh/smu.c | 1 + drivers/macintosh/via-pmu.c | 2 ++ drivers/mtd/nand/fsl_elbc_nand.c | 1 + drivers/mtd/nand/pasemi_nand.c | 2 ++ drivers/net/ethernet/ibm/emac/core.c | 2 ++ drivers/net/ethernet/ibm/emac/mal.c | 1 + drivers/net/ethernet/ibm/emac/rgmii.c | 1 + drivers/net/ethernet/ibm/emac/tah.c | 1 + drivers/net/ethernet/ibm/emac/zmii.c | 1 + drivers/pcmcia/electra_cf.c | 2 ++ drivers/tty/ehv_bytechan.c | 1 + drivers/tty/serial/pmac_zilog.c | 2 ++ drivers/usb/host/ehci-ppc-of.c | 2 ++ drivers/usb/host/ohci-ppc-of.c | 2 ++ sound/aoa/core/gpio-feature.c | 3 ++- sound/aoa/soundbus/i2sbus/core.c | 2 ++ sound/ppc/pmac.c | 2 ++ sound/ppc/tumbler.c | 1 + 31 files changed, 49 insertions(+), 1 deletion(-)
drivers/ata/sata_fsl.c +2 -0
@@ -24,6 +24,8 @@#include <scsi/scsi_cmnd.h> #include <linux/libata.h> #include <asm/io.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> static unsigned int intr_coalescing_count;
drivers/char/bsr.c +1 -0
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/of.h> +#include <linux/of_address.h> #include <linux/of_device.h> #include <linux/of_platform.h> #include <linux/fs.h>
drivers/char/hw_random/pasemi-rng.c +1 -0
@@ -24,6 +24,7 @@#include <linux/platform_device.h> #include <linux/hw_random.h> #include <linux/delay.h> +#include <linux/of_address.h> #include <linux/of_platform.h> #include <asm/io.h>
drivers/cpufreq/pasemi-cpufreq.c +1 -0
@@ -28,6 +28,7 @@#include <linux/cpufreq.h> #include <linux/timer.h> #include <linux/module.h> +#include <linux/of_address.h> #include <asm/hw_irq.h> #include <asm/io.h>
drivers/crypto/caam/ctrl.c +3 -0
@@ -5,6 +5,9 @@* Copyright 2008-2012 Freescale Semiconductor, Inc. */ +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include "compat.h" #include "regs.h" #include "intern.h"
drivers/crypto/caam/jr.c +2 -0
@@ -5,6 +5,8 @@* Copyright 2008-2012 Freescale Semiconductor, Inc. */ +#include <linux/of_irq.h> +#include "compat.h" #include "regs.h" #include "jr.h"
drivers/dma/fsldma.c +2 -0
@@ -33,6 +33,8 @@#include <linux/delay.h> #include <linux/dma-mapping.h> #include <linux/dmapool.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include "dmaengine.h"
drivers/edac/cell_edac.c +1 -0
@@ -15,6 +15,7 @@#include <linux/platform_device.h> #include <linux/stop_machine.h> #include <linux/io.h> +#include <linux/of_address.h> #include <asm/machdep.h> #include <asm/cell-regs.h>
drivers/i2c/busses/i2c-mpc.c +2 -0
@@ -17,6 +17,8 @@#include <linux/module.h> #include <linux/sched.h> #include <linux/init.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/slab.h>
drivers/i2c/busses/i2c-powermac.c +1 -0
@@ -27,6 +27,7 @@#include <linux/init.h> #include <linux/device.h> #include <linux/platform_device.h> +#include <linux/of_irq.h> #include <asm/prom.h> #include <asm/pmac_low_i2c.h>
drivers/input/serio/xilinx_ps2.c +1 -0
@@ -25,6 +25,7 @@#include <linux/io.h> #include <linux/of_address.h> #include <linux/of_device.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #define DRIVER_NAME "xilinx_ps2"
drivers/macintosh/macio_asic.c +2 -0
@@ -24,6 +24,8 @@#include <linux/init.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/machdep.h> #include <asm/macio.h>
drivers/macintosh/rack-meter.c +2 -0
@@ -25,6 +25,8 @@#include <linux/pci.h> #include <linux/dma-mapping.h> #include <linux/kernel_stat.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/io.h> #include <asm/prom.h>
drivers/macintosh/smu.c +1 -0
@@ -35,6 +35,7 @@#include <linux/poll.h> #include <linux/mutex.h> #include <linux/of_device.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/slab.h>
drivers/macintosh/via-pmu.c +2 -0
@@ -46,6 +46,8 @@#include <linux/suspend.h> #include <linux/cpu.h> #include <linux/compat.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/prom.h> #include <asm/machdep.h> #include <asm/io.h>
drivers/mtd/nand/fsl_elbc_nand.c +1 -0
@@ -28,6 +28,7 @@#include <linux/kernel.h> #include <linux/string.h> #include <linux/ioport.h> +#include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/slab.h>
drivers/mtd/nand/pasemi_nand.c +2 -0
@@ -28,6 +28,8 @@#include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/nand_ecc.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/pci.h>
drivers/net/ethernet/ibm/emac/core.c +2 -0
@@ -39,6 +39,8 @@#include <linux/bitops.h> #include <linux/workqueue.h> #include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_net.h> #include <linux/slab.h>
drivers/net/ethernet/ibm/emac/mal.c +1 -0
@@ -27,6 +27,7 @@#include <linux/delay.h> #include <linux/slab.h> +#include <linux/of_irq.h> #include "core.h" #include <asm/dcr-regs.h>
drivers/net/ethernet/ibm/emac/rgmii.c +1 -0
@@ -24,6 +24,7 @@#include <linux/slab.h> #include <linux/kernel.h> #include <linux/ethtool.h> +#include <linux/of_address.h> #include <asm/io.h> #include "emac.h"
drivers/net/ethernet/ibm/emac/tah.c +1 -0
@@ -18,6 +18,7 @@* Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include <linux/of_address.h> #include <asm/io.h> #include "emac.h"
drivers/net/ethernet/ibm/emac/zmii.c +1 -0
@@ -24,6 +24,7 @@#include <linux/slab.h> #include <linux/kernel.h> #include <linux/ethtool.h> +#include <linux/of_address.h> #include <asm/io.h> #include "emac.h"
drivers/pcmcia/electra_cf.c +2 -0
@@ -30,6 +30,8 @@#include <linux/interrupt.h> #include <linux/mm.h> #include <linux/vmalloc.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/slab.h>
drivers/tty/ehv_bytechan.c +1 -0
@@ -32,6 +32,7 @@#include <linux/poll.h> #include <asm/epapr_hcalls.h> #include <linux/of.h> +#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/cdev.h> #include <linux/console.h>
drivers/tty/serial/pmac_zilog.c +2 -0
@@ -57,6 +57,8 @@#include <linux/bitops.h> #include <linux/sysrq.h> #include <linux/mutex.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/sections.h> #include <asm/io.h> #include <asm/irq.h>
drivers/usb/host/ehci-ppc-of.c +2 -0
@@ -16,6 +16,8 @@#include <linux/signal.h> #include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h>
drivers/usb/host/ohci-ppc-of.c +2 -0
@@ -14,6 +14,8 @@*/ #include <linux/signal.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <asm/prom.h>
sound/aoa/core/gpio-feature.c +2 -1
@@ -10,8 +10,9 @@* registers. */ -#include <asm/pmac_feature.h> +#include <linux/of_irq.h> #include <linux/interrupt.h> +#include <asm/pmac_feature.h> #include "../aoa.h" /* TODO: these are lots of global variables
sound/aoa/soundbus/i2sbus/core.c +2 -0
@@ -11,6 +11,8 @@#include <linux/pci.h> #include <linux/interrupt.h> #include <linux/dma-mapping.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <sound/core.h>
sound/ppc/pmac.c +2 -0
@@ -28,6 +28,8 @@#include <linux/interrupt.h> #include <linux/pci.h> #include <linux/dma-mapping.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <sound/core.h> #include "pmac.h" #include <sound/pcm_params.h>
sound/ppc/tumbler.c +1 -0
@@ -31,6 +31,7 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/string.h> +#include <linux/of_irq.h> #include <sound/core.h> #include <asm/io.h> #include <asm/irq.h>
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 11/21 mips: add explicit includes of prom.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation of removing prom.h include by of.h, add explicit includes.
--- arch/mips/lantiq/prom.c | 1 + arch/mips/mti-sead3/sead3-setup.c | 2 ++ arch/mips/ralink/of.c | 1 + 3 files changed, 4 insertions(+)
arch/mips/lantiq/prom.c +1 -0
@@ -14,6 +14,7 @@#include <asm/bootinfo.h> #include <asm/time.h> +#include <asm/prom.h> #include <lantiq.h>
arch/mips/mti-sead3/sead3-setup.c +2 -0
@@ -10,6 +10,8 @@#include <linux/of_fdt.h> #include <linux/bootmem.h> +#include <asm/prom.h> +#include <asm/mips-boards/generic.h> const char *get_system_type (void )
arch/mips/ralink/of.c +1 -0
@@ -21,6 +21,7 @@#include <asm/reboot.h> #include <asm/bootinfo.h> #include <asm/addrspace.h> +#include <asm/prom.h> #include "common.h"
Signature · 1 line
1.8.1.2
PATCH 12/21 x86: add necessary includes for prom.h
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Once prom.h is no longer implicitly included, we need to include setup.h to get COMMAND_LINE_SIZE.
--- arch/x86/kernel/devicetree.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kernel/devicetree.c +1 -0
@@ -20,6 +20,7 @@#include <asm/hpet.h> #include <asm/apic.h> #include <asm/pci_x86.h> +#include <asm/setup.h> __initdata u64 initial_dtb;char __initdata cmd_line[COMMAND_LINE_SIZE ];
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 13/21 of: implement pci_address_to_pio as weak function
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Implement pci_address_to_pio as weak function to remove the dependency on asm/prom.h. This is in preparation to make prom.h optional.
--- arch/microblaze/include/asm/prom.h | 9 --------- arch/mips/include/asm/prom.h | 11 ----------- arch/powerpc/include/asm/prom.h | 5 ----- arch/x86/include/asm/prom.h | 3 --- arch/x86/kernel/devicetree.c | 10 ---------- drivers/of/address.c | 8 ++++++++ drivers/of/of_pci.c | 1 - include/linux/of_address.h | 5 +---- 8 files changed, 9 insertions(+), 43 deletions(-)
arch/microblaze/include/asm/prom.h +0 -9
@@ -26,13 +26,4 @@ enum early_consoles {extern int of_early_console (void *version); -/* -* OF address retreival & translation -*/ - -#ifdef CONFIG_PCI -extern unsigned long pci_address_to_pio (phys_addr_t address); -#define pci_address_to_pio pci_address_to_pio -#endif /* CONFIG_PCI */ -#endif /* _ASM_MICROBLAZE_PROM_H */
arch/mips/include/asm/prom.h +0 -11
@@ -22,17 +22,6 @@ extern int early_init_dt_scan_memory_arch(unsigned long node,extern void device_tree_init (void ); -static inline unsigned long pci_address_to_pio (phys_addr_t address) -{ -/* -* The ioport address can be directly used by inX() / outX() -*/ -BUG_ON (address >IO_SPACE_LIMIT ); - -return (unsigned long ) address; -} -#define pci_address_to_pio pci_address_to_pio -struct boot_param_header ;extern void __dt_setup_arch (struct boot_param_header *bph);
arch/powerpc/include/asm/prom.h +0 -5
@@ -30,11 +30,6 @@extern u64 of_translate_dma_address (struct device_node *dev,const __be32 *in_addr); -#ifdef CONFIG_PCI -extern unsigned long pci_address_to_pio (phys_addr_t address); -#define pci_address_to_pio pci_address_to_pio -#endif /* CONFIG_PCI */ -/* Parse the ibm,dma-window property of an OF node into the busno, phys and * size parameters. */
arch/x86/include/asm/prom.h +0 -3
@@ -39,9 +39,6 @@ static inline void x86_dtb_init(void) { }extern char cmd_line[COMMAND_LINE_SIZE ]; -#define pci_address_to_pio pci_address_to_pio -unsigned long pci_address_to_pio (phys_addr_t addr); -#define HAVE_ARCH_DEVTREE_FIXUPS #endif /* __ASSEMBLY__ */
arch/x86/kernel/devicetree.c +0 -10
@@ -27,16 +27,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE];int __initdata of_ioapic; -unsigned long pci_address_to_pio (phys_addr_t address) -{ -/* -* The ioport address can be directly used by inX / outX -*/ -BUG_ON (address >= (1 <<16 )); -return (unsigned long )address; -} -EXPORT_SYMBOL_GPL (pci_address_to_pio); -void __init early_init_dt_scan_chosen_arch (unsigned long node) {BUG ();
drivers/of/address.c +8 -0
@@ -626,6 +626,14 @@ const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, }EXPORT_SYMBOL (of_get_address); +unsigned long __weak pci_address_to_pio (phys_addr_t address) +{ +if (address >IO_SPACE_LIMIT ) +return (unsigned long )-1 ; + +return (unsigned long ) address; +} +static int __of_address_to_resource (struct device_node *dev,const __be32 *addrp,u64 size,unsigned int flags,const char *name,struct resource *r)
drivers/of/of_pci.c +0 -1
@@ -2,7 +2,6 @@#include <linux/export.h> #include <linux/of.h> #include <linux/of_pci.h> -#include <asm/prom.h> static inline int __of_pci_pci_compare (struct device_node *node,unsigned int data)
include/linux/of_address.h +1 -4
@@ -52,10 +52,7 @@ extern void __iomem *of_iomap(struct device_node *device, int index);extern const __be32 *of_get_address (struct device_node *dev,int index,u64 *size,unsigned int *flags); -#ifndef pci_address_to_pio -static inline unsigned long pci_address_to_pio (phys_addr_t addr) {return -1 ; } -#define pci_address_to_pio pci_address_to_pio -#endif +extern unsigned long pci_address_to_pio (phys_addr_t addr);extern int of_pci_range_parser_init (struct of_pci_range_parser *parser,struct device_node *node);
Signature · 1 line
1.8.1.2
PATCH 14/21 of: implement of_node_to_nid as a weak function
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Implement of_node_to_nid as weak function to remove the dependency on asm/prom.h. This is in preparation to make prom.h optional.
--- arch/powerpc/include/asm/prom.h | 7 ------- arch/sparc/include/asm/prom.h | 4 ---- drivers/of/base.c | 7 +++++++ include/linux/of.h | 11 ++++------- 4 files changed, 11 insertions(+), 18 deletions(-)
arch/powerpc/include/asm/prom.h +0 -7
@@ -42,13 +42,6 @@ extern void kdump_move_device_tree(void);/* cache lookup */ struct device_node *of_find_next_cache_node (struct device_node *np); -#ifdef CONFIG_NUMA -extern int of_node_to_nid (struct device_node *device); -#else -static inline int of_node_to_nid (struct device_node *device) {return 0 ; } -#endif -#define of_node_to_nid of_node_to_nid -extern void of_instantiate_rtc (void );extern int of_get_ibm_chip_id (struct device_node *np);
arch/sparc/include/asm/prom.h +0 -4
@@ -43,10 +43,6 @@ extern int of_getintprop_default(struct device_node *np,const char *name, int def);extern int of_find_in_proplist (const char *list,const char *match,int len); -#ifdef CONFIG_NUMA -extern int of_node_to_nid (struct device_node *dp); -#define of_node_to_nid of_node_to_nid -#endif extern void prom_build_devicetree (void );extern void of_populate_present_mask (void );
drivers/of/base.c +7 -0
@@ -74,6 +74,13 @@ int of_n_size_cells(struct device_node *np) }EXPORT_SYMBOL (of_n_size_cells); +#ifdef CONFIG_NUMA +int __weak of_node_to_nid (struct device_node *np) +{ +return numa_node_id (); +} +#endif +#if defined(CONFIG_OF_DYNAMIC )/** * of_node_get - Increment refcount of a node
include/linux/of.h +4 -7
@@ -534,13 +534,10 @@ static inline const char *of_prop_next_string(struct property *prop,#define of_match_node (_matches, _node) NULL#endif /* CONFIG_OF */ -#ifndef of_node_to_nid -static inline int of_node_to_nid (struct device_node *np) -{ -return numa_node_id (); -} - -#define of_node_to_nid of_node_to_nid +#if defined(CONFIG_OF ) && defined(CONFIG_NUMA ) +extern int of_node_to_nid (struct device_node *np); +#else +static inline int of_node_to_nid (struct device_node *device) {return 0 ; }#endif /**
Signature · 1 line
1.8.1.2
Re: [PATCH 14/21] of: implement of_node_to_nid as a weak function
Quoted 6 lines · Rob Herring
From: Rob Herring <[email protected]>
Implement
of_node_to_nidas weak function to remove the dependency onasm/prom.h. This is in preparation to makeprom.hoptional.Signed-off-by Rob Herring <[email protected]>
Quoted 83 lines
--- arch/powerpc/include/asm/prom.h | 7 ------- arch/sparc/include/asm/prom.h | 4 ---- drivers/of/base.c | 7 +++++++ include/linux/of.h | 11 ++++------- 4 files changed, 11 insertions(+), 18 deletions(-)arch/powerpc/include/asm/prom.h +0
-7@@ -42,13 +42,6 @@ extern void kdump_move_device_tree(void);/* cache lookup */ struct device_node *of_find_next_cache_node (struct device_node *np); -#ifdef CONFIG_NUMA -extern int of_node_to_nid (struct device_node *device); -#else -static inline int of_node_to_nid (struct device_node *device) {return 0 ; } -#endif -#define of_node_to_nid of_node_to_nid -extern void of_instantiate_rtc (void );extern int of_get_ibm_chip_id (struct device_node *np);arch/sparc/include/asm/prom.h +0
-4@@ -43,10 +43,6 @@ extern int of_getintprop_default(struct device_node *np,const char *name, int def);extern int of_find_in_proplist (const char *list,const char *match,int len); -#ifdef CONFIG_NUMA -extern int of_node_to_nid (struct device_node *dp); -#define of_node_to_nid of_node_to_nid -#endif extern void prom_build_devicetree (void );extern void of_populate_present_mask (void );drivers/of/base.c +7
-0@@ -74,6 +74,13 @@ int of_n_size_cells(struct device_node *np) }EXPORT_SYMBOL (of_n_size_cells); +#ifdef CONFIG_NUMA +int __weak of_node_to_nid (struct device_node *np) +{ +return numa_node_id (); +} +#endif +#if defined(CONFIG_OF_DYNAMIC )/** * of_node_get - Increment refcount of a node include/linux/of.h +4
-7@@ -534,13 +534,10 @@ static inline const char *of_prop_next_string(struct property *prop,#define of_match_node (_matches, _node) NULL#endif /* CONFIG_OF */ -#ifndef of_node_to_nid -static inline int of_node_to_nid (struct device_node *np) -{ -return numa_node_id (); -} - -#define of_node_to_nid of_node_to_nid +#if defined(CONFIG_OF ) && defined(CONFIG_NUMA ) +extern int of_node_to_nid (struct device_node *np); +#else +static inline int of_node_to_nid (struct device_node *device) {return 0 ; }#endif /** Signature · 1 line
1.8.1.2
PATCH 15/21 of: remove HAVE_ARCH_DEVTREE_FIXUPS
In reply to Rob HerringFrom: Rob Herring <[email protected]>
HAVE_ARCH_DEVTREE_FIXUPS appears to always be needed except for sparc, but it is only used for /proc/device-teee and sparc does not enable /proc/device-tree. So this option is redundant. Remove the option and always enable it. This has the side effect of fixing /proc/device-tree on arches such as arm64 which failed to define this option.
--- arch/arc/include/asm/prom.h | 2 -- arch/arm/include/asm/prom.h | 2 -- arch/metag/include/asm/prom.h | 1 - arch/microblaze/include/asm/prom.h | 2 -- arch/openrisc/include/asm/prom.h | 2 -- arch/powerpc/include/asm/prom.h | 2 -- arch/x86/include/asm/prom.h | 2 -- arch/xtensa/include/asm/prom.h | 2 -- fs/proc/proc_devtree.c | 3 --- 9 files changed, 18 deletions(-)
arch/arc/include/asm/prom.h +0 -2
@@ -9,6 +9,4 @@#ifndef _ASM_ARC_PROM_H_#define _ASM_ARC_PROM_H_ -#define HAVE_ARCH_DEVTREE_FIXUPS -#endif
arch/arm/include/asm/prom.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASMARM_PROM_H#define __ASMARM_PROM_H -#define HAVE_ARCH_DEVTREE_FIXUPS -#ifdef CONFIG_OF extern const struct machine_desc *setup_machine_fdt (unsigned int dt_phys);
arch/metag/include/asm/prom.h +0 -1
@@ -14,7 +14,6 @@#ifndef __ASM_METAG_PROM_H#define __ASM_METAG_PROM_H -#define HAVE_ARCH_DEVTREE_FIXUPS extern void copy_fdt (void );
arch/microblaze/include/asm/prom.h +0 -2
@@ -16,8 +16,6 @@#include <linux/of.h> -#define HAVE_ARCH_DEVTREE_FIXUPS -/* Other Prototypes */ enum early_consoles {UARTLITE =1 ,
arch/openrisc/include/asm/prom.h +0 -2
@@ -17,6 +17,4 @@#ifndef _ASM_OPENRISC_PROM_H#define _ASM_OPENRISC_PROM_H -#define HAVE_ARCH_DEVTREE_FIXUPS -#endif /* _ASM_OPENRISC_PROM_H */
arch/powerpc/include/asm/prom.h +0 -2
@@ -20,8 +20,6 @@#include <asm/irq.h> #include <linux/atomic.h> -#define HAVE_ARCH_DEVTREE_FIXUPS -/* * OF address retreival & translation */
arch/x86/include/asm/prom.h +0 -2
@@ -39,7 +39,5 @@ static inline void x86_dtb_init(void) { }extern char cmd_line[COMMAND_LINE_SIZE ]; -#define HAVE_ARCH_DEVTREE_FIXUPS -#endif /* __ASSEMBLY__ */ #endif
arch/xtensa/include/asm/prom.h +0 -2
@@ -1,6 +1,4 @@#ifndef _XTENSA_ASM_PROM_H#define _XTENSA_ASM_PROM_H -#define HAVE_ARCH_DEVTREE_FIXUPS -#endif /* _XTENSA_ASM_PROM_H */
fs/proc/proc_devtree.c +0 -3
@@ -14,16 +14,13 @@#include <linux/of.h> #include <linux/export.h> #include <linux/slab.h> -#include <asm/prom.h> #include <asm/uaccess.h> #include "internal.h" static inline void set_node_proc_entry (struct device_node *np,struct proc_dir_entry *de) { -#ifdef HAVE_ARCH_DEVTREE_FIXUPS np->pde = de; -#endif }static struct proc_dir_entry *proc_device_tree;
Signature · 1 line
1.8.1.2
Re: [PATCH 15/21] of: remove HAVE_ARCH_DEVTREE_FIXUPS
Quoted 9 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
HAVE_ARCH_DEVTREE_FIXUPSappears to always be needed except for sparc, but it is only used for/proc/device-teeeand sparc does not enable/proc/device-tree. So this option is redundant. Remove the option and always enable it. This has the side effect of fixing/proc/device-treeon arches such as arm64 which failed to define this option.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Thx for the continued cleanup.
-Vineet
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 16/21 of: move of_address_to_resource and of_iomap declarations from sparc
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move of_address_to_resource and of_iomap declarations to common code. These only differ on sparc, but the declarations are the same and don't need to be in arch header.
--- arch/sparc/include/asm/prom.h | 8 -------- include/linux/of_address.h | 30 +++++++++++++++++------------- 2 files changed, 17 insertions(+), 21 deletions(-)
arch/sparc/include/asm/prom.h +0 -8
@@ -59,13 +59,5 @@ extern char *of_console_options;extern void irq_trans_init (struct device_node *dp);extern char *build_path_component (struct device_node *dp); -/* SPARC has local implementations */ -extern int of_address_to_resource (struct device_node *dev,int index, -struct resource *r); -#define of_address_to_resource of_address_to_resource - -void __iomem *of_iomap (struct device_node *node,int index); -#define of_iomap of_iomap -#endif /* __KERNEL__ */ #endif /* _SPARC_PROM_H */
include/linux/of_address.h +17 -13
@@ -60,13 +60,6 @@ extern struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser, struct of_pci_range *range);#else /* CONFIG_OF_ADDRESS */ -#ifndef of_address_to_resource -static inline int of_address_to_resource (struct device_node *dev,int index, -struct resource *r) -{ -return -EINVAL ; -} -#endif static inline struct device_node *of_find_matching_node_by_address( struct device_node *from, const struct of_device_id *matches,
@@ -74,12 +67,7 @@ static inline struct device_node *of_find_matching_node_by_address( {return NULL ; } -#ifndef of_iomap -static inline void __iomem *of_iomap (struct device_node *device,int index) -{ -return NULL ; -} -#endif +static inline const __be32 *of_get_address (struct device_node *dev,int index,u64 *size,unsigned int *flags) {
@@ -100,6 +88,22 @@ static inline struct of_pci_range *of_pci_range_parser_one( }#endif /* CONFIG_OF_ADDRESS */ +#ifdef CONFIG_OF +extern int of_address_to_resource (struct device_node *dev,int index, +struct resource *r); +void __iomem *of_iomap (struct device_node *node,int index); +#else +static inline int of_address_to_resource (struct device_node *dev,int index, +struct resource *r) +{ +return -EINVAL ; +} + +static inline void __iomem *of_iomap (struct device_node *device,int index) +{ +return NULL ; +} +#endif #if defined(CONFIG_OF_ADDRESS ) && defined(CONFIG_PCI ) extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no,
Signature · 1 line
1.8.1.2
PATCH 17/21 of: move of_translate_dma_address to of_address.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
of_translate_dma_address is implemented in common code, so move the declaration there too.
--- arch/powerpc/include/asm/prom.h | 4 ---- include/linux/of_address.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/prom.h +0 -4
@@ -24,10 +24,6 @@* OF address retreival & translation */ -/* Translate a DMA address from device space to CPU space */ -extern u64 of_translate_dma_address (struct device_node *dev, -const __be32 *in_addr); -/* Parse the ibm,dma-window property of an OF node into the busno, phys and * size parameters. */
include/linux/of_address.h +4 -0
@@ -34,6 +34,10 @@ static inline void of_pci_range_to_resource(struct of_pci_range *range, res->name = np->full_name; } +/* Translate a DMA address from device space to CPU space */ +extern u64 of_translate_dma_address (struct device_node *dev, +const __be32 *in_addr); +#ifdef CONFIG_OF_ADDRESS extern u64 of_translate_address (struct device_node *np,const __be32 *addr);extern bool of_can_translate_address (struct device_node *dev);
Signature · 1 line
1.8.1.2
PATCH 18/21 powerpc: clean-up include ordering in prom.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Now that the core OF headers don't depend on prom.h, rearrange the includes. There are still lots of implicit includes in the powerpc tree, so the includes of OF headers are still necessary.
--- arch/powerpc/include/asm/prom.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
arch/powerpc/include/asm/prom.h +7 -10
@@ -1,4 +1,3 @@ -#include <linux/of.h> /* linux/of.h gets to determine #include ordering */ #ifndef _POWERPC_PROM_H#define _POWERPC_PROM_H#ifdef __KERNEL__
@@ -20,6 +19,13 @@#include <asm/irq.h> #include <linux/atomic.h> +/* These includes should be removed once implicit includes are cleaned up. */ +#include <linux/of.h> +#include <linux/of_fdt.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <linux/platform_device.h> +/* * OF address retreival & translation */
@@ -125,14 +131,5 @@ struct of_drconf_cell {*/ extern unsigned char ibm_architecture_vec[]; -/* These includes are put at the bottom because they may contain things -* that are overridden by this file. Ideally they shouldn't be included -* by this file, but there are a bunch of .c files that currently depend -* on it. Eventually they will be cleaned up. */ -#include <linux/of_fdt.h> -#include <linux/of_address.h> -#include <linux/of_irq.h> -#include <linux/platform_device.h> -#endif /* __KERNEL__ */ #endif /* _POWERPC_PROM_H */
Signature · 1 line
1.8.1.2
PATCH 19/21 powerpc: add explicit OF includes
In reply to Rob HerringFrom: Rob Herring <[email protected]>
When removing prom.h include by of.h, several OF headers will no longer be implicitly included. Add explicit includes of of_*.h as needed.
--- arch/powerpc/kernel/epapr_paravirt.c | 1 + arch/powerpc/platforms/512x/clock.c | 1 + arch/powerpc/platforms/512x/pdm360ng.c | 2 ++ arch/powerpc/platforms/82xx/mpc8272_ads.c | 2 ++ arch/powerpc/platforms/82xx/pq2fads.c | 2 ++ arch/powerpc/platforms/83xx/suspend.c | 2 ++ arch/powerpc/platforms/86xx/pic.c | 1 + arch/powerpc/platforms/embedded6xx/flipper-pic.c | 1 + arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 ++ arch/powerpc/platforms/pasemi/gpio_mdio.c | 1 + arch/powerpc/platforms/powermac/pfunc_base.c | 1 + arch/powerpc/platforms/powernv/opal-lpc.c | 1 + arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/platforms/powernv/setup.c | 1 + arch/powerpc/platforms/pseries/hotplug-memory.c | 2 ++ arch/powerpc/sysdev/cpm_common.c | 1 + arch/powerpc/sysdev/fsl_gtm.c | 2 ++ arch/powerpc/sysdev/fsl_pmc.c | 1 + arch/powerpc/sysdev/mpic.c | 8 ++++---- arch/powerpc/sysdev/mpic_timer.c | 2 ++ 20 files changed, 31 insertions(+), 4 deletions(-)
arch/powerpc/kernel/epapr_paravirt.c +1 -0
@@ -18,6 +18,7 @@*/ #include <linux/of.h> +#include <linux/of_fdt.h> #include <asm/epapr_hcalls.h> #include <asm/cacheflush.h> #include <asm/code-patching.h>
arch/powerpc/platforms/512x/clock.c +1 -0
@@ -24,6 +24,7 @@#include <linux/mutex.h> #include <linux/io.h> +#include <linux/of_address.h> #include <linux/of_platform.h> #include <asm/mpc5xxx.h> #include <asm/mpc5121.h>
arch/powerpc/platforms/512x/pdm360ng.c +2 -0
@@ -14,6 +14,8 @@#include <linux/kernel.h> #include <linux/io.h> +#include <linux/of_address.h> +#include <linux/of_fdt.h> #include <linux/of_platform.h> #include <asm/machdep.h>
arch/powerpc/platforms/82xx/mpc8272_ads.c +2 -0
@@ -16,6 +16,8 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/fsl_devices.h> +#include <linux/of_address.h> +#include <linux/of_fdt.h> #include <linux/of_platform.h> #include <linux/io.h>
arch/powerpc/platforms/82xx/pq2fads.c +2 -0
@@ -15,6 +15,8 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/fsl_devices.h> +#include <linux/of_address.h> +#include <linux/of_fdt.h> #include <linux/of_platform.h> #include <asm/io.h>
arch/powerpc/platforms/83xx/suspend.c +2 -0
@@ -20,6 +20,8 @@#include <linux/freezer.h> #include <linux/suspend.h> #include <linux/fsl_devices.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/export.h>
arch/powerpc/platforms/86xx/pic.c +1 -0
@@ -10,6 +10,7 @@#include <linux/stddef.h> #include <linux/kernel.h> #include <linux/interrupt.h> +#include <linux/of_irq.h> #include <linux/of_platform.h> #include <asm/mpic.h>
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -0
@@ -18,6 +18,7 @@#include <linux/init.h> #include <linux/irq.h> #include <linux/of.h> +#include <linux/of_address.h> #include <asm/io.h> #include "flipper-pic.h"
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +2 -0
@@ -18,6 +18,8 @@#include <linux/init.h> #include <linux/irq.h> #include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <asm/io.h> #include "hlwd-pic.h"
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -0
@@ -30,6 +30,7 @@#include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/phy.h> +#include <linux/of_address.h> #include <linux/of_mdio.h> #include <linux/of_platform.h>
arch/powerpc/platforms/powermac/pfunc_base.c +1 -0
@@ -4,6 +4,7 @@#include <linux/kernel.h> #include <linux/interrupt.h> #include <linux/spinlock.h> +#include <linux/of_irq.h> #include <asm/pmac_feature.h> #include <asm/pmac_pfunc.h>
arch/powerpc/platforms/powernv/opal-lpc.c +1 -0
@@ -17,6 +17,7 @@#include <asm/firmware.h> #include <asm/xics.h> #include <asm/opal.h> +#include <asm/prom.h> static int opal_lpc_chip_id =-1 ;
arch/powerpc/platforms/powernv/opal.c +1 -0
@@ -13,6 +13,7 @@#include <linux/types.h> #include <linux/of.h> +#include <linux/of_fdt.h> #include <linux/of_platform.h> #include <linux/interrupt.h> #include <linux/notifier.h>
arch/powerpc/platforms/powernv/setup.c +1 -0
@@ -23,6 +23,7 @@#include <linux/irq.h> #include <linux/seq_file.h> #include <linux/of.h> +#include <linux/of_fdt.h> #include <linux/interrupt.h> #include <linux/bug.h>
arch/powerpc/platforms/pseries/hotplug-memory.c +2 -0
@@ -10,12 +10,14 @@*/ #include <linux/of.h> +#include <linux/of_address.h> #include <linux/memblock.h> #include <linux/vmalloc.h> #include <linux/memory.h> #include <asm/firmware.h> #include <asm/machdep.h> +#include <asm/prom.h> #include <asm/sparsemem.h> static unsigned long get_memblock_size (void )
arch/powerpc/sysdev/cpm_common.c +1 -0
@@ -22,6 +22,7 @@#include <linux/spinlock.h> #include <linux/export.h> #include <linux/of.h> +#include <linux/of_address.h> #include <linux/slab.h> #include <asm/udbg.h>
arch/powerpc/sysdev/fsl_gtm.c +2 -0
@@ -19,6 +19,8 @@#include <linux/list.h> #include <linux/io.h> #include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> #include <linux/spinlock.h> #include <linux/bitops.h> #include <linux/slab.h>
arch/powerpc/sysdev/fsl_pmc.c +1 -0
@@ -18,6 +18,7 @@#include <linux/suspend.h> #include <linux/delay.h> #include <linux/device.h> +#include <linux/of_address.h> #include <linux/of_platform.h> struct pmc_regs {
arch/powerpc/sysdev/mpic.c +4 -4
@@ -535,7 +535,7 @@ static void __init mpic_scan_ht_pic(struct mpic *mpic, u8 __iomem *devbase, mpic->fixups[irq].data =readl (base +4 ) |0x80000000 ; } } - +static void __init mpic_scan_ht_pics (struct mpic *mpic) {
@@ -1475,7 +1475,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,* as a default instead of the value read from the HW. */ last_irq = (greg_feature &MPIC_GREG_FEATURE_LAST_SRC_MASK ) - >>MPIC_GREG_FEATURE_LAST_SRC_SHIFT ; + >>MPIC_GREG_FEATURE_LAST_SRC_SHIFT ;if (isu_size) last_irq = isu_size *MPIC_MAX_ISU -1 ;of_property_read_u32 (mpic->node,"last-interrupt-source" , &last_irq);
@@ -1625,7 +1625,7 @@ void __init mpic_init(struct mpic *mpic)/* start with vector = source number, and masked */ u32 vecpri =MPIC_VECPRI_MASK | i | (8 <<MPIC_VECPRI_PRIORITY_SHIFT ); - +/* check if protected */ if (mpic->protected &&test_bit (i, mpic->protected))continue ;
@@ -1634,7 +1634,7 @@ void __init mpic_init(struct mpic *mpic)mpic_irq_write (i,MPIC_INFO (IRQ_DESTINATION ),1 << cpu); } } - +/* Init spurious vector */ mpic_write (mpic->gregs,MPIC_INFO (GREG_SPURIOUS ), mpic->spurious_vec);
arch/powerpc/sysdev/mpic_timer.c +2 -0
@@ -19,7 +19,9 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/of.h> +#include <linux/of_address.h> #include <linux/of_device.h> +#include <linux/of_irq.h> #include <linux/syscore_ops.h> #include <sysdev/fsl_soc.h> #include <asm/io.h>
Signature · 1 line
1.8.1.2
PATCH 20/21 of: only include prom.h on sparc
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
The dependency on prom.h by the core DT code is now removed and only sparc needs to include prom.h for the core code.
--- include/linux/of.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/of.h +2 -0
@@ -136,7 +136,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)return of_read_number (cell, size); } +#if defined(CONFIG_SPARC )#include <asm/prom.h> +#endif /* Default #address and #size cells. Allow arch asm/prom.h to override */ #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT )
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 21/21 of: remove empty arch prom.h headers
In reply to Rob HerringFrom: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Now that prom.h is optional, all the empty prom.h headers can be removed.
--- arch/arc/include/asm/prom.h | 12 ------------ arch/arm64/include/asm/prom.h | 1 - arch/c6x/include/asm/prom.h | 1 - arch/metag/include/asm/prom.h | 20 -------------------- arch/openrisc/include/asm/prom.h | 20 -------------------- arch/xtensa/include/asm/prom.h | 4 ---- 6 files changed, 58 deletions(-) delete mode 100644 arch/arc/include/asm/prom.h delete mode 100644 arch/arm64/include/asm/prom.h delete mode 100644 arch/c6x/include/asm/prom.h delete mode 100644 arch/metag/include/asm/prom.h delete mode 100644 arch/openrisc/include/asm/prom.h delete mode 100644 arch/xtensa/include/asm/prom.h
arch/arc/include/asm/prom.h deleted +0 -12
@@ -1,12 +0,0 @@ -/* -* Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com) -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef _ASM_ARC_PROM_H_ -#define _ASM_ARC_PROM_H_ - -#endif
arch/arm64/include/asm/prom.h deleted +0 -1
@@ -1 +0,0 @@ -/* Empty for now */
arch/c6x/include/asm/prom.h deleted +0 -1
@@ -1 +0,0 @@ -/* dummy prom.h; here to make linux/of.h's #includes happy */
arch/metag/include/asm/prom.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* arch/metag/include/asm/prom.h -* -* Copyright (C) 2012 Imagination Technologies Ltd. -* -* Based on ARM version: -* Copyright (C) 2009 Canonical Ltd. <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -*/ -#ifndef __ASM_METAG_PROM_H -#define __ASM_METAG_PROM_H - - -extern void copy_fdt (void ); - -#endif /* __ASM_METAG_PROM_H */
arch/openrisc/include/asm/prom.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* -* OpenRISC Linux -* -* Linux architectural port borrowing liberally from similar works of -* others. All original copyrights apply as per the original source -* declaration. -* -* OpenRISC implementation: -* Copyright (C) 2010-2011 Jonas Bonn <[email protected]> -* et al. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -*/ -#ifndef _ASM_OPENRISC_PROM_H -#define _ASM_OPENRISC_PROM_H - -#endif /* _ASM_OPENRISC_PROM_H */
arch/xtensa/include/asm/prom.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef _XTENSA_ASM_PROM_H -#define _XTENSA_ASM_PROM_H - -#endif /* _XTENSA_ASM_PROM_H */
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 21/21] of: remove empty arch prom.h headers
Quoted 5 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Now that
prom.his optional, all the emptyprom.hheaders can be removed.Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Thx for the continued cleanup.
-Vineet
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 21/21] of: remove empty arch prom.h headers
In reply to Rob HerringQuoted 4 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
Now that
prom.his optional, all the emptyprom.hheaders can be removed.
Quoted 10 lines
Signed-off-by Rob Herring <rob.herring-bsGFqQB8/[email protected]>Cc Vineet Gupta <vgupta-HKixBCOQz3hWk0Htik3J/[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Mark Salter <[email protected]>Cc Aurelien Jacquiot <[email protected]>Cc James Hogan <[email protected]>Cc Jonas Bonn <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Rob Herring
From: Rob Herring <[email protected]>
This is the second series of clean-up for architecture DT code. The first series is here [1].
As the number of DT enabled architectures has grown, there has been a lot of copy/paste duplication of
prom.h. The include ordering forprom.his complex and has resulted in many implicit includes. This series cleans upprom.hand removes the dependency ofprom.hincludes in the core DT code on all architectures except sparc. This removesprom.hon several architectures and makes it an architecture specific include on the rest.
Quoted 7 lines
Compiled on arm, arm64, microblaze, mips, openrisc, powerpc, sparc, xtensa. Mostly defconfigs and some allyesconfigs. The 0-day builder has also caught some issues.
A branch with both series is available here:
git://sources.calxeda.com/kernel/linux.gitdt-cleanup
I gave the latest branch a spin - everything looks good except for a build warning
- and given the const qualifier in the API, I reckon most (if not all) would see that.
It seems this was introduced in first series but maybe I failed to notice then as I'm sure I booted that code too.
------------------>8-----------------------------
CC arch/arc/kernel/devtree.oarch/arc/kernel/devtree.c: In function ‘setup_machine_fdt’:arch/arc/kernel/devtree.c:50:8: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
mdesc = of_flat_dt_match_machine(NULL, arch_get_next_mach);
^------------------>8-----------------------------
ARM propagates the const to callers - upto setup_arch(), but that might not work for us as we use it to setup a global @machine_desc which is then used to dispatch the callbacks in platform APIs. Semantically it's good if it is const but that would require making it local and propagating to all the users - not worth the trouble I suppose.
What say you !
Thx,
-Vineet
[Trimmed CC list a bit]
Quoted 35 lines · Vineet Gupta
Quoted 12 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
This is the second series of clean-up for architecture DT code. The first series is here [1].
As the number of DT enabled architectures has grown, there has been a lot of copy/paste duplication of
prom.h. The include ordering forprom.his complex and has resulted in many implicit includes. This series cleans upprom.hand removes the dependency ofprom.hincludes in the core DT code on all architectures except sparc. This removesprom.hon several architectures and makes it an architecture specific include on the rest.Quoted 7 lines
Compiled on arm, arm64, microblaze, mips, openrisc, powerpc, sparc, xtensa. Mostly defconfigs and some allyesconfigs. The 0-day builder has also caught some issues.
A branch with both series is available here:
git://sources.calxeda.com/kernel/linux.gitdt-cleanupI gave the latest branch a spin - everything looks good except for a build warning
- and given the const qualifier in the API, I reckon most (if not all) would see that.It seems this was introduced in first series but maybe I failed to notice then as I'm sure I booted that code too.
------------------>8-----------------------------
CCarch/arc/kernel/devtree.oarch/arc/kernel/devtree.c: In function ‘setup_machine_fdt’:arch/arc/kernel/devtree.c:50:8: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]mdesc = of_flat_dt_match_machine(NULL, arch_get_next_mach); ^------------------>8-----------------------------
Quoted 7 lines
ARM propagates the const to callers - upto
setup_arch(), but that might not work for us as we use it to setup a global @machine_desc which is then used to dispatch the callbacks in platform APIs. Semantically it's good if it is const but that would require making it local and propagating to all the users - not worth the trouble I suppose.What say you !
Ping ?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 44 lines · Vineet Gupta
[Trimmed CC list a bit]
Quoted 41 lines · Vineet Gupta
Quoted 12 lines · Rob Herring
From: Rob Herring <rob.herring-bsGFqQB8/[email protected]>
This is the second series of clean-up for architecture DT code. The first series is here [1].
As the number of DT enabled architectures has grown, there has been a lot of copy/paste duplication of
prom.h. The include ordering forprom.his complex and has resulted in many implicit includes. This series cleans upprom.hand removes the dependency ofprom.hincludes in the core DT code on all architectures except sparc. This removesprom.hon several architectures and makes it an architecture specific include on the rest.Quoted 7 lines
Compiled on arm, arm64, microblaze, mips, openrisc, powerpc, sparc, xtensa. Mostly defconfigs and some allyesconfigs. The 0-day builder has also caught some issues.
A branch with both series is available here:
git://sources.calxeda.com/kernel/linux.gitdt-cleanupI gave the latest branch a spin - everything looks good except for a build warning
- and given the const qualifier in the API, I reckon most (if not all) would see that.It seems this was introduced in first series but maybe I failed to notice then as I'm sure I booted that code too.
------------------>8-----------------------------
CCarch/arc/kernel/devtree.oarch/arc/kernel/devtree.c: In function ‘setup_machine_fdt’:arch/arc/kernel/devtree.c:50:8: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]mdesc = of_flat_dt_match_machine(NULL, arch_get_next_mach); ^------------------>8-----------------------------
ARM propagates the const to callers - upto
setup_arch(), but that might not work for us as we use it to setup a global @machine_desc which is then used to dispatch the callbacks in platform APIs. Semantically it's good if it is const but that would require making it local and propagating to all the users - not worth the trouble I suppose.
Quoted 3 lines
Quoted 1 line
What say you !
Ping ?
I think this should be const like arm recently fixed. The structure is declared const with MACHINE_START which gets dropped.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Rob Herring
From: Rob Herring <[email protected]>
This is the second series of clean-up for architecture DT code. The first series is here [1].
As the number of DT enabled architectures has grown, there has been a lot of copy/paste duplication of
prom.h. The include ordering forprom.his complex and has resulted in many implicit includes. This series cleans upprom.hand removes the dependency ofprom.hincludes in the core DT code on all architectures except sparc. This removesprom.hon several architectures and makes it an architecture specific include on the rest.
Quoted 6 lines
Compiled on arm, arm64, microblaze, mips, openrisc, powerpc, sparc, xtensa. Mostly defconfigs and some allyesconfigs. The 0-day builder has also caught some issues.
A branch with both series is available here:
git://sources.calxeda.com/kernel/linux.gitdt-cleanup
Nice!
for the whole series.
g.
Quoted 129 lines
Rob
[1] http://www.spinics.net/lists/devicetree/msg04865.html
Rob Herring (21):
drivers: remove unnecessaryprom.hincludes
of: remove unnecessaryprom.hincludes
ARM: keystone: remove unnecessaryprom.hinclude
arm64: remove unnecessaryprom.hinclude
openrisc: remove unnecessaryprom.hinclude
arc: remove unnecessaryprom.hincludes
hexagon: remove unnecessaryprom.hincludes
metag: movesetup_machine_fdtdeclaration fromprom.h
microblaze: clean-upprom.himplicit includes
drivers: clean-upprom.himplicit includes
mips: add explicit includes ofprom.h
x86: add necessary includes forprom.h
of: implementpci_address_to_pioas weak function
of: implementof_node_to_nidas a weak function
of: removeHAVE_ARCH_DEVTREE_FIXUPS
of: moveof_address_to_resourceandof_iomapdeclarations from sparc
of: moveof_translate_dma_addresstoof_address.h
powerpc: clean-up include ordering inprom.h
powerpc: add explicit OF includes
of: only includeprom.hon sparc
of: remove empty archprom.hheadersarch/arc/include/asm/prom.h | 14 --------- arch/arc/kernel/devtree.c | 1 - arch/arc/kernel/setup.c | 1 - arch/arm/include/asm/prom.h | 2 -- arch/arm/mach-keystone/platsmp.c | 1 - arch/arm64/include/asm/prom.h | 1 - arch/arm64/mm/init.c | 1 - arch/c6x/include/asm/prom.h | 1 - arch/hexagon/kernel/setup.c | 3 -- arch/metag/include/asm/prom.h | 23 -------------- arch/metag/include/asm/setup.h | 1 + arch/metag/kernel/setup.c | 1 - arch/microblaze/include/asm/prom.h | 39 +----------------------- arch/microblaze/kernel/prom.c | 1 + arch/microblaze/kernel/setup.c | 1 + arch/microblaze/kernel/timer.c | 1 + arch/microblaze/pci/pci-common.c | 1 + arch/mips/include/asm/prom.h | 11 ------- arch/mips/lantiq/prom.c | 1 + arch/mips/mti-sead3/sead3-setup.c | 2 ++ arch/mips/ralink/of.c | 1 + arch/openrisc/include/asm/prom.h | 22 ------------- arch/openrisc/kernel/prom.c | 1 - arch/powerpc/include/asm/prom.h | 33 ++++---------------- arch/powerpc/kernel/epapr_paravirt.c | 1 + arch/powerpc/platforms/512x/clock.c | 1 + arch/powerpc/platforms/512x/pdm360ng.c | 2 ++ arch/powerpc/platforms/82xx/mpc8272_ads.c | 2 ++ arch/powerpc/platforms/82xx/pq2fads.c | 2 ++ arch/powerpc/platforms/83xx/suspend.c | 2 ++ arch/powerpc/platforms/86xx/pic.c | 1 + arch/powerpc/platforms/embedded6xx/flipper-pic.c | 1 + arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 ++ arch/powerpc/platforms/pasemi/gpio_mdio.c | 1 + arch/powerpc/platforms/powermac/pfunc_base.c | 1 + arch/powerpc/platforms/powernv/opal-lpc.c | 1 + arch/powerpc/platforms/powernv/opal.c | 1 + arch/powerpc/platforms/powernv/setup.c | 1 + arch/powerpc/platforms/pseries/hotplug-memory.c | 2 ++ arch/powerpc/sysdev/cpm_common.c | 1 + arch/powerpc/sysdev/fsl_gtm.c | 2 ++ arch/powerpc/sysdev/fsl_pmc.c | 1 + arch/powerpc/sysdev/mpic.c | 8 ++--- arch/powerpc/sysdev/mpic_timer.c | 2 ++ arch/sparc/include/asm/prom.h | 12 -------- arch/x86/include/asm/prom.h | 5 --- arch/x86/kernel/devicetree.c | 11 +------ arch/xtensa/include/asm/prom.h | 6 ---- drivers/ata/sata_fsl.c | 2 ++ drivers/char/bsr.c | 1 + drivers/char/hw_random/pasemi-rng.c | 1 + drivers/cpufreq/pasemi-cpufreq.c | 1 + drivers/crypto/caam/ctrl.c | 3 ++ drivers/crypto/caam/jr.c | 2 ++ drivers/dma/fsldma.c | 2 ++ drivers/edac/cell_edac.c | 1 + drivers/i2c/busses/i2c-mpc.c | 2 ++ drivers/i2c/busses/i2c-powermac.c | 1 + drivers/input/serio/xilinx_ps2.c | 1 + drivers/macintosh/macio_asic.c | 2 ++ drivers/macintosh/rack-meter.c | 2 ++ drivers/macintosh/smu.c | 1 + drivers/macintosh/via-pmu.c | 2 ++ drivers/mtd/nand/fsl_elbc_nand.c | 1 + drivers/mtd/nand/pasemi_nand.c | 2 ++ drivers/net/can/grcan.c | 3 -- drivers/net/can/sja1000/sja1000_of_platform.c | 1 - drivers/net/ethernet/ibm/emac/core.c | 2 ++ drivers/net/ethernet/ibm/emac/mal.c | 1 + drivers/net/ethernet/ibm/emac/rgmii.c | 1 + drivers/net/ethernet/ibm/emac/tah.c | 1 + drivers/net/ethernet/ibm/emac/zmii.c | 1 + drivers/net/ethernet/xilinx/ll_temac_main.c | 1 + drivers/of/address.c | 8 +++++ drivers/of/base.c | 7 +++++ drivers/of/of_pci.c | 1 - drivers/of/of_pci_irq.c | 1 - drivers/of/pdt.c | 1 - drivers/pcmcia/electra_cf.c | 2 ++ drivers/tty/ehv_bytechan.c | 1 + drivers/tty/serial/pmac_zilog.c | 2 ++ drivers/usb/host/ehci-ppc-of.c | 2 ++ drivers/usb/host/ohci-ppc-of.c | 2 ++ fs/proc/proc_devtree.c | 3 -- include/linux/of.h | 13 ++++---- include/linux/of_address.h | 39 +++++++++++++----------- sound/aoa/core/gpio-feature.c | 3 +- sound/aoa/soundbus/i2sbus/core.c | 2 ++ sound/ppc/pmac.c | 2 ++ sound/ppc/tumbler.c | 1 + 90 files changed, 141 insertions(+), 220 deletions(-) delete mode 100644 arch/arc/include/asm/prom.h delete mode 100644 arch/arm64/include/asm/prom.h delete mode 100644 arch/c6x/include/asm/prom.h delete mode 100644 arch/metag/include/asm/prom.h delete mode 100644 arch/openrisc/include/asm/prom.h delete mode 100644 arch/xtensa/include/asm/prom.hSignature · 1 line
1.8.1.2