clk-sunxi.c (858a0d7eb5300b5f620d98ab3c4b96c9d5f19131) | clk-sunxi.c (1667393126d7c51fad8b3cb9d3798e8e0367e2ec) |
---|---|
1/* 2 * Copyright 2013 Emilio López 3 * 4 * Emilio López <emilio@elopez.com.ar> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 652 unchanged lines hidden (view full) --- 661 struct clk *clk; 662 const char *clk_name = node->name; 663 const char *parents[SUNXI_MAX_PARENTS]; 664 void __iomem *reg; 665 int i; 666 667 reg = of_iomap(node, 0); 668 if (!reg) { | 1/* 2 * Copyright 2013 Emilio López 3 * 4 * Emilio López <emilio@elopez.com.ar> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 652 unchanged lines hidden (view full) --- 661 struct clk *clk; 662 const char *clk_name = node->name; 663 const char *parents[SUNXI_MAX_PARENTS]; 664 void __iomem *reg; 665 int i; 666 667 reg = of_iomap(node, 0); 668 if (!reg) { |
669 pr_err("Could not map registers for mux-clk: %s\n", 670 of_node_full_name(node)); | 669 pr_err("Could not map registers for mux-clk: %pOF\n", node); |
671 return NULL; 672 } 673 674 i = of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS); 675 if (of_property_read_string(node, "clock-output-names", &clk_name)) { | 670 return NULL; 671 } 672 673 i = of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS); 674 if (of_property_read_string(node, "clock-output-names", &clk_name)) { |
676 pr_err("%s: could not read clock-output-names from \"%s\"\n", 677 __func__, of_node_full_name(node)); | 675 pr_err("%s: could not read clock-output-names from \"%pOF\"\n", 676 __func__, node); |
678 goto out_unmap; 679 } 680 681 clk = clk_register_mux(NULL, clk_name, parents, i, 682 CLK_SET_RATE_PARENT, reg, 683 data->shift, SUNXI_MUX_GATE_WIDTH, 684 0, &clk_lock); 685 --- 106 unchanged lines hidden (view full) --- 792{ 793 struct clk *clk; 794 const char *clk_name = node->name; 795 const char *clk_parent; 796 void __iomem *reg; 797 798 reg = of_iomap(node, 0); 799 if (!reg) { | 677 goto out_unmap; 678 } 679 680 clk = clk_register_mux(NULL, clk_name, parents, i, 681 CLK_SET_RATE_PARENT, reg, 682 data->shift, SUNXI_MUX_GATE_WIDTH, 683 0, &clk_lock); 684 --- 106 unchanged lines hidden (view full) --- 791{ 792 struct clk *clk; 793 const char *clk_name = node->name; 794 const char *clk_parent; 795 void __iomem *reg; 796 797 reg = of_iomap(node, 0); 798 if (!reg) { |
800 pr_err("Could not map registers for mux-clk: %s\n", 801 of_node_full_name(node)); | 799 pr_err("Could not map registers for mux-clk: %pOF\n", node); |
802 return; 803 } 804 805 clk_parent = of_clk_get_parent_name(node, 0); 806 807 if (of_property_read_string(node, "clock-output-names", &clk_name)) { | 800 return; 801 } 802 803 clk_parent = of_clk_get_parent_name(node, 0); 804 805 if (of_property_read_string(node, "clock-output-names", &clk_name)) { |
808 pr_err("%s: could not read clock-output-names from \"%s\"\n", 809 __func__, of_node_full_name(node)); | 806 pr_err("%s: could not read clock-output-names from \"%pOF\"\n", 807 __func__, node); |
810 goto out_unmap; 811 } 812 813 clk = clk_register_divider_table(NULL, clk_name, clk_parent, 0, 814 reg, data->shift, data->width, 815 data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0, 816 data->table, &clk_lock); 817 if (IS_ERR(clk)) { --- 187 unchanged lines hidden (view full) --- 1005 if (!pclk) 1006 return NULL; 1007 1008 parent = __clk_get_name(pclk); 1009 kfree(derived_name); 1010 1011 reg = of_iomap(node, 0); 1012 if (!reg) { | 808 goto out_unmap; 809 } 810 811 clk = clk_register_divider_table(NULL, clk_name, clk_parent, 0, 812 reg, data->shift, data->width, 813 data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0, 814 data->table, &clk_lock); 815 if (IS_ERR(clk)) { --- 187 unchanged lines hidden (view full) --- 1003 if (!pclk) 1004 return NULL; 1005 1006 parent = __clk_get_name(pclk); 1007 kfree(derived_name); 1008 1009 reg = of_iomap(node, 0); 1010 if (!reg) { |
1013 pr_err("Could not map registers for divs-clk: %s\n", 1014 of_node_full_name(node)); | 1011 pr_err("Could not map registers for divs-clk: %pOF\n", node); |
1015 return NULL; 1016 } 1017 1018 clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL); 1019 if (!clk_data) 1020 goto out_unmap; 1021 1022 clks = kcalloc(ndivs, sizeof(*clks), GFP_KERNEL); --- 164 unchanged lines hidden --- | 1012 return NULL; 1013 } 1014 1015 clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL); 1016 if (!clk_data) 1017 goto out_unmap; 1018 1019 clks = kcalloc(ndivs, sizeof(*clks), GFP_KERNEL); --- 164 unchanged lines hidden --- |