ram: renesas: dbsc5: Fix JS1 index calculation
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 16 Mar 2025 13:51:40 +0000 (14:51 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 16 Mar 2025 13:56:16 +0000 (14:56 +0100)
commit9a106f15fac20790c272023845ec10e46281bef2
tree02541fac1cb7a6e6c2fe964807d83a1cb3fcd56b
parent6c219e184f9efffed88dbd82dac94c24ebb00347
ram: renesas: dbsc5: Fix JS1 index calculation

The JS1 index is calculated correctly, but the limiter cannot
be the max() function because the index should be lower than
JS1_USABLEC_SPEC_HI and the max() function would unconditionally
override the JS1 index to JS1_USABLEC_SPEC_HI. Use clamp() to
limit the JS1 index instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/ram/renesas/dbsc5/dram.c