ssp: mn: enable more N values in set_mclk_divider

According to spec, we can configure more devidier ratios via register
MDIVR, in 1/N the N could be 2, 3, 4, 5, 6, 7, 8.

Here change to enable these possibilities.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2020-12-16 16:47:58 +08:00 committed by Liam Girdwood
parent f5aa594e48
commit 6d75984f7b
1 changed files with 2 additions and 8 deletions

View File

@ -193,14 +193,8 @@ static inline int set_mclk_divider(uint16_t mclk_id, uint32_t mdivr_val)
case 1: case 1:
mdivr = 0x00000fff; /* bypass divider for MCLK */ mdivr = 0x00000fff; /* bypass divider for MCLK */
break; break;
case 2: case 2 ... 8:
mdivr = 0x0; /* 1/2 */ mdivr = mdivr_val - 2; /* 1/n */
break;
case 4:
mdivr = 0x2; /* 1/4 */
break;
case 8:
mdivr = 0x6; /* 1/8 */
break; break;
default: default:
tr_err(&mn_tr, "invalid mdivr_val %d", mdivr_val); tr_err(&mn_tr, "invalid mdivr_val %d", mdivr_val);