From d450f445f9a654080a6be4094376c2192d9a1f36 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Tue, 19 Feb 2013 02:58:25 +0300 Subject: : fix compilation warnings with DT disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following compilation warnings (in Simon Horman's renesas.git repo): In file included from arch/arm/mach-shmobile/setup-r8a7779.c:24:0: include/linux/of_platform.h:107:13: warning: ‘struct of_device_id’ declared inside parameter list [enabled by default] include/linux/of_platform.h:107:13: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/linux/of_platform.h:107:13: warning: ‘struct device_node’ declared inside parameter list [enabled by default] only #include's headers with definitions of the above mentioned structures if CONFIG_OF_DEVICE=y but uses them even if not. One solution is to move some #include's out of #ifdef CONFIG_OF_DEVICE and use incomplete declarations for the rest of the structures where the #ifdef move doesn't help... Reported-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Rob Herring diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3863a4d..2a93b64 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -11,9 +11,10 @@ * */ -#ifdef CONFIG_OF_DEVICE #include #include + +#ifdef CONFIG_OF_DEVICE #include #include #include @@ -100,7 +101,7 @@ extern int of_platform_populate(struct device_node *root, #if !defined(CONFIG_OF_ADDRESS) struct of_dev_auxdata; -struct device; +struct device_node; static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, -- cgit v0.10.2 From 48d045dbe9c757681edfe8274211254c56d53a41 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Wed, 6 Feb 2013 09:51:39 -0500 Subject: of/documentation: move video device bindings to a common place Binding Documents for drm-devices are placed in Documentation/devicetree/bindings/drm/*. But these devices are common for v4l framework, hence moved to a common place at Documentation/devicetree/bindings/video/. 'exynos_' prefix is added to associate them with exynos soc series. Signed-off-by: Rahul Sharma Signed-off-by: Grant Likely diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt deleted file mode 100644 index 589edee..0000000 --- a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt +++ /dev/null @@ -1,22 +0,0 @@ -Device-Tree bindings for drm hdmi driver - -Required properties: -- compatible: value should be "samsung,exynos5-hdmi". -- reg: physical base address of the hdmi and length of memory mapped - region. -- interrupts: interrupt number to the cpu. -- hpd-gpio: following information about the hotplug gpio pin. - a) phandle of the gpio controller node. - b) pin number within the gpio controller. - c) pin function mode. - d) optional flags and pull up/down. - e) drive strength. - -Example: - - hdmi { - compatible = "samsung,exynos5-hdmi"; - reg = <0x14530000 0x100000>; - interrupts = <0 95 0>; - hpd-gpio = <&gpx3 7 0xf 1 3>; - }; diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt deleted file mode 100644 index fa166d9..0000000 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt +++ /dev/null @@ -1,12 +0,0 @@ -Device-Tree bindings for hdmiddc driver - -Required properties: -- compatible: value should be "samsung,exynos5-hdmiddc". -- reg: I2C address of the hdmiddc device. - -Example: - - hdmiddc { - compatible = "samsung,exynos5-hdmiddc"; - reg = <0x50>; - }; diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt deleted file mode 100644 index 858f4f9..0000000 --- a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt +++ /dev/null @@ -1,12 +0,0 @@ -Device-Tree bindings for hdmiphy driver - -Required properties: -- compatible: value should be "samsung,exynos5-hdmiphy". -- reg: I2C address of the hdmiphy device. - -Example: - - hdmiphy { - compatible = "samsung,exynos5-hdmiphy"; - reg = <0x38>; - }; diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/drm/exynos/mixer.txt deleted file mode 100644 index 9b2ea03..0000000 --- a/Documentation/devicetree/bindings/drm/exynos/mixer.txt +++ /dev/null @@ -1,15 +0,0 @@ -Device-Tree bindings for mixer driver - -Required properties: -- compatible: value should be "samsung,exynos5-mixer". -- reg: physical base address of the mixer and length of memory mapped - region. -- interrupts: interrupt number to the cpu. - -Example: - - mixer { - compatible = "samsung,exynos5-mixer"; - reg = <0x14450000 0x10000>; - interrupts = <0 94 0>; - }; diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt new file mode 100644 index 0000000..589edee --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt @@ -0,0 +1,22 @@ +Device-Tree bindings for drm hdmi driver + +Required properties: +- compatible: value should be "samsung,exynos5-hdmi". +- reg: physical base address of the hdmi and length of memory mapped + region. +- interrupts: interrupt number to the cpu. +- hpd-gpio: following information about the hotplug gpio pin. + a) phandle of the gpio controller node. + b) pin number within the gpio controller. + c) pin function mode. + d) optional flags and pull up/down. + e) drive strength. + +Example: + + hdmi { + compatible = "samsung,exynos5-hdmi"; + reg = <0x14530000 0x100000>; + interrupts = <0 95 0>; + hpd-gpio = <&gpx3 7 0xf 1 3>; + }; diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt new file mode 100644 index 0000000..fa166d9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_hdmiddc.txt @@ -0,0 +1,12 @@ +Device-Tree bindings for hdmiddc driver + +Required properties: +- compatible: value should be "samsung,exynos5-hdmiddc". +- reg: I2C address of the hdmiddc device. + +Example: + + hdmiddc { + compatible = "samsung,exynos5-hdmiddc"; + reg = <0x50>; + }; diff --git a/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt new file mode 100644 index 0000000..858f4f9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_hdmiphy.txt @@ -0,0 +1,12 @@ +Device-Tree bindings for hdmiphy driver + +Required properties: +- compatible: value should be "samsung,exynos5-hdmiphy". +- reg: I2C address of the hdmiphy device. + +Example: + + hdmiphy { + compatible = "samsung,exynos5-hdmiphy"; + reg = <0x38>; + }; diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt new file mode 100644 index 0000000..9b2ea03 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt @@ -0,0 +1,15 @@ +Device-Tree bindings for mixer driver + +Required properties: +- compatible: value should be "samsung,exynos5-mixer". +- reg: physical base address of the mixer and length of memory mapped + region. +- interrupts: interrupt number to the cpu. + +Example: + + mixer { + compatible = "samsung,exynos5-mixer"; + reg = <0x14450000 0x10000>; + interrupts = <0 94 0>; + }; -- cgit v0.10.2 From b855f16b05a697ac1863adabe99bfba56e6d3199 Mon Sep 17 00:00:00 2001 From: Tang Yuantian Date: Wed, 10 Apr 2013 11:36:39 +0800 Subject: of/base: release the node correctly in of_parse_phandle_with_args() Call of_node_put() only when the out_args is NULL on success, or the node's reference count will not be correct because the caller will call of_node_put() again. Signed-off-by: Tang Yuantian [grant.likely: tightened up the patch] Signed-off-by: Grant Likely diff --git a/drivers/of/base.c b/drivers/of/base.c index 321d3ef..e77e719 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1166,11 +1166,11 @@ static int __of_parse_phandle_with_args(const struct device_node *np, out_args->args_count = count; for (i = 0; i < count; i++) out_args->args[i] = be32_to_cpup(list++); + } else { + of_node_put(node); } /* Found it! return success */ - if (node) - of_node_put(node); return 0; } -- cgit v0.10.2 From a2b9ea73967386ec5e524ab206bd549d5aafea17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 25 Apr 2013 14:27:57 +0200 Subject: Documentation/devicetree: make semantic of initrd-end more explicit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: Rob Herring diff --git a/Documentation/devicetree/usage-model.txt b/Documentation/devicetree/usage-model.txt index ef9d06c..0efedaa 100644 --- a/Documentation/devicetree/usage-model.txt +++ b/Documentation/devicetree/usage-model.txt @@ -191,9 +191,11 @@ Linux it will look something like this: }; The bootargs property contains the kernel arguments, and the initrd-* -properties define the address and size of an initrd blob. The -chosen node may also optionally contain an arbitrary number of -additional properties for platform-specific configuration data. +properties define the address and size of an initrd blob. Note that +initrd-end is the first address after the initrd image, so this doesn't +match the usual semantic of struct resource. The chosen node may also +optionally contain an arbitrary number of additional properties for +platform-specific configuration data. During early boot, the architecture setup code calls of_scan_flat_dt() several times with different helper callbacks to parse device tree -- cgit v0.10.2