diff mbox series

Revert "riscv: cpu: fu740: clear feature disable CSR"

Message ID 20210510090816.2061533-1-bmeng.cn@gmail.com
State Accepted
Commit ffdc71bc0977c1e6b7b6e6a5a005e1f77213bf21
Delegated to: Andes
Headers show
Series Revert "riscv: cpu: fu740: clear feature disable CSR" | expand

Commit Message

Bin Meng May 10, 2021, 9:08 a.m. UTC
This reverts commit bc8bbb77f74f21582b3bfd790334397757f88575.

This commit breaks U-Boot booting on SiFive Unleashed board, as
there is no such CSR on U54 core.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/riscv/cpu/fu540/spl.c | 15 ---------------
 1 file changed, 15 deletions(-)

Comments

Leo Liang May 12, 2021, 6:39 a.m. UTC | #1
On Mon, May 10, 2021 at 05:08:16PM +0800, Bin Meng wrote:
> This reverts commit bc8bbb77f74f21582b3bfd790334397757f88575.
> 
> This commit breaks U-Boot booting on SiFive Unleashed board, as
> there is no such CSR on U54 core.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
> 
>  arch/riscv/cpu/fu540/spl.c | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git a/arch/riscv/cpu/fu540/spl.c b/arch/riscv/cpu/fu540/spl.c
> index 1740ef98b6..45657b7909 100644
> --- a/arch/riscv/cpu/fu540/spl.c
> +++ b/arch/riscv/cpu/fu540/spl.c
> @@ -6,9 +6,6 @@
>  
>  #include <dm.h>
>  #include <log.h>
> -#include <asm/csr.h>
> -
> -#define CSR_U74_FEATURE_DISABLE	0x7c1
>  
>  int spl_soc_init(void)
>  {
> @@ -24,15 +21,3 @@ int spl_soc_init(void)
>  
>  	return 0;
>  }
> -
> -void harts_early_init(void)
> -{
> -	/*
> -	 * Feature Disable CSR
> -	 *
> -	 * Clear feature disable CSR to '0' to turn on all features for
> -	 * each core. This operation must be in M-mode.
> -	 */
> -	if (CONFIG_IS_ENABLED(RISCV_MMODE))
> -		csr_write(CSR_U74_FEATURE_DISABLE, 0);
> -}
> -- 
> 2.25.1
>

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Bin Meng May 12, 2021, 1:01 p.m. UTC | #2
Hi Green,

On Mon, May 10, 2021 at 5:08 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> This reverts commit bc8bbb77f74f21582b3bfd790334397757f88575.
>
> This commit breaks U-Boot booting on SiFive Unleashed board, as
> there is no such CSR on U54 core.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/riscv/cpu/fu540/spl.c | 15 ---------------
>  1 file changed, 15 deletions(-)
>

Please note you need to add the changes in the arch/riscv/cpu/fu740 directory.

Regards,
Bin
Green Wan May 12, 2021, 3:13 p.m. UTC | #3
Yes, noted. This patch should be applied based on the fu740 port. Thanks
for the reminder.

- Green

On Wed, May 12, 2021 at 9:01 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> Hi Green,
>
> On Mon, May 10, 2021 at 5:08 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > This reverts commit bc8bbb77f74f21582b3bfd790334397757f88575.
> >
> > This commit breaks U-Boot booting on SiFive Unleashed board, as
> > there is no such CSR on U54 core.
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> >  arch/riscv/cpu/fu540/spl.c | 15 ---------------
> >  1 file changed, 15 deletions(-)
> >
>
> Please note you need to add the changes in the arch/riscv/cpu/fu740
> directory.
>
> Regards,
> Bin
>
Bin Meng May 12, 2021, 3:28 p.m. UTC | #4
Hi Green,

On Wed, May 12, 2021 at 11:13 PM Green Wan <green.wan@sifive.com> wrote:
>
> Yes, noted. This patch should be applied based on the fu740 port. Thanks for the reminder.
>

Just to clarify, the reverted patch *content* should be in your fu740
support series.

@Rick, this revert patch itself should be applied in u-boot/master
now, as the mainline U-Boot does not boot on the Unleashed board.

Regards,
Bin
Green Wan May 14, 2021, 3:45 a.m. UTC | #5
Hi Bin,

Thanks, I'll include that revert. Just traced back the git log. My original
patch is based on fu740. I guess it was merged to fu540 since fu740 series
wasn't present yet.

Hi Rick,

Not sure whether you'll pick fu740 series soon or if any parts need more
revisement. Do you prefer that I append both this revert and "disable CSR"
patch to fu740&unmatched patch series? If so, I will create v9 patch and
include these 2 patches.

Or if you prefer to keep them separate from fu740 series, we can wait for
fu740&unmatche patch merge and I'll create a separate patch for this revert
and CSR disable.

What do you think? Many thanks.

Regards,
- Green

On Wed, May 12, 2021 at 11:28 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> Hi Green,
>
> On Wed, May 12, 2021 at 11:13 PM Green Wan <green.wan@sifive.com> wrote:
> >
> > Yes, noted. This patch should be applied based on the fu740 port. Thanks
> for the reminder.
> >
>
> Just to clarify, the reverted patch *content* should be in your fu740
> support series.
>
> @Rick, this revert patch itself should be applied in u-boot/master
> now, as the mainline U-Boot does not boot on the Unleashed board.
>
> Regards,
> Bin
>
Bin Meng May 14, 2021, 3:50 a.m. UTC | #6
On Fri, May 14, 2021 at 11:45 AM Green Wan <green.wan@sifive.com> wrote:
>
> Hi Bin,
>
> Thanks, I'll include that revert. Just traced back the git log. My original patch is based on fu740. I guess it was merged to fu540 since fu740 series wasn't present yet.
>
> Hi Rick,
>
> Not sure whether you'll pick fu740 series soon or if any parts need more revisement. Do you prefer that I append both this revert and "disable CSR" patch to fu740&unmatched patch series? If so, I will create v9 patch and include these 2 patches.
>
> Or if you prefer to keep them separate from fu740 series, we can wait for fu740&unmatche patch merge and I'll create a separate patch for this revert and CSR disable.
>
> What do you think? Many thanks.
>

