]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
memory: stm32_omm: Fix req2ack update test
authorPatrice Chotard <patrice.chotard@foss.st.com>
Thu, 7 Aug 2025 07:34:09 +0000 (09:34 +0200)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 11 Aug 2025 12:53:13 +0000 (14:53 +0200)
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>
drivers/memory/stm32_omm.c

index bee2ecc8c2b9636aca334e7c05cf59fb6c991142..5d06623f3f689903ad81ac3f4cdd04d8d0284ee6 100644 (file)
@@ -238,7 +238,7 @@ static int stm32_omm_configure(struct device *dev)
                if (mux & CR_MUXEN) {
                        ret = of_property_read_u32(dev->of_node, "st,omm-req2ack-ns",
                                                   &req2ack);
-                       if (!ret && !req2ack) {
+                       if (!ret && req2ack) {
                                req2ack = DIV_ROUND_UP(req2ack, NSEC_PER_SEC / clk_rate_max) - 1;
 
                                if (req2ack > 256)