mbox series

[v7,0/8] Add FU740 chip and HiFive Unmatched board support

Message ID 20210422091202.396956-1-green.wan@sifive.com
Headers show
Series Add FU740 chip and HiFive Unmatched board support | expand

Message

Green Wan April 22, 2021, 9:11 a.m. UTC
This patch set is to add SiFive fu740 chip and HiFive Unmatched board
support. Patches are split into several parts:

  - [PATCH v7 1/8] support for fu740 cpu
  - [PATCH v7 2/8] support for fu740 clk driver
  - [PATCH v7 3/8] rename and support for fu740 ram driver
  - [PATCH v7 4/8] add pcie driver
  - [PATCH v7 5/8] dts for SiFive fu740
  - [PATCH v7 6/8] dts for SiFive Unmatched board
  - [PATCH v7 7/8] add Unmatched board support
  - [PATCH v7 8/8] add fu740 support to macb driver

Description

  - For fu740 cpu support, reuse most of fu540 cpu.
  - For prci driver, add one abstract layer to separate fu540 and
    fu740. Move orignal fu540 code to separate files.
  - For pcie driver, it depends on gpio, prci, clk and reset drivers
    to do init&reset works. Also based on pcie_dw_common.c
  - Align with Linux DT file.

Tests and patch checks

  - Able to boot both unmatched and unleashed boards.
  - PCIe tests
    . M.2 NVMe SSD
    . e1000 compatibale ethernet adapter (ping&tftpboot)
    . pci-to-usb adapter(usb mass storage)
  - checkpatch is performed. To keep code derived from other boards
    the same, ignore some warnings/errors in [PATCH 7/8].

Changlogs
  - V7
    . Rebase to latest master branch
    . Moved dts for fu740 patch [v6 1/7] to [v7 5/8] and seperate dts of
      Unmatched board from [v6 6/7] into [v7 6/8]
    . Applied PCIe refactoring patch to base on the common code in
      pcie_dw_common.c
  - V6
    . Remove redundant DT string for 1.2GHz CPU clock and squash to
      [1/7]
  - V5
    . Fix unleashed build error in patch [6/8]
    . Append one more set for 1.2GHz CPU speed
    . Add "#include <asm/global_data.h>" back to sifive_ddr.c
    . Add Reviewed-by to [4/8] and [7/8]
  - V4
    . fixed incorrect file name in ./board/sifive/unmatched/Makefile
    . fixed link in doc/board/sifive/index.rst, passed 'make htmldocs'
  - V3
    . Rebase to unleashed rename v2 patch
    . Rename
      doc/board/sifive/unmatched.rst
      board/sifive/unmatched/unmatched.c
    . Fix tail whitespace
    . Add 'git mv' info to ram driver and merge patch back to one
    . Add comment to macb driver for PLL hardware quirk
    . Add reviewed-by to patch [6/7] 
    . Add 'gpio-poweroff' node for upcoming opensbi integration
  - V2
    . Rebase to unleashed rename patch
    . remove unnessaary fu540 changes
    . split ram driver patch into 2 to keep 'git mv' info
    . use a shorter name for unmatched support
    . Remove redundant&incorrect temperature-sensor in DT
    . Remove unnecessary USB EHCI & OHCI from defconfig
    . Revised fu740 doc
    . Fixed year of copyright
    . Add reviewed-by received in v1 patch

David Abdurachmanov (1):
  drivers: net: macb: add fu740 support

Green Wan (7):
  riscv: cpu: fu740: Add support for cpu fu740
  drivers: clk: add fu740 support
  drivers: ram: sifive: rename fu540_ddr and add fu740 support
  drivers: pci: add pcie support for fu740
  riscv: dts: add fu740 support
  riscv: dts: add SiFive Unmatched board support
  board: sifive: add HiFive Unmatched board support

 arch/riscv/Kconfig                            |    5 +
 arch/riscv/cpu/fu740/Kconfig                  |   37 +
 arch/riscv/cpu/fu740/Makefile                 |   12 +
 arch/riscv/cpu/fu740/cache.c                  |   55 +
 arch/riscv/cpu/fu740/cpu.c                    |   22 +
 arch/riscv/cpu/fu740/dram.c                   |   38 +
 arch/riscv/cpu/fu740/spl.c                    |   23 +
 arch/riscv/dts/Makefile                       |    1 +
 arch/riscv/dts/fu740-c000-u-boot.dtsi         |  105 ++
 arch/riscv/dts/fu740-c000.dtsi                |  329 ++++
 .../dts/fu740-hifive-unmatched-a00-ddr.dtsi   | 1489 +++++++++++++++++
 .../dts/hifive-unmatched-a00-u-boot.dtsi      |   40 +
 arch/riscv/dts/hifive-unmatched-a00.dts       |  259 +++
 arch/riscv/include/asm/arch-fu740/cache.h     |   14 +
 arch/riscv/include/asm/arch-fu740/clk.h       |   14 +
 arch/riscv/include/asm/arch-fu740/gpio.h      |   38 +
 arch/riscv/include/asm/arch-fu740/reset.h     |   13 +
 arch/riscv/include/asm/arch-fu740/spl.h       |   14 +
 arch/riscv/lib/sifive_clint.c                 |    1 -
 board/sifive/unleashed/Kconfig                |    1 +
 board/sifive/unmatched/Kconfig                |   50 +
 board/sifive/unmatched/MAINTAINERS            |    9 +
 board/sifive/unmatched/Makefile               |    9 +
 board/sifive/unmatched/spl.c                  |   85 +
 board/sifive/unmatched/unmatched.c            |   24 +
 common/spl/Kconfig                            |    4 +-
 configs/sifive_unleashed_defconfig            |    1 +
 configs/sifive_unmatched_defconfig            |   54 +
 doc/board/sifive/index.rst                    |    1 +
 doc/board/sifive/unmatched.rst                |  536 ++++++
 drivers/clk/sifive/Kconfig                    |    8 +-
 drivers/clk/sifive/Makefile                   |    4 +-
 drivers/clk/sifive/fu540-prci.c               |  769 +--------
 drivers/clk/sifive/fu540-prci.h               |   22 +
 drivers/clk/sifive/fu740-prci.c               |  158 ++
 drivers/clk/sifive/fu740-prci.h               |   22 +
 drivers/clk/sifive/sifive-prci.c              |  733 ++++++++
 drivers/clk/sifive/sifive-prci.h              |  323 ++++
 drivers/net/macb.c                            |   13 +-
 drivers/pci/Kconfig                           |   10 +
 drivers/pci/Makefile                          |    1 +
 drivers/pci/pcie_dw_sifive.c                  |  508 ++++++
 drivers/ram/sifive/Kconfig                    |    8 +-
 drivers/ram/sifive/Makefile                   |    2 +-
 .../ram/sifive/{fu540_ddr.c => sifive_ddr.c}  |   89 +-
 drivers/reset/Kconfig                         |    2 +-
 include/configs/sifive-unmatched.h            |   85 +
 include/dt-bindings/clock/sifive-fu740-prci.h |   25 +
 include/dt-bindings/reset/sifive-fu740-prci.h |   19 +
 49 files changed, 5277 insertions(+), 807 deletions(-)
 create mode 100644 arch/riscv/cpu/fu740/Kconfig
 create mode 100644 arch/riscv/cpu/fu740/Makefile
 create mode 100644 arch/riscv/cpu/fu740/cache.c
 create mode 100644 arch/riscv/cpu/fu740/cpu.c
 create mode 100644 arch/riscv/cpu/fu740/dram.c
 create mode 100644 arch/riscv/cpu/fu740/spl.c
 create mode 100644 arch/riscv/dts/fu740-c000-u-boot.dtsi
 create mode 100644 arch/riscv/dts/fu740-c000.dtsi
 create mode 100644 arch/riscv/dts/fu740-hifive-unmatched-a00-ddr.dtsi
 create mode 100644 arch/riscv/dts/hifive-unmatched-a00-u-boot.dtsi
 create mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts
 create mode 100644 arch/riscv/include/asm/arch-fu740/cache.h
 create mode 100644 arch/riscv/include/asm/arch-fu740/clk.h
 create mode 100644 arch/riscv/include/asm/arch-fu740/gpio.h
 create mode 100644 arch/riscv/include/asm/arch-fu740/reset.h
 create mode 100644 arch/riscv/include/asm/arch-fu740/spl.h
 create mode 100644 board/sifive/unmatched/Kconfig
 create mode 100644 board/sifive/unmatched/MAINTAINERS
 create mode 100644 board/sifive/unmatched/Makefile
 create mode 100644 board/sifive/unmatched/spl.c
 create mode 100644 board/sifive/unmatched/unmatched.c
 create mode 100644 configs/sifive_unmatched_defconfig
 create mode 100644 doc/board/sifive/unmatched.rst
 create mode 100644 drivers/clk/sifive/fu540-prci.h
 create mode 100644 drivers/clk/sifive/fu740-prci.c
 create mode 100644 drivers/clk/sifive/fu740-prci.h
 create mode 100644 drivers/clk/sifive/sifive-prci.c
 create mode 100644 drivers/clk/sifive/sifive-prci.h
 create mode 100644 drivers/pci/pcie_dw_sifive.c
 rename drivers/ram/sifive/{fu540_ddr.c => sifive_ddr.c} (81%)
 create mode 100644 include/configs/sifive-unmatched.h
 create mode 100644 include/dt-bindings/clock/sifive-fu740-prci.h
 create mode 100644 include/dt-bindings/reset/sifive-fu740-prci.h