There are multiple breakages in current u-boot/master for SiFive
Unleashed board.

We'd better apply them as soon as possible.

Regards,
Bin
Rick Chen May 14, 2021, 5:31 a.m. UTC | #7
> From: Bin Meng <bmeng.cn@gmail.com>
> Sent: Friday, May 14, 2021 11:50 AM
> To: Green Wan <green.wan@sifive.com>
> Cc: Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Sean Anderson <seanga2@gmail.com>; U-Boot Mailing List <u-boot@lists.denx.de>
> Subject: Re: [PATCH] Revert "riscv: cpu: fu740: clear feature disable CSR"
>
> On Fri, May 14, 2021 at 11:45 AM Green Wan <green.wan@sifive.com> wrote:
> >
> > Hi Bin,
> >
> > Thanks, I'll include that revert. Just traced back the git log. My original patch is based on fu740. I guess it was merged to fu540 since fu740 series wasn't present yet.
> >
> > Hi Rick,
> >
> > Not sure whether you'll pick fu740 series soon or if any parts need more revisement. Do you prefer that I append both this revert and "disable CSR" patch to fu740&unmatched patch series? If so, I will create v9 patch and include these 2 patches.
> >
> > Or if you prefer to keep them separate from fu740 series, we can wait for fu740&unmatche patch merge and I'll create a separate patch for this revert and CSR disable.
> >
> > What do you think? Many thanks.
> >
>
> There are multiple breakages in current u-boot/master for SiFive Unleashed board.
>
> We'd better apply them as soon as possible.

OK

Leo will help to apply it ASAP.

Thanks,
Rick

>
> Regards,
> Bin
Leo Liang May 18, 2021, 7:38 a.m. UTC | #8
On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> Hi Bin,
> 
> Thanks, I'll include that revert. Just traced back the git log. My original
> patch is based on fu740. I guess it was merged to fu540 since fu740 series
> wasn't present yet.
> 
> Hi Rick,
> 
> Not sure whether you'll pick fu740 series soon or if any parts need more
> revisement. Do you prefer that I append both this revert and "disable CSR"
> patch to fu740&unmatched patch series? If so, I will create v9 patch and
> include these 2 patches.
> 
> Or if you prefer to keep them separate from fu740 series, we can wait for
> fu740&unmatche patch merge and I'll create a separate patch for this revert
> and CSR disable.
> 
> What do you think? Many thanks.
> 
> Regards,
> - Green
>

Hi Green,

Could you please append the "disable CSR" patch to fu740 unmatched patch
and send a v9 patch ? Thanks!

Best regards,
Leo

> On Wed, May 12, 2021 at 11:28 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> 
> > Hi Green,
> >
> > On Wed, May 12, 2021 at 11:13 PM Green Wan <green.wan@sifive.com> wrote:
> > >
> > > Yes, noted. This patch should be applied based on the fu740 port. Thanks
> > for the reminder.
> > >
> >
> > Just to clarify, the reverted patch *content* should be in your fu740
> > support series.
> >
> > @Rick, this revert patch itself should be applied in u-boot/master
> > now, as the mainline U-Boot does not boot on the Unleashed board.
> >
> > Regards,
> > Bin
> >
Bin Meng May 18, 2021, 7:45 a.m. UTC | #9
Hi Green,

On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com> wrote:
>
> On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> > Hi Bin,
> >
> > Thanks, I'll include that revert. Just traced back the git log. My original
> > patch is based on fu740. I guess it was merged to fu540 since fu740 series
> > wasn't present yet.
> >
> > Hi Rick,
> >
> > Not sure whether you'll pick fu740 series soon or if any parts need more
> > revisement. Do you prefer that I append both this revert and "disable CSR"
> > patch to fu740&unmatched patch series? If so, I will create v9 patch and
> > include these 2 patches.
> >
> > Or if you prefer to keep them separate from fu740 series, we can wait for
> > fu740&unmatche patch merge and I'll create a separate patch for this revert
> > and CSR disable.
> >
> > What do you think? Many thanks.
> >
> > Regards,
> > - Green
> >
>
> Hi Green,
>
> Could you please append the "disable CSR" patch to fu740 unmatched patch
> and send a v9 patch ? Thanks!
>

I think you will need some update per this patch as well:
http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/

Hi Leo,

What's your plan for the binman patch series?

If the binman patch series go first, Green needs to update Unmatched
to use binman as well.

Regards,
Bin
Green Wan May 18, 2021, 8:10 a.m. UTC | #10
Leo Liang <ycliang@andestech.com>於 2021年5月18日 週二,下午3:38寫道:

> On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> > Hi Bin,
> >
> > Thanks, I'll include that revert. Just traced back the git log. My
> original
> > patch is based on fu740. I guess it was merged to fu540 since fu740
> series
> > wasn't present yet.
> >
> > Hi Rick,
> >
> > Not sure whether you'll pick fu740 series soon or if any parts need more
> > revisement. Do you prefer that I append both this revert and "disable
> CSR"
> > patch to fu740&unmatched patch series? If so, I will create v9 patch and
> > include these 2 patches.
> >
> > Or if you prefer to keep them separate from fu740 series, we can wait for
> > fu740&unmatche patch merge and I'll create a separate patch for this
> revert
> > and CSR disable.
> >
> > What do you think? Many thanks.
> >
> > Regards,
> > - Green
> >
>
> Hi Green,
>
> Could you please append the "disable CSR" patch to fu740 unmatched patch
> and send a v9 patch ? Thanks!
>
> Best regards,
> Leo
>

