clk: imx7d: Add PLL_AUDIO_TEST_DIV/POST_DIV clocks
authorFabio Estevam <fabio.estevam@nxp.com>
Tue, 30 Aug 2016 17:34:01 +0000 (14:34 -0300)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 30 Aug 2016 21:58:15 +0000 (14:58 -0700)
commit54fe0791fa0dbe075f6465860bdd38a4b4e6e59c
tree869e1eeef2941d71d24fb74ceaa0f5816b990c78
parent3174b0c9a62bb3738b4a2a506b8a075d4430e353
clk: imx7d: Add PLL_AUDIO_TEST_DIV/POST_DIV clocks

Currently we see the following error when using the SAI audio
driver on mx7:

Division by zero in kernel.
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc3-next-20160823
Hardware name: Freescale i.MX7 Dual (Device Tree)
Backtrace:
[<c010b70c>] (dump_backtrace) from [<c010b8a8>] (show_stack+0x18)
r6:60000013 r5:ffffffff r4:00000000 r3:00000000
[<c010b890>] (show_stack) from [<c03e9324>] (dump_stack+0xb0/0xe)
[<c03e9274>] (dump_stack) from [<c010b578>] (__div0+0x18/0x20)
r8:00000000 r7:ffffffff r6:ffffffff r5:00000000 r4:00000000 r3:0
[<c010b560>] (__div0) from [<c03e795c>] (Ldiv0_64+0x8/0x18)
[<c06cd860>] (divider_get_val) from [<c06cda28>] (clk_divider_se)

This error happens due to the lack of definition of the
IMX7D_PLL_AUDIO_TEST_DIV/IMX7D_PLL_AUDIO_POST_DIV clocks.

Add support for them.

Tested on a imx7s-warp board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/imx/clk-imx7d.c