]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 9119/1: amba: Properly handle device probe without IRQ domain
authorWang Kefeng <wangkefeng.wang@huawei.com>
Mon, 23 Aug 2021 09:41:43 +0000 (10:41 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 19 Oct 2021 09:30:53 +0000 (10:30 +0100)
commit7db991d586a3636ad5e16c6c01203f1cce7a52c8
tree9f85eb6f9ff706cecfc7678d971661fbd0bcf844
parent07f7a3e53d483937f72d4cd5e52e26952f629e56
ARM: 9119/1: amba: Properly handle device probe without IRQ domain

of_amba_device_create() uses irq_of_parse_and_map() to translate
a DT interrupt specification into a Linux virtual interrupt number.

But it doesn't properly handle the case where the interrupt controller
is not yet available, eg, when pl011 interrupt is connected to MBIGEN
interrupt controller, because the mbigen initialization is too late,
which will lead to no IRQ due to no IRQ domain found, log is shown below,
  "irq: no irq domain found for uart0 !"

use of_irq_get() to return -EPROBE_DEFER as above, and in the function
amba_device_try_add()/amba_device_add(), it will properly handle in such
case, also return 0 in other fail cases to be consistent as before.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Reported-by: Ruizhe Lin <linruizhe@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
drivers/amba/bus.c
drivers/of/platform.c