Comments

Palmer Dabbelt April 23, 2021, 3:40 a.m. UTC | #1
On Thu, 22 Apr 2021 02:11:51 PDT (-0700), green.wan@sifive.com wrote:
> This patch set is to add SiFive fu740 chip and HiFive Unmatched board
> support. Patches are split into several parts:
>
>   - [PATCH v7 1/8] support for fu740 cpu
>   - [PATCH v7 2/8] support for fu740 clk driver
>   - [PATCH v7 3/8] rename and support for fu740 ram driver
>   - [PATCH v7 4/8] add pcie driver
>   - [PATCH v7 5/8] dts for SiFive fu740
>   - [PATCH v7 6/8] dts for SiFive Unmatched board
>   - [PATCH v7 7/8] add Unmatched board support
>   - [PATCH v7 8/8] add fu740 support to macb driver

I've got a bunch of versions of this in my inbox, but I always have an 
arbitrary subset of the patches.  This generally LGTM, but it's kind of 
hard to figure out what goes where when patch sets are split between 
trees like this.

IMO the drivers don't need to be in my tree for the DTS files to get 
merged, we just need the bindings to be agreed upon.  Can you send a 
version of this with just the patches that haven't otherwise been merged 
and are relevant for the RISC-V tree?

>
> Description
>
>   - For fu740 cpu support, reuse most of fu540 cpu.
>   - For prci driver, add one abstract layer to separate fu540 and
>     fu740. Move orignal fu540 code to separate files.
>   - For pcie driver, it depends on gpio, prci, clk and reset drivers
>     to do init&reset works. Also based on pcie_dw_common.c
>   - Align with Linux DT file.
>
> Tests and patch checks
>
>   - Able to boot both unmatched and unleashed boards.
>   - PCIe tests
>     . M.2 NVMe SSD
>     . e1000 compatibale ethernet adapter (ping&tftpboot)
>     . pci-to-usb adapter(usb mass storage)
>   - checkpatch is performed. To keep code derived from other boards
>     the same, ignore some warnings/errors in [PATCH 7/8].
>
> Changlogs
>   - V7
>     . Rebase to latest master branch
>     . Moved dts for fu740 patch [v6 1/7] to [v7 5/8] and seperate dts of
>       Unmatched board from [v6 6/7] into [v7 6/8]
>     . Applied PCIe refactoring patch to base on the common code in
>       pcie_dw_common.c
>   - V6
>     . Remove redundant DT string for 1.2GHz CPU clock and squash to
>       [1/7]
>   - V5
>     . Fix unleashed build error in patch [6/8]
>     . Append one more set for 1.2GHz CPU speed
>     . Add "#include <asm/global_data.h>" back to sifive_ddr.c
>     . Add Reviewed-by to [4/8] and [7/8]
>   - V4
>     . fixed incorrect file name in ./board/sifive/unmatched/Makefile
>     . fixed link in doc/board/sifive/index.rst, passed 'make htmldocs'
>   - V3
>     . Rebase to unleashed rename v2 patch
>     . Rename
>       doc/board/sifive/unmatched.rst
>       board/sifive/unmatched/unmatched.c
>     . Fix tail whitespace
>     . Add 'git mv' info to ram driver and merge patch back to one
>     . Add comment to macb driver for PLL hardware quirk
>     . Add reviewed-by to patch [6/7]
>     . Add 'gpio-poweroff' node for upcoming opensbi integration
>   - V2
>     . Rebase to unleashed rename patch
>     . remove unnessaary fu540 changes
>     . split ram driver patch into 2 to keep 'git mv' info
>     . use a shorter name for unmatched support
>     . Remove redundant&incorrect temperature-sensor in DT
>     . Remove unnecessary USB EHCI & OHCI from defconfig
>     . Revised fu740 doc
>     . Fixed year of copyright
>     . Add reviewed-by received in v1 patch
>
> David Abdurachmanov (1):
>   drivers: net: macb: add fu740 support
>
> Green Wan (7):
>   riscv: cpu: fu740: Add support for cpu fu740
>   drivers: clk: add fu740 support
>   drivers: ram: sifive: rename fu540_ddr and add fu740 support
>   drivers: pci: add pcie support for fu740
>   riscv: dts: add fu740 support
>   riscv: dts: add SiFive Unmatched board support
>   board: sifive: add HiFive Unmatched board support
>
>  arch/riscv/Kconfig                            |    5 +
>  arch/riscv/cpu/fu740/Kconfig                  |   37 +
>  arch/riscv/cpu/fu740/Makefile                 |   12 +
>  arch/riscv/cpu/fu740/cache.c                  |   55 +
>  arch/riscv/cpu/fu740/cpu.c                    |   22 +
>  arch/riscv/cpu/fu740/dram.c                   |   38 +
>  arch/riscv/cpu/fu740/spl.c                    |   23 +
>  arch/riscv/dts/Makefile                       |    1 +
>  arch/riscv/dts/fu740-c000-u-boot.dtsi         |  105 ++
>  arch/riscv/dts/fu740-c000.dtsi                |  329 ++++
>  .../dts/fu740-hifive-unmatched-a00-ddr.dtsi   | 1489 +++++++++++++++++
>  .../dts/hifive-unmatched-a00-u-boot.dtsi      |   40 +
>  arch/riscv/dts/hifive-unmatched-a00.dts       |  259 +++
>  arch/riscv/include/asm/arch-fu740/cache.h     |   14 +
>  arch/riscv/include/asm/arch-fu740/clk.h       |   14 +
>  arch/riscv/include/asm/arch-fu740/gpio.h      |   38 +
>  arch/riscv/include/asm/arch-fu740/reset.h     |   13 +
>  arch/riscv/include/asm/arch-fu740/spl.h       |   14 +
>  arch/riscv/lib/sifive_clint.c                 |    1 -
>  board/sifive/unleashed/Kconfig                |    1 +
>  board/sifive/unmatched/Kconfig                |   50 +
>  board/sifive/unmatched/MAINTAINERS            |    9 +
>  board/sifive/unmatched/Makefile               |    9 +
>  board/sifive/unmatched/spl.c                  |   85 +
>  board/sifive/unmatched/unmatched.c            |   24 +
>  common/spl/Kconfig                            |    4 +-
>  configs/sifive_unleashed_defconfig            |    1 +
>  configs/sifive_unmatched_defconfig            |   54 +
>  doc/board/sifive/index.rst                    |    1 +
>  doc/board/sifive/unmatched.rst                |  536 ++++++
>  drivers/clk/sifive/Kconfig                    |    8 +-
>  drivers/clk/sifive/Makefile                   |    4 +-
>  drivers/clk/sifive/fu540-prci.c               |  769 +--------
>  drivers/clk/sifive/fu540-prci.h               |   22 +
>  drivers/clk/sifive/fu740-prci.c               |  158 ++
>  drivers/clk/sifive/fu740-prci.h               |   22 +
>  drivers/clk/sifive/sifive-prci.c              |  733 ++++++++
>  drivers/clk/sifive/sifive-prci.h              |  323 ++++
>  drivers/net/macb.c                            |   13 +-
>  drivers/pci/Kconfig                           |   10 +
>  drivers/pci/Makefile                          |    1 +
>  drivers/pci/pcie_dw_sifive.c                  |  508 ++++++
>  drivers/ram/sifive/Kconfig                    |    8 +-
>  drivers/ram/sifive/Makefile                   |    2 +-
>  .../ram/sifive/{fu540_ddr.c => sifive_ddr.c}  |   89 +-
>  drivers/reset/Kconfig                         |    2 +-
>  include/configs/sifive-unmatched.h            |   85 +
>  include/dt-bindings/clock/sifive-fu740-prci.h |   25 +
>  include/dt-bindings/reset/sifive-fu740-prci.h |   19 +
>  49 files changed, 5277 insertions(+), 807 deletions(-)
>  create mode 100644 arch/riscv/cpu/fu740/Kconfig
>  create mode 100644 arch/riscv/cpu/fu740/Makefile
>  create mode 100644 arch/riscv/cpu/fu740/cache.c
>  create mode 100644 arch/riscv/cpu/fu740/cpu.c
>  create mode 100644 arch/riscv/cpu/fu740/dram.c
>  create mode 100644 arch/riscv/cpu/fu740/spl.c
>  create mode 100644 arch/riscv/dts/fu740-c000-u-boot.dtsi
>  create mode 100644 arch/riscv/dts/fu740-c000.dtsi
>  create mode 100644 arch/riscv/dts/fu740-hifive-unmatched-a00-ddr.dtsi
>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00-u-boot.dtsi
>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts
>  create mode 100644 arch/riscv/include/asm/arch-fu740/cache.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/clk.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/gpio.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/reset.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/spl.h
>  create mode 100644 board/sifive/unmatched/Kconfig
>  create mode 100644 board/sifive/unmatched/MAINTAINERS
>  create mode 100644 board/sifive/unmatched/Makefile
>  create mode 100644 board/sifive/unmatched/spl.c
>  create mode 100644 board/sifive/unmatched/unmatched.c
>  create mode 100644 configs/sifive_unmatched_defconfig
>  create mode 100644 doc/board/sifive/unmatched.rst
>  create mode 100644 drivers/clk/sifive/fu540-prci.h
>  create mode 100644 drivers/clk/sifive/fu740-prci.c
>  create mode 100644 drivers/clk/sifive/fu740-prci.h
>  create mode 100644 drivers/clk/sifive/sifive-prci.c
>  create mode 100644 drivers/clk/sifive/sifive-prci.h
>  create mode 100644 drivers/pci/pcie_dw_sifive.c
>  rename drivers/ram/sifive/{fu540_ddr.c => sifive_ddr.c} (81%)
>  create mode 100644 include/configs/sifive-unmatched.h
>  create mode 100644 include/dt-bindings/clock/sifive-fu740-prci.h
>  create mode 100644 include/dt-bindings/reset/sifive-fu740-prci.h
Palmer Dabbelt April 23, 2021, 4:01 a.m. UTC | #2
On Thu, 22 Apr 2021 20:40:43 PDT (-0700), Palmer Dabbelt wrote:
> On Thu, 22 Apr 2021 02:11:51 PDT (-0700), green.wan@sifive.com wrote:
>> This patch set is to add SiFive fu740 chip and HiFive Unmatched board
>> support. Patches are split into several parts:
>>
>>   - [PATCH v7 1/8] support for fu740 cpu
>>   - [PATCH v7 2/8] support for fu740 clk driver
>>   - [PATCH v7 3/8] rename and support for fu740 ram driver
>>   - [PATCH v7 4/8] add pcie driver
>>   - [PATCH v7 5/8] dts for SiFive fu740
>>   - [PATCH v7 6/8] dts for SiFive Unmatched board
>>   - [PATCH v7 7/8] add Unmatched board support
>>   - [PATCH v7 8/8] add fu740 support to macb driver
>
> I've got a bunch of versions of this in my inbox, but I always have an
> arbitrary subset of the patches.  This generally LGTM, but it's kind of
> hard to figure out what goes where when patch sets are split between
> trees like this.
>
> IMO the drivers don't need to be in my tree for the DTS files to get
> merged, we just need the bindings to be agreed upon.  Can you send a
> version of this with just the patches that haven't otherwise been merged
> and are relevant for the RISC-V tree?

