mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 11:31:31 +00:00
FSL SOC changes for 6.13:
- Fix a missing of_node_put() in RCPM - Fix a missing error code on failure in CPM1 QMC - Switch to using for_each_available_child_of_node_scoped() in CPM1 TSA -----BEGIN PGP SIGNATURE----- iJIEABYKADoWIQQQ/+b4s5DeF6zCYyNoqS/rAbjdeAUCZzYBFRwcY2hyaXN0b3Bo ZS5sZXJveUBjc2dyb3VwLmV1AAoJEGipL+sBuN14vbcBALObPpE0CcTKWee4PMKu iEMnznKztaety2HsU8EVmYVPAP9nYGA/3EkGUMiEwh2+Kc/0/pIIIXRveCt2xWq4 fBOACQ== =WD3l -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmc3WIQACgkQYKtH/8kJ UicDwg//c8rH7NJoAI1oSwwJMk7HBai2rNxvZSldfsOskVa7C2CRie7oSVhZIcE3 X0JeEIu5byqZl60wqNalDPdSKUwWr+tNybU6iznViyf7dDRpPzy/gGd4TmlKj9Fh ZvrxtT4atMgTHeHkvZm7ev0xk+zKF/7ffsiyMrdX/BMbrHmaQVLVEyAcS1eyDCNY iwpWmv1WdlU352TleM1sd0oTHQ9D9d/7xOFnlZKddfOi7LYZBWok6BVvoolE1j3l CjJwtD0ILsGvoYKM+Fdh55qz3spPWyLE7VgWUyEnhuCNA/c19fhyS3yvZbwEVyvW EDlnIHQBgthVsOW6I7coBUqCXPwk9fddmbMijkyyW4YCvGwAHExkyQTL3inwY/wK x/X9v8//DnjN1T/M+UdkXz68lBeMfPvcuWepI1mDebWdSRCmcG11wZIM8qszOLoe 8VqRTcNZ/FaHmHhwWSy7U8fWbfdg55NirhT2bdgnuiuTDzuVofNCsKzSN5MzwZFi SCeypvwFstfWfTE3yh0l1p2iJoxZ8nXsda/p9VT4JeHIwppgyUJ5s8wzhOlffmiS OFQimIkcXaqNtQKZmzXUXRI3ZQHk62Q/isWy14ZMVVr99SdFxr5Src4VpFc9fjxb JJz4Bh/+5NqHcFbXJ3l5zIc/ss6Yj/Q58pGVa+aYX1+Aumhjh4I= =6Rkj -----END PGP SIGNATURE----- Merge tag 'soc_fsl-6.13-1' of https://github.com/chleroy/linux into soc/drivers FSL SOC changes for 6.13: - Fix a missing of_node_put() in RCPM - Fix a missing error code on failure in CPM1 QMC - Switch to using for_each_available_child_of_node_scoped() in CPM1 TSA * tag 'soc_fsl-6.13-1' of https://github.com/chleroy/linux: soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting() soc: fsl: cpm1: tsa: switch to for_each_available_child_of_node_scoped() Link: https://lore.kernel.org/r/c3c4961b-fe2a-4fcc-a7a1-f8b5352e09a2@csgroup.eu Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
b77587ac51
@ -2004,8 +2004,10 @@ static int qmc_probe(struct platform_device *pdev)
|
||||
|
||||
/* Set the irq handler */
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
if (irq < 0) {
|
||||
ret = irq;
|
||||
goto err_exit_xcc;
|
||||
}
|
||||
ret = devm_request_irq(qmc->dev, irq, qmc_irq_handler, 0, "qmc", qmc);
|
||||
if (ret < 0)
|
||||
goto err_exit_xcc;
|
||||
|
@ -680,7 +680,6 @@ static inline int tsa_of_parse_tdm_tx_route(struct tsa *tsa,
|
||||
|
||||
static int tsa_of_parse_tdms(struct tsa *tsa, struct device_node *np)
|
||||
{
|
||||
struct device_node *tdm_np;
|
||||
struct tsa_tdm *tdm;
|
||||
struct clk *clk;
|
||||
u32 tdm_id, val;
|
||||
@ -691,11 +690,10 @@ static int tsa_of_parse_tdms(struct tsa *tsa, struct device_node *np)
|
||||
for (i = 0; i < ARRAY_SIZE(tsa->tdm); i++)
|
||||
tsa->tdm[i].is_enable = false;
|
||||
|
||||
for_each_available_child_of_node(np, tdm_np) {
|
||||
for_each_available_child_of_node_scoped(np, tdm_np) {
|
||||
ret = of_property_read_u32(tdm_np, "reg", &tdm_id);
|
||||
if (ret) {
|
||||
dev_err(tsa->dev, "%pOF: failed to read reg\n", tdm_np);
|
||||
of_node_put(tdm_np);
|
||||
return ret;
|
||||
}
|
||||
switch (tdm_id) {
|
||||
@ -719,16 +717,14 @@ static int tsa_of_parse_tdms(struct tsa *tsa, struct device_node *np)
|
||||
invalid_tdm:
|
||||
dev_err(tsa->dev, "%pOF: Invalid tdm_id (%u)\n", tdm_np,
|
||||
tdm_id);
|
||||
of_node_put(tdm_np);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
for_each_available_child_of_node(np, tdm_np) {
|
||||
for_each_available_child_of_node_scoped(np, tdm_np) {
|
||||
ret = of_property_read_u32(tdm_np, "reg", &tdm_id);
|
||||
if (ret) {
|
||||
dev_err(tsa->dev, "%pOF: failed to read reg\n", tdm_np);
|
||||
of_node_put(tdm_np);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -742,14 +738,12 @@ invalid_tdm:
|
||||
dev_err(tsa->dev,
|
||||
"%pOF: failed to read fsl,rx-frame-sync-delay-bits\n",
|
||||
tdm_np);
|
||||
of_node_put(tdm_np);
|
||||
return ret;
|
||||
}
|
||||
if (val > 3) {
|
||||
dev_err(tsa->dev,
|
||||
"%pOF: Invalid fsl,rx-frame-sync-delay-bits (%u)\n",
|
||||
tdm_np, val);
|
||||
of_node_put(tdm_np);
|
||||
return -EINVAL;
|
||||
}
|
||||
tdm->simode_tdm |= TSA_SIMODE_TDM_RFSD(val);
|
||||
@ -761,14 +755,12 @@ invalid_tdm:
|
||||
dev_err(tsa->dev,
|
||||
"%pOF: failed to read fsl,tx-frame-sync-delay-bits\n",
|
||||
tdm_np);
|
||||
of_node_put(tdm_np);
|
||||
return ret;
|
||||
}
|
||||
if (val > 3) {
|
||||
dev_err(tsa->dev,
|
||||
"%pOF: Invalid fsl,tx-frame-sync-delay-bits (%u)\n",
|
||||
tdm_np, val);
|
||||
of_node_put(tdm_np);
|
||||
return -EINVAL;
|
||||
}
|
||||
tdm->simode_tdm |= TSA_SIMODE_TDM_TFSD(val);
|
||||
@ -792,13 +784,11 @@ invalid_tdm:
|
||||
clk = of_clk_get_by_name(tdm_np, tsa_is_qe(tsa) ? "rsync" : "l1rsync");
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret) {
|
||||
clk_put(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
tdm->l1rsync_clk = clk;
|
||||
@ -806,13 +796,11 @@ invalid_tdm:
|
||||
clk = of_clk_get_by_name(tdm_np, tsa_is_qe(tsa) ? "rclk" : "l1rclk");
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret) {
|
||||
clk_put(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
tdm->l1rclk_clk = clk;
|
||||
@ -821,13 +809,11 @@ invalid_tdm:
|
||||
clk = of_clk_get_by_name(tdm_np, tsa_is_qe(tsa) ? "tsync" : "l1tsync");
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret) {
|
||||
clk_put(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
tdm->l1tsync_clk = clk;
|
||||
@ -835,13 +821,11 @@ invalid_tdm:
|
||||
clk = of_clk_get_by_name(tdm_np, tsa_is_qe(tsa) ? "tclk" : "l1tclk");
|
||||
if (IS_ERR(clk)) {
|
||||
ret = PTR_ERR(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
ret = clk_prepare_enable(clk);
|
||||
if (ret) {
|
||||
clk_put(clk);
|
||||
of_node_put(tdm_np);
|
||||
goto err;
|
||||
}
|
||||
tdm->l1tclk_clk = clk;
|
||||
@ -859,16 +843,12 @@ invalid_tdm:
|
||||
}
|
||||
|
||||
ret = tsa_of_parse_tdm_rx_route(tsa, tdm_np, tsa->tdms, tdm_id);
|
||||
if (ret) {
|
||||
of_node_put(tdm_np);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = tsa_of_parse_tdm_tx_route(tsa, tdm_np, tsa->tdms, tdm_id);
|
||||
if (ret) {
|
||||
of_node_put(tdm_np);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
tdm->is_enable = true;
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ static void copy_ippdexpcr1_setting(u32 val)
|
||||
return;
|
||||
|
||||
regs = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!regs)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user