mbox series

[U-Boot] Pull request: u-boot-riscv/master

Message ID 2e5a5174-9872-4413-85b0-aa9f1ff446fa@ATCPCS12.andestech.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series [U-Boot] Pull request: u-boot-riscv/master | expand

Pull-request

git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git

Message

Andes May 25, 2020, 8:01 a.m. UTC
Hi Tom,

Please pull some riscv updates:

- Add Sipeed Maix support.
- sifive: fix palmer's email address.
- Move all SMP related SBI calls to SBI_v01.

https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926

Thanks
Rick


The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:

  Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)

are available in the Git repository at:

  git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git

for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:

  riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)

----------------------------------------------------------------
Atish Patra (1):
      riscv: Move all SMP related SBI calls to SBI_v01

Pragnesh Patel (1):
      sifive: fix palmer's email address

Sean Anderson (21):
      clk: Always use the supplied struct clk
      clk: Check that ops of composite clock components exist before calling
      clk: Unconditionally recursively en-/dis-able clocks
      clk: Fix clk_get_by_* handling of index
      clk: Add K210 pll support
      clk: Add a bypass clock for K210
      clk: Add K210 clock support
      dm: Add support for simple-pm-bus
      dm: Fix error handling for dev_read_addr_ptr
      reset: Add generic reset driver
      lib: Always set errno in hcreate_r
      riscv: Add headers for asm/global_data.h
      riscv: Clear pending interrupts before enabling IPIs
      riscv: Clean up IPI initialization code
      riscv: Add option to support RISC-V privileged spec 1.9
      riscv: Allow use of reset drivers
      riscv: Try to get cpu frequency from a "clocks" node if it exists
      riscv: Enable cpu clock if it is present
      riscv: Add device tree for K210 and Sipeed Maix BitM
      doc: riscv: Add documentation for Sipeed Maix Bit
      riscv: Add Sipeed Maix support

 MAINTAINERS                                           |   7 +
 arch/riscv/Kconfig                                    |  14 ++
 arch/riscv/cpu/cpu.c                                  |  15 +++
 arch/riscv/cpu/start.S                                |   2 +
 arch/riscv/dts/Makefile                               |   1 +
 arch/riscv/dts/k210-maix-bit.dts                      |  47 +++++++
 arch/riscv/dts/k210.dtsi                              | 594 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 arch/riscv/include/asm/csr.h                          |  40 ++++++
 arch/riscv/include/asm/global_data.h                  |   2 +
 arch/riscv/include/asm/sbi.h                          |   5 +-
 arch/riscv/include/asm/smp.h                          |  43 +++++++
 arch/riscv/lib/andes_plic.c                           |  34 ++---
 arch/riscv/lib/reset.c                                |   2 +
 arch/riscv/lib/sbi.c                                  |  37 +++---
 arch/riscv/lib/sbi_ipi.c                              |   5 +
 arch/riscv/lib/sifive_clint.c                         |  33 ++---
 arch/riscv/lib/smp.c                                  |  49 +------
 arch/sandbox/dts/test.dts                             |  21 +++
 arch/sandbox/include/asm/clk.h                        |   1 +
 board/sifive/fu540/MAINTAINERS                        |   2 +-
 board/sipeed/maix/Kconfig                             |  47 +++++++
 board/sipeed/maix/MAINTAINERS                         |  11 ++
 board/sipeed/maix/Makefile                            |   5 +
 board/sipeed/maix/maix.c                              |  41 ++++++
 common/spl/spl_opensbi.c                              |   5 +
 configs/sandbox_defconfig                             |   3 +
 configs/sipeed_maix_bitm_defconfig                    |   8 ++
 doc/board/index.rst                                   |   1 +
 doc/board/sipeed/index.rst                            |   9 ++
 doc/board/sipeed/maix.rst                             | 298 +++++++++++++++++++++++++++++++++++++++++++
 doc/device-tree-bindings/bus/simple-pm-bus.txt        |  44 +++++++
 doc/device-tree-bindings/mfd/kendryte,k210-sysctl.txt |  33 +++++
 doc/device-tree-bindings/reset/syscon-reset.txt       |  36 ++++++
 doc/imx/clk/ccf.txt                                   |  63 ++++-----
 drivers/clk/Kconfig                                   |   1 +
 drivers/clk/Makefile                                  |   1 +
 drivers/clk/clk-composite.c                           |  64 ++++++----
 drivers/clk/clk-divider.c                             |   6 +-
 drivers/clk/clk-fixed-factor.c                        |   3 +-
 drivers/clk/clk-gate.c                                |   6 +-
 drivers/clk/clk-mux.c                                 |  12 +-
 drivers/clk/clk-uclass.c                              |  68 +++++-----
 drivers/clk/imx/clk-gate2.c                           |   4 +-
 drivers/clk/imx/clk-imx8mp.c                          |   2 +-
 drivers/clk/kendryte/Kconfig                          |  12 ++
 drivers/clk/kendryte/Makefile                         |   1 +
 drivers/clk/kendryte/bypass.c                         | 270 +++++++++++++++++++++++++++++++++++++++
 drivers/clk/kendryte/clk.c                            | 663 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/kendryte/pll.c                            | 601 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/core/Kconfig                                  |   7 +
 drivers/core/Makefile                                 |   1 +
 drivers/core/read.c                                   |   2 +-
 drivers/core/simple-pm-bus.c                          |  56 ++++++++
 drivers/cpu/riscv_cpu.c                               |  39 +++++-
 drivers/pinctrl/broadcom/pinctrl-bcm283x.c            |   2 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c         |   2 +-
 drivers/reset/Kconfig                                 |   5 +
 drivers/reset/Makefile                                |   1 +
 drivers/reset/reset-syscon.c                          |  81 ++++++++++++
 include/configs/sipeed-maix.h                         |  24 ++++
 include/dm/read.h                                     |   4 +-
 include/dt-bindings/clock/k210-sysctl.h               |  59 +++++++++
 include/dt-bindings/mfd/k210-sysctl.h                 |  38 ++++++
 include/dt-bindings/reset/k210-sysctl.h               |  38 ++++++
 include/kendryte/bypass.h                             |  31 +++++
 include/kendryte/clk.h                                |  35 +++++
 include/kendryte/pll.h                                |  57 +++++++++
 include/test/export.h                                 |  16 +++
 lib/hashtable.c                                       |   8 +-
 test/dm/Makefile                                      |   3 +
 test/dm/k210_pll.c                                    |  96 ++++++++++++++
 test/dm/simple-pm-bus.c                               |  45 +++++++
 test/dm/syscon-reset.c                                |  59 +++++++++
 73 files changed, 3754 insertions(+), 227 deletions(-)
 create mode 100644 arch/riscv/dts/k210-maix-bit.dts
 create mode 100644 arch/riscv/dts/k210.dtsi
 create mode 100644 board/sipeed/maix/Kconfig
 create mode 100644 board/sipeed/maix/MAINTAINERS
 create mode 100644 board/sipeed/maix/Makefile
 create mode 100644 board/sipeed/maix/maix.c
 create mode 100644 configs/sipeed_maix_bitm_defconfig
 create mode 100644 doc/board/sipeed/index.rst
 create mode 100644 doc/board/sipeed/maix.rst
 create mode 100644 doc/device-tree-bindings/bus/simple-pm-bus.txt
 create mode 100644 doc/device-tree-bindings/mfd/kendryte,k210-sysctl.txt
 create mode 100644 doc/device-tree-bindings/reset/syscon-reset.txt
 create mode 100644 drivers/clk/kendryte/Kconfig
 create mode 100644 drivers/clk/kendryte/Makefile
 create mode 100644 drivers/clk/kendryte/bypass.c
 create mode 100644 drivers/clk/kendryte/clk.c
 create mode 100644 drivers/clk/kendryte/pll.c
 create mode 100644 drivers/core/simple-pm-bus.c
 create mode 100644 drivers/reset/reset-syscon.c
 create mode 100644 include/configs/sipeed-maix.h
 create mode 100644 include/dt-bindings/clock/k210-sysctl.h
 create mode 100644 include/dt-bindings/mfd/k210-sysctl.h
 create mode 100644 include/dt-bindings/reset/k210-sysctl.h
 create mode 100644 include/kendryte/bypass.h
 create mode 100644 include/kendryte/clk.h
 create mode 100644 include/kendryte/pll.h
 create mode 100644 include/test/export.h
 create mode 100644 test/dm/k210_pll.c
 create mode 100644 test/dm/simple-pm-bus.c
 create mode 100644 test/dm/syscon-reset.c