Ah, sorry, I'm lost here -- I thought this was a Linux patch set.  That 
probably explains why I can't follow the thread... ;)

>
>>
>> Description
>>
>>   - For fu740 cpu support, reuse most of fu540 cpu.
>>   - For prci driver, add one abstract layer to separate fu540 and
>>     fu740. Move orignal fu540 code to separate files.
>>   - For pcie driver, it depends on gpio, prci, clk and reset drivers
>>     to do init&reset works. Also based on pcie_dw_common.c
>>   - Align with Linux DT file.
>>
>> Tests and patch checks
>>
>>   - Able to boot both unmatched and unleashed boards.
>>   - PCIe tests
>>     . M.2 NVMe SSD
>>     . e1000 compatibale ethernet adapter (ping&tftpboot)
>>     . pci-to-usb adapter(usb mass storage)
>>   - checkpatch is performed. To keep code derived from other boards
>>     the same, ignore some warnings/errors in [PATCH 7/8].
>>
>> Changlogs
>>   - V7
>>     . Rebase to latest master branch
>>     . Moved dts for fu740 patch [v6 1/7] to [v7 5/8] and seperate dts of
>>       Unmatched board from [v6 6/7] into [v7 6/8]
>>     . Applied PCIe refactoring patch to base on the common code in
>>       pcie_dw_common.c
>>   - V6
>>     . Remove redundant DT string for 1.2GHz CPU clock and squash to
>>       [1/7]
>>   - V5
>>     . Fix unleashed build error in patch [6/8]
>>     . Append one more set for 1.2GHz CPU speed
>>     . Add "#include <asm/global_data.h>" back to sifive_ddr.c
>>     . Add Reviewed-by to [4/8] and [7/8]
>>   - V4
>>     . fixed incorrect file name in ./board/sifive/unmatched/Makefile
>>     . fixed link in doc/board/sifive/index.rst, passed 'make htmldocs'
>>   - V3
>>     . Rebase to unleashed rename v2 patch
>>     . Rename
>>       doc/board/sifive/unmatched.rst
>>       board/sifive/unmatched/unmatched.c
>>     . Fix tail whitespace
>>     . Add 'git mv' info to ram driver and merge patch back to one
>>     . Add comment to macb driver for PLL hardware quirk
>>     . Add reviewed-by to patch [6/7]
>>     . Add 'gpio-poweroff' node for upcoming opensbi integration
>>   - V2
>>     . Rebase to unleashed rename patch
>>     . remove unnessaary fu540 changes
>>     . split ram driver patch into 2 to keep 'git mv' info
>>     . use a shorter name for unmatched support
>>     . Remove redundant&incorrect temperature-sensor in DT
>>     . Remove unnecessary USB EHCI & OHCI from defconfig
>>     . Revised fu740 doc
>>     . Fixed year of copyright
>>     . Add reviewed-by received in v1 patch
>>
>> David Abdurachmanov (1):
>>   drivers: net: macb: add fu740 support
>>
>> Green Wan (7):
>>   riscv: cpu: fu740: Add support for cpu fu740
>>   drivers: clk: add fu740 support
>>   drivers: ram: sifive: rename fu540_ddr and add fu740 support
>>   drivers: pci: add pcie support for fu740
>>   riscv: dts: add fu740 support
>>   riscv: dts: add SiFive Unmatched board support
>>   board: sifive: add HiFive Unmatched board support
>>
>>  arch/riscv/Kconfig                            |    5 +
>>  arch/riscv/cpu/fu740/Kconfig                  |   37 +
>>  arch/riscv/cpu/fu740/Makefile                 |   12 +
>>  arch/riscv/cpu/fu740/cache.c                  |   55 +
>>  arch/riscv/cpu/fu740/cpu.c                    |   22 +
>>  arch/riscv/cpu/fu740/dram.c                   |   38 +
>>  arch/riscv/cpu/fu740/spl.c                    |   23 +
>>  arch/riscv/dts/Makefile                       |    1 +
>>  arch/riscv/dts/fu740-c000-u-boot.dtsi         |  105 ++
>>  arch/riscv/dts/fu740-c000.dtsi                |  329 ++++
>>  .../dts/fu740-hifive-unmatched-a00-ddr.dtsi   | 1489 +++++++++++++++++
>>  .../dts/hifive-unmatched-a00-u-boot.dtsi      |   40 +
>>  arch/riscv/dts/hifive-unmatched-a00.dts       |  259 +++
>>  arch/riscv/include/asm/arch-fu740/cache.h     |   14 +
>>  arch/riscv/include/asm/arch-fu740/clk.h       |   14 +
>>  arch/riscv/include/asm/arch-fu740/gpio.h      |   38 +
>>  arch/riscv/include/asm/arch-fu740/reset.h     |   13 +
>>  arch/riscv/include/asm/arch-fu740/spl.h       |   14 +
>>  arch/riscv/lib/sifive_clint.c                 |    1 -
>>  board/sifive/unleashed/Kconfig                |    1 +
>>  board/sifive/unmatched/Kconfig                |   50 +
>>  board/sifive/unmatched/MAINTAINERS            |    9 +
>>  board/sifive/unmatched/Makefile               |    9 +
>>  board/sifive/unmatched/spl.c                  |   85 +
>>  board/sifive/unmatched/unmatched.c            |   24 +
>>  common/spl/Kconfig                            |    4 +-
>>  configs/sifive_unleashed_defconfig            |    1 +
>>  configs/sifive_unmatched_defconfig            |   54 +
>>  doc/board/sifive/index.rst                    |    1 +
>>  doc/board/sifive/unmatched.rst                |  536 ++++++
>>  drivers/clk/sifive/Kconfig                    |    8 +-
>>  drivers/clk/sifive/Makefile                   |    4 +-
>>  drivers/clk/sifive/fu540-prci.c               |  769 +--------
>>  drivers/clk/sifive/fu540-prci.h               |   22 +
>>  drivers/clk/sifive/fu740-prci.c               |  158 ++
>>  drivers/clk/sifive/fu740-prci.h               |   22 +
>>  drivers/clk/sifive/sifive-prci.c              |  733 ++++++++
>>  drivers/clk/sifive/sifive-prci.h              |  323 ++++
>>  drivers/net/macb.c                            |   13 +-
>>  drivers/pci/Kconfig                           |   10 +
>>  drivers/pci/Makefile                          |    1 +
>>  drivers/pci/pcie_dw_sifive.c                  |  508 ++++++
>>  drivers/ram/sifive/Kconfig                    |    8 +-
>>  drivers/ram/sifive/Makefile                   |    2 +-
>>  .../ram/sifive/{fu540_ddr.c => sifive_ddr.c}  |   89 +-
>>  drivers/reset/Kconfig                         |    2 +-
>>  include/configs/sifive-unmatched.h            |   85 +
>>  include/dt-bindings/clock/sifive-fu740-prci.h |   25 +
>>  include/dt-bindings/reset/sifive-fu740-prci.h |   19 +
>>  49 files changed, 5277 insertions(+), 807 deletions(-)
>>  create mode 100644 arch/riscv/cpu/fu740/Kconfig
>>  create mode 100644 arch/riscv/cpu/fu740/Makefile
>>  create mode 100644 arch/riscv/cpu/fu740/cache.c
>>  create mode 100644 arch/riscv/cpu/fu740/cpu.c
>>  create mode 100644 arch/riscv/cpu/fu740/dram.c
>>  create mode 100644 arch/riscv/cpu/fu740/spl.c
>>  create mode 100644 arch/riscv/dts/fu740-c000-u-boot.dtsi
>>  create mode 100644 arch/riscv/dts/fu740-c000.dtsi
>>  create mode 100644 arch/riscv/dts/fu740-hifive-unmatched-a00-ddr.dtsi
>>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00-u-boot.dtsi
>>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts
>>  create mode 100644 arch/riscv/include/asm/arch-fu740/cache.h
>>  create mode 100644 arch/riscv/include/asm/arch-fu740/clk.h
>>  create mode 100644 arch/riscv/include/asm/arch-fu740/gpio.h
>>  create mode 100644 arch/riscv/include/asm/arch-fu740/reset.h
>>  create mode 100644 arch/riscv/include/asm/arch-fu740/spl.h
>>  create mode 100644 board/sifive/unmatched/Kconfig
>>  create mode 100644 board/sifive/unmatched/MAINTAINERS
>>  create mode 100644 board/sifive/unmatched/Makefile
>>  create mode 100644 board/sifive/unmatched/spl.c
>>  create mode 100644 board/sifive/unmatched/unmatched.c
>>  create mode 100644 configs/sifive_unmatched_defconfig
>>  create mode 100644 doc/board/sifive/unmatched.rst
>>  create mode 100644 drivers/clk/sifive/fu540-prci.h
>>  create mode 100644 drivers/clk/sifive/fu740-prci.c
>>  create mode 100644 drivers/clk/sifive/fu740-prci.h
>>  create mode 100644 drivers/clk/sifive/sifive-prci.c
>>  create mode 100644 drivers/clk/sifive/sifive-prci.h
>>  create mode 100644 drivers/pci/pcie_dw_sifive.c
>>  rename drivers/ram/sifive/{fu540_ddr.c => sifive_ddr.c} (81%)
>>  create mode 100644 include/configs/sifive-unmatched.h
>>  create mode 100644 include/dt-bindings/clock/sifive-fu740-prci.h
>>  create mode 100644 include/dt-bindings/reset/sifive-fu740-prci.h
Green Wan April 29, 2021, 11:11 a.m. UTC | #3
Hi Bin,

