Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sunxi-clocks-for-4.2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-next

Allwinner clocks additions for 4.2

One error fix, and one patch to add support for the USB clock found on the
Allwinner A23 and A33

+19 -5
+1
Documentation/devicetree/bindings/clock/sunxi.txt
··· 67 67 "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 68 68 "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 69 69 "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 70 + "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23 70 71 "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 71 72 "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 72 73
+5 -5
drivers/clk/sunxi/clk-sun9i-core.c
··· 93 93 void __iomem *reg; 94 94 95 95 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 96 - if (!reg) { 96 + if (IS_ERR(reg)) { 97 97 pr_err("Could not get registers for a80-pll4-clk: %s\n", 98 98 node->name); 99 99 return; ··· 154 154 struct clk *gt; 155 155 156 156 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 157 - if (!reg) { 157 + if (IS_ERR(reg)) { 158 158 pr_err("Could not get registers for a80-gt-clk: %s\n", 159 159 node->name); 160 160 return; ··· 218 218 void __iomem *reg; 219 219 220 220 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 221 - if (!reg) { 221 + if (IS_ERR(reg)) { 222 222 pr_err("Could not get registers for a80-ahb-clk: %s\n", 223 223 node->name); 224 224 return; ··· 244 244 void __iomem *reg; 245 245 246 246 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 247 - if (!reg) { 247 + if (IS_ERR(reg)) { 248 248 pr_err("Could not get registers for a80-apb0-clk: %s\n", 249 249 node->name); 250 250 return; ··· 310 310 void __iomem *reg; 311 311 312 312 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 313 - if (!reg) { 313 + if (IS_ERR(reg)) { 314 314 pr_err("Could not get registers for a80-apb1-clk: %s\n", 315 315 node->name); 316 316 return;
+2
drivers/clk/sunxi/clk-sunxi.c
··· 198 198 int i = 0; 199 199 200 200 reg = of_io_request_and_map(node, 0, of_node_full_name(node)); 201 + if (IS_ERR(reg)) 202 + return; 201 203 202 204 /* we have a mux, we will have >1 parents */ 203 205 while (i < SUN6I_AHB1_MAX_PARENTS &&
+11
drivers/clk/sunxi/clk-usb.c
··· 204 204 } 205 205 CLK_OF_DECLARE(sun6i_a31_usb, "allwinner,sun6i-a31-usb-clk", sun6i_a31_usb_setup); 206 206 207 + static const struct usb_clk_data sun8i_a23_usb_clk_data __initconst = { 208 + .clk_mask = BIT(16) | BIT(11) | BIT(10) | BIT(9) | BIT(8), 209 + .reset_mask = BIT(2) | BIT(1) | BIT(0), 210 + }; 211 + 212 + static void __init sun8i_a23_usb_setup(struct device_node *node) 213 + { 214 + sunxi_usb_clk_setup(node, &sun8i_a23_usb_clk_data, &sun4i_a10_usb_lock); 215 + } 216 + CLK_OF_DECLARE(sun8i_a23_usb, "allwinner,sun8i-a23-usb-clk", sun8i_a23_usb_setup); 217 + 207 218 static const struct usb_clk_data sun9i_a80_usb_mod_data __initconst = { 208 219 .clk_mask = BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1), 209 220 .reset_mask = BIT(19) | BIT(18) | BIT(17),