Sure, I think I can do it by today.


> > On Wed, May 12, 2021 at 11:28 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > > Hi Green,
> > >
> > > On Wed, May 12, 2021 at 11:13 PM Green Wan <green.wan@sifive.com>
> wrote:
> > > >
> > > > Yes, noted. This patch should be applied based on the fu740 port.
> Thanks
> > > for the reminder.
> > > >
> > >
> > > Just to clarify, the reverted patch *content* should be in your fu740
> > > support series.
> > >
> > > @Rick, this revert patch itself should be applied in u-boot/master
> > > now, as the mainline U-Boot does not boot on the Unleashed board.
> > >
> > > Regards,
> > > Bin
> > >
>
Green Wan May 18, 2021, 9:43 a.m. UTC | #11
On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> Hi Green,
>
> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com> wrote:
> >
> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> > > Hi Bin,
> > >
> > > Thanks, I'll include that revert. Just traced back the git log. My
> original
> > > patch is based on fu740. I guess it was merged to fu540 since fu740
> series
> > > wasn't present yet.
> > >
> > > Hi Rick,
> > >
> > > Not sure whether you'll pick fu740 series soon or if any parts need
> more
> > > revisement. Do you prefer that I append both this revert and "disable
> CSR"
> > > patch to fu740&unmatched patch series? If so, I will create v9 patch
> and
> > > include these 2 patches.
> > >
> > > Or if you prefer to keep them separate from fu740 series, we can wait
> for
> > > fu740&unmatche patch merge and I'll create a separate patch for this
> revert
> > > and CSR disable.
> > >
> > > What do you think? Many thanks.
> > >
> > > Regards,
> > > - Green
> > >
> >
> > Hi Green,
> >
> > Could you please append the "disable CSR" patch to fu740 unmatched patch
> > and send a v9 patch ? Thanks!
> >
>
> I think you will need some update per this patch as well:
>
> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/


Hi Bin
I updated the change to [patch v9 1/8]. Thanks,


>
>
> Hi Leo,
>
> What's your plan for the binman patch series?
>
> If the binman patch series go first, Green needs to update Unmatched
> to use binman as well.
>

Hi Leo/Bin,

Are we referring to
https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
I'd prefer to have a separated patch work to track binman changes. Thanks,

Regards,
- Green


>
> Regards,
> Bin
>
Bin Meng May 18, 2021, 9:56 a.m. UTC | #12
Hi Green,

On Tue, May 18, 2021 at 5:43 PM Green Wan <green.wan@sifive.com> wrote:
>
>
>
> On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>
>> Hi Green,
>>
>> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com> wrote:
>> >
>> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
>> > > Hi Bin,
>> > >
>> > > Thanks, I'll include that revert. Just traced back the git log. My original
>> > > patch is based on fu740. I guess it was merged to fu540 since fu740 series
>> > > wasn't present yet.
>> > >
>> > > Hi Rick,
>> > >
>> > > Not sure whether you'll pick fu740 series soon or if any parts need more
>> > > revisement. Do you prefer that I append both this revert and "disable CSR"
>> > > patch to fu740&unmatched patch series? If so, I will create v9 patch and
>> > > include these 2 patches.
>> > >
>> > > Or if you prefer to keep them separate from fu740 series, we can wait for
>> > > fu740&unmatche patch merge and I'll create a separate patch for this revert
>> > > and CSR disable.
>> > >
>> > > What do you think? Many thanks.
>> > >
>> > > Regards,
>> > > - Green
>> > >
>> >
>> > Hi Green,
>> >
>> > Could you please append the "disable CSR" patch to fu740 unmatched patch
>> > and send a v9 patch ? Thanks!
>> >
>>
>> I think you will need some update per this patch as well:
>> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
>
>
> Hi Bin
> I updated the change to [patch v9 1/8]. Thanks,
>
>>
>>
>>
>> Hi Leo,
>>
>> What's your plan for the binman patch series?
>>
>> If the binman patch series go first, Green needs to update Unmatched
>> to use binman as well.
>
>
> Hi Leo/Bin,
>
> Are we referring to https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?

This one: http://patchwork.ozlabs.org/project/uboot/list/?series=242992

> I'd prefer to have a separated patch work to track binman changes. Thanks,

Actually that's why I asked Leo the plan. If your patch go before my
patch, then I will need to do an additional patch to convert
unmatched.

But if mine go first before yours, you will have to respin another
version to do the convert in the first place.

Leo, please let us know your plan.