How should this patch set be proceeded?

To summary the major changes,
- I've rebased to mainstream and merged pcie refactoring code which
based on pcie_dw_common.c
- separate unmatched dts into separated patch.

Thanks,
- Green

On Thu, Apr 22, 2021 at 5:13 PM Green Wan <green.wan@sifive.com> wrote:
>
> This patch set is to add SiFive fu740 chip and HiFive Unmatched board
> support. Patches are split into several parts:
>
>   - [PATCH v7 1/8] support for fu740 cpu
>   - [PATCH v7 2/8] support for fu740 clk driver
>   - [PATCH v7 3/8] rename and support for fu740 ram driver
>   - [PATCH v7 4/8] add pcie driver
>   - [PATCH v7 5/8] dts for SiFive fu740
>   - [PATCH v7 6/8] dts for SiFive Unmatched board
>   - [PATCH v7 7/8] add Unmatched board support
>   - [PATCH v7 8/8] add fu740 support to macb driver
>
> Description
>
>   - For fu740 cpu support, reuse most of fu540 cpu.
>   - For prci driver, add one abstract layer to separate fu540 and
>     fu740. Move orignal fu540 code to separate files.
>   - For pcie driver, it depends on gpio, prci, clk and reset drivers
>     to do init&reset works. Also based on pcie_dw_common.c
>   - Align with Linux DT file.
>
> Tests and patch checks
>
>   - Able to boot both unmatched and unleashed boards.
>   - PCIe tests
>     . M.2 NVMe SSD
>     . e1000 compatibale ethernet adapter (ping&tftpboot)
>     . pci-to-usb adapter(usb mass storage)
>   - checkpatch is performed. To keep code derived from other boards
>     the same, ignore some warnings/errors in [PATCH 7/8].
>
> Changlogs
>   - V7
>     . Rebase to latest master branch
>     . Moved dts for fu740 patch [v6 1/7] to [v7 5/8] and seperate dts of
>       Unmatched board from [v6 6/7] into [v7 6/8]
>     . Applied PCIe refactoring patch to base on the common code in
>       pcie_dw_common.c
>   - V6
>     . Remove redundant DT string for 1.2GHz CPU clock and squash to
>       [1/7]
>   - V5
>     . Fix unleashed build error in patch [6/8]
>     . Append one more set for 1.2GHz CPU speed
>     . Add "#include <asm/global_data.h>" back to sifive_ddr.c
>     . Add Reviewed-by to [4/8] and [7/8]
>   - V4
>     . fixed incorrect file name in ./board/sifive/unmatched/Makefile
>     . fixed link in doc/board/sifive/index.rst, passed 'make htmldocs'
>   - V3
>     . Rebase to unleashed rename v2 patch
>     . Rename
>       doc/board/sifive/unmatched.rst
>       board/sifive/unmatched/unmatched.c
>     . Fix tail whitespace
>     . Add 'git mv' info to ram driver and merge patch back to one
>     . Add comment to macb driver for PLL hardware quirk
>     . Add reviewed-by to patch [6/7]
>     . Add 'gpio-poweroff' node for upcoming opensbi integration
>   - V2
>     . Rebase to unleashed rename patch
>     . remove unnessaary fu540 changes
>     . split ram driver patch into 2 to keep 'git mv' info
>     . use a shorter name for unmatched support
>     . Remove redundant&incorrect temperature-sensor in DT
>     . Remove unnecessary USB EHCI & OHCI from defconfig
>     . Revised fu740 doc
>     . Fixed year of copyright
>     . Add reviewed-by received in v1 patch
>
> David Abdurachmanov (1):
>   drivers: net: macb: add fu740 support
>
> Green Wan (7):
>   riscv: cpu: fu740: Add support for cpu fu740
>   drivers: clk: add fu740 support
>   drivers: ram: sifive: rename fu540_ddr and add fu740 support
>   drivers: pci: add pcie support for fu740
>   riscv: dts: add fu740 support
>   riscv: dts: add SiFive Unmatched board support
>   board: sifive: add HiFive Unmatched board support
>
>  arch/riscv/Kconfig                            |    5 +
>  arch/riscv/cpu/fu740/Kconfig                  |   37 +
>  arch/riscv/cpu/fu740/Makefile                 |   12 +
>  arch/riscv/cpu/fu740/cache.c                  |   55 +
>  arch/riscv/cpu/fu740/cpu.c                    |   22 +
>  arch/riscv/cpu/fu740/dram.c                   |   38 +
>  arch/riscv/cpu/fu740/spl.c                    |   23 +
>  arch/riscv/dts/Makefile                       |    1 +
>  arch/riscv/dts/fu740-c000-u-boot.dtsi         |  105 ++
>  arch/riscv/dts/fu740-c000.dtsi                |  329 ++++
>  .../dts/fu740-hifive-unmatched-a00-ddr.dtsi   | 1489 +++++++++++++++++
>  .../dts/hifive-unmatched-a00-u-boot.dtsi      |   40 +
>  arch/riscv/dts/hifive-unmatched-a00.dts       |  259 +++
>  arch/riscv/include/asm/arch-fu740/cache.h     |   14 +
>  arch/riscv/include/asm/arch-fu740/clk.h       |   14 +
>  arch/riscv/include/asm/arch-fu740/gpio.h      |   38 +
>  arch/riscv/include/asm/arch-fu740/reset.h     |   13 +
>  arch/riscv/include/asm/arch-fu740/spl.h       |   14 +
>  arch/riscv/lib/sifive_clint.c                 |    1 -
>  board/sifive/unleashed/Kconfig                |    1 +
>  board/sifive/unmatched/Kconfig                |   50 +
>  board/sifive/unmatched/MAINTAINERS            |    9 +
>  board/sifive/unmatched/Makefile               |    9 +
>  board/sifive/unmatched/spl.c                  |   85 +
>  board/sifive/unmatched/unmatched.c            |   24 +
>  common/spl/Kconfig                            |    4 +-
>  configs/sifive_unleashed_defconfig            |    1 +
>  configs/sifive_unmatched_defconfig            |   54 +
>  doc/board/sifive/index.rst                    |    1 +
>  doc/board/sifive/unmatched.rst                |  536 ++++++
>  drivers/clk/sifive/Kconfig                    |    8 +-
>  drivers/clk/sifive/Makefile                   |    4 +-
>  drivers/clk/sifive/fu540-prci.c               |  769 +--------
>  drivers/clk/sifive/fu540-prci.h               |   22 +
>  drivers/clk/sifive/fu740-prci.c               |  158 ++
>  drivers/clk/sifive/fu740-prci.h               |   22 +
>  drivers/clk/sifive/sifive-prci.c              |  733 ++++++++
>  drivers/clk/sifive/sifive-prci.h              |  323 ++++
>  drivers/net/macb.c                            |   13 +-
>  drivers/pci/Kconfig                           |   10 +
>  drivers/pci/Makefile                          |    1 +
>  drivers/pci/pcie_dw_sifive.c                  |  508 ++++++
>  drivers/ram/sifive/Kconfig                    |    8 +-
>  drivers/ram/sifive/Makefile                   |    2 +-
>  .../ram/sifive/{fu540_ddr.c => sifive_ddr.c}  |   89 +-
>  drivers/reset/Kconfig                         |    2 +-
>  include/configs/sifive-unmatched.h            |   85 +
>  include/dt-bindings/clock/sifive-fu740-prci.h |   25 +
>  include/dt-bindings/reset/sifive-fu740-prci.h |   19 +
>  49 files changed, 5277 insertions(+), 807 deletions(-)
>  create mode 100644 arch/riscv/cpu/fu740/Kconfig
>  create mode 100644 arch/riscv/cpu/fu740/Makefile
>  create mode 100644 arch/riscv/cpu/fu740/cache.c
>  create mode 100644 arch/riscv/cpu/fu740/cpu.c
>  create mode 100644 arch/riscv/cpu/fu740/dram.c
>  create mode 100644 arch/riscv/cpu/fu740/spl.c
>  create mode 100644 arch/riscv/dts/fu740-c000-u-boot.dtsi
>  create mode 100644 arch/riscv/dts/fu740-c000.dtsi
>  create mode 100644 arch/riscv/dts/fu740-hifive-unmatched-a00-ddr.dtsi
>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00-u-boot.dtsi
>  create mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts
>  create mode 100644 arch/riscv/include/asm/arch-fu740/cache.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/clk.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/gpio.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/reset.h
>  create mode 100644 arch/riscv/include/asm/arch-fu740/spl.h
>  create mode 100644 board/sifive/unmatched/Kconfig
>  create mode 100644 board/sifive/unmatched/MAINTAINERS
>  create mode 100644 board/sifive/unmatched/Makefile
>  create mode 100644 board/sifive/unmatched/spl.c
>  create mode 100644 board/sifive/unmatched/unmatched.c
>  create mode 100644 configs/sifive_unmatched_defconfig
>  create mode 100644 doc/board/sifive/unmatched.rst
>  create mode 100644 drivers/clk/sifive/fu540-prci.h
>  create mode 100644 drivers/clk/sifive/fu740-prci.c
>  create mode 100644 drivers/clk/sifive/fu740-prci.h
>  create mode 100644 drivers/clk/sifive/sifive-prci.c
>  create mode 100644 drivers/clk/sifive/sifive-prci.h
>  create mode 100644 drivers/pci/pcie_dw_sifive.c
>  rename drivers/ram/sifive/{fu540_ddr.c => sifive_ddr.c} (81%)
>  create mode 100644 include/configs/sifive-unmatched.h
>  create mode 100644 include/dt-bindings/clock/sifive-fu740-prci.h
>  create mode 100644 include/dt-bindings/reset/sifive-fu740-prci.h
>
> --
> 2.31.0
>
Bin Meng April 29, 2021, 12:27 p.m. UTC | #4
Hi Green,

