aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 00:34:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 00:34:19 -0500
commit66a173b926891023e34e78cb32f4681d19777e01 (patch)
treee6018f50fbceea7c07e6e27368ee817f9adb34f2 /drivers/of
parent11db81a59d0b2e563e30512cd76f23d0db384780 (diff)
parent0c4888ef1d8a8b82c29075ce7e257ff795af15c7 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Benjamin Herrenschmidt: "The bulk of this is LE updates. One should now be able to build an LE kernel and even run some things in it. I'm still sitting on a handful of patches to enable the new ABI that I *might* still send this merge window around, but due to the incertainty (they are pretty fresh) I want to keep them separate. Other notable changes are some infrastructure bits to better handle PCI pass-through under KVM, some bits and pieces added to the new PowerNV platform support such as access to the CPU SCOM bus via sysfs, and support for EEH error handling on PHB3 (Power8 PCIe). We also grew arch_get_random_long() for both pseries and powernv when running on P7+ and P8, exploiting the HW rng. And finally various embedded updates from freescale" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (154 commits) powerpc: Fix fatal SLB miss when restoring PPR powerpc/powernv: Reserve the correct PE number powerpc/powernv: Add PE to its own PELTV powerpc/powernv: Add support for indirect XSCOM via debugfs powerpc/scom: Improve debugfs interface powerpc/scom: Enable 64-bit addresses powerpc/boot: Properly handle the base "of" boot wrapper powerpc/bpf: Support MOD operation powerpc/bpf: Fix DIVWU instruction opcode of: Move definition of of_find_next_cache_node into common code. powerpc: Remove big endianness assumption in of_find_next_cache_node powerpc/tm: Remove interrupt disable in __switch_to() powerpc: word-at-a-time optimization for 64-bit Little Endian powerpc/bpf: BPF JIT compiler for 64-bit Little Endian powerpc: Only save/restore SDR1 if in hypervisor mode powerpc/pmu: Fix ADB_PMU_LED_IDE dependencies powerpc/nvram: Fix endian issue when using the partition length powerpc/nvram: Fix endian issue when reading the NVRAM size powerpc/nvram: Scan partitions only once powerpc/mpc512x: remove unnecessary #if ...
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/base.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 7d4c70f859e3..aace017fc452 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1882,3 +1882,34 @@ int of_device_is_stdout_path(struct device_node *dn)
1882 return of_stdout == dn; 1882 return of_stdout == dn;
1883} 1883}
1884EXPORT_SYMBOL_GPL(of_device_is_stdout_path); 1884EXPORT_SYMBOL_GPL(of_device_is_stdout_path);
1885
1886/**
1887 * of_find_next_cache_node - Find a node's subsidiary cache
1888 * @np: node of type "cpu" or "cache"
1889 *
1890 * Returns a node pointer with refcount incremented, use
1891 * of_node_put() on it when done. Caller should hold a reference
1892 * to np.
1893 */
1894struct device_node *of_find_next_cache_node(const struct device_node *np)
1895{
1896 struct device_node *child;
1897 const phandle *handle;
1898
1899 handle = of_get_property(np, "l2-cache", NULL);
1900 if (!handle)
1901 handle = of_get_property(np, "next-level-cache", NULL);
1902
1903 if (handle)
1904 return of_find_node_by_phandle(be32_to_cpup(handle));
1905
1906 /* OF on pmac has nodes instead of properties named "l2-cache"
1907 * beneath CPU nodes.
1908 */
1909 if (!strcmp(np->type, "cpu"))
1910 for_each_child_of_node(np, child)
1911 if (!strcmp(child->type, "cache"))
1912 return child;
1913
1914 return NULL;
1915}