Regards,
Bin
Leo Liang May 18, 2021, 11:59 a.m. UTC | #13
On Tue, May 18, 2021 at 05:56:08PM +0800, Bin Meng wrote:
> Hi Green,
> 
> On Tue, May 18, 2021 at 5:43 PM Green Wan <green.wan@sifive.com> wrote:
> >
> >
> >
> > On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >>
> >> Hi Green,
> >>
> >> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com> wrote:
> >> >
> >> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> >> > > Hi Bin,
> >> > >
> >> > > Thanks, I'll include that revert. Just traced back the git log. My original
> >> > > patch is based on fu740. I guess it was merged to fu540 since fu740 series
> >> > > wasn't present yet.
> >> > >
> >> > > Hi Rick,
> >> > >
> >> > > Not sure whether you'll pick fu740 series soon or if any parts need more
> >> > > revisement. Do you prefer that I append both this revert and "disable CSR"
> >> > > patch to fu740&unmatched patch series? If so, I will create v9 patch and
> >> > > include these 2 patches.
> >> > >
> >> > > Or if you prefer to keep them separate from fu740 series, we can wait for
> >> > > fu740&unmatche patch merge and I'll create a separate patch for this revert
> >> > > and CSR disable.
> >> > >
> >> > > What do you think? Many thanks.
> >> > >
> >> > > Regards,
> >> > > - Green
> >> > >
> >> >
> >> > Hi Green,
> >> >
> >> > Could you please append the "disable CSR" patch to fu740 unmatched patch
> >> > and send a v9 patch ? Thanks!
> >> >
> >>
> >> I think you will need some update per this patch as well:
> >> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
> >
> >
> > Hi Bin
> > I updated the change to [patch v9 1/8]. Thanks,
> >
> >>
> >>
> >>
> >> Hi Leo,
> >>
> >> What's your plan for the binman patch series?
> >>
> >> If the binman patch series go first, Green needs to update Unmatched
> >> to use binman as well.
> >
> >
> > Hi Leo/Bin,
> >
> > Are we referring to https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
> 
> This one: http://patchwork.ozlabs.org/project/uboot/list/?series=242992
> 
> > I'd prefer to have a separated patch work to track binman changes. Thanks,
> 
> Actually that's why I asked Leo the plan. If your patch go before my
> patch, then I will need to do an additional patch to convert
> unmatched.
> 
> But if mine go first before yours, you will have to respin another
> version to do the convert in the first place.
> 
> Leo, please let us know your plan.
> 

Hi Bin/Green,

I was thinking picking Bin's patch first,
because Green's patch could not pass CI.
(Due to some format warning being treated as error 
when compiling drivers/pci/pcie_dw_common.c)

At the meantime, we should come up with some fixes to pass CI.
Then Green could send his patch with binman,
or a seperate patch to track binman utility.

What do you guys think?

Best regards,
Leo


> Regards,
> Bin
Green Wan May 18, 2021, 1:12 p.m. UTC | #14
As I mentioned before, pcie_dw_common.c is not part of fu740 patch. The
error is actually nothing to do with fu740 patchset. Even I fix those
warning message. It will not be in same patch series.

- Green

Leo Liang <ycliang@andestech.com>於 2021年5月18日 週二,下午8:00寫道:

> On Tue, May 18, 2021 at 05:56:08PM +0800, Bin Meng wrote:
> > Hi Green,
> >
> > On Tue, May 18, 2021 at 5:43 PM Green Wan <green.wan@sifive.com> wrote:
> > >
> > >
> > >
> > > On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > >>
> > >> Hi Green,
> > >>
> > >> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com>
> wrote:
> > >> >
> > >> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
> > >> > > Hi Bin,
> > >> > >
> > >> > > Thanks, I'll include that revert. Just traced back the git log.
> My original
> > >> > > patch is based on fu740. I guess it was merged to fu540 since
> fu740 series
> > >> > > wasn't present yet.
> > >> > >
> > >> > > Hi Rick,
> > >> > >
> > >> > > Not sure whether you'll pick fu740 series soon or if any parts
> need more
> > >> > > revisement. Do you prefer that I append both this revert and
> "disable CSR"
> > >> > > patch to fu740&unmatched patch series? If so, I will create v9
> patch and
> > >> > > include these 2 patches.
> > >> > >
> > >> > > Or if you prefer to keep them separate from fu740 series, we can
> wait for
> > >> > > fu740&unmatche patch merge and I'll create a separate patch for
> this revert
> > >> > > and CSR disable.
> > >> > >
> > >> > > What do you think? Many thanks.
> > >> > >
> > >> > > Regards,
> > >> > > - Green
> > >> > >
> > >> >
> > >> > Hi Green,
> > >> >
> > >> > Could you please append the "disable CSR" patch to fu740 unmatched
> patch
> > >> > and send a v9 patch ? Thanks!
> > >> >
> > >>
> > >> I think you will need some update per this patch as well:
> > >>
> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
> > >
> > >
> > > Hi Bin
> > > I updated the change to [patch v9 1/8]. Thanks,
> > >
> > >>
> > >>
> > >>
> > >> Hi Leo,
> > >>
> > >> What's your plan for the binman patch series?
> > >>
> > >> If the binman patch series go first, Green needs to update Unmatched
> > >> to use binman as well.
> > >
> > >
> > > Hi Leo/Bin,
> > >
> > > Are we referring to
> https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
> >
> > This one: http://patchwork.ozlabs.org/project/uboot/list/?series=242992
> >
> > > I'd prefer to have a separated patch work to track binman changes.
> Thanks,
> >
> > Actually that's why I asked Leo the plan. If your patch go before my
> > patch, then I will need to do an additional patch to convert
> > unmatched.
> >
> > But if mine go first before yours, you will have to respin another
> > version to do the convert in the first place.
> >
> > Leo, please let us know your plan.
> >
>
> Hi Bin/Green,
>
> I was thinking picking Bin's patch first,
> because Green's patch could not pass CI.
> (Due to some format warning being treated as error
> when compiling drivers/pci/pcie_dw_common.c)
>
> At the meantime, we should come up with some fixes to pass CI.
> Then Green could send his patch with binman,
> or a seperate patch to track binman utility.
>
> What do you guys think?
>
> Best regards,
> Leo
>
>
> > Regards,
> > Bin
>
Green Wan May 18, 2021, 2:35 p.m. UTC | #15
Hi Leo,

I just posted the patch for pcie_dw_common.c compilation error. Please
check and see if it works. Thanks.

