rtc: sh: assign correct interrupts with DT
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: dab5aec64b ("rtc: sh: add support for rza series")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250227134256.9167-11-wsa+renesas@sang-engineering.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
committed by
Alexandre Belloni
parent
0af2f6be1b
commit
8f2efdbc30
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user