On Thu, Apr 29, 2021 at 7:11 PM Green Wan <green.wan@sifive.com> wrote:
>
> Hi Bin,
>
> How should this patch set be proceeded?
>
> To summary the major changes,
> - I've rebased to mainstream and merged pcie refactoring code which
> based on pcie_dw_common.c
> - separate unmatched dts into separated patch.
>

I don't have specific comments. Rick should pick this up via the riscv
tree. Thanks!

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

Hi Rick,

Not sure whether you have a chance to pick it up. Or let me know if
any part needs change.

Thanks,
- Green

On Thu, Apr 29, 2021 at 8:27 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Green,
>
> On Thu, Apr 29, 2021 at 7:11 PM Green Wan <green.wan@sifive.com> wrote:
> >
> > Hi Bin,
> >
> > How should this patch set be proceeded?
> >
> > To summary the major changes,
> > - I've rebased to mainstream and merged pcie refactoring code which
> > based on pcie_dw_common.c
> > - separate unmatched dts into separated patch.
> >
>
> I don't have specific comments. Rick should pick this up via the riscv
> tree. Thanks!
>
> Regards,
> Bin
Rick Chen May 3, 2021, 2:34 a.m. UTC | #6
Hi Green,


I did not sign the Reviewed-by for this patch "board: sifive: add
HiFive Unmatched board support" from v1 to v6.
But it just has been tagged in [v7,7/8] board: sifive: add HiFive
Unmatched board support by yourself.

