clk-emev2.c (8c57a5e7b2820f349c95b8c8393fec1e0f4070d2) | clk-emev2.c (e665f029a283aff4f36f0c5388f7c708be67470e) |
---|---|
1/* 2 * EMMA Mobile EV2 common clock framework support 3 * 4 * Copyright (C) 2013 Takashi Yoshii <takashi.yoshii.ze@renesas.com> 5 * Copyright (C) 2012 Magnus Damm 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 72 unchanged lines hidden (view full) --- 81 const char *parent_name = of_clk_get_parent_name(np, 0); 82 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) 83 return; 84 if (!smu_base) 85 emev2_smu_init(); 86 clk = clk_register_divider(NULL, np->name, parent_name, 0, 87 smu_base + reg[0], reg[1], 8, 0, &lock); 88 of_clk_add_provider(np, of_clk_src_simple_get, clk); | 1/* 2 * EMMA Mobile EV2 common clock framework support 3 * 4 * Copyright (C) 2013 Takashi Yoshii <takashi.yoshii.ze@renesas.com> 5 * Copyright (C) 2012 Magnus Damm 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 72 unchanged lines hidden (view full) --- 81 const char *parent_name = of_clk_get_parent_name(np, 0); 82 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) 83 return; 84 if (!smu_base) 85 emev2_smu_init(); 86 clk = clk_register_divider(NULL, np->name, parent_name, 0, 87 smu_base + reg[0], reg[1], 8, 0, &lock); 88 of_clk_add_provider(np, of_clk_src_simple_get, clk); |
89 clk_register_clkdev(clk, np->name, NULL); 90 pr_debug("## %s %s %p\n", __func__, np->name, clk); | 89 clk_register_clkdev(clk, np->full_name, NULL); 90 pr_debug("## %s %pOFn %p\n", __func__, np, clk); |
91} 92CLK_OF_DECLARE(emev2_smu_clkdiv, "renesas,emev2-smu-clkdiv", 93 emev2_smu_clkdiv_init); 94 95static void __init emev2_smu_gclk_init(struct device_node *np) 96{ 97 u32 reg[2]; 98 struct clk *clk; 99 const char *parent_name = of_clk_get_parent_name(np, 0); 100 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) 101 return; 102 if (!smu_base) 103 emev2_smu_init(); 104 clk = clk_register_gate(NULL, np->name, parent_name, 0, 105 smu_base + reg[0], reg[1], 0, &lock); 106 of_clk_add_provider(np, of_clk_src_simple_get, clk); | 91} 92CLK_OF_DECLARE(emev2_smu_clkdiv, "renesas,emev2-smu-clkdiv", 93 emev2_smu_clkdiv_init); 94 95static void __init emev2_smu_gclk_init(struct device_node *np) 96{ 97 u32 reg[2]; 98 struct clk *clk; 99 const char *parent_name = of_clk_get_parent_name(np, 0); 100 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) 101 return; 102 if (!smu_base) 103 emev2_smu_init(); 104 clk = clk_register_gate(NULL, np->name, parent_name, 0, 105 smu_base + reg[0], reg[1], 0, &lock); 106 of_clk_add_provider(np, of_clk_src_simple_get, clk); |
107 clk_register_clkdev(clk, np->name, NULL); 108 pr_debug("## %s %s %p\n", __func__, np->name, clk); | 107 clk_register_clkdev(clk, np->full_name, NULL); 108 pr_debug("## %s %pOFn %p\n", __func__, np, clk); |
109} 110CLK_OF_DECLARE(emev2_smu_gclk, "renesas,emev2-smu-gclk", emev2_smu_gclk_init); | 109} 110CLK_OF_DECLARE(emev2_smu_gclk, "renesas,emev2-smu-gclk", emev2_smu_gclk_init); |