Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memory: stm32_omm: Fix req2ack update test

If "st,omm-req2ack-ns" property is found and its value is not 0,
the current test doesn't allow to compute and set req2ack value,
Fix this test.

Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20250807-upstream_omm_fix_req2ack_test_condition-v2-1-d7df4af2b48b@foss.st.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Patrice Chotard and committed by
Krzysztof Kozlowski
d140f3ba 8f5ae30d

+1 -1
+1 -1
drivers/memory/stm32_omm.c
··· 238 238 if (mux & CR_MUXEN) { 239 239 ret = of_property_read_u32(dev->of_node, "st,omm-req2ack-ns", 240 240 &req2ack); 241 - if (!ret && !req2ack) { 241 + if (!ret && req2ack) { 242 242 req2ack = DIV_ROUND_UP(req2ack, NSEC_PER_SEC / clk_rate_max) - 1; 243 243 244 244 if (req2ack > 256)