[v6,6/7] board: sifive: add HiFive Unmatched board support
https://patchwork.ozlabs.org/project/uboot/patch/20210408134020.238658-7-green.wan@sifive.com/

[v7,7/8] board: sifive: add HiFive Unmatched board support
https://patchwork.ozlabs.org/project/uboot/patch/20210422091202.396956-8-green.wan@sifive.com/

Actually I don't like this patch that you mix every things (arch/,
drivers/, common/, doc/)together in this patch.
But it is OK for now.

BTW, in [PATCH v7 1/8] riscv: cpu: fu740: Add support for cpu fu740
I found that arch/riscv/cpu/fu740/cpu.c and arch/riscv/fu540/cpu.c are
100% the same.

And about spl.c, they are only different in the annotation of Copyright
diff fu540/spl.c fu740/spl.c
3c3
<  * Copyright (C) 2020 SiFive, Inc
---
>  * Copyright (C) 2020-201 SiFive, Inc

About the cache.c, they are just different in one character

diff fu540/cache.c fu740/cache.c
3c3
<  * Copyright (C) 2020 SiFive, Inc
---
>  * Copyright (C) 2020-2021 SiFive, Inc
10d9
< #include <asm/global_data.h>
12a12
> #include <asm/global_data.h>
34c34
<                                            "sifive,fu540-c000-ccache");
---
>                                            "sifive,fu740-c000-ccache");


