mbox series

[v2,0/6] MIPS: cm: Probe GCR address from devicetree

Message ID 20240612-cm_probe-v2-0-a5b55440563c@flygoat.com (mailing list archive)
Headers show
Series MIPS: cm: Probe GCR address from devicetree | expand

Message

Jiaxun Yang June 12, 2024, 10:08 a.m. UTC
Hi all,

This series enabled mips-cm code to probe GCR address from devicetree.

This feature has been implemented in MIPS's out-of-tree kernel for
a while, and MIPS's u-boot fork on boston will generate required
"mti,mips-cm" node as well.

Please review.
Thanks

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Changes in v2:
- Fix probe order on malta (Serge)
- dt binding improvements (Conor)
- Build warning fix
- Link to v1: https://lore.kernel.org/r/20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com

---
Jiaxun Yang (6):
      MIPS: generic: Do __dt_setup_arch in prom_init
      MIPS: malta: Move SMP initialisation to device_tree_init
      MIPS: cm: Prefix probe functions with __init
      MIPS: Move mips_cm_probe after prom_init
      dt-bindings: mips: Document mti,mips-cm
      MIPS: cm: Probe GCR address from DeviceTree

 .../devicetree/bindings/mips/mti,mips-cm.yaml      | 38 ++++++++++++
 arch/mips/generic/init.c                           |  9 ++-
 arch/mips/include/asm/mips-cm.h                    |  4 +-
 arch/mips/kernel/mips-cm.c                         | 69 ++++++++++++++++++----
 arch/mips/kernel/setup.c                           |  2 +-
 arch/mips/mti-malta/malta-init.c                   |  8 ++-
 6 files changed, 111 insertions(+), 19 deletions(-)
---
base-commit: 2b84edefcad14934796fad37b16512b6a2ca467e
change-id: 20240506-cm_probe-0c667c8b63bf

Best regards,

Comments

Jiaxun Yang July 6, 2024, 5:13 a.m. UTC | #1
在2024年6月12日六月 下午6:08,Jiaxun Yang写道:
> Hi all,
>
> This series enabled mips-cm code to probe GCR address from devicetree.
>
> This feature has been implemented in MIPS's out-of-tree kernel for
> a while, and MIPS's u-boot fork on boston will generate required
> "mti,mips-cm" node as well.

Folks, any comments on this series?

Thanks

>
> Please review.
> Thanks
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> Changes in v2:
> - Fix probe order on malta (Serge)
> - dt binding improvements (Conor)
> - Build warning fix
> - Link to v1: 
> https://lore.kernel.org/r/20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com
>
> ---
> Jiaxun Yang (6):
>       MIPS: generic: Do __dt_setup_arch in prom_init
>       MIPS: malta: Move SMP initialisation to device_tree_init
>       MIPS: cm: Prefix probe functions with __init
>       MIPS: Move mips_cm_probe after prom_init
>       dt-bindings: mips: Document mti,mips-cm
>       MIPS: cm: Probe GCR address from DeviceTree
>
>  .../devicetree/bindings/mips/mti,mips-cm.yaml      | 38 ++++++++++++
>  arch/mips/generic/init.c                           |  9 ++-
>  arch/mips/include/asm/mips-cm.h                    |  4 +-
>  arch/mips/kernel/mips-cm.c                         | 69 ++++++++++++++++++----
>  arch/mips/kernel/setup.c                           |  2 +-
>  arch/mips/mti-malta/malta-init.c                   |  8 ++-
>  6 files changed, 111 insertions(+), 19 deletions(-)
> ---
> base-commit: 2b84edefcad14934796fad37b16512b6a2ca467e
> change-id: 20240506-cm_probe-0c667c8b63bf
>
> Best regards,
> -- 
> Jiaxun Yang <jiaxun.yang@flygoat.com>
Jiaxun Yang July 20, 2024, 7:30 a.m. UTC | #2
在2024年6月12日六月 下午6:08,Jiaxun Yang写道:
> Hi all,
>
> This series enabled mips-cm code to probe GCR address from devicetree.
>
> This feature has been implemented in MIPS's out-of-tree kernel for
> a while, and MIPS's u-boot fork on boston will generate required
> "mti,mips-cm" node as well.
>
> Please review.
> Thanks


