pwm: imx: Add ipg clock operation
authorAnson Huang <anson.huang@nxp.com>
Wed, 19 Dec 2018 05:24:58 +0000 (05:24 +0000)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 24 Dec 2018 11:06:56 +0000 (12:06 +0100)
commit9f4c8f9607c3147d291b70c13dd01c738ed41faf
tree6fc107417a425b3a0f55f516ee12c0017daa2198
parentf236d188683667274824de662d124720198730b7
pwm: imx: Add ipg clock operation

i.MX PWM module's ipg_clk_s is for PWM register access, on most of i.MX
SoCs, this ipg_clk_s is from system ipg clock or perclk which is always
enabled, but on i.MX7D, the ipg_clk_s is from PWM1_CLK_ROOT which is
controlled by CCGR132, that means the CCGR132 MUST be enabled first
before accessing PWM registers on i.MX7D. This patch adds ipg clock
operation to make sure register access successfully on i.MX7D and it
fixes Linux kernel boot up hang during PWM driver probe.

Fixes: 4a23e6ee9f69 ("ARM: dts: imx7d-sdb: Restore pwm backlight support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-imx.c