Comments

Tom Rini May 25, 2020, 3:40 p.m. UTC | #1
On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:

> Hi Tom,
> 
> Please pull some riscv updates:
> 
> - Add Sipeed Maix support.
> - sifive: fix palmer's email address.
> - Move all SMP related SBI calls to SBI_v01.
> 
> https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> 
> Thanks
> Rick
> 
> 
> The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> 
>   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> 
> are available in the Git repository at:
> 
>   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> 
> for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> 
>   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> 

There's too many generic changes in this PR for this late in the cycle,
for things I gather related to the Maix platform.  All of the clk and DM
changes impact virtually all platforms.  Please re-do this PR to drop
the Maix platform support for now, and resubmit that for -next, which I
will be opening shortly.  Everything else however is good for master.
Sorry.
Rick Chen May 26, 2020, 7:41 a.m. UTC | #2
Hi Tom

> From: Tom Rini [mailto:trini@konsulko.com]
> Sent: Monday, May 25, 2020 11:40 PM
> To: Open Source Project uboot
> Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
>
> On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
>
> > Hi Tom,
> >
> > Please pull some riscv updates:
> >
> > - Add Sipeed Maix support.
> > - sifive: fix palmer's email address.
> > - Move all SMP related SBI calls to SBI_v01.
> >
> > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> >
> > Thanks
> > Rick
> >
> >
> > The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> >
> >   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> >
> > are available in the Git repository at:
> >
> >   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> >
> > for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> >
> >   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> >
>
> There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.