Hi Bin and Leo,

And I'll check the 'binman' patch series soon. See if we can have both
binman and fu740 patchset ready.

Regards,
Green

On Tue, May 18, 2021 at 9:12 PM Green Wan <green.wan@sifive.com> wrote:

> As I mentioned before, pcie_dw_common.c is not part of fu740 patch. The
> error is actually nothing to do with fu740 patchset. Even I fix those
> warning message. It will not be in same patch series.
>
> - Green
>
> Leo Liang <ycliang@andestech.com>於 2021年5月18日 週二,下午8:00寫道:
>
>> On Tue, May 18, 2021 at 05:56:08PM +0800, Bin Meng wrote:
>> > Hi Green,
>> >
>> > On Tue, May 18, 2021 at 5:43 PM Green Wan <green.wan@sifive.com> wrote:
>> > >
>> > >
>> > >
>> > > On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>> > >>
>> > >> Hi Green,
>> > >>
>> > >> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com>
>> wrote:
>> > >> >
>> > >> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
>> > >> > > Hi Bin,
>> > >> > >
>> > >> > > Thanks, I'll include that revert. Just traced back the git log.
>> My original
>> > >> > > patch is based on fu740. I guess it was merged to fu540 since
>> fu740 series
>> > >> > > wasn't present yet.
>> > >> > >
>> > >> > > Hi Rick,
>> > >> > >
>> > >> > > Not sure whether you'll pick fu740 series soon or if any parts
>> need more
>> > >> > > revisement. Do you prefer that I append both this revert and
>> "disable CSR"
>> > >> > > patch to fu740&unmatched patch series? If so, I will create v9
>> patch and
>> > >> > > include these 2 patches.
>> > >> > >
>> > >> > > Or if you prefer to keep them separate from fu740 series, we can
>> wait for
>> > >> > > fu740&unmatche patch merge and I'll create a separate patch for
>> this revert
>> > >> > > and CSR disable.
>> > >> > >
>> > >> > > What do you think? Many thanks.
>> > >> > >
>> > >> > > Regards,
>> > >> > > - Green
>> > >> > >
>> > >> >
>> > >> > Hi Green,
>> > >> >
>> > >> > Could you please append the "disable CSR" patch to fu740 unmatched
>> patch
>> > >> > and send a v9 patch ? Thanks!
>> > >> >
>> > >>
>> > >> I think you will need some update per this patch as well:
>> > >>
>> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
>> > >
>> > >
>> > > Hi Bin
>> > > I updated the change to [patch v9 1/8]. Thanks,
>> > >
>> > >>
>> > >>
>> > >>
>> > >> Hi Leo,
>> > >>
>> > >> What's your plan for the binman patch series?
>> > >>
>> > >> If the binman patch series go first, Green needs to update Unmatched
>> > >> to use binman as well.
>> > >
>> > >
>> > > Hi Leo/Bin,
>> > >
>> > > Are we referring to
>> https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
>> >
>> > This one: http://patchwork.ozlabs.org/project/uboot/list/?series=242992
>> >
>> > > I'd prefer to have a separated patch work to track binman changes.
>> Thanks,
>> >
>> > Actually that's why I asked Leo the plan. If your patch go before my
>> > patch, then I will need to do an additional patch to convert
>> > unmatched.
>> >
>> > But if mine go first before yours, you will have to respin another
>> > version to do the convert in the first place.
>> >
>> > Leo, please let us know your plan.
>> >
>>
>> Hi Bin/Green,
>>
>> I was thinking picking Bin's patch first,
>> because Green's patch could not pass CI.
>> (Due to some format warning being treated as error
>> when compiling drivers/pci/pcie_dw_common.c)
>>
>> At the meantime, we should come up with some fixes to pass CI.
>> Then Green could send his patch with binman,
>> or a seperate patch to track binman utility.
>>
>> What do you guys think?
>>
>> Best regards,
>> Leo
>>
>>
>> > Regards,
>> > Bin
>>
>
Green Wan May 19, 2021, 7:52 a.m. UTC | #16
Hi Leo and Bin,

I have the 'binman' patch for unmatched ready. So, we can pick up the
'binman' series first.

I plan to create a v10 patchset that includes the fu740 series on top of
'binman' patch and 'split CLINT' patchset and appends 'clear feature
disable CSRs' and 'binman change for unmatched'. But I keep the
pcie_dw_common.c compilation fixes in the separated patch. (already posted)

What do you think of it? If there is no further revisement needed, I can do
the patch.

Many thanks,
- Green

On Tue, May 18, 2021 at 10:35 PM Green Wan <green.wan@sifive.com> wrote:

