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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk driver fixes from Stephen Boyd:

- Mark the DDR bus clk critical in the SpaceMiT driver so that
boot doesn't fail

- Fix boot on Mobile EyeQ by creating the auxiliary device for
the ethernet PHY

- Plug an OF node leak in Rockchip rk808 clk driver

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: rk808: fix OF node reference imbalance
MAINTAINERS: add myself as a reviewer for the clk subsystem
reset: eyeq: drop device_set_of_node_from_dev() done by parent
clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs
clk: eyeq: use the auxiliary device creation helper
clk: spacemit: k3: mark top_dclk as CLK_IS_CRITICAL

+20 -69
+1
MAINTAINERS
··· 6356 6356 COMMON CLK FRAMEWORK 6357 6357 M: Michael Turquette <mturquette@baylibre.com> 6358 6358 M: Stephen Boyd <sboyd@kernel.org> 6359 + R: Brian Masney <bmasney@redhat.com> 6359 6360 L: linux-clk@vger.kernel.org 6360 6361 S: Maintained 6361 6362 Q: http://patchwork.kernel.org/project/linux-clk/list/
+15 -45
drivers/clk/clk-eyeq.c
··· 110 110 111 111 const char *reset_auxdev_name; 112 112 const char *pinctrl_auxdev_name; 113 + const char *eth_phy_auxdev_name; 113 114 114 115 unsigned int early_clk_count; 115 116 }; ··· 322 321 } 323 322 } 324 323 325 - static void eqc_auxdev_release(struct device *dev) 326 - { 327 - struct auxiliary_device *adev = to_auxiliary_dev(dev); 328 - 329 - kfree(adev); 330 - } 331 - 332 - static int eqc_auxdev_create(struct device *dev, void __iomem *base, 333 - const char *name, u32 id) 324 + static void eqc_auxdev_create_optional(struct device *dev, void __iomem *base, 325 + const char *name) 334 326 { 335 327 struct auxiliary_device *adev; 336 - int ret; 337 328 338 - adev = kzalloc_obj(*adev); 339 - if (!adev) 340 - return -ENOMEM; 341 - 342 - adev->name = name; 343 - adev->dev.parent = dev; 344 - adev->dev.platform_data = (void __force *)base; 345 - adev->dev.release = eqc_auxdev_release; 346 - adev->id = id; 347 - 348 - ret = auxiliary_device_init(adev); 349 - if (ret) 350 - return ret; 351 - 352 - ret = auxiliary_device_add(adev); 353 - if (ret) 354 - auxiliary_device_uninit(adev); 355 - 356 - return ret; 329 + if (name) { 330 + adev = devm_auxiliary_device_create(dev, name, 331 + (void __force *)base); 332 + if (!adev) 333 + dev_warn(dev, "failed creating auxiliary device %s.%s\n", 334 + KBUILD_MODNAME, name); 335 + } 357 336 } 358 337 359 338 static int eqc_probe(struct platform_device *pdev) ··· 345 364 unsigned int i, clk_count; 346 365 struct resource *res; 347 366 void __iomem *base; 348 - int ret; 349 367 350 368 data = device_get_match_data(dev); 351 369 if (!data) ··· 358 378 if (!base) 359 379 return -ENOMEM; 360 380 361 - /* Init optional reset auxiliary device. */ 362 - if (data->reset_auxdev_name) { 363 - ret = eqc_auxdev_create(dev, base, data->reset_auxdev_name, 0); 364 - if (ret) 365 - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", 366 - KBUILD_MODNAME, data->reset_auxdev_name, ret); 367 - } 368 - 369 - /* Init optional pinctrl auxiliary device. */ 370 - if (data->pinctrl_auxdev_name) { 371 - ret = eqc_auxdev_create(dev, base, data->pinctrl_auxdev_name, 0); 372 - if (ret) 373 - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", 374 - KBUILD_MODNAME, data->pinctrl_auxdev_name, ret); 375 - } 381 + /* Init optional auxiliary devices. */ 382 + eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); 383 + eqc_auxdev_create_optional(dev, base, data->pinctrl_auxdev_name); 384 + eqc_auxdev_create_optional(dev, base, data->eth_phy_auxdev_name); 376 385 377 386 if (data->pll_count + data->div_count + data->fixed_factor_count == 0) 378 387 return 0; /* Zero clocks, we are done. */ ··· 522 553 523 554 .reset_auxdev_name = "reset", 524 555 .pinctrl_auxdev_name = "pinctrl", 556 + .eth_phy_auxdev_name = "phy", 525 557 526 558 .early_clk_count = ARRAY_SIZE(eqc_eyeq5_early_plls) + 527 559 ARRAY_SIZE(eqc_eyeq5_early_fixed_factors),
+1 -1
drivers/clk/clk-rk808.c
··· 153 153 struct rk808_clkout *rk808_clkout; 154 154 int ret; 155 155 156 - dev->of_node = pdev->dev.parent->of_node; 156 + device_set_of_node_from_dev(dev, dev->parent); 157 157 158 158 rk808_clkout = devm_kzalloc(dev, 159 159 sizeof(*rk808_clkout), GFP_KERNEL);
+1 -1
drivers/clk/spacemit/ccu-k3.c
··· 846 846 CCU_PARENT_HW(pll6_d3), 847 847 }; 848 848 CCU_MUX_DIV_GATE_FC_DEFINE(top_dclk, top_parents, APMU_TOP_DCLK_CTRL, 5, 3, 849 - BIT(8), 2, 3, BIT(1), 0); 849 + BIT(8), 2, 3, BIT(1), CLK_IS_CRITICAL); 850 850 851 851 static const struct clk_parent_data ucie_parents[] = { 852 852 CCU_PARENT_HW(pll1_d8_307p2),
+2 -22
drivers/reset/reset-eyeq.c
··· 422 422 return eqr_of_xlate_internal(rcdev, reset_spec->args[0], reset_spec->args[1]); 423 423 } 424 424 425 - static void eqr_of_node_put(void *_dev) 426 - { 427 - struct device *dev = _dev; 428 - 429 - of_node_put(dev->of_node); 430 - } 431 - 432 425 static int eqr_probe(struct auxiliary_device *adev, 433 426 const struct auxiliary_device_id *id) 434 427 { ··· 432 439 int ret; 433 440 434 441 /* 435 - * We are an auxiliary device of clk-eyeq. We do not have an OF node by 436 - * default; let's reuse our parent's OF node. 437 - */ 438 - WARN_ON(dev->of_node); 439 - device_set_of_node_from_dev(dev, dev->parent); 440 - if (!dev->of_node) 441 - return -ENODEV; 442 - 443 - ret = devm_add_action_or_reset(dev, eqr_of_node_put, dev); 444 - if (ret) 445 - return ret; 446 - 447 - /* 448 - * Using our newfound OF node, we can get match data. We cannot use 449 - * device_get_match_data() because it does not match reused OF nodes. 442 + * Get match data. We cannot use device_get_match_data() because it does 443 + * not accept reused OF nodes; see device_set_of_node_from_dev(). 450 444 */ 451 445 match = of_match_node(dev->driver->of_match_table, dev->of_node); 452 446 if (!match || !match->data)