Thanks for your explanations.
Actually I have the same concern with you before sending this PR.

I have tried to ask Sean don't mix all codes together in one patchset.
He shall separate and send them individually, If they are not highly dependent.

Following are my suggestions from those patch-work:

Re: [PATCH v2 01/11] clk: Always use the supplied struct clk
https://patchwork.ozlabs.org/project/uboot/patch/da401261-b73f-afae-0702-ada1e7dd836b@gmail.com/

Re: [PATCH v4 07/17] spi: dw: Add mem_ops
https://patchwork.ozlabs.org/project/uboot/patch/20200211060425.1619471-8-seanga2@gmail.com/

Re: [PATCH v5 33/33] riscv: Add Sipeed Maix support
http://u-boot.10912.n7.nabble.com/PATCH-v5-00-33-riscv-Add-Sipeed-Maix-support-tt401784.html#a402055

Re: [PATCH v6 04/19] clk: Add functions to register CCF clock structs
https://patchwork.ozlabs.org/project/uboot/patch/20200305181308.944595-5-seanga2@gmail.com/

I will drop the Maix platform support in next PR and re-send again.

Thanks,
Rick


> Sorry.
>
> --
> Tom
Rick Chen June 22, 2020, 6:03 a.m. UTC | #3
Hi Tom

> From: Tom Rini [mailto:trini@konsulko.com]
> Sent: Monday, May 25, 2020 11:40 PM
> To: Open Source Project uboot
> Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
>
> On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
>
> > Hi Tom,
> >
> > Please pull some riscv updates:
> >
> > - Add Sipeed Maix support.
> > - sifive: fix palmer's email address.
> > - Move all SMP related SBI calls to SBI_v01.
> >
> > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> >
> > Thanks
> > Rick
> >
> >
> > The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> >
> >   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> >
> > are available in the Git repository at:
> >
> >   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> >
> > for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> >
> >   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> >
>
> There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.

May I ask for your suggestions about this patch series about "riscv:
Add Sipeed Maix support " ?
Shall I send a PR include this patch series in early release cycle or
shall I suggest Sean to re-edit this patch series for less generic
changes which may bring virtual impacts?

Thanks,
Rick

> Sorry.


