Commit 4345f0dc015da045a775655e6afac66dbaa1f62d
Committed by
Tony Lindgren
1 parent
b603631443
bus: ti-sysc: rework the reset handling
If reset controllers are assigned to the ti-sysc target-module, only ti-sysc is going to be able to control these. Thus, remove all the disable_on_idle flag usage, and assert/de-assert the reset always in the idle path. Otherwise the reset signal will always just be de-asserted. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Showing 1 changed file with 5 additions and 20 deletions Side-by-side Diff
drivers/bus/ti-sysc.c
... | ... | @@ -94,7 +94,6 @@ |
94 | 94 | unsigned int enabled:1; |
95 | 95 | unsigned int needs_resume:1; |
96 | 96 | unsigned int child_needs_resume:1; |
97 | - unsigned int disable_on_idle:1; | |
98 | 97 | struct delayed_work idle_work; |
99 | 98 | void (*clk_enable_quirk)(struct sysc *sysc); |
100 | 99 | void (*clk_disable_quirk)(struct sysc *sysc); |
... | ... | @@ -1030,8 +1029,7 @@ |
1030 | 1029 | dev_err(dev, "%s: could not idle: %i\n", |
1031 | 1030 | __func__, error); |
1032 | 1031 | |
1033 | - if (ddata->disable_on_idle) | |
1034 | - reset_control_assert(ddata->rsts); | |
1032 | + reset_control_assert(ddata->rsts); | |
1035 | 1033 | |
1036 | 1034 | return 0; |
1037 | 1035 | } |
... | ... | @@ -1042,8 +1040,7 @@ |
1042 | 1040 | struct ti_sysc_platform_data *pdata; |
1043 | 1041 | int error; |
1044 | 1042 | |
1045 | - if (ddata->disable_on_idle) | |
1046 | - reset_control_deassert(ddata->rsts); | |
1043 | + reset_control_deassert(ddata->rsts); | |
1047 | 1044 | |
1048 | 1045 | pdata = dev_get_platdata(ddata->dev); |
1049 | 1046 | if (!pdata) |
... | ... | @@ -1090,8 +1087,7 @@ |
1090 | 1087 | ddata->enabled = false; |
1091 | 1088 | |
1092 | 1089 | err_allow_idle: |
1093 | - if (ddata->disable_on_idle) | |
1094 | - reset_control_assert(ddata->rsts); | |
1090 | + reset_control_assert(ddata->rsts); | |
1095 | 1091 | |
1096 | 1092 | sysc_clkdm_allow_idle(ddata); |
1097 | 1093 | |
... | ... | @@ -1111,8 +1107,7 @@ |
1111 | 1107 | |
1112 | 1108 | sysc_clkdm_deny_idle(ddata); |
1113 | 1109 | |
1114 | - if (ddata->disable_on_idle) | |
1115 | - reset_control_deassert(ddata->rsts); | |
1110 | + reset_control_deassert(ddata->rsts); | |
1116 | 1111 | |
1117 | 1112 | if (sysc_opt_clks_needed(ddata)) { |
1118 | 1113 | error = sysc_enable_opt_clocks(ddata); |
... | ... | @@ -1543,14 +1538,7 @@ |
1543 | 1538 | return error; |
1544 | 1539 | } |
1545 | 1540 | |
1546 | - error = reset_control_deassert(ddata->rsts); | |
1547 | - if (error == -EEXIST) | |
1548 | - return 0; | |
1549 | - | |
1550 | - error = readx_poll_timeout(reset_control_status, ddata->rsts, val, | |
1551 | - val == 0, 100, MAX_MODULE_SOFTRESET_WAIT); | |
1552 | - | |
1553 | - return error; | |
1541 | + return reset_control_deassert(ddata->rsts); | |
1554 | 1542 | } |
1555 | 1543 | |
1556 | 1544 | /* |
... | ... | @@ -2445,9 +2433,6 @@ |
2445 | 2433 | } else { |
2446 | 2434 | pm_runtime_put(&pdev->dev); |
2447 | 2435 | } |
2448 | - | |
2449 | - if (!of_get_available_child_count(ddata->dev->of_node)) | |
2450 | - ddata->disable_on_idle = true; | |
2451 | 2436 | |
2452 | 2437 | return 0; |
2453 | 2438 |