Ping on this?


Thanks

>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> Changes in v2:
> - Fix probe order on malta (Serge)
> - dt binding improvements (Conor)
> - Build warning fix
> - Link to v1: 
> https://lore.kernel.org/r/20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com
>
> ---
> Jiaxun Yang (6):
>       MIPS: generic: Do __dt_setup_arch in prom_init
>       MIPS: malta: Move SMP initialisation to device_tree_init
>       MIPS: cm: Prefix probe functions with __init
>       MIPS: Move mips_cm_probe after prom_init
>       dt-bindings: mips: Document mti,mips-cm
>       MIPS: cm: Probe GCR address from DeviceTree
>
>  .../devicetree/bindings/mips/mti,mips-cm.yaml      | 38 ++++++++++++
>  arch/mips/generic/init.c                           |  9 ++-
>  arch/mips/include/asm/mips-cm.h                    |  4 +-
>  arch/mips/kernel/mips-cm.c                         | 69 ++++++++++++++++++----
>  arch/mips/kernel/setup.c                           |  2 +-
>  arch/mips/mti-malta/malta-init.c                   |  8 ++-
>  6 files changed, 111 insertions(+), 19 deletions(-)
> ---
> base-commit: 2b84edefcad14934796fad37b16512b6a2ca467e
> change-id: 20240506-cm_probe-0c667c8b63bf
>
> Best regards,
> -- 
> Jiaxun Yang <jiaxun.yang@flygoat.com>
Serge Semin Aug. 6, 2024, 7:49 p.m. UTC | #3
Hi Jiaxun

On Wed, Jun 12, 2024 at 11:08:52AM +0100, Jiaxun Yang wrote:
> Hi all,
> 
> This series enabled mips-cm code to probe GCR address from devicetree.
> 
> This feature has been implemented in MIPS's out-of-tree kernel for
> a while, and MIPS's u-boot fork on boston will generate required
> "mti,mips-cm" node as well.
> 
> Please review.
> Thanks

Got this tested on my P5600-based SoC implemented as non-generic
platform. Alas the system hangs up on the early boot-up stage with no
even a single char printed to the console. I'll be able to get back to
the problem debugging on the next week.

-Serge(y)

> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> Changes in v2:
> - Fix probe order on malta (Serge)
> - dt binding improvements (Conor)
> - Build warning fix
> - Link to v1: https://lore.kernel.org/r/20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com
> 
> ---
> Jiaxun Yang (6):
>       MIPS: generic: Do __dt_setup_arch in prom_init
>       MIPS: malta: Move SMP initialisation to device_tree_init
>       MIPS: cm: Prefix probe functions with __init
>       MIPS: Move mips_cm_probe after prom_init
>       dt-bindings: mips: Document mti,mips-cm
>       MIPS: cm: Probe GCR address from DeviceTree
> 
>  .../devicetree/bindings/mips/mti,mips-cm.yaml      | 38 ++++++++++++
>  arch/mips/generic/init.c                           |  9 ++-
>  arch/mips/include/asm/mips-cm.h                    |  4 +-
>  arch/mips/kernel/mips-cm.c                         | 69 ++++++++++++++++++----
>  arch/mips/kernel/setup.c                           |  2 +-
>  arch/mips/mti-malta/malta-init.c                   |  8 ++-
>  6 files changed, 111 insertions(+), 19 deletions(-)
> ---
> base-commit: 2b84edefcad14934796fad37b16512b6a2ca467e
> change-id: 20240506-cm_probe-0c667c8b63bf
> 
> Best regards,
> -- 
> Jiaxun Yang <jiaxun.yang@flygoat.com>
>
Thomas Bogendoerfer Sept. 9, 2024, 1:32 p.m. UTC | #4
On Tue, Aug 06, 2024 at 10:49:52PM +0300, Serge Semin wrote:
> Hi Jiaxun
> 
> On Wed, Jun 12, 2024 at 11:08:52AM +0100, Jiaxun Yang wrote:
> > Hi all,
> > 
> > This series enabled mips-cm code to probe GCR address from devicetree.
> > 
> > This feature has been implemented in MIPS's out-of-tree kernel for
> > a while, and MIPS's u-boot fork on boston will generate required
> > "mti,mips-cm" node as well.
> > 
> > Please review.
> > Thanks
> 
> Got this tested on my P5600-based SoC implemented as non-generic
> platform. Alas the system hangs up on the early boot-up stage with no
> even a single char printed to the console. I'll be able to get back to
> the problem debugging on the next week.