Originally, I am considering to tell you to re-use the same code base
instead of just copy and create.
After a few days of consideration, I feel it's OK for now.

About
[PATCH v7 2/8] drivers: clk: add fu740 support and
[PATCH v7 4/8] drivers: pci: add pcie support for fu740,
there are still not get any Reviewed-by till now.
For me, it will be better if someone can tag a Reviewed-by here.

Principally, it will be suggested to split drivers from RISC-V
relevant, do not mix them together as Palmer said.

Thanks,
Rick

> From: Bin Meng <bmeng.cn@gmail.com>
> Sent: Thursday, April 29, 2021 8:27 PM
> To: Green Wan <green.wan@sifive.com>
> Cc: Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Paul Walmsley <paul.walmsley@sifive.com>; Palmer Dabbelt <palmer@dabbelt.com>; Anup Patel <anup.patel@wdc.com>; Atish Patra <atish.patra@wdc.com>; Lukasz Majewski <lukma@denx.de>; Joe Hershberger <joe.hershberger@ni.com>; Ramon Fried <rfried.dev@gmail.com>; U-Boot Mailing List <u-boot@lists.denx.de>
> Subject: Re: [PATCH v7 0/8] Add FU740 chip and HiFive Unmatched board support
>
> Hi Green,
>
> On Thu, Apr 29, 2021 at 7:11 PM Green Wan <green.wan@sifive.com> wrote:
> >
> > Hi Bin,
> >
> > How should this patch set be proceeded?
> >
> > To summary the major changes,
> > - I've rebased to mainstream and merged pcie refactoring code which
> > based on pcie_dw_common.c
> > - separate unmatched dts into separated patch.
> >
>
> I don't have specific comments. Rick should pick this up via the riscv tree. Thanks!
>
> Regards,
> Bin
Green Wan May 3, 2021, 3:35 a.m. UTC | #7
Hi Rick,

Thanks for quick response. See my reply below.

On Mon, May 3, 2021 at 10:34 AM Rick Chen <rickchen36@gmail.com> wrote:
>
> Hi Green,
>
>
> I did not sign the Reviewed-by for this patch "board: sifive: add
> HiFive Unmatched board support" from v1 to v6.
> But it just has been tagged in [v7,7/8] board: sifive: add HiFive
> Unmatched board support by yourself.

Sorry, I might have a quick conclusion when Reviewed-by is on our
previous discussion in [v6 1/7]. We ended up splitting dts into two.
One for fu740 and the other for Unmatched board specifically. And put
them closer. Then, I added the review-by to them.

---- Here is the previous discussion. ----
"Makefile need the dts file, but it is not exist in this patch. It
doesn't make sense.

Maybe you can combine with the dts relative files in [PATCH v6 6/7]
into one patch and name as :
riscv: dts: ...

LGTM.
Other than that,

Reviewed-by: Rick Chen <rick@andestech.com> "

"It is OK.

You may arrange them nearby as below:
6/x riscv: dts: support fu740
7/x riscv: dst: support HiFive Unmatched board

Thanks,
Rick"

>
> [v6,6/7] board: sifive: add HiFive Unmatched board support
> https://patchwork.ozlabs.org/project/uboot/patch/20210408134020.238658-7-green.wan@sifive.com/
>
> [v7,7/8] board: sifive: add HiFive Unmatched board support
> https://patchwork.ozlabs.org/project/uboot/patch/20210422091202.396956-8-green.wan@sifive.com/
>
> Actually I don't like this patch that you mix every things (arch/,
> drivers/, common/, doc/)together in this patch.
> But it is OK for now.

Noted. Thanks for reminding me.

>
> BTW, in [PATCH v7 1/8] riscv: cpu: fu740: Add support for cpu fu740
> I found that arch/riscv/cpu/fu740/cpu.c and arch/riscv/fu540/cpu.c are
> 100% the same.
>
> And about spl.c, they are only different in the annotation of Copyright
> diff fu540/spl.c fu740/spl.c
> 3c3
> <  * Copyright (C) 2020 SiFive, Inc
> ---
> >  * Copyright (C) 2020-201 SiFive, Inc
>
> About the cache.c, they are just different in one character
>
> diff fu540/cache.c fu740/cache.c
> 3c3
> <  * Copyright (C) 2020 SiFive, Inc
> ---
> >  * Copyright (C) 2020-2021 SiFive, Inc
> 10d9
> < #include <asm/global_data.h>
> 12a12
> > #include <asm/global_data.h>
> 34c34
> <                                            "sifive,fu540-c000-ccache");
> ---
> >                                            "sifive,fu740-c000-ccache");
>
>
> Originally, I am considering to tell you to re-use the same code base
> instead of just copy and create.
> After a few days of consideration, I feel it's OK for now.
>
You're right. As you mentioned, I also considered having common code.
But I conservatively decided to keep separated files to handle
possible differences among chips.

> About
> [PATCH v7 2/8] drivers: clk: add fu740 support and
> [PATCH v7 4/8] drivers: pci: add pcie support for fu740,
> there are still not get any Reviewed-by till now.
> For me, it will be better if someone can tag a Reviewed-by here.
>
> Principally, it will be suggested to split drivers from RISC-V
> relevant, do not mix them together as Palmer said.

Not sure whether we'll have the driver reviewers very quick. What do
you think of moving forward? I can try to ping some driver maintainers
and see if we have someone to review them. =]

Thanks,