> Hi Leo,
>
> I just posted the patch for pcie_dw_common.c compilation error. Please
> check and see if it works. Thanks.
>
> Hi Bin and Leo,
>
> And I'll check the 'binman' patch series soon. See if we can have both
> binman and fu740 patchset ready.
>
> Regards,
> Green
>
> On Tue, May 18, 2021 at 9:12 PM Green Wan <green.wan@sifive.com> wrote:
>
>> As I mentioned before, pcie_dw_common.c is not part of fu740 patch. The
>> error is actually nothing to do with fu740 patchset. Even I fix those
>> warning message. It will not be in same patch series.
>>
>> - Green
>>
>> Leo Liang <ycliang@andestech.com>於 2021年5月18日 週二,下午8:00寫道:
>>
>>> On Tue, May 18, 2021 at 05:56:08PM +0800, Bin Meng wrote:
>>> > Hi Green,
>>> >
>>> > On Tue, May 18, 2021 at 5:43 PM Green Wan <green.wan@sifive.com>
>>> wrote:
>>> > >
>>> > >
>>> > >
>>> > > On Tue, May 18, 2021 at 3:45 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>>> > >>
>>> > >> Hi Green,
>>> > >>
>>> > >> On Tue, May 18, 2021 at 3:38 PM Leo Liang <ycliang@andestech.com>
>>> wrote:
>>> > >> >
>>> > >> > On Fri, May 14, 2021 at 11:45:30AM +0800, Green Wan wrote:
>>> > >> > > Hi Bin,
>>> > >> > >
>>> > >> > > Thanks, I'll include that revert. Just traced back the git log.
>>> My original
>>> > >> > > patch is based on fu740. I guess it was merged to fu540 since
>>> fu740 series
>>> > >> > > wasn't present yet.
>>> > >> > >
>>> > >> > > Hi Rick,
>>> > >> > >
>>> > >> > > Not sure whether you'll pick fu740 series soon or if any parts
>>> need more
>>> > >> > > revisement. Do you prefer that I append both this revert and
>>> "disable CSR"
>>> > >> > > patch to fu740&unmatched patch series? If so, I will create v9
>>> patch and
>>> > >> > > include these 2 patches.
>>> > >> > >
>>> > >> > > Or if you prefer to keep them separate from fu740 series, we
>>> can wait for
>>> > >> > > fu740&unmatche patch merge and I'll create a separate patch for
>>> this revert
>>> > >> > > and CSR disable.
>>> > >> > >
>>> > >> > > What do you think? Many thanks.
>>> > >> > >
>>> > >> > > Regards,
>>> > >> > > - Green
>>> > >> > >
>>> > >> >
>>> > >> > Hi Green,
>>> > >> >
>>> > >> > Could you please append the "disable CSR" patch to fu740
>>> unmatched patch
>>> > >> > and send a v9 patch ? Thanks!
>>> > >> >
>>> > >>
>>> > >> I think you will need some update per this patch as well:
>>> > >>
>>> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
>>> > >
>>> > >
>>> > > Hi Bin
>>> > > I updated the change to [patch v9 1/8]. Thanks,
>>> > >
>>> > >>
>>> > >>
>>> > >>
>>> > >> Hi Leo,
>>> > >>
>>> > >> What's your plan for the binman patch series?
>>> > >>
>>> > >> If the binman patch series go first, Green needs to update Unmatched
>>> > >> to use binman as well.
>>> > >
>>> > >
>>> > > Hi Leo/Bin,
>>> > >
>>> > > Are we referring to
>>> https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
>>> >
>>> > This one:
>>> http://patchwork.ozlabs.org/project/uboot/list/?series=242992
>>> >
>>> > > I'd prefer to have a separated patch work to track binman changes.
>>> Thanks,
>>> >
>>> > Actually that's why I asked Leo the plan. If your patch go before my
>>> > patch, then I will need to do an additional patch to convert
>>> > unmatched.
>>> >
>>> > But if mine go first before yours, you will have to respin another
>>> > version to do the convert in the first place.
>>> >
>>> > Leo, please let us know your plan.
>>> >
>>>
>>> Hi Bin/Green,
>>>
>>> I was thinking picking Bin's patch first,
>>> because Green's patch could not pass CI.
>>> (Due to some format warning being treated as error
>>> when compiling drivers/pci/pcie_dw_common.c)
>>>
>>> At the meantime, we should come up with some fixes to pass CI.
>>> Then Green could send his patch with binman,
>>> or a seperate patch to track binman utility.
>>>
>>> What do you guys think?
>>>
>>> Best regards,
>>> Leo
>>>
>>>
>>> > Regards,
>>> > Bin
>>>
>>
Leo Liang May 19, 2021, 8:57 a.m. UTC | #17
On Wed, May 19, 2021 at 03:52:39PM +0800, Green Wan wrote:

Hi Green,

> Hi Leo and Bin,
> 
> I have the 'binman' patch for unmatched ready. So, we can pick up the 'binman' series first.
> 
> I plan to create a v10 patchset that includes the fu740 series on top of 'binman' patch and 'split CLINT' patchset and appends 'clear feature disable CSRs' and 'binman change for unmatched'. But I keep the pcie_dw_common.c compilation fixes in the separated
>  patch. (already posted)
> 
> What do you think of it? If there is no&nbsp;further revisement needed, I can do the patch.
> 
> Many thanks,
> - Green
> 

Hi Green,

Unfortunately, the patch for compilation fixes still does not work.
CI result: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7580

But other than that, sounds good to me. Thanks!

Best regards,
Leo