any news about that ?

Thomas.
Serge Semin Sept. 10, 2024, 8:06 a.m. UTC | #5
Hi Thomas

On Mon, Sep 09, 2024 at 03:32:21PM +0200, Thomas Bogendoerfer wrote:
> On Tue, Aug 06, 2024 at 10:49:52PM +0300, Serge Semin wrote:
> > Hi Jiaxun
> > 
> > On Wed, Jun 12, 2024 at 11:08:52AM +0100, Jiaxun Yang wrote:
> > > Hi all,
> > > 
> > > This series enabled mips-cm code to probe GCR address from devicetree.
> > > 
> > > This feature has been implemented in MIPS's out-of-tree kernel for
> > > a while, and MIPS's u-boot fork on boston will generate required
> > > "mti,mips-cm" node as well.
> > > 
> > > Please review.
> > > Thanks
> > 
> > Got this tested on my P5600-based SoC implemented as non-generic
> > platform. Alas the system hangs up on the early boot-up stage with no
> > even a single char printed to the console. I'll be able to get back to
> > the problem debugging on the next week.
> 
> any news about that ?

Oops. This patch set has absolutely slipped out of my mind. I am
getting back to it immediately and will submit the debug status
shortly after I dig out the reason of the hanging up. Sorry for the
inconvenience.

-Serge(y)

> 
> Thomas.
> 
> -- 
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea.                                                [ RFC1925, 2.3 ]
Serge Semin Sept. 10, 2024, 12:20 p.m. UTC | #6
On Tue, Sep 10, 2024 at 11:06:56AM +0300, Serge Semin wrote:
> Hi Thomas
> 
> On Mon, Sep 09, 2024 at 03:32:21PM +0200, Thomas Bogendoerfer wrote:
> > On Tue, Aug 06, 2024 at 10:49:52PM +0300, Serge Semin wrote:
> > > Hi Jiaxun
> > > 
> > > On Wed, Jun 12, 2024 at 11:08:52AM +0100, Jiaxun Yang wrote:
> > > > Hi all,
> > > > 
> > > > This series enabled mips-cm code to probe GCR address from devicetree.
> > > > 
> > > > This feature has been implemented in MIPS's out-of-tree kernel for
> > > > a while, and MIPS's u-boot fork on boston will generate required
> > > > "mti,mips-cm" node as well.
> > > > 
> > > > Please review.
> > > > Thanks
> > > 
> > > Got this tested on my P5600-based SoC implemented as non-generic
> > > platform. Alas the system hangs up on the early boot-up stage with no
> > > even a single char printed to the console. I'll be able to get back to
> > > the problem debugging on the next week.
> > 
> > any news about that ?
> 
> Oops. This patch set has absolutely slipped out of my mind. I am
> getting back to it immediately and will submit the debug status
> shortly after I dig out the reason of the hanging up. Sorry for the
> inconvenience.

Found the reason of the problem on my platform. It was due to the too
early change_gcs_control() invocation. Since mips_cm_probe() is now
called after the prom_init() method the later function can't access
any CM-register. So for the system to boot up I had to move the GCR
controler register update to the plat_mem_setup() method in my
platform code. After that the system booted up successfully. Double
checked the rest of the platforms in the vanilla kernel repo for having
the similar issue. It seems to me there is no platform left in the
kernel with such potential problem presented.

But then I decided to test out the actual GCR-base address setup
procedure implemented in this patch set, and found another problem
unrelated to my platform. I'll submit the problem summary in reply to
the respective patch in this series.

-Serge(y)

> 
> -Serge(y)
> 
> > 
> > Thomas.
> > 
> > -- 
> > Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> > good idea.                                                [ RFC1925, 2.3 ]