Refactor AST2500 reset control
Subsystems (3)
Chia-Wei
v3 cover Refactor AST2500 reset control
This patch series refactors the reset method to use the System Control Unit (SCU) reset control for simplicity.
In addition, the naming of reset driver and Kconfig option is also refined for future consistency.
v3:
- Fix Makefile to adapt to the renamed reset driver file
v2:
- Rebase patches to fix conflict
Chia-Wei, Wang (2):
reset: ast2500: Use SCU for reset control
cosmetic: reset: ast2500: Rename driver and configs
arch/arm/dts/ast2500-u-boot.dtsi | 7 +- drivers/reset/Kconfig | 11 +-- drivers/reset/Makefile | 2 +- drivers/reset/ast2500-reset.c | 104 --------------------- drivers/reset/reset-ast2500.c | 109 ++++++++++++++++++++++ include/dt-bindings/reset/ast2500-reset.h | 73 ++++++++------- 6 files changed, 157 insertions(+), 149 deletions(-) delete mode 100644 drivers/reset/ast2500-reset.c create mode 100644 drivers/reset/reset-ast2500.c
Signature · 1 line
2.17.1
Chia-Wei
PATCH v3 1/2 reset: ast2500: Use SCU for reset control
The System Control Unit (SCU) controller of Aspeed SoCs provides the reset control for each peripheral.
This patch refactors the reset method to leverage the SCU reset control. Thus the driver dependency on watchdog including dedicated WDT API and reset flag encoding can be eliminated.
The Kconfig description is also updated accordingly.
--- arch/arm/dts/ast2500-u-boot.dtsi | 7 +- drivers/reset/Kconfig | 9 +-- drivers/reset/ast2500-reset.c | 97 ++++++++++++----------- include/dt-bindings/reset/ast2500-reset.h | 73 +++++++++-------- 4 files changed, 97 insertions(+), 89 deletions(-)
arch/arm/dts/ast2500-u-boot.dtsi +3 -4
@@ -16,7 +16,6 @@ rst: reset-controller { u-boot,dm-pre-reloc; compatible = "aspeed,ast2500-reset"; - aspeed,wdt = <&wdt1>; #reset-cells = <1>; };
@@ -27,7 +26,7 @@ 0x1e6e0200 0x1d4 >; #reset-cells = <1>; clocks = <&scu ASPEED_CLK_MPLL>; - resets = <&rst AST_RESET_SDRAM>; + resets = <&rst ASPEED_RESET_SDRAM>; }; ahb {
@@ -41,7 +40,7 @@ reg = <0x1e740100>; #reset-cells = <1>; clocks = <&scu ASPEED_CLK_SDIO>; - resets = <&rst AST_RESET_SDIO>; + resets = <&rst ASPEED_RESET_SDIO>; }; sdhci1: sdhci at 1e740200 {
@@ -49,7 +48,7 @@ reg = <0x1e740200>; #reset-cells = <1>; clocks = <&scu ASPEED_CLK_SDIO>; - resets = <&rst AST_RESET_SDIO>; + resets = <&rst ASPEED_RESET_SDIO>; }; };
drivers/reset/Kconfig +4 -5
@@ -74,13 +74,12 @@ config RESET_UNIPHIER config AST2500_RESET bool "Reset controller driver for AST2500 SoCs" - depends on DM_RESET && WDT_ASPEED + depends on DM_RESET default y if ASPEED_AST2500 help - Support for reset controller on AST2500 SoC. This controller uses - watchdog to reset different peripherals and thus only supports - resets that are supported by watchdog. The main limitation though - is that some reset signals, like I2C or MISC reset multiple devices. + Support for reset controller on AST2500 SoC. + Say Y if you want to control reset signals of different peripherals + through System Control Unit (SCU). config RESET_ROCKCHIP bool "Reset controller driver for Rockchip SoCs"
drivers/reset/ast2500-reset.c +51 -46
148 lines not on this page · raw message
include/dt-bindings/reset/ast2500-reset.h +39 -34
83 lines not on this page · raw message
Signature · 1 line
2.17.1
Chia-Wei
PATCH v3 2/2 cosmetic: reset: ast2500: Rename driver and configs
In reply to Chia-Wei1. Rename AST2500 reset driver from ast2500-reset.c to reset-ast2500.c
2. Rename AST2500 reset kconfig option from AST2500_RESET to RESET_AST2500
---
drivers/reset/Kconfig | 2 +-
drivers/reset/Makefile | 2 +-
drivers/reset/{ast2500-reset.c => reset-ast2500.c} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/reset/{ast2500-reset.c => reset-ast2500.c} (100%)drivers/reset/Kconfig +1 -1
@@ -72,7 +72,7 @@ config RESET_UNIPHIER Say Y if you want to control reset signals provided by System Control block, Media I/O block, Peripheral Block. -config AST2500_RESET +config RESET_AST2500 bool "Reset controller driver for AST2500 SoCs" depends on DM_RESET default y if ASPEED_AST2500
drivers/reset/Makefile +1 -1
@@ -14,7 +14,7 @@ obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o obj-$(CONFIG_RESET_UNIPHIER) += reset-uniphier.o -obj-$(CONFIG_AST2500_RESET) += ast2500-reset.o +obj-$(CONFIG_RESET_AST2500) += reset-ast2500.o obj-$(CONFIG_RESET_ROCKCHIP) += reset-rockchip.o obj-$(CONFIG_RESET_MESON) += reset-meson.o obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
drivers/reset/reset-ast2500.c renamed from drivers/reset/ast2500-reset.c +0 -0
Signature · 1 line
2.17.1
v3 cover Refactor AST2500 reset control
In reply to Chia-WeiHi Tom,
The patches has been rebased onto the up-to-date U-Boot master.
A makefile error is also fixed in the revised version and verified with an AST2500 EVB.
Thanks,
Chiawei
Quoted 36 lines
-----Original Message-----
From: ChiaWei Wang <[email protected]>
Sent: Thursday, October 15, 2020 10:25 AM
To: trini at konsulko.com; u-boot at lists.denx.de; maxims at google.com
Subject: [v3 0/2] Refactor AST2500 reset controlThis patch series refactors the reset method to use the System Control Unit (SCU) reset control for simplicity.
In addition, the naming of reset driver and
Kconfigoption is also refined for future consistency.v3:
- FixMakefileto adapt to the renamed reset driver filev2:
- Rebase patches to fix conflictChia-Wei, Wang (2):
reset: ast2500: Use SCU for reset control
cosmetic: reset: ast2500: Rename driver and configsarch/arm/dts/ast2500-u-boot.dtsi | 7 +- drivers/reset/Kconfig | 11 +-- drivers/reset/Makefile | 2 +- drivers/reset/ast2500-reset.c | 104 --------------------- drivers/reset/reset-ast2500.c | 109 ++++++++++++++++++++++ include/dt-bindings/reset/ast2500-reset.h | 73 ++++++++------- 6 files changed, 157 insertions(+), 149 deletions(-) delete mode 100644
drivers/reset/ast2500-reset.ccreate mode 100644drivers/reset/reset-ast2500.c--
2.17.1
PATCH v3 1/2 reset: ast2500: Use SCU for reset control
In reply to Chia-WeiQuoted 8 lines · Wang
The System Control Unit (SCU) controller of Aspeed SoCs provides the reset control for each peripheral.
This patch refactors the reset method to leverage the SCU reset control. Thus the driver dependency on watchdog including dedicated WDT API and reset flag encoding can be eliminated.
Quoted 4 lines
The
Kconfigdescription is also updated accordingly.Signed-off-by Chia-Wei, Wang <[email protected]>Reviewed-by Ryan Chen <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201022/5ce85757/attachment.sig>
PATCH v3 2/2 cosmetic: reset: ast2500: Rename driver and configs
In reply to Chia-WeiQuoted 7 lines · Wang
1. Rename AST2500 reset driver from
ast2500-reset.ctoreset-ast2500.c
2. Rename AST2500 reset kconfig option fromAST2500_RESETtoRESET_AST2500Signed-off-by Chia-Wei, Wang <[email protected]>Reviewed-by Ryan Chen <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201022/1a257ac9/attachment.sig>