>
> Thanks,
> Rick
>
> > From: Bin Meng <bmeng.cn@gmail.com>
> > Sent: Thursday, April 29, 2021 8:27 PM
> > To: Green Wan <green.wan@sifive.com>
> > Cc: Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Paul Walmsley <paul.walmsley@sifive.com>; Palmer Dabbelt <palmer@dabbelt.com>; Anup Patel <anup.patel@wdc.com>; Atish Patra <atish.patra@wdc.com>; Lukasz Majewski <lukma@denx.de>; Joe Hershberger <joe.hershberger@ni.com>; Ramon Fried <rfried.dev@gmail.com>; U-Boot Mailing List <u-boot@lists.denx.de>
> > Subject: Re: [PATCH v7 0/8] Add FU740 chip and HiFive Unmatched board support
> >
> > Hi Green,
> >
> > On Thu, Apr 29, 2021 at 7:11 PM Green Wan <green.wan@sifive.com> wrote:
> > >
> > > Hi Bin,
> > >
> > > How should this patch set be proceeded?
> > >
> > > To summary the major changes,
> > > - I've rebased to mainstream and merged pcie refactoring code which
> > > based on pcie_dw_common.c
> > > - separate unmatched dts into separated patch.
> > >
> >
> > I don't have specific comments. Rick should pick this up via the riscv tree. Thanks!
> >
> > Regards,
> > Bin
Rick Chen May 3, 2021, 3:42 a.m. UTC | #8
Hi Green,

> Hi Rick,
>
> Thanks for quick response. See my reply below.
>
> On Mon, May 3, 2021 at 10:34 AM Rick Chen <rickchen36@gmail.com> wrote:
> >
> > Hi Green,
> >
> >
> > I did not sign the Reviewed-by for this patch "board: sifive: add
> > HiFive Unmatched board support" from v1 to v6.
> > But it just has been tagged in [v7,7/8] board: sifive: add HiFive
> > Unmatched board support by yourself.
>
> Sorry, I might have a quick conclusion when Reviewed-by is on our
> previous discussion in [v6 1/7]. We ended up splitting dts into two.
> One for fu740 and the other for Unmatched board specifically. And put
> them closer. Then, I added the review-by to them.
>
> ---- Here is the previous discussion. ----
> "Makefile need the dts file, but it is not exist in this patch. It
> doesn't make sense.
>
> Maybe you can combine with the dts relative files in [PATCH v6 6/7]
> into one patch and name as :
> riscv: dts: ...
>
> LGTM.
> Other than that,
>
> Reviewed-by: Rick Chen <rick@andestech.com> "
>
> "It is OK.
>
> You may arrange them nearby as below:
> 6/x riscv: dts: support fu740
> 7/x riscv: dst: support HiFive Unmatched board
>
> Thanks,
> Rick"
>
> >
> > [v6,6/7] board: sifive: add HiFive Unmatched board support
> > https://patchwork.ozlabs.org/project/uboot/patch/20210408134020.238658-7-green.wan@sifive.com/
> >
> > [v7,7/8] board: sifive: add HiFive Unmatched board support
> > https://patchwork.ozlabs.org/project/uboot/patch/20210422091202.396956-8-green.wan@sifive.com/
> >
> > Actually I don't like this patch that you mix every things (arch/,
> > drivers/, common/, doc/)together in this patch.
> > But it is OK for now.
>
> Noted. Thanks for reminding me.
>
> >
> > BTW, in [PATCH v7 1/8] riscv: cpu: fu740: Add support for cpu fu740
> > I found that arch/riscv/cpu/fu740/cpu.c and arch/riscv/fu540/cpu.c are
> > 100% the same.
> >
> > And about spl.c, they are only different in the annotation of Copyright
> > diff fu540/spl.c fu740/spl.c
> > 3c3
> > <  * Copyright (C) 2020 SiFive, Inc
> > ---
> > >  * Copyright (C) 2020-201 SiFive, Inc
> >
> > About the cache.c, they are just different in one character
> >
> > diff fu540/cache.c fu740/cache.c
> > 3c3
> > <  * Copyright (C) 2020 SiFive, Inc
> > ---
> > >  * Copyright (C) 2020-2021 SiFive, Inc
> > 10d9
> > < #include <asm/global_data.h>
> > 12a12
> > > #include <asm/global_data.h>
> > 34c34
> > <                                            "sifive,fu540-c000-ccache");
> > ---
> > >                                            "sifive,fu740-c000-ccache");
> >
> >
> > Originally, I am considering to tell you to re-use the same code base
> > instead of just copy and create.
> > After a few days of consideration, I feel it's OK for now.
> >
> You're right. As you mentioned, I also considered having common code.
> But I conservatively decided to keep separated files to handle
> possible differences among chips.
>
> > About
> > [PATCH v7 2/8] drivers: clk: add fu740 support and
> > [PATCH v7 4/8] drivers: pci: add pcie support for fu740,
> > there are still not get any Reviewed-by till now.
> > For me, it will be better if someone can tag a Reviewed-by here.
> >
> > Principally, it will be suggested to split drivers from RISC-V
> > relevant, do not mix them together as Palmer said.
>
> Not sure whether we'll have the driver reviewers very quick. What do
> you think of moving forward? I can try to ping some driver maintainers
> and see if we have someone to review them. =]

OK.
Maybe let's just wait for a period of time, if it still no furthermore response.
I can help to pull them via riscv tree.

Thanks,
Rick

>
> Thanks,
>
>
>
> >
> > Thanks,
> > Rick
> >
> > > From: Bin Meng <bmeng.cn@gmail.com>
> > > Sent: Thursday, April 29, 2021 8:27 PM
> > > To: Green Wan <green.wan@sifive.com>
> > > Cc: Rick Jian-Zhi Chen(陳建志) <rick@andestech.com>; Paul Walmsley <paul.walmsley@sifive.com>; Palmer Dabbelt <palmer@dabbelt.com>; Anup Patel <anup.patel@wdc.com>; Atish Patra <atish.patra@wdc.com>; Lukasz Majewski <lukma@denx.de>; Joe Hershberger <joe.hershberger@ni.com>; Ramon Fried <rfried.dev@gmail.com>; U-Boot Mailing List <u-boot@lists.denx.de>
> > > Subject: Re: [PATCH v7 0/8] Add FU740 chip and HiFive Unmatched board support
> > >
> > > Hi Green,
> > >
> > > On Thu, Apr 29, 2021 at 7:11 PM Green Wan <green.wan@sifive.com> wrote:
> > > >
> > > > Hi Bin,
> > > >
> > > > How should this patch set be proceeded?
> > > >
> > > > To summary the major changes,
> > > > - I've rebased to mainstream and merged pcie refactoring code which
> > > > based on pcie_dw_common.c
> > > > - separate unmatched dts into separated patch.
> > > >
> > >
> > > I don't have specific comments. Rick should pick this up via the riscv tree. Thanks!
> > >
> > > Regards,
> > > Bin