From: Stefan Roese Date: Thu, 10 Sep 2020 09:46:27 +0200 Subject: [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER In-Reply-To: References: <20200909081444.2573-1-priyanka.jain@nxp.com> <1a0dcdb5-fbd1-f56e-8f70-713537b8d243@denx.de> Message-ID: <11a9b43c-bf4c-01b4-e42b-a614426188a1@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10.09.20 07:58, Rayagonda Kokatanur wrote: > Hi Stefan, > > On Thu, Sep 10, 2020 at 10:53 AM Stefan Roese wrote: >> >> Hi Rayagonda, >> >> On 09.09.20 19:15, Rayagonda Kokatanur wrote: >>> Hi Stefan, >>> >>> On Wed, Sep 9, 2020 at 1:57 PM Stefan Roese wrote: >>>> >>>> On 09.09.20 10:14, Priyanka Jain wrote: >>>>> This is required to fix >>>>> "Error binding driver 'gic-v3': -96" >>>>> on lx2160a platforms. >>>>> >>>>> Signed-off-by: Priyanka Jain >>>>> --- >>>>> arch/arm/lib/gic-v3-its.c | 5 +++++ >>>>> 1 file changed, 5 insertions(+) >>>>> >>>>> diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c >>>>> index a1657e3853..6c6b7c430c 100644 >>>>> --- a/arch/arm/lib/gic-v3-its.c >>>>> +++ b/arch/arm/lib/gic-v3-its.c >>>>> @@ -208,3 +208,8 @@ U_BOOT_DRIVER(gic_lpi_syscon) = { >>>>> .id = UCLASS_SYSCON, >>>>> .of_match = gic_lpi_syscon_ids, >>>>> }; >>>>> + >>>>> +UCLASS_DRIVER(irq) = { >>>>> + .id = UCLASS_IRQ, >>>>> + .name = "irq", >>>>> +}; >>>> >>>> I tested this on LX2160 and get this error when booting into Linux: >>>> >>>> Loading Device Tree to 000000009fff6000, end 000000009fffff3e ... OK >>>> gic_v3_its_get_gic_lpi_addr: failed to get gic-lpi-base syscon device >>>> >>>> Starting kernel ... >>>> >>>> [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] >>>> >>>> I did not look closely yet. Any idea whats going wrong here? >>> >>> I added the following patch to use UCLASS_SYSCON to get gic lpi details. >>> >>> commit id - 2ae7adc659f7fca9ea65df4318e5bca2b8274310 >>> >>> because the above commit is failing, hence we need this patch. >>> When I tested this I didn't face any issue hence didn't push the above change. >>> In my case it was failing only in the lower uboot version without this patch. >> >> What's the "lower uboot version"? > > U-Boot 2020.01 version. > >> >> In any case, it's failing now on the lx2160, since no SYSCON device is >> found: >> >> $ git grep "gic-lpi-base" >> arch/arm/lib/gic-v3-its.c: { .compatible = "gic-lpi-base" }, >> arch/arm/lib/gic-v3-its.c: .name = "gic-lpi-base", >> >> So no device is providing this compatible in the dts anywhere. Or am I >> missing something? > > If you apply this patch it will work. This patch is already applied. > Please let me know if anything more is required or if this patch is > the not right way to address the issue. Again, its not working, as no device is providing "gic-lpi-base" AFICT. Thanks, Stefan