aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-tiehrpwm.c
diff options
context:
space:
mode:
authorCooper Jr., Franklin <fcooper@ti.com>2016-03-07 14:33:56 -0500
committerThierry Reding <thierry.reding@gmail.com>2016-07-11 06:07:18 -0400
commitcc37655e6bbf83ded1e4d1d7ffd977786a845a67 (patch)
tree2edeb564a96d7694122764fa745546a4519465af /drivers/pwm/pwm-tiehrpwm.c
parentae5200d2271691b28aff8d0409fbefd4644ff507 (diff)
pwm: pwm-ti*: Remove support for local clock gating
The PWMSS local clock gating registers have no real purpose on OMAP ARM devices. These registers were left over registers from DSP IP where the PRCM doesn't exist. There is a silicon bug where gating and ungating clocks don't function properly. TRMs will be update to indicate that these registers shouldn't be touched. Therefore, all code that accesses the PWMSS_CLKCONFIG or PWMSS_CLKSTATUS will be removed by this patch with zero loss of functionality by the ECAP and EPWM drivers. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-tiehrpwm.c')
-rw-r--r--drivers/pwm/pwm-tiehrpwm.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index c791720d27b0..b5c6b0636893 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -27,8 +27,6 @@
27#include <linux/pm_runtime.h> 27#include <linux/pm_runtime.h>
28#include <linux/of_device.h> 28#include <linux/of_device.h>
29 29
30#include "pwm-tipwmss.h"
31
32/* EHRPWM registers and bits definitions */ 30/* EHRPWM registers and bits definitions */
33 31
34/* Time base module registers */ 32/* Time base module registers */
@@ -439,7 +437,6 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
439 struct resource *r; 437 struct resource *r;
440 struct clk *clk; 438 struct clk *clk;
441 struct ehrpwm_pwm_chip *pc; 439 struct ehrpwm_pwm_chip *pc;
442 u16 status;
443 440
444 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); 441 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
445 if (!pc) 442 if (!pc)
@@ -496,27 +493,9 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
496 } 493 }
497 494
498 pm_runtime_enable(&pdev->dev); 495 pm_runtime_enable(&pdev->dev);
499 pm_runtime_get_sync(&pdev->dev);
500
501 status = pwmss_submodule_state_change(pdev->dev.parent,
502 PWMSS_EPWMCLK_EN);
503 if (!(status & PWMSS_EPWMCLK_EN_ACK)) {
504 dev_err(&pdev->dev, "PWMSS config space clock enable failed\n");
505 ret = -EINVAL;
506 goto pwmss_clk_failure;
507 }
508
509 pm_runtime_put_sync(&pdev->dev);
510 496
511 platform_set_drvdata(pdev, pc); 497 platform_set_drvdata(pdev, pc);
512 return 0; 498 return 0;
513
514pwmss_clk_failure:
515 pm_runtime_put_sync(&pdev->dev);
516 pm_runtime_disable(&pdev->dev);
517 pwmchip_remove(&pc->chip);
518 clk_unprepare(pc->tbclk);
519 return ret;
520} 499}
521 500
522static int ehrpwm_pwm_remove(struct platform_device *pdev) 501static int ehrpwm_pwm_remove(struct platform_device *pdev)
@@ -525,14 +504,6 @@ static int ehrpwm_pwm_remove(struct platform_device *pdev)
525 504
526 clk_unprepare(pc->tbclk); 505 clk_unprepare(pc->tbclk);
527 506
528 pm_runtime_get_sync(&pdev->dev);
529 /*
530 * Due to hardware misbehaviour, acknowledge of the stop_req
531 * is missing. Hence checking of the status bit skipped.
532 */
533 pwmss_submodule_state_change(pdev->dev.parent, PWMSS_EPWMCLK_STOP_REQ);
534 pm_runtime_put_sync(&pdev->dev);
535
536 pm_runtime_put_sync(&pdev->dev); 507 pm_runtime_put_sync(&pdev->dev);
537 pm_runtime_disable(&pdev->dev); 508 pm_runtime_disable(&pdev->dev);
538 return pwmchip_remove(&pc->chip); 509 return pwmchip_remove(&pc->chip);