>
> --
> Tom
Tom Rini June 23, 2020, 12:45 a.m. UTC | #4
On Mon, Jun 22, 2020 at 02:03:52PM +0800, Rick Chen wrote:
> Hi Tom
> 
> > From: Tom Rini [mailto:trini@konsulko.com]
> > Sent: Monday, May 25, 2020 11:40 PM
> > To: Open Source Project uboot
> > Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> > Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
> >
> > On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
> >
> > > Hi Tom,
> > >
> > > Please pull some riscv updates:
> > >
> > > - Add Sipeed Maix support.
> > > - sifive: fix palmer's email address.
> > > - Move all SMP related SBI calls to SBI_v01.
> > >
> > > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> > >
> > > Thanks
> > > Rick
> > >
> > >
> > > The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> > >
> > >   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> > >
> > > are available in the Git repository at:
> > >
> > >   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> > >
> > > for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> > >
> > >   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> > >
> >
> > There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.
> 
> May I ask for your suggestions about this patch series about "riscv:
> Add Sipeed Maix support " ?
> Shall I send a PR include this patch series in early release cycle or
> shall I suggest Sean to re-edit this patch series for less generic
> changes which may bring virtual impacts?

So I looked over the generic changes again.  There's no other way to
support the platform without those type of changes, yes?  If so, yes,
lets put it in to -next.
Rick Chen June 23, 2020, 2:05 a.m. UTC | #5
Hi Tom,

> On Mon, Jun 22, 2020 at 02:03:52PM +0800, Rick Chen wrote:
> > Hi Tom
> >
> > > From: Tom Rini [mailto:trini@konsulko.com]
> > > Sent: Monday, May 25, 2020 11:40 PM
> > > To: Open Source Project uboot
> > > Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> > > Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
> > >
> > > On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
> > >
> > > > Hi Tom,
> > > >
> > > > Please pull some riscv updates:
> > > >
> > > > - Add Sipeed Maix support.
> > > > - sifive: fix palmer's email address.
> > > > - Move all SMP related SBI calls to SBI_v01.
> > > >
> > > > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> > > >
> > > > Thanks
> > > > Rick
> > > >
> > > >
> > > > The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> > > >
> > > >   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > >   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> > > >
> > > > for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> > > >
> > > >   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> > > >
> > >
> > > There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.
> >
> > May I ask for your suggestions about this patch series about "riscv:
> > Add Sipeed Maix support " ?
> > Shall I send a PR include this patch series in early release cycle or
> > shall I suggest Sean to re-edit this patch series for less generic
> > changes which may bring virtual impacts?
>
> So I looked over the generic changes again.  There's no other way to
> support the platform without those type of changes, yes?

Yes. Discusstion between Sean and Lukasz about clk as below:
https://patchwork.ozlabs.org/project/uboot/patch/da401261-b73f-afae-0702-ada1e7dd836b@gmail.com/#2346363

If so, yes,
> lets put it in to -next.

Thanks for your reply.

Rick

>
> --
> Tom
Rick Chen June 24, 2020, 1:31 a.m. UTC | #6
Hi Sean

Tom Rini <trini@konsulko.com> 於 2020年6月23日 週二 上午8:45寫道:
>
> On Mon, Jun 22, 2020 at 02:03:52PM +0800, Rick Chen wrote:
> > Hi Tom
> >
> > > From: Tom Rini [mailto:trini@konsulko.com]
> > > Sent: Monday, May 25, 2020 11:40 PM
> > > To: Open Source Project uboot
> > > Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
> > > Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
> > >
> > > On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
> > >
> > > > Hi Tom,
> > > >
> > > > Please pull some riscv updates:
> > > >
> > > > - Add Sipeed Maix support.
> > > > - sifive: fix palmer's email address.
> > > > - Move all SMP related SBI calls to SBI_v01.
> > > >
> > > > https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
> > > >
> > > > Thanks
> > > > Rick
> > > >
> > > >
> > > > The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
> > > >
> > > >   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > >   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
> > > >
> > > > for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
> > > >
> > > >   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
> > > >
> > >
> > > There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.
> >
> > May I ask for your suggestions about this patch series about "riscv:
> > Add Sipeed Maix support " ?
> > Shall I send a PR include this patch series in early release cycle or
> > shall I suggest Sean to re-edit this patch series for less generic
> > changes which may bring virtual impacts?
>
> So I looked over the generic changes again.  There's no other way to
> support the platform without those type of changes, yes?  If so, yes,
> lets put it in to -next.

