Loading drivers/clk/msm/clock-cpu-8939.c +21 −9 Original line number Diff line number Diff line Loading @@ -230,19 +230,31 @@ static struct cpu_clk_8939 *cpuclk[] = { &a53_bc_clk, &a53_lc_clk, &cci_clk}; static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; /* CPU 0/1/2/3 --> a53_bc_clk and mask = 0x103 cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } /* * CPU 0/1/2/3 --> a53_bc_clk and mask = 0x103 * CPU 4/5/6/7 --> a53_lc_clk and mask = 0x3 */ if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | a53_bc_clk.cpu_reg_mask) == a53_bc_clk.cpu_reg_mask) hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | a53_bc_clk.cpu_reg_mask) == a53_bc_clk.cpu_reg_mask) return &a53_lc_clk.c; if ((reg | a53_lc_clk.cpu_reg_mask) == a53_lc_clk.cpu_reg_mask) if ((hwid | a53_lc_clk.cpu_reg_mask) == a53_lc_clk.cpu_reg_mask) return &a53_bc_clk.c; } fail: return NULL; } Loading drivers/clk/msm/clock-cpu-8953.c +20 −11 Original line number Diff line number Diff line /* * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -466,18 +466,27 @@ static struct cpu_clk_8953 *cpuclk[] = { &a53_pwr_clk, &a53_perf_clk, static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | a53_pwr_clk.cpu_reg_mask) == a53_pwr_clk.cpu_reg_mask) cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | a53_pwr_clk.cpu_reg_mask) == a53_pwr_clk.cpu_reg_mask) return &a53_pwr_clk.c; if ((reg | a53_perf_clk.cpu_reg_mask) == a53_perf_clk.cpu_reg_mask) if ((hwid | a53_perf_clk.cpu_reg_mask) == a53_perf_clk.cpu_reg_mask) return &a53_perf_clk.c; } fail: return NULL; } Loading drivers/clk/msm/clock-cpu-sdm632.c +20 −10 Original line number Diff line number Diff line Loading @@ -528,18 +528,28 @@ static struct a53_cpu_clk *cpuclk[] = { &perf_clk, &pwr_clk, static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | pwr_clk.cpu_reg_mask) == pwr_clk.cpu_reg_mask) hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | pwr_clk.cpu_reg_mask) == pwr_clk.cpu_reg_mask) return &pwr_clk.c; if ((reg | perf_clk.cpu_reg_mask) == perf_clk.cpu_reg_mask) if ((hwid | perf_clk.cpu_reg_mask) == perf_clk.cpu_reg_mask) return &perf_clk.c; } fail: return NULL; } Loading Loading
drivers/clk/msm/clock-cpu-8939.c +21 −9 Original line number Diff line number Diff line Loading @@ -230,19 +230,31 @@ static struct cpu_clk_8939 *cpuclk[] = { &a53_bc_clk, &a53_lc_clk, &cci_clk}; static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; /* CPU 0/1/2/3 --> a53_bc_clk and mask = 0x103 cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } /* * CPU 0/1/2/3 --> a53_bc_clk and mask = 0x103 * CPU 4/5/6/7 --> a53_lc_clk and mask = 0x3 */ if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | a53_bc_clk.cpu_reg_mask) == a53_bc_clk.cpu_reg_mask) hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | a53_bc_clk.cpu_reg_mask) == a53_bc_clk.cpu_reg_mask) return &a53_lc_clk.c; if ((reg | a53_lc_clk.cpu_reg_mask) == a53_lc_clk.cpu_reg_mask) if ((hwid | a53_lc_clk.cpu_reg_mask) == a53_lc_clk.cpu_reg_mask) return &a53_bc_clk.c; } fail: return NULL; } Loading
drivers/clk/msm/clock-cpu-8953.c +20 −11 Original line number Diff line number Diff line /* * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -466,18 +466,27 @@ static struct cpu_clk_8953 *cpuclk[] = { &a53_pwr_clk, &a53_perf_clk, static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | a53_pwr_clk.cpu_reg_mask) == a53_pwr_clk.cpu_reg_mask) cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | a53_pwr_clk.cpu_reg_mask) == a53_pwr_clk.cpu_reg_mask) return &a53_pwr_clk.c; if ((reg | a53_perf_clk.cpu_reg_mask) == a53_perf_clk.cpu_reg_mask) if ((hwid | a53_perf_clk.cpu_reg_mask) == a53_perf_clk.cpu_reg_mask) return &a53_perf_clk.c; } fail: return NULL; } Loading
drivers/clk/msm/clock-cpu-sdm632.c +20 −10 Original line number Diff line number Diff line Loading @@ -528,18 +528,28 @@ static struct a53_cpu_clk *cpuclk[] = { &perf_clk, &pwr_clk, static struct clk *logical_cpu_to_clk(int cpu) { struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); u32 reg; struct device_node *cpu_node; const u32 *cell; u64 hwid; cpu_node = of_get_cpu_node(cpu, NULL); if (!cpu_node) goto fail; cell = of_get_property(cpu_node, "reg", NULL); if (!cell) { pr_err("%s: missing reg property\n", cpu_node->full_name); goto fail; } if (cpu_node && !of_property_read_u32(cpu_node, "reg", ®)) { if ((reg | pwr_clk.cpu_reg_mask) == pwr_clk.cpu_reg_mask) hwid = of_read_number(cell, of_n_addr_cells(cpu_node)); if ((hwid | pwr_clk.cpu_reg_mask) == pwr_clk.cpu_reg_mask) return &pwr_clk.c; if ((reg | perf_clk.cpu_reg_mask) == perf_clk.cpu_reg_mask) if ((hwid | perf_clk.cpu_reg_mask) == perf_clk.cpu_reg_mask) return &perf_clk.c; } fail: return NULL; } Loading