All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
@ 2020-09-09  8:14 Priyanka Jain
  2020-09-09  8:27 ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: Priyanka Jain @ 2020-09-09  8:14 UTC (permalink / raw)
  To: u-boot

This is required to fix
"Error binding driver 'gic-v3': -96"
on lx2160a platforms.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
---
 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",
+};
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-09  8:14 [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER Priyanka Jain
@ 2020-09-09  8:27 ` Stefan Roese
  2020-09-09 17:15   ` Rayagonda Kokatanur
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2020-09-09  8:27 UTC (permalink / raw)
  To: u-boot

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 <priyanka.jain@nxp.com>
> ---
>   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?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-09  8:27 ` Stefan Roese
@ 2020-09-09 17:15   ` Rayagonda Kokatanur
  2020-09-10  5:23     ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: Rayagonda Kokatanur @ 2020-09-09 17:15 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Wed, Sep 9, 2020 at 1:57 PM Stefan Roese <sr@denx.de> 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 <priyanka.jain@nxp.com>
> > ---
> >   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.

Best regards,
Rayagonda


>
> Thanks,
> Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-09 17:15   ` Rayagonda Kokatanur
@ 2020-09-10  5:23     ` Stefan Roese
  2020-09-10  5:58       ` Rayagonda Kokatanur
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2020-09-10  5:23 UTC (permalink / raw)
  To: u-boot

Hi Rayagonda,

On 09.09.20 19:15, Rayagonda Kokatanur wrote:
> Hi Stefan,
> 
> On Wed, Sep 9, 2020 at 1:57 PM Stefan Roese <sr@denx.de> 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 <priyanka.jain@nxp.com>
>>> ---
>>>    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"?

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?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-10  5:23     ` Stefan Roese
@ 2020-09-10  5:58       ` Rayagonda Kokatanur
  2020-09-10  7:46         ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: Rayagonda Kokatanur @ 2020-09-10  5:58 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Sep 10, 2020 at 10:53 AM Stefan Roese <sr@denx.de> 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 <sr@denx.de> 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 <priyanka.jain@nxp.com>
> >>> ---
> >>>    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.
Please let me know if anything more is required or if this patch is
the not right way to address the issue.

Thank,
Rayagonda


>
> Thanks,
> Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-10  5:58       ` Rayagonda Kokatanur
@ 2020-09-10  7:46         ` Stefan Roese
  2020-09-10  8:13           ` Rayagonda Kokatanur
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2020-09-10  7:46 UTC (permalink / raw)
  To: u-boot

On 10.09.20 07:58, Rayagonda Kokatanur wrote:
> Hi Stefan,
> 
> On Thu, Sep 10, 2020 at 10:53 AM Stefan Roese <sr@denx.de> 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 <sr@denx.de> 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 <priyanka.jain@nxp.com>
>>>>> ---
>>>>>     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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER
  2020-09-10  7:46         ` Stefan Roese
@ 2020-09-10  8:13           ` Rayagonda Kokatanur
  0 siblings, 0 replies; 7+ messages in thread
From: Rayagonda Kokatanur @ 2020-09-10  8:13 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Sep 10, 2020, 1:16 PM Stefan Roese <sr@denx.de> wrote:

> On 10.09.20 07:58, Rayagonda Kokatanur wrote:
> > Hi Stefan,
> >
> > On Thu, Sep 10, 2020 at 10:53 AM Stefan Roese <sr@denx.de> 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 <sr@denx.de> 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 <priyanka.jain@nxp.com>
> >>>>> ---
> >>>>>     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.
>

Please add dt node which defines "gic-lpi-base" and other details.
@Priyanka Jain <priyanka.jain@nxp.com>  - can you please provide dt node
added for your platform lx2160a.

For ex -

gic_lpi_base: syscon at 0x8ad70000 {
    compatible = "gic-lpi-base";
    reg = <0x0 0x8ad70000 0x0 0x90000>;
    max-gic-redistributors = <8>;
};

scr {
    compatible = "simple-bus";
    #address-cells = <1>;
    #size-cells = <1>;
    ranges = <0x0 0x0 0x61000000 0x05000000>;

    gic: interrupt-controller at 2c00000 {
        compatible = "arm,gic-v3";
        #interrupt-cells = <3>;
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        interrupt-controller;
        reg = <0x02c00000 0x010000>, /* GICD */
                 <0x02e00000 0x600000>; /* GICR */
        regmap = <&gic_lpi_base>;

        gic_its: gic-its at 63c20000 {
            compatible = "arm,gic-v3-its";
            msi-controller;
            #msi-cells = <1>;
            reg = <0x02c20000 0x10000>;
        };
    };
};

Best regards,
Rayagonda


> Thanks,
> Stefan
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-10  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09  8:14 [PATCH] arm: gic-v3-its: Add irq UCLASS_DRIVER Priyanka Jain
2020-09-09  8:27 ` Stefan Roese
2020-09-09 17:15   ` Rayagonda Kokatanur
2020-09-10  5:23     ` Stefan Roese
2020-09-10  5:58       ` Rayagonda Kokatanur
2020-09-10  7:46         ` Stefan Roese
2020-09-10  8:13           ` Rayagonda Kokatanur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.