From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 772852EA175; Tue, 17 Jun 2025 16:42:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750178578; cv=none; b=oeYEuycs4qL2F2mYITMsB/qiIaeXG+8Z1zl/rbfUTapJmkpERAyNSdZ9LN8LhvpM3aCHkQBwf5FnaynOGU+5Yc2li+PBwxeOp1SMmwo3YKSSGxZigKL43eF4n8g85ZBnLL6MQdRvb8ZdWoENh0dQqG6T5Fle2nWx0RBIMEbZPRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750178578; c=relaxed/simple; bh=HxUZ4IBndGSX5KWMmy6SGCy8LKtG6sSPPaPHrja4Res=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YrdmnDdQwf+FdYEcyrvRj+7QMq7ND8lhZwjD+APS6UlEm1csj6C4ZOE3QFCsH0hQIEpfph8yXfc/i11mZIJxR7KNs8P21ri/mvpF3+Ge8NfUqch9ZBBc2aCb879mQJ8r2PgK1CbM6mpd7QMugHjAnjuZiaPWMO818rib1wTRnK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ESC6uXMW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ESC6uXMW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD53EC4CEE3; Tue, 17 Jun 2025 16:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750178578; bh=HxUZ4IBndGSX5KWMmy6SGCy8LKtG6sSPPaPHrja4Res=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESC6uXMWb3t23oo/GBndK5gUsGkhKhUVskpNYn/e8r5523dioiF3AU3CqBHO9cM4J sedWNAZe3BOAN/cQCnonXuPxLjYShYU8JzLk1NqV+4kcicM48RD3JNVWs8d3LkhJQJ p4KP/N0SwkmPE8jHLUIhllrFK9aYcXmiSqakJh28= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wolfram Sang , Alexandre Belloni , Sasha Levin Subject: [PATCH 6.15 490/780] rtc: sh: assign correct interrupts with DT Date: Tue, 17 Jun 2025 17:23:18 +0200 Message-ID: <20250617152511.439614142@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152451.485330293@linuxfoundation.org> References: <20250617152451.485330293@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wolfram Sang [ Upstream commit 8f2efdbc303fe7baa83843d3290dd6ea5ba3276c ] The DT bindings for this driver define the interrupts in the order as they are numbered in the interrupt controller. The old platform_data, however, listed them in a different order. So, for DT based platforms, they are mixed up. Assign them specifically for DT, so we can keep the bindings stable. After the fix, 'rtctest' passes again on the Renesas Genmai board (RZ-A1 / R7S72100). Fixes: dab5aec64bf5 ("rtc: sh: add support for rza series") Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250227134256.9167-11-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-sh.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 9ea40f40188f3..3409f57642248 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c @@ -485,9 +485,15 @@ static int __init sh_rtc_probe(struct platform_device *pdev) return -ENOENT; } - rtc->periodic_irq = ret; - rtc->carry_irq = platform_get_irq(pdev, 1); - rtc->alarm_irq = platform_get_irq(pdev, 2); + if (!pdev->dev.of_node) { + rtc->periodic_irq = ret; + rtc->carry_irq = platform_get_irq(pdev, 1); + rtc->alarm_irq = platform_get_irq(pdev, 2); + } else { + rtc->alarm_irq = ret; + rtc->periodic_irq = platform_get_irq(pdev, 1); + rtc->carry_irq = platform_get_irq(pdev, 2); + } res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (!res) -- 2.39.5