Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hi Anup, On Thu, Aug 1, 2019 at 9:26 PM Anup Patel wrote: > > On Thu, Aug 1, 2019 at 8:26 PM Sagar Kadam wrote: > > > > Hi Anup, > > > > On Wed, Jul 31, 2019 at 1:50 PM Anup Patel wrote: > > > > > > On Tue, Jul 30, 2019 at 11:01 PM Sagar Kadam > > > wrote: > > > > > > > > Hello Anup, > > > > > > > > On Tue, Jul 30, 2019 at 9:12 AM Anup Patel wrote: > > > > > > > > > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam > > > > > wrote: > > > > > > > > > > > > This patch aligns the current implementation of HiFive Unleashed > > > > > > board configuration framework with the one described in > > > > > > doc/README.kconfig. > > > > > > > > > > > > Signed-off-by: Sagar Shrikant Kadam > > > > > > --- > > > > > > arch/riscv/Kconfig | 6 +- > > > > > > arch/riscv/cpu/generic/Kconfig | 12 --- > > > > > > arch/riscv/cpu/generic/Makefile | 6 -- > > > > > > arch/riscv/cpu/generic/cpu.c | 35 --- > > > > > > arch/riscv/cpu/generic/dram.c| 37 --- > > > > > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > > > > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > > > > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > > > > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > > > > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > > > > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > > > > > board/sifive/fu540/Kconfig | 49 -- > > > > > > board/sifive/fu540/MAINTAINERS | 9 -- > > > > > > board/sifive/fu540/Makefile | 5 - > > > > > > board/sifive/fu540/fu540.c | 139 > > > > > > --- > > > > > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > > > > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > > > > > board/sifive/hifive_unleashed/Makefile | 5 + > > > > > > board/sifive/hifive_unleashed/fu540.c| 139 > > > > > > +++ > > > > > > configs/hifive_unleashed_defconfig | 11 +++ > > > > > > configs/sifive_fu540_defconfig | 11 --- > > > > > > include/configs/hifive_unleashed.h | 47 + > > > > > > include/configs/sifive-fu540.h | 47 - > > > > > > 23 files changed, 370 insertions(+), 367 deletions(-) > > > > > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > > > > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > > > > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > > > > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > > > > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > > > > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > > > > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > > > > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > > > > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > > > > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > > > > > delete mode 100644 board/sifive/fu540/Kconfig > > > > > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > > > > > delete mode 100644 board/sifive/fu540/Makefile > > > > > > delete mode 100644 board/sifive/fu540/fu540.c > > > > > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > > > > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > > > > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > > > > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > > > > > create mode 100644 configs/hifive_unleashed_defconfig > > > > > > delete mode 100644 configs/sifive_fu540_defconfig > > > > > > create mode 100644 include/configs/hifive_unleashed.h > > > > > > delete mode 100644 include/configs/sifive-fu540.h > > > > > > > > > > > > > > > > I agree with Bin's concerns. > > > > > > > > > > Please don't rename generic CPU support under arch/riscv > > > > > > > > > > We should think long-term here. If every SOC vendor starts adding > > > > > their CPU support directory under arch/riscv then U-Boot RISC port > > > > > will be eventually difficult to manage and we will also have duplicate > > > > > code across various CPU support. > > > > > > > > > > IMHO, we should avoid adding new CPU support under arch/riscv > > > > > as much as possible. We can call weak functions from generic CPU > > > > > support and board support code can implement it. We should only > > > > > add new CPU support under arch/riscv when we are not able to > > > > > re-use generic CPU support. > > > > > > > > > > > > > Yes, your points are valid. I am Ok with it. > > > > My intent here was that as the support for riscv in U-boot is in its > > > > early stages > > > > and doing it now would be better as minimum changes will be required and > > > > going ahead as other CPU vendors introduce their CPU under arch/riscv/ > > > > we could i
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
On Thu, Aug 1, 2019 at 8:26 PM Sagar Kadam wrote: > > Hi Anup, > > On Wed, Jul 31, 2019 at 1:50 PM Anup Patel wrote: > > > > On Tue, Jul 30, 2019 at 11:01 PM Sagar Kadam wrote: > > > > > > Hello Anup, > > > > > > On Tue, Jul 30, 2019 at 9:12 AM Anup Patel wrote: > > > > > > > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam > > > > wrote: > > > > > > > > > > This patch aligns the current implementation of HiFive Unleashed > > > > > board configuration framework with the one described in > > > > > doc/README.kconfig. > > > > > > > > > > Signed-off-by: Sagar Shrikant Kadam > > > > > --- > > > > > arch/riscv/Kconfig | 6 +- > > > > > arch/riscv/cpu/generic/Kconfig | 12 --- > > > > > arch/riscv/cpu/generic/Makefile | 6 -- > > > > > arch/riscv/cpu/generic/cpu.c | 35 --- > > > > > arch/riscv/cpu/generic/dram.c| 37 --- > > > > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > > > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > > > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > > > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > > > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > > > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > > > > board/sifive/fu540/Kconfig | 49 -- > > > > > board/sifive/fu540/MAINTAINERS | 9 -- > > > > > board/sifive/fu540/Makefile | 5 - > > > > > board/sifive/fu540/fu540.c | 139 > > > > > --- > > > > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > > > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > > > > board/sifive/hifive_unleashed/Makefile | 5 + > > > > > board/sifive/hifive_unleashed/fu540.c| 139 > > > > > +++ > > > > > configs/hifive_unleashed_defconfig | 11 +++ > > > > > configs/sifive_fu540_defconfig | 11 --- > > > > > include/configs/hifive_unleashed.h | 47 + > > > > > include/configs/sifive-fu540.h | 47 - > > > > > 23 files changed, 370 insertions(+), 367 deletions(-) > > > > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > > > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > > > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > > > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > > > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > > > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > > > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > > > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > > > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > > > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > > > > delete mode 100644 board/sifive/fu540/Kconfig > > > > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > > > > delete mode 100644 board/sifive/fu540/Makefile > > > > > delete mode 100644 board/sifive/fu540/fu540.c > > > > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > > > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > > > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > > > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > > > > create mode 100644 configs/hifive_unleashed_defconfig > > > > > delete mode 100644 configs/sifive_fu540_defconfig > > > > > create mode 100644 include/configs/hifive_unleashed.h > > > > > delete mode 100644 include/configs/sifive-fu540.h > > > > > > > > > > > > > I agree with Bin's concerns. > > > > > > > > Please don't rename generic CPU support under arch/riscv > > > > > > > > We should think long-term here. If every SOC vendor starts adding > > > > their CPU support directory under arch/riscv then U-Boot RISC port > > > > will be eventually difficult to manage and we will also have duplicate > > > > code across various CPU support. > > > > > > > > IMHO, we should avoid adding new CPU support under arch/riscv > > > > as much as possible. We can call weak functions from generic CPU > > > > support and board support code can implement it. We should only > > > > add new CPU support under arch/riscv when we are not able to > > > > re-use generic CPU support. > > > > > > > > > > Yes, your points are valid. I am Ok with it. > > > My intent here was that as the support for riscv in U-boot is in its > > > early stages > > > and doing it now would be better as minimum changes will be required and > > > going ahead as other CPU vendors introduce their CPU under arch/riscv/ > > > we could isolate a generic CPU code as it grows. > > > > Thanks. > > > > Let's try to make arch/riscv/cpu/generic extensible from start itself so > > that it is relatively easy to fit newer RISC-V SOCs and boards. > > > Thanks. So can I assume that we agree on addi
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hi Andreas, On Wed, Jul 31, 2019 at 2:02 PM Andreas Schwab wrote: > > On Jul 30 2019, Sagar Kadam wrote: > > > I do remember using "git mv" here. > > git mv is identical to git rm + git add. A git repository has no > concept of file renames. > > Andreas. > Thanks, for clarifying. Regards, Sagar Kadam > -- > Andreas Schwab, SUSE Labs, sch...@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hi Anup, On Wed, Jul 31, 2019 at 1:50 PM Anup Patel wrote: > > On Tue, Jul 30, 2019 at 11:01 PM Sagar Kadam wrote: > > > > Hello Anup, > > > > On Tue, Jul 30, 2019 at 9:12 AM Anup Patel wrote: > > > > > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam > > > wrote: > > > > > > > > This patch aligns the current implementation of HiFive Unleashed > > > > board configuration framework with the one described in > > > > doc/README.kconfig. > > > > > > > > Signed-off-by: Sagar Shrikant Kadam > > > > --- > > > > arch/riscv/Kconfig | 6 +- > > > > arch/riscv/cpu/generic/Kconfig | 12 --- > > > > arch/riscv/cpu/generic/Makefile | 6 -- > > > > arch/riscv/cpu/generic/cpu.c | 35 --- > > > > arch/riscv/cpu/generic/dram.c| 37 --- > > > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > > > board/sifive/fu540/Kconfig | 49 -- > > > > board/sifive/fu540/MAINTAINERS | 9 -- > > > > board/sifive/fu540/Makefile | 5 - > > > > board/sifive/fu540/fu540.c | 139 > > > > --- > > > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > > > board/sifive/hifive_unleashed/Makefile | 5 + > > > > board/sifive/hifive_unleashed/fu540.c| 139 > > > > +++ > > > > configs/hifive_unleashed_defconfig | 11 +++ > > > > configs/sifive_fu540_defconfig | 11 --- > > > > include/configs/hifive_unleashed.h | 47 + > > > > include/configs/sifive-fu540.h | 47 - > > > > 23 files changed, 370 insertions(+), 367 deletions(-) > > > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > > > delete mode 100644 board/sifive/fu540/Kconfig > > > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > > > delete mode 100644 board/sifive/fu540/Makefile > > > > delete mode 100644 board/sifive/fu540/fu540.c > > > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > > > create mode 100644 configs/hifive_unleashed_defconfig > > > > delete mode 100644 configs/sifive_fu540_defconfig > > > > create mode 100644 include/configs/hifive_unleashed.h > > > > delete mode 100644 include/configs/sifive-fu540.h > > > > > > > > > > I agree with Bin's concerns. > > > > > > Please don't rename generic CPU support under arch/riscv > > > > > > We should think long-term here. If every SOC vendor starts adding > > > their CPU support directory under arch/riscv then U-Boot RISC port > > > will be eventually difficult to manage and we will also have duplicate > > > code across various CPU support. > > > > > > IMHO, we should avoid adding new CPU support under arch/riscv > > > as much as possible. We can call weak functions from generic CPU > > > support and board support code can implement it. We should only > > > add new CPU support under arch/riscv when we are not able to > > > re-use generic CPU support. > > > > > > > Yes, your points are valid. I am Ok with it. > > My intent here was that as the support for riscv in U-boot is in its > > early stages > > and doing it now would be better as minimum changes will be required and > > going ahead as other CPU vendors introduce their CPU under arch/riscv/ > > we could isolate a generic CPU code as it grows. > > Thanks. > > Let's try to make arch/riscv/cpu/generic extensible from start itself so > that it is relatively easy to fit newer RISC-V SOCs and boards. > Thanks. So can I assume that we agree on adding new CPU support under arch/riscv. Will provide a new patch for the same. > > > > > > > > Other board support renaming is fine but there is lot of documentation > > If board support renaming is fine. Shall I submit another patch > > excluding the
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
On Jul 30 2019, Sagar Kadam wrote: > I do remember using "git mv" here. git mv is identical to git rm + git add. A git repository has no concept of file renames. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
On Tue, Jul 30, 2019 at 11:01 PM Sagar Kadam wrote: > > Hello Anup, > > On Tue, Jul 30, 2019 at 9:12 AM Anup Patel wrote: > > > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam > > wrote: > > > > > > This patch aligns the current implementation of HiFive Unleashed > > > board configuration framework with the one described in > > > doc/README.kconfig. > > > > > > Signed-off-by: Sagar Shrikant Kadam > > > --- > > > arch/riscv/Kconfig | 6 +- > > > arch/riscv/cpu/generic/Kconfig | 12 --- > > > arch/riscv/cpu/generic/Makefile | 6 -- > > > arch/riscv/cpu/generic/cpu.c | 35 --- > > > arch/riscv/cpu/generic/dram.c| 37 --- > > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > > board/sifive/fu540/Kconfig | 49 -- > > > board/sifive/fu540/MAINTAINERS | 9 -- > > > board/sifive/fu540/Makefile | 5 - > > > board/sifive/fu540/fu540.c | 139 > > > --- > > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > > board/sifive/hifive_unleashed/Makefile | 5 + > > > board/sifive/hifive_unleashed/fu540.c| 139 > > > +++ > > > configs/hifive_unleashed_defconfig | 11 +++ > > > configs/sifive_fu540_defconfig | 11 --- > > > include/configs/hifive_unleashed.h | 47 + > > > include/configs/sifive-fu540.h | 47 - > > > 23 files changed, 370 insertions(+), 367 deletions(-) > > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > > delete mode 100644 board/sifive/fu540/Kconfig > > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > > delete mode 100644 board/sifive/fu540/Makefile > > > delete mode 100644 board/sifive/fu540/fu540.c > > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > > create mode 100644 configs/hifive_unleashed_defconfig > > > delete mode 100644 configs/sifive_fu540_defconfig > > > create mode 100644 include/configs/hifive_unleashed.h > > > delete mode 100644 include/configs/sifive-fu540.h > > > > > > > I agree with Bin's concerns. > > > > Please don't rename generic CPU support under arch/riscv > > > > We should think long-term here. If every SOC vendor starts adding > > their CPU support directory under arch/riscv then U-Boot RISC port > > will be eventually difficult to manage and we will also have duplicate > > code across various CPU support. > > > > IMHO, we should avoid adding new CPU support under arch/riscv > > as much as possible. We can call weak functions from generic CPU > > support and board support code can implement it. We should only > > add new CPU support under arch/riscv when we are not able to > > re-use generic CPU support. > > > > Yes, your points are valid. I am Ok with it. > My intent here was that as the support for riscv in U-boot is in its > early stages > and doing it now would be better as minimum changes will be required and > going ahead as other CPU vendors introduce their CPU under arch/riscv/ > we could isolate a generic CPU code as it grows. Thanks. Let's try to make arch/riscv/cpu/generic extensible from start itself so that it is relatively easy to fit newer RISC-V SOCs and boards. > > > > > Other board support renaming is fine but there is lot of documentation > If board support renaming is fine. Shall I submit another patch > excluding the CPU > changes? Yes, please send another revision. Also have consider updating U-Boot and OpenSBI documentation as separate patches. Regards, Anup ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hello Anup, On Tue, Jul 30, 2019 at 9:12 AM Anup Patel wrote: > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam > wrote: > > > > This patch aligns the current implementation of HiFive Unleashed > > board configuration framework with the one described in doc/README.kconfig. > > > > Signed-off-by: Sagar Shrikant Kadam > > --- > > arch/riscv/Kconfig | 6 +- > > arch/riscv/cpu/generic/Kconfig | 12 --- > > arch/riscv/cpu/generic/Makefile | 6 -- > > arch/riscv/cpu/generic/cpu.c | 35 --- > > arch/riscv/cpu/generic/dram.c| 37 --- > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > board/sifive/fu540/Kconfig | 49 -- > > board/sifive/fu540/MAINTAINERS | 9 -- > > board/sifive/fu540/Makefile | 5 - > > board/sifive/fu540/fu540.c | 139 > > --- > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > board/sifive/hifive_unleashed/Makefile | 5 + > > board/sifive/hifive_unleashed/fu540.c| 139 > > +++ > > configs/hifive_unleashed_defconfig | 11 +++ > > configs/sifive_fu540_defconfig | 11 --- > > include/configs/hifive_unleashed.h | 47 + > > include/configs/sifive-fu540.h | 47 - > > 23 files changed, 370 insertions(+), 367 deletions(-) > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > delete mode 100644 board/sifive/fu540/Kconfig > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > delete mode 100644 board/sifive/fu540/Makefile > > delete mode 100644 board/sifive/fu540/fu540.c > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > create mode 100644 configs/hifive_unleashed_defconfig > > delete mode 100644 configs/sifive_fu540_defconfig > > create mode 100644 include/configs/hifive_unleashed.h > > delete mode 100644 include/configs/sifive-fu540.h > > > > I agree with Bin's concerns. > > Please don't rename generic CPU support under arch/riscv > > We should think long-term here. If every SOC vendor starts adding > their CPU support directory under arch/riscv then U-Boot RISC port > will be eventually difficult to manage and we will also have duplicate > code across various CPU support. > > IMHO, we should avoid adding new CPU support under arch/riscv > as much as possible. We can call weak functions from generic CPU > support and board support code can implement it. We should only > add new CPU support under arch/riscv when we are not able to > re-use generic CPU support. > Yes, your points are valid. I am Ok with it. My intent here was that as the support for riscv in U-boot is in its early stages and doing it now would be better as minimum changes will be required and going ahead as other CPU vendors introduce their CPU under arch/riscv/ we could isolate a generic CPU code as it grows. > > Other board support renaming is fine but there is lot of documentation If board support renaming is fine. Shall I submit another patch excluding the CPU changes? Thanks & BR, Sagar Kadam > > > in U-Boot, OpenSBI and other places which needs to be also updated. > > Regards, > Anup ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hello Bin, On Mon, Jul 29, 2019 at 7:15 PM Bin Meng wrote: > > Hi, > > On Mon, Jul 29, 2019 at 8:42 PM Sagar Shrikant Kadam > wrote: > > > > This patch aligns the current implementation of HiFive Unleashed > > board configuration framework with the one described in doc/README.kconfig. > > > > Can you please explain why these changes are needed? It looks that the > changes are only to rename the "generic" cpu name to "u54-mc", and > rename the board name "fu540" to "hifive_unleashed"? > This patch is intended to update the naming convention which U-boot mentions in doc/README.kconfig. As we know that FU540-C000 has a U54-MC CPU core, I thought of naming it as u54-mc and board name from fu540 to hifive_unleashed which is the actual case. > This breaks the QEMU virt boards. > Unfortunately yes. Hence I raised a request in the cover letter for suggestions accordingly. > > Signed-off-by: Sagar Shrikant Kadam > > --- > > arch/riscv/Kconfig | 6 +- > > arch/riscv/cpu/generic/Kconfig | 12 --- > > arch/riscv/cpu/generic/Makefile | 6 -- > > arch/riscv/cpu/generic/cpu.c | 35 --- > > arch/riscv/cpu/generic/dram.c| 37 --- > > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > > board/sifive/fu540/Kconfig | 49 -- > > board/sifive/fu540/MAINTAINERS | 9 -- > > board/sifive/fu540/Makefile | 5 - > > board/sifive/fu540/fu540.c | 139 > > --- > > board/sifive/hifive_unleashed/Kconfig| 52 ++ > > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > > board/sifive/hifive_unleashed/Makefile | 5 + > > board/sifive/hifive_unleashed/fu540.c| 139 > > +++ > > configs/hifive_unleashed_defconfig | 11 +++ > > configs/sifive_fu540_defconfig | 11 --- > > include/configs/hifive_unleashed.h | 47 + > > include/configs/sifive-fu540.h | 47 - > > 23 files changed, 370 insertions(+), 367 deletions(-) > > delete mode 100644 arch/riscv/cpu/generic/Kconfig > > delete mode 100644 arch/riscv/cpu/generic/Makefile > > delete mode 100644 arch/riscv/cpu/generic/cpu.c > > delete mode 100644 arch/riscv/cpu/generic/dram.c > > It looks that you did not use "git mv" command. > I do remember using "git mv" here. Probably adding '-M' (detect renames) switch to git format-patch would have helped to include the renamed files instead of delete and create information. Next time I will ensure to include it. Thanks for pointing this. BR, Sagar Kadam > > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > > delete mode 100644 board/sifive/fu540/Kconfig > > delete mode 100644 board/sifive/fu540/MAINTAINERS > > delete mode 100644 board/sifive/fu540/Makefile > > delete mode 100644 board/sifive/fu540/fu540.c > > create mode 100644 board/sifive/hifive_unleashed/Kconfig > > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > > create mode 100644 board/sifive/hifive_unleashed/Makefile > > create mode 100644 board/sifive/hifive_unleashed/fu540.c > > create mode 100644 configs/hifive_unleashed_defconfig > > delete mode 100644 configs/sifive_fu540_defconfig > > create mode 100644 include/configs/hifive_unleashed.h > > delete mode 100644 include/configs/sifive-fu540.h > > > > Regards, > Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam wrote: > > This patch aligns the current implementation of HiFive Unleashed > board configuration framework with the one described in doc/README.kconfig. > > Signed-off-by: Sagar Shrikant Kadam > --- > arch/riscv/Kconfig | 6 +- > arch/riscv/cpu/generic/Kconfig | 12 --- > arch/riscv/cpu/generic/Makefile | 6 -- > arch/riscv/cpu/generic/cpu.c | 35 --- > arch/riscv/cpu/generic/dram.c| 37 --- > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > board/sifive/fu540/Kconfig | 49 -- > board/sifive/fu540/MAINTAINERS | 9 -- > board/sifive/fu540/Makefile | 5 - > board/sifive/fu540/fu540.c | 139 > --- > board/sifive/hifive_unleashed/Kconfig| 52 ++ > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > board/sifive/hifive_unleashed/Makefile | 5 + > board/sifive/hifive_unleashed/fu540.c| 139 > +++ > configs/hifive_unleashed_defconfig | 11 +++ > configs/sifive_fu540_defconfig | 11 --- > include/configs/hifive_unleashed.h | 47 + > include/configs/sifive-fu540.h | 47 - > 23 files changed, 370 insertions(+), 367 deletions(-) > delete mode 100644 arch/riscv/cpu/generic/Kconfig > delete mode 100644 arch/riscv/cpu/generic/Makefile > delete mode 100644 arch/riscv/cpu/generic/cpu.c > delete mode 100644 arch/riscv/cpu/generic/dram.c > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > delete mode 100644 board/sifive/fu540/Kconfig > delete mode 100644 board/sifive/fu540/MAINTAINERS > delete mode 100644 board/sifive/fu540/Makefile > delete mode 100644 board/sifive/fu540/fu540.c > create mode 100644 board/sifive/hifive_unleashed/Kconfig > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > create mode 100644 board/sifive/hifive_unleashed/Makefile > create mode 100644 board/sifive/hifive_unleashed/fu540.c > create mode 100644 configs/hifive_unleashed_defconfig > delete mode 100644 configs/sifive_fu540_defconfig > create mode 100644 include/configs/hifive_unleashed.h > delete mode 100644 include/configs/sifive-fu540.h > I agree with Bin's concerns. Please don't rename generic CPU support under arch/riscv We should think long-term here. If every SOC vendor starts adding their CPU support directory under arch/riscv then U-Boot RISC port will be eventually difficult to manage and we will also have duplicate code across various CPU support. IMHO, we should avoid adding new CPU support under arch/riscv as much as possible. We can call weak functions from generic CPU support and board support code can implement it. We should only add new CPU support under arch/riscv when we are not able to re-use generic CPU support. Other board support renaming is fine but there is lot of documentation in U-Boot, OpenSBI and other places which needs to be also updated. Regards, Anup ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Hi, On Mon, Jul 29, 2019 at 8:42 PM Sagar Shrikant Kadam wrote: > > This patch aligns the current implementation of HiFive Unleashed > board configuration framework with the one described in doc/README.kconfig. > Can you please explain why these changes are needed? It looks that the changes are only to rename the "generic" cpu name to "u54-mc", and rename the board name "fu540" to "hifive_unleashed"? This breaks the QEMU virt boards. > Signed-off-by: Sagar Shrikant Kadam > --- > arch/riscv/Kconfig | 6 +- > arch/riscv/cpu/generic/Kconfig | 12 --- > arch/riscv/cpu/generic/Makefile | 6 -- > arch/riscv/cpu/generic/cpu.c | 35 --- > arch/riscv/cpu/generic/dram.c| 37 --- > arch/riscv/cpu/u54-mc/Kconfig| 12 +++ > arch/riscv/cpu/u54-mc/Makefile | 6 ++ > arch/riscv/cpu/u54-mc/cpu.c | 35 +++ > arch/riscv/cpu/u54-mc/dram.c | 37 +++ > arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ > arch/riscv/include/asm/arch-generic/clk.h| 14 --- > board/sifive/fu540/Kconfig | 49 -- > board/sifive/fu540/MAINTAINERS | 9 -- > board/sifive/fu540/Makefile | 5 - > board/sifive/fu540/fu540.c | 139 > --- > board/sifive/hifive_unleashed/Kconfig| 52 ++ > board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ > board/sifive/hifive_unleashed/Makefile | 5 + > board/sifive/hifive_unleashed/fu540.c| 139 > +++ > configs/hifive_unleashed_defconfig | 11 +++ > configs/sifive_fu540_defconfig | 11 --- > include/configs/hifive_unleashed.h | 47 + > include/configs/sifive-fu540.h | 47 - > 23 files changed, 370 insertions(+), 367 deletions(-) > delete mode 100644 arch/riscv/cpu/generic/Kconfig > delete mode 100644 arch/riscv/cpu/generic/Makefile > delete mode 100644 arch/riscv/cpu/generic/cpu.c > delete mode 100644 arch/riscv/cpu/generic/dram.c It looks that you did not use "git mv" command. > create mode 100644 arch/riscv/cpu/u54-mc/Kconfig > create mode 100644 arch/riscv/cpu/u54-mc/Makefile > create mode 100644 arch/riscv/cpu/u54-mc/cpu.c > create mode 100644 arch/riscv/cpu/u54-mc/dram.c > create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h > delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h > delete mode 100644 board/sifive/fu540/Kconfig > delete mode 100644 board/sifive/fu540/MAINTAINERS > delete mode 100644 board/sifive/fu540/Makefile > delete mode 100644 board/sifive/fu540/fu540.c > create mode 100644 board/sifive/hifive_unleashed/Kconfig > create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS > create mode 100644 board/sifive/hifive_unleashed/Makefile > create mode 100644 board/sifive/hifive_unleashed/fu540.c > create mode 100644 configs/hifive_unleashed_defconfig > delete mode 100644 configs/sifive_fu540_defconfig > create mode 100644 include/configs/hifive_unleashed.h > delete mode 100644 include/configs/sifive-fu540.h > Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
This patch aligns the current implementation of HiFive Unleashed board configuration framework with the one described in doc/README.kconfig. Signed-off-by: Sagar Shrikant Kadam --- arch/riscv/Kconfig | 6 +- arch/riscv/cpu/generic/Kconfig | 12 --- arch/riscv/cpu/generic/Makefile | 6 -- arch/riscv/cpu/generic/cpu.c | 35 --- arch/riscv/cpu/generic/dram.c| 37 --- arch/riscv/cpu/u54-mc/Kconfig| 12 +++ arch/riscv/cpu/u54-mc/Makefile | 6 ++ arch/riscv/cpu/u54-mc/cpu.c | 35 +++ arch/riscv/cpu/u54-mc/dram.c | 37 +++ arch/riscv/include/asm/arch-fu540-c000/clk.h | 14 +++ arch/riscv/include/asm/arch-generic/clk.h| 14 --- board/sifive/fu540/Kconfig | 49 -- board/sifive/fu540/MAINTAINERS | 9 -- board/sifive/fu540/Makefile | 5 - board/sifive/fu540/fu540.c | 139 --- board/sifive/hifive_unleashed/Kconfig| 52 ++ board/sifive/hifive_unleashed/MAINTAINERS| 9 ++ board/sifive/hifive_unleashed/Makefile | 5 + board/sifive/hifive_unleashed/fu540.c| 139 +++ configs/hifive_unleashed_defconfig | 11 +++ configs/sifive_fu540_defconfig | 11 --- include/configs/hifive_unleashed.h | 47 + include/configs/sifive-fu540.h | 47 - 23 files changed, 370 insertions(+), 367 deletions(-) delete mode 100644 arch/riscv/cpu/generic/Kconfig delete mode 100644 arch/riscv/cpu/generic/Makefile delete mode 100644 arch/riscv/cpu/generic/cpu.c delete mode 100644 arch/riscv/cpu/generic/dram.c create mode 100644 arch/riscv/cpu/u54-mc/Kconfig create mode 100644 arch/riscv/cpu/u54-mc/Makefile create mode 100644 arch/riscv/cpu/u54-mc/cpu.c create mode 100644 arch/riscv/cpu/u54-mc/dram.c create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h delete mode 100644 board/sifive/fu540/Kconfig delete mode 100644 board/sifive/fu540/MAINTAINERS delete mode 100644 board/sifive/fu540/Makefile delete mode 100644 board/sifive/fu540/fu540.c create mode 100644 board/sifive/hifive_unleashed/Kconfig create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS create mode 100644 board/sifive/hifive_unleashed/Makefile create mode 100644 board/sifive/hifive_unleashed/fu540.c create mode 100644 configs/hifive_unleashed_defconfig delete mode 100644 configs/sifive_fu540_defconfig create mode 100644 include/configs/hifive_unleashed.h delete mode 100644 include/configs/sifive-fu540.h diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 8cfc7d0..82891fd 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -17,7 +17,7 @@ config TARGET_MICROCHIP_ICICLE config TARGET_QEMU_VIRT bool "Support QEMU Virt Board" -config TARGET_SIFIVE_FU540 +config TARGET_SIFIVE_HIFIVE_UNLEASHED bool "Support SiFive FU540 Board" endchoice @@ -52,11 +52,11 @@ config SPL_SYS_DCACHE_OFF source "board/AndesTech/ax25-ae350/Kconfig" source "board/emulation/qemu-riscv/Kconfig" source "board/microchip/mpfs_icicle/Kconfig" -source "board/sifive/fu540/Kconfig" +source "board/sifive/hifive_unleashed/Kconfig" # platform-specific options below source "arch/riscv/cpu/ax25/Kconfig" -source "arch/riscv/cpu/generic/Kconfig" +source "arch/riscv/cpu/u54-mc/Kconfig" # architecture-specific options below diff --git a/arch/riscv/cpu/generic/Kconfig b/arch/riscv/cpu/generic/Kconfig deleted file mode 100644 index 1d6ab50..000 --- a/arch/riscv/cpu/generic/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2018, Bin Meng - -config GENERIC_RISCV - bool - select ARCH_EARLY_INIT_R - imply CPU - imply CPU_RISCV - imply RISCV_TIMER - imply SIFIVE_CLINT if RISCV_MMODE - imply CMD_CPU diff --git a/arch/riscv/cpu/generic/Makefile b/arch/riscv/cpu/generic/Makefile deleted file mode 100644 index 258e462..000 --- a/arch/riscv/cpu/generic/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2018, Bin Meng - -obj-y += dram.o -obj-y += cpu.o diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c deleted file mode 100644 index ad2950c..000 --- a/arch/riscv/cpu/generic/cpu.c +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2018, Bin Meng - */ - -#include -#include - -/* - * cleanup_before_linux() is called just before we call linux - * it prepares the processor for linux - * - * we disable interrupt and caches. - */ -int cleanup_before_linux(void) -{ - disable_interrupts(); - - cache_flush(); - - return 0; -} - -/* To enumerate devices on the /soc/ node, create a