Please rebase -next for upstream
There are some conflicts needed to be fixed.

Applying: clk: Always use the supplied struct clk
Applying: clk: Check that ops of composite clock components exist before calling
Applying: clk: Unconditionally recursively en-/dis-able clocks
Applying: clk: Fix clk_get_by_* handling of index
Applying: clk: Add K210 pll support
Applying: clk: Add a bypass clock for K210
Applying: clk: Add K210 clock support
Applying: dm: Add support for simple-pm-bus
Applying: dm: Fix error handling for dev_read_addr_ptr
Applying: reset: Add generic reset driver
error: patch failed: configs/sandbox_defconfig:196
error: configs/sandbox_defconfig: patch does not apply
Patch failed at 0010 reset: Add generic reset driver

Thanks,
Rick

>
> --
> Tom
Sean Anderson June 24, 2020, 3:37 a.m. UTC | #7
On 5/26/20 3:41 AM, Rick Chen wrote:
> Hi Tom
> 
>> From: Tom Rini [mailto:trini@konsulko.com]
>> Sent: Monday, May 25, 2020 11:40 PM
>> To: Open Source Project uboot
>> Cc: u-boot@lists.denx.de; Rick Jian-Zhi Chen(陳建志)
>> Subject: Re: [U-Boot] Pull request: u-boot-riscv/master
>>
>> On Mon, May 25, 2020 at 04:01:08PM +0800, uboot@andestech.com wrote:
>>
>>> Hi Tom,
>>>
>>> Please pull some riscv updates:
>>>
>>> - Add Sipeed Maix support.
>>> - sifive: fix palmer's email address.
>>> - Move all SMP related SBI calls to SBI_v01.
>>>
>>> https://travis-ci.org/github/rickchen36/u-boot-riscv/builds/690778926
>>>
>>> Thanks
>>> Rick
>>>
>>>
>>> The following changes since commit 9c5fef577494769e3ff07952a85f9b7125ef765b:
>>>
>>>   Merge git://git.denx.de/u-boot-usb (2020-05-22 22:58:50 -0400)
>>>
>>> are available in the Git repository at:
>>>
>>>   git@gitlab.denx.de:u-boot/custodians/u-boot-riscv.git
>>>
>>> for you to fetch changes up to 421c4eb2dcf39f65c31c1804369267ed8a7b5607:
>>>
>>>   riscv: Add Sipeed Maix support (2020-05-25 10:01:21 +0800)
>>>
>>

Hi, I just saw this thread, and I would like to comment on a few things.

>> There's too many generic changes in this PR for this late in the cycle, for things I gather related to the Maix platform.  All of the clk and DM changes impact virtually all platforms.  Please re-do this PR to drop the Maix platform support for now, and resubmit that for -next, which I will be opening shortly.  Everything else however is good for master.
> 
> Thanks for your explanations.
> Actually I have the same concern with you before sending this PR.
> 
> I have tried to ask Sean don't mix all codes together in one patchset.
> He shall separate and send them individually, If they are not highly dependent.

I have been asked by Bin Meng and others to keep together related
patches so that the patch which uses changed/new behaviour is in the
same series as the patch which changes the behavior. I have tried to
split out unrelated patches and minimize changes. Would you rather all
patches which do not explicitly add maix support be split off from this
series?

> 
> Following are my suggestions from those patch-work:
> 
> Re: [PATCH v2 01/11] clk: Always use the supplied struct clk
> https://patchwork.ozlabs.org/project/uboot/patch/da401261-b73f-afae-0702-ada1e7dd836b@gmail.com/

The composite clock framework is only used by IMX in U-Boot as far as I
can tell. As such, it has a number of (mis)features which make it
unsuitable for generic code. These quirks are generally worked around in
a variety of ways by IMX code, often by using custom functions instead
of those within the CCF itself. The maix platform has around 40 clocks
in a complicated tree, and is not constrained by RAM or flash. Given
these circumstances, I think using the CCF is the correct choice.
However, in order to do so, I have had to address many of the quirks. I
could also add support for maix by effectively duplicating the CCF
within the maix driver. However, I think such a duplication of code is
likely to rot over time.