> 
> On Tue, May 18, 2021 at 10:35 PM Green Wan &lt;green.wan@sifive.com> wrote:
> 
> 
> Hi Leo,
> 
> I just posted the patch for pcie_dw_common.c compilation error. Please check and see if it works. Thanks.
> 
> Hi Bin and Leo,
> 
> And I'll check the 'binman' patch series soon. See if we can have both binman and fu740 patchset ready.
> 
> Regards,
> Green
> 
> 
> On Tue, May 18, 2021 at 9:12 PM Green Wan &lt;green.wan@sifive.com> wrote:
> 
> 
> As I mentioned before, pcie_dw_common.c is not part of fu740 patch. The error is actually nothing to do with fu740 patchset. Even I fix those warning message. It will not be in same patch series.
> 
> 
> - Green
> 
> 
> Leo Liang &lt;ycliang@andestech.com>於 2021年5月18日 週二,下午8:00寫道:
> 
> 
> On Tue, May 18, 2021 at 05:56:08PM &#43;0800, Bin Meng wrote:
> > Hi Green,
> > 
> > On Tue, May 18, 2021 at 5:43 PM Green Wan &lt;green.wan@sifive.com> wrote:
> > >
> > >
> > >
> > > On Tue, May 18, 2021 at 3:45 PM Bin Meng &lt;bmeng.cn@gmail.com> wrote:
> > >>
> > >> Hi Green,
> > >>
> > >> On Tue, May 18, 2021 at 3:38 PM Leo Liang &lt;ycliang@andestech.com> wrote:
> > >> >
> > >> > On Fri, May 14, 2021 at 11:45:30AM &#43;0800, Green Wan wrote:
> > >> > > Hi Bin,
> > >> > >
> > >> > > Thanks, I'll include that revert. Just traced back the git log. My original
> > >> > > patch is based on fu740. I guess it was merged to fu540 since fu740 series
> > >> > > wasn't present yet.
> > >> > >
> > >> > > Hi Rick,
> > >> > >
> > >> > > Not sure whether you'll pick fu740 series soon or if any parts need more
> > >> > > revisement. Do you prefer that I append both this revert and &quot;disable CSR&quot;
> > >> > > patch to fu740&amp;unmatched patch series? If so, I will create v9 patch and
> > >> > > include these 2 patches.
> > >> > >
> > >> > > Or if you prefer to keep them separate from fu740 series, we can wait for
> > >> > > fu740&amp;unmatche patch merge and I'll create a separate patch for this revert
> > >> > > and CSR disable.
> > >> > >
> > >> > > What do you think? Many thanks.
> > >> > >
> > >> > > Regards,
> > >> > > - Green
> > >> > >
> > >> >
> > >> > Hi Green,
> > >> >
> > >> > Could you please append the &quot;disable CSR&quot; patch to fu740 unmatched patch
> > >> > and send a v9 patch ? Thanks!
> > >> >
> > >>
> > >> I think you will need some update per this patch as well:
> > >> 
> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
> > >
> > >
> > > Hi Bin
> > > I updated the change to [patch v9 1/8]. Thanks,
> > >
> > >>
> > >>
> > >>
> > >> Hi Leo,
> > >>
> > >> What's your plan for the binman patch series?
> > >>
> > >> If the binman patch series go first, Green needs to update Unmatched
> > >> to use binman as well.
> > >
> > >
> > > Hi Leo/Bin,
> > >
> > > Are we referring to 
> https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
> > 
> > This one: 
> http://patchwork.ozlabs.org/project/uboot/list/?series=242992
> > 
> > > I'd prefer to have a separated patch work to track binman changes. Thanks,
> > 
> > Actually that's why I asked Leo the plan. If your patch go before my
> > patch, then I will need to do an additional patch to convert
> > unmatched.
> > 
> > But if mine go first before yours, you will have to respin another
> > version to do the convert in the first place.
> > 
> > Leo, please let us know your plan.
> > 
> 
> Hi Bin/Green,
> 
> I was thinking picking Bin's patch first,
> because Green's patch could not pass CI.
> (Due to some format warning being treated as error 
> when compiling drivers/pci/pcie_dw_common.c)
> 
> At the meantime, we should come up with some fixes to pass CI.
> Then Green could send his patch with binman,
> or a seperate patch to track binman utility.
> 
> What do you guys think?
> 
> Best regards,
> Leo
> 
> 
> > Regards,
> > Bin
>
Green Wan May 19, 2021, 11:09 a.m. UTC | #18
On Wed, May 19, 2021 at 4:58 PM Leo Liang <ycliang@andestech.com> wrote:

> On Wed, May 19, 2021 at 03:52:39PM +0800, Green Wan wrote:
>
> Hi Green,
>
> > Hi Leo and Bin,
> >
> > I have the 'binman' patch for unmatched ready. So, we can pick up the
> 'binman' series first.
> >
> > I plan to create a v10 patchset that includes the fu740 series on top of
> 'binman' patch and 'split CLINT' patchset and appends 'clear feature
> disable CSRs' and 'binman change for unmatched'. But I keep the
> pcie_dw_common.c compilation fixes in the separated
> >  patch. (already posted)
> >
> > What do you think of it? If there is no&nbsp;further revisement needed,
> I can do the patch.
> >
> > Many thanks,
> > - Green
> >
>
> Hi Green,
>
> Unfortunately, the patch for compilation fixes still does not work.
> CI result:
> https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/7580
>
> I might know what causes the difference. Some platforms in the CI use
'u64' as "pci_addr_t" and "pci_size_t" and others use 'unsigned long'.
(check include/pci.h)

I will simply cast all variables to the bigger length to avoid compilation
warning. will post the patch later.



> But other than that, sounds good to me. Thanks!
>

will create the patchset. Thanks.


