mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-11-03 01:25:36 +01:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
34
arch/powerpc/sysdev/mpc5xxx_clocks.c
Normal file
34
arch/powerpc/sysdev/mpc5xxx_clocks.c
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* 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)
|
||||
{
|
||||
struct device_node *np;
|
||||
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;
|
||||
|
||||
np = of_get_parent(node);
|
||||
of_node_put(node);
|
||||
node = np;
|
||||
}
|
||||
if (node)
|
||||
of_node_put(node);
|
||||
|
||||
return p_bus_freq ? *p_bus_freq : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mpc5xxx_get_bus_frequency);
|
||||
Loading…
Add table
Add a link
Reference in a new issue