I have tried to describe why I think each of the clk patches should be
included in their commit messages. It may be unclear what the impact
will be on other users of the clock subsystem and the CCF.

[01/21] clk: Always use the supplied struct clk

This patch only affects users of the CCF. As discussed in the above
link, this specific behaviour is left over from when the CCF was ported
from Linux, due to the different semantics between struct clk and struct
clk_core. The problem here is that with the current system, either a
struct device must be associated with each CCF clock (a significant
overhead), or custom functions must be used for CCF clock operations.
The latter approach is used by the IMX code, but I would like to be able
to use the generic functions which are provided by CCF clocks.

[v13,02/21] clk: Check that ops of composite clock components exist before calling 

This only affects the CCF subsystem. This is a bugfix for drivers which
use composite clocks and do not always have the same sub-clocks. Without
this patch, if one registers a composite clock with a gate sub-clock,
and then registers another composite clock without a gate sub-clock,
calling a enable or disable on the latter clock will result in calling a
NULL pointer. No drivers currently use this functionality, but it is a
"gotcha" if one implements a driver which does.

[v13,03/21] clk: Unconditionally recursively en-/dis-able clocks

This affects all clock drivers, but primarily affects CCF clocks. This
patch is designed to handle a case with a configuration like


   A
  / \
 B   C
 |
 D

where B is a clock with an id of 0. If D is enabled, B and A will not be
enabled. If C is enabled, A will also be enabled. If C is then disabled,
A will also be disabled. This can cause strange behaviour. I have since
added ids to all clocks I use, so this patch can be split off.

[v13,04/21] clk: Fix clk_get_by_* handling of index 

This affects all clock drivers, but is a bugfix. The parameters passed
to clk_get_by_index_tail have the wrong semantics. This patch primarily
affects callers of clk_get_by_index_nodev (2 drivers), and improves
error messages.

So of these four patches, I think 3 are 100% necessary for new drivers
using the CCF. One is nice to have, but could be split off to reduce the
scope of this patch. I would have liked to get all of these patches
reviewed by Lukas, but he hasn't commented on this series for several
months. I would also love to test some of these patches on IMX, but I
don't own any boards with IMX on them.

> Re: [PATCH v4 07/17] spi: dw: Add mem_ops
> https://patchwork.ozlabs.org/project/uboot/patch/20200211060425.1619471-8-seanga2@gmail.com/

Here I took your advice and split off the pinctrl-, gpio-, and spi-related patches.

> 
> Re: [PATCH v5 33/33] riscv: Add Sipeed Maix support
> http://u-boot.10912.n7.nabble.com/PATCH-v5-00-33-riscv-Add-Sipeed-Maix-support-tt401784.html#a402055

ditto

> 
> Re: [PATCH v6 04/19] clk: Add functions to register CCF clock structs
> https://patchwork.ozlabs.org/project/uboot/patch/20200305181308.944595-5-seanga2@gmail.com/

I removed this patch in the next revision of the series.

On 6/23/20 9:31 PM, Rick Chen wrote:
> Hi Sean
> 
> Tom Rini <trini@konsulko.com> 於 2020年6月23日 週二 上午8:45寫道:
>> So I looked over the generic changes again.  There's no other way to
>> support the platform without those type of changes, yes?  If so, yes,
>> lets put it in to -next.

I saw this only after writing the above explanation, but hopefully it
will stioll be helpful.

> 
> Please rebase -next for upstream
> There are some conflicts needed to be fixed.
> 
> Applying: clk: Always use the supplied struct clk
> Applying: clk: Check that ops of composite clock components exist before calling
> Applying: clk: Unconditionally recursively en-/dis-able clocks
> Applying: clk: Fix clk_get_by_* handling of index
> Applying: clk: Add K210 pll support
> Applying: clk: Add a bypass clock for K210
> Applying: clk: Add K210 clock support
> Applying: dm: Add support for simple-pm-bus
> Applying: dm: Fix error handling for dev_read_addr_ptr
> Applying: reset: Add generic reset driver
> error: patch failed: configs/sandbox_defconfig:196
> error: configs/sandbox_defconfig: patch does not apply
> Patch failed at 0010 reset: Add generic reset driver

Ok, I can rebase again.

--Sean