>
> Best regards,
> Leo
>
> >
> > On Tue, May 18, 2021 at 10:35 PM Green Wan &lt;green.wan@sifive.com>
> wrote:
> >
> >
> > Hi Leo,
> >
> > I just posted the patch for pcie_dw_common.c compilation error. Please
> check and see if it works. Thanks.
> >
> > Hi Bin and Leo,
> >
> > And I'll check the 'binman' patch series soon. See if we can have both
> binman and fu740 patchset ready.
> >
> > Regards,
> > Green
> >
> >
> > On Tue, May 18, 2021 at 9:12 PM Green Wan &lt;green.wan@sifive.com>
> wrote:
> >
> >
> > As I mentioned before, pcie_dw_common.c is not part of fu740 patch. The
> error is actually nothing to do with fu740 patchset. Even I fix those
> warning message. It will not be in same patch series.
> >
> >
> > - Green
> >
> >
> > Leo Liang &lt;ycliang@andestech.com>於 2021年5月18日 週二,下午8:00寫道:
> >
> >
> > On Tue, May 18, 2021 at 05:56:08PM &#43;0800, Bin Meng wrote:
> > > Hi Green,
> > >
> > > On Tue, May 18, 2021 at 5:43 PM Green Wan &lt;green.wan@sifive.com>
> wrote:
> > > >
> > > >
> > > >
> > > > On Tue, May 18, 2021 at 3:45 PM Bin Meng &lt;bmeng.cn@gmail.com>
> wrote:
> > > >>
> > > >> Hi Green,
> > > >>
> > > >> On Tue, May 18, 2021 at 3:38 PM Leo Liang &lt;ycliang@andestech.com>
> wrote:
> > > >> >
> > > >> > On Fri, May 14, 2021 at 11:45:30AM &#43;0800, Green Wan wrote:
> > > >> > > Hi Bin,
> > > >> > >
> > > >> > > Thanks, I'll include that revert. Just traced back the git log.
> My original
> > > >> > > patch is based on fu740. I guess it was merged to fu540 since
> fu740 series
> > > >> > > wasn't present yet.
> > > >> > >
> > > >> > > Hi Rick,
> > > >> > >
> > > >> > > Not sure whether you'll pick fu740 series soon or if any parts
> need more
> > > >> > > revisement. Do you prefer that I append both this revert and
> &quot;disable CSR&quot;
> > > >> > > patch to fu740&amp;unmatched patch series? If so, I will create
> v9 patch and
> > > >> > > include these 2 patches.
> > > >> > >
> > > >> > > Or if you prefer to keep them separate from fu740 series, we
> can wait for
> > > >> > > fu740&amp;unmatche patch merge and I'll create a separate patch
> for this revert
> > > >> > > and CSR disable.
> > > >> > >
> > > >> > > What do you think? Many thanks.
> > > >> > >
> > > >> > > Regards,
> > > >> > > - Green
> > > >> > >
> > > >> >
> > > >> > Hi Green,
> > > >> >
> > > >> > Could you please append the &quot;disable CSR&quot; patch to
> fu740 unmatched patch
> > > >> > and send a v9 patch ? Thanks!
> > > >> >
> > > >>
> > > >> I think you will need some update per this patch as well:
> > > >>
> >
> http://patchwork.ozlabs.org/project/uboot/patch/20210511120412.25065-1-bmeng.cn@gmail.com/
> > > >
> > > >
> > > > Hi Bin
> > > > I updated the change to [patch v9 1/8]. Thanks,
> > > >
> > > >>
> > > >>
> > > >>
> > > >> Hi Leo,
> > > >>
> > > >> What's your plan for the binman patch series?
> > > >>
> > > >> If the binman patch series go first, Green needs to update Unmatched
> > > >> to use binman as well.
> > > >
> > > >
> > > > Hi Leo/Bin,
> > > >
> > > > Are we referring to
> > https://lists.denx.de/pipermail/u-boot/2021-May/448885.html?
> > >
> > > This one:
> > http://patchwork.ozlabs.org/project/uboot/list/?series=242992
> > >
> > > > I'd prefer to have a separated patch work to track binman changes.
> Thanks,
> > >
> > > Actually that's why I asked Leo the plan. If your patch go before my
> > > patch, then I will need to do an additional patch to convert
> > > unmatched.
> > >
> > > But if mine go first before yours, you will have to respin another
> > > version to do the convert in the first place.
> > >
> > > Leo, please let us know your plan.
> > >
> >
> > Hi Bin/Green,
> >
> > I was thinking picking Bin's patch first,
> > because Green's patch could not pass CI.
> > (Due to some format warning being treated as error
> > when compiling drivers/pci/pcie_dw_common.c)
> >
> > At the meantime, we should come up with some fixes to pass CI.
> > Then Green could send his patch with binman,
> > or a seperate patch to track binman utility.
> >
> > What do you guys think?
> >
> > Best regards,
> > Leo
> >
> >
> > > Regards,
> > > Bin
> >
>
Bin Meng May 19, 2021, 12:18 p.m. UTC | #19
Hi Green,

On Wed, May 19, 2021 at 3:52 PM Green Wan <green.wan@sifive.com> wrote:
>
> Hi Leo and Bin,
>
> I have the 'binman' patch for unmatched ready. So, we can pick up the 'binman' series first.
>
> I plan to create a v10 patchset that includes the fu740 series on top of 'binman' patch and 'split CLINT' patchset and appends 'clear feature disable CSRs' and 'binman change for unmatched'. But I keep the pcie_dw_common.c compilation fixes in the separated patch. (already posted)
>

Sounds good to me. Thanks!

> What do you think of it? If there is no further revisement needed, I can do the patch.

Regards,
Bin
diff mbox series

Patch

diff --git a/arch/riscv/cpu/fu540/spl.c b/arch/riscv/cpu/fu540/spl.c
index 1740ef98b6..45657b7909 100644
--- a/arch/riscv/cpu/fu540/spl.c
+++ b/arch/riscv/cpu/fu540/spl.c
@@ -6,9 +6,6 @@ 
 
 #include <dm.h>
 #include <log.h>
-#include <asm/csr.h>
-
-#define CSR_U74_FEATURE_DISABLE	0x7c1
 
 int spl_soc_init(void)
 {
@@ -24,15 +21,3 @@  int spl_soc_init(void)
 
 	return 0;
 }
-
-void harts_early_init(void)
-{
-	/*
-	 * Feature Disable CSR
-	 *
-	 * Clear feature disable CSR to '0' to turn on all features for
-	 * each core. This operation must be in M-mode.
-	 */
-	if (CONFIG_IS_ENABLED(RISCV_MMODE))
-		csr_write(CSR_U74_FEATURE_DISABLE, 0);
-}