// SPDX-License-Identifier: GPL-2.0 /** * mpc5xxx_get_bus_frequency - Find the bus frequency for a device * @node: device node * * Returns bus frequency (IPS on MPC512x, IPB on MPC52xx), * or 0 if the bus frequency cannot be found. */ #include <linux/kernel.h> #include <linux/of_platform.h> #include <linux/export.h> #include <asm/mpc5xxx.h>
unsigned long mpc5xxx_get_bus_frequency(struct device_node *node) { const unsigned int *p_bus_freq = NULL; of_node_get(node); while (node) { p_bus_freq = of_get_property(node, "bus-frequency", NULL); if (p_bus_freq) break; node = of_get_next_parent(node); } of_node_put(node); return p_bus_freq ? *p_bus_freq : 0; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Wolfgang Denk | 62 | 93.94% | 1 | 33.33% |
Anatolij Gustschin | 2 | 3.03% | 1 | 33.33% |
Christophe Jaillet | 2 | 3.03% | 1 | 33.33% |
Total | 66 | 100.00% | 3 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Wolfgang Denk | 74 | 87.06% | 1 | 20.00% |
Anatolij Gustschin | 5 | 5.88% | 1 | 20.00% |
Paul Gortmaker | 3 | 3.53% | 1 | 20.00% |
Christophe Jaillet | 2 | 2.35% | 1 | 20.00% |
Greg Kroah-Hartman | 1 | 1.18% | 1 | 20.00% |
Total | 85 | 100.00% | 5 | 100.00% |