Add support for AST2700 clk driver
Subsystems (6)
Ryan Chen
maintainerv3 cover Add support for AST2700 clk driver
This patch series is add clk driver for AST2700.
AST2700 is the 8th generation of Integrated Remote Management Processor introduced by ASPEED Technology Inc. Which is Board Management controller (BMC) SoC family. AST2700 have two SoC connected, one is SoC0, another is SoC1, it has it's own scu, this driver inlcude SCU0 and SCU1 driver.
v3:
-yaml: v2 missing send yaml patch, v3 add. -yaml: drop 64bits address example.
-yaml: add discription about soc0 and soc1 -dt-bindings: remove (), *_NUMS, reserved. -dt-bindings: remove dulipated define number. -dt-bindings: merge clk and reset to be one patch. -reset-aspeed: add auxiliary device for reset driver. -clk-ast2700: modify reset to be auxiliary add. -clk-ast2700: modify to be platform driver. -clk-ast2700: modify each clk to const clk array.
v2:
-yaml: drop 64bits address example.
-yaml: add discription about soc0 and soc1
-dt-bindings: remove (), *_NUMS, reserved.
-dt-bindings: remove dulipated define number
-clk-ast2700: drop WARN_ON, weird comment.
Ryan Chen (4):
dt-bindings: mfd: aspeed: support for AST2700
dt-bindings: Add AST2700 bindings
reset: aspeed: register AST2700 reset auxiliary bus device
clk: aspeed: add AST2700 clock driver.
.../bindings/mfd/aspeed,ast2x00-scu.yaml | 13 +- drivers/clk/Kconfig | 8 + drivers/clk/Makefile | 1 + drivers/clk/clk-ast2700.c | 1548 +++++++++++++++++ drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-aspeed.c | 259 +++ .../dt-bindings/clock/aspeed,ast2700-clk.h | 163 ++ .../dt-bindings/reset/aspeed,ast2700-reset.h | 124 ++ 9 files changed, 2121 insertions(+), 2 deletions(-) create mode 100644 drivers/clk/clk-ast2700.c create mode 100644 drivers/reset/reset-aspeed.c create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.h
Signature · 1 line
2.34.1
Ryan Chen
maintainerPATCH v3 1/4 dt-bindings: mfd: aspeed: support for AST2700
Add compatible support for AST2700 clk, reset, pinctrl, silicon-id for AST2700 scu.
--- .../devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +11 -2
@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour of the SoC, configuring elements such as clocks, pinmux, and reset. + In AST2700 SOC which has two soc connection, each soc have its own scu + register control, ast2700-scu0 for soc0, ast2700-scu1 for soc1. maintainers: - Joel Stanley <[email protected]>
@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd
@@ -30,10 +34,12 @@ properties: ranges: true '#address-cells': - const: 1 + minimum: 1 + maximum: 2 '#size-cells': - const: 1 + minimum: 1 + maximum: 2 '#clock-cells': const: 1
@@ -56,6 +62,8 @@ patternProperties: - aspeed,ast2400-pinctrl - aspeed,ast2500-pinctrl - aspeed,ast2600-pinctrl + - aspeed,ast2700-soc0-pinctrl + - aspeed,ast2700-soc1-pinctrl required: - compatible
@@ -76,6 +84,7 @@ patternProperties: - aspeed,ast2400-silicon-id - aspeed,ast2500-silicon-id - aspeed,ast2600-silicon-id + - aspeed,ast2700-silicon-id - const: aspeed,silicon-id reg:
Signature · 1 line
2.34.1
Ryan Chen
maintainerPATCH v3 2/4 dt-bindings: Add AST2700 bindings
In reply to Ryan ChenAdd reset, clock dt bindings for AST2700.
--- .../dt-bindings/clock/aspeed,ast2700-clk.h | 163 ++++++++++++++++++ .../dt-bindings/reset/aspeed,ast2700-reset.h | 124 +++++++++++++ 2 files changed, 287 insertions(+) create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.h
include/dt-bindings/clock/aspeed,ast2700-clk.h new file +163 -0
@@ -0,0 +1,163 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Device Tree binding constants for AST2700 clock controller. +* +* Copyright (c) 2024 Aspeed Technology Inc. +*/ + +#ifndef __DT_BINDINGS_CLOCK_AST2700_H +#define __DT_BINDINGS_CLOCK_AST2700_H + +/* SOC0 clk */ +#define SCU0_CLKIN 0 +#define SCU0_CLK_24M 1 +#define SCU0_CLK_192M 2 +#define SCU0_CLK_UART 3 +#define SCU0_CLK_UART_DIV13 3 +#define SCU0_CLK_PSP 4 +#define SCU0_CLK_HPLL 5 +#define SCU0_CLK_HPLL_DIV2 6 +#define SCU0_CLK_HPLL_DIV4 7 +#define SCU0_CLK_HPLL_DIV_AHB 8 +#define SCU0_CLK_DPLL 9 +#define SCU0_CLK_MPLL 10 +#define SCU0_CLK_MPLL_DIV2 11 +#define SCU0_CLK_MPLL_DIV4 12 +#define SCU0_CLK_MPLL_DIV8 13 +#define SCU0_CLK_MPLL_DIV_AHB 14 +#define SCU0_CLK_D0 15 +#define SCU0_CLK_D1 16 +#define SCU0_CLK_CRT0 17 +#define SCU0_CLK_CRT1 18 +#define SCU0_CLK_MPHY 19 +#define SCU0_CLK_AXI0 20 +#define SCU0_CLK_AXI1 21 +#define SCU0_CLK_AHB 22 +#define SCU0_CLK_APB 23 +#define SCU0_CLK_UART4 24 +#define SCU0_CLK_EMMCMUX 25 +#define SCU0_CLK_EMMC 26 +#define SCU0_CLK_U2PHY_CLK12M 27 +#define SCU0_CLK_U2PHY_REFCLK 28 + +/* SOC0 clk-gate */ +#define SCU0_CLK_GATE_MCLK 29 +#define SCU0_CLK_GATE_ECLK 30 +#define SCU0_CLK_GATE_2DCLK 31 +#define SCU0_CLK_GATE_VCLK 32 +#define SCU0_CLK_GATE_BCLK 33 +#define SCU0_CLK_GATE_VGA0CLK 34 +#define SCU0_CLK_GATE_REFCLK 35 +#define SCU0_CLK_GATE_PORTBUSB2CLK 36 +#define SCU0_CLK_GATE_UHCICLK 37 +#define SCU0_CLK_GATE_VGA1CLK 38 +#define SCU0_CLK_GATE_DDRPHYCLK 39 +#define SCU0_CLK_GATE_E2M0CLK 40 +#define SCU0_CLK_GATE_HACCLK 41 +#define SCU0_CLK_GATE_PORTAUSB2CLK 42 +#define SCU0_CLK_GATE_UART4CLK 43 +#define SCU0_CLK_GATE_SLICLK 44 +#define SCU0_CLK_GATE_DACCLK 45 +#define SCU0_CLK_GATE_DP 46 +#define SCU0_CLK_GATE_E2M1CLK 47 +#define SCU0_CLK_GATE_CRT0CLK 48 +#define SCU0_CLK_GATE_CRT1CLK 49 +#define SCU0_CLK_GATE_ECDSACLK 50 +#define SCU0_CLK_GATE_RSACLK 51 +#define SCU0_CLK_GATE_RVAS0CLK 52 +#define SCU0_CLK_GATE_UFSCLK 53 +#define SCU0_CLK_GATE_EMMCCLK 54 +#define SCU0_CLK_GATE_RVAS1CLK 55 + +/* SOC1 clk */ +#define SCU1_CLKIN 0 +#define SCU1_CLK_HPLL 1 +#define SCU1_CLK_APLL 2 +#define SCU1_CLK_APLL_DIV2 3 +#define SCU1_CLK_APLL_DIV4 4 +#define SCU1_CLK_DPLL 5 +#define SCU1_CLK_UXCLK 6 +#define SCU1_CLK_HUXCLK 7 +#define SCU1_CLK_UARTX 8 +#define SCU1_CLK_HUARTX 9 +#define SCU1_CLK_AHB 10 +#define SCU1_CLK_APB 11 +#define SCU1_CLK_UART0 12 +#define SCU1_CLK_UART1 13 +#define SCU1_CLK_UART2 14 +#define SCU1_CLK_UART3 15 +#define SCU1_CLK_UART5 16 +#define SCU1_CLK_UART6 17 +#define SCU1_CLK_UART7 18 +#define SCU1_CLK_UART8 19 +#define SCU1_CLK_UART9 20 +#define SCU1_CLK_UART10 21 +#define SCU1_CLK_UART11 22 +#define SCU1_CLK_UART12 23 +#define SCU1_CLK_UART13 24 +#define SCU1_CLK_UART14 25 +#define SCU1_CLK_APLL_DIVN 26 +#define SCU1_CLK_SDMUX 27 +#define SCU1_CLK_SDCLK 28 +#define SCU1_CLK_RMII 29 +#define SCU1_CLK_RGMII 30 +#define SCU1_CLK_MACHCLK 31 +#define SCU1_CLK_MAC0RCLK 32 +#define SCU1_CLK_MAC1RCLK 33 +#define SCU1_CLK_CAN 34 + +/* SOC1 clk gate */ +#define SCU1_CLK_GATE_LCLK0 35 +#define SCU1_CLK_GATE_LCLK1 36 +#define SCU1_CLK_GATE_ESPI0CLK 37 +#define SCU1_CLK_GATE_ESPI1CLK 38 +#define SCU1_CLK_GATE_SDCLK 39 +#define SCU1_CLK_GATE_IPEREFCLK 40 +#define SCU1_CLK_GATE_REFCLK 41 +#define SCU1_CLK_GATE_LPCHCLK 42 +#define SCU1_CLK_GATE_MAC0CLK 43 +#define SCU1_CLK_GATE_MAC1CLK 44 +#define SCU1_CLK_GATE_MAC2CLK 45 +#define SCU1_CLK_GATE_UART0CLK 46 +#define SCU1_CLK_GATE_UART1CLK 47 +#define SCU1_CLK_GATE_UART2CLK 48 +#define SCU1_CLK_GATE_UART3CLK 49 +#define SCU1_CLK_GATE_I2CCLK 50 +#define SCU1_CLK_GATE_I3C0CLK 51 +#define SCU1_CLK_GATE_I3C1CLK 52 +#define SCU1_CLK_GATE_I3C2CLK 53 +#define SCU1_CLK_GATE_I3C3CLK 54 +#define SCU1_CLK_GATE_I3C4CLK 55 +#define SCU1_CLK_GATE_I3C5CLK 56 +#define SCU1_CLK_GATE_I3C6CLK 57 +#define SCU1_CLK_GATE_I3C7CLK 58 +#define SCU1_CLK_GATE_I3C8CLK 59 +#define SCU1_CLK_GATE_I3C9CLK 60 +#define SCU1_CLK_GATE_I3C10CLK 61 +#define SCU1_CLK_GATE_I3C11CLK 62 +#define SCU1_CLK_GATE_I3C12CLK 63 +#define SCU1_CLK_GATE_I3C13CLK 64 +#define SCU1_CLK_GATE_I3C14CLK 65 +#define SCU1_CLK_GATE_I3C15CLK 66 +#define SCU1_CLK_GATE_UART5CLK 67 +#define SCU1_CLK_GATE_UART6CLK 68 +#define SCU1_CLK_GATE_UART7CLK 69 +#define SCU1_CLK_GATE_UART8CLK 70 +#define SCU1_CLK_GATE_UART9CLK 71 +#define SCU1_CLK_GATE_UART10CLK 72 +#define SCU1_CLK_GATE_UART11CLK 73 +#define SCU1_CLK_GATE_UART12CLK 74 +#define SCU1_CLK_GATE_FSICLK 75 +#define SCU1_CLK_GATE_LTPIPHYCLK 76 +#define SCU1_CLK_GATE_LTPICLK 77 +#define SCU1_CLK_GATE_VGALCLK 78 +#define SCU1_CLK_GATE_UHCICLK 79 +#define SCU1_CLK_GATE_CANCLK 80 +#define SCU1_CLK_GATE_PCICLK 81 +#define SCU1_CLK_GATE_SLICLK 82 +#define SCU1_CLK_GATE_E2MCLK 83 +#define SCU1_CLK_GATE_PORTCUSB2CLK 84 +#define SCU1_CLK_GATE_PORTDUSB2CLK 85 +#define SCU1_CLK_GATE_LTPI1TXCLK 86 + +#endif
include/dt-bindings/reset/aspeed,ast2700-reset.h new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.34.1
Ryan Chen
maintainerPATCH v3 3/4 reset: aspeed: register AST2700 reset auxiliary bus device
In reply to Ryan ChenThe AST2700 reset driver is registered as an auxiliary device due to reset and clock controller share the same register region.
--- drivers/reset/Kconfig | 6 + drivers/reset/Makefile | 1 + drivers/reset/reset-aspeed.c | 259 +++++++++++++++++++++++++++++++++++ 3 files changed, 266 insertions(+) create mode 100644 drivers/reset/reset-aspeed.c
drivers/reset/Kconfig +6 -0
@@ -22,6 +22,12 @@ config RESET_A10SR This option enables support for the external reset functions for peripheral PHYs on the Altera Arria10 System Resource Chip. +config RESET_ASPEED + tristate "ASPEED Reset Driver" + depends on ARCH_ASPEED || COMPILE_TEST + help + This enables the reset controller driver for AST2700. + config RESET_ATH79 bool "AR71xx Reset Driver" if COMPILE_TEST default ATH79
drivers/reset/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-y += starfive/ obj-y += sti/ obj-y += tegra/ obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o +obj-$(CONFIG_RESET_ASPEED) += reset-aspeed.o obj-$(CONFIG_RESET_ATH79) += reset-ath79.o obj-$(CONFIG_RESET_AXS10X) += reset-axs10x.o obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o
drivers/reset/reset-aspeed.c new file +259 -0
259 lines not on this page · raw message
Signature · 1 line
2.34.1
Ryan Chen
maintainerPATCH v3 4/4 clk: aspeed: add AST2700 clock driver.
In reply to Ryan ChenAdd AST2700 clock controller driver and also use axiliary device framework register the reset controller driver. Due to clock and reset using the same register region.
--- drivers/clk/Kconfig | 8 + drivers/clk/Makefile | 1 + drivers/clk/clk-ast2700.c | 1548 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1557 insertions(+) create mode 100644 drivers/clk/clk-ast2700.c
drivers/clk/Kconfig +8 -0
@@ -269,6 +269,14 @@ config COMMON_CLK_ASPEED The G4 and G5 series, including the ast2400 and ast2500, are supported by this driver. +config COMMON_CLK_AST2700 + bool "Clock driver for AST2700 SoC" + depends on ARCH_ASPEED || COMPILE_TEST + help + This driver provides support for clock on AST2700 SoC. + The driver is responsible for managing the various clocks required + by the peripherals and cores within the AST2700. + config COMMON_CLK_S2MPS11 tristate "Clock driver for S2MPS1X/S5M8767 MFD" depends on MFD_SEC_CORE || COMPILE_TEST
drivers/clk/Makefile +1 -0
@@ -38,6 +38,7 @@ obj-$(CONFIG_COMMON_CLK_FSL_SAI) += clk-fsl-sai.o obj-$(CONFIG_COMMON_CLK_GEMINI) += clk-gemini.o obj-$(CONFIG_COMMON_CLK_ASPEED) += clk-aspeed.o obj-$(CONFIG_MACH_ASPEED_G6) += clk-ast2600.o +obj-$(CONFIG_COMMON_CLK_AST2700) += clk-ast2700.o obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o obj-$(CONFIG_CLK_HSDK) += clk-hsdk-pll.o obj-$(CONFIG_COMMON_CLK_K210) += clk-k210.o
drivers/clk/clk-ast2700.c new file +1548 -0
1,548 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
In reply to Ryan ChenQuoted 7 lines · Ryan Chen
Add reset, clock dt bindings for AST2700.
Signed-off-by Ryan Chen <[email protected]>--- .../dt-bindings/clock/aspeed,ast2700-clk.h | 163 ++++++++++++++++++ .../dt-bindings/reset/aspeed,ast2700-reset.h | 124 +++++++++++++ 2 files changed, 287 insertions(+)
This is supposed to be part of the commit adding these bindings. You got this comment already, didn't you?
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 8 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.hinclude/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0
Use compatible as filename.
Best regards,
Krzysztof
Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
In reply to Ryan ChenQuoted 1 line · Ryan Chen
Add compatible support for AST2700 clk, reset, pinctrl, silicon-id for AST2700 scu.
Please wrap commit message according to Linux coding style / submission process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
Quoted 30 lines
Signed-off-by Ryan Chen <[email protected]>--- .../devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +4
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour of the SoC, configuring elements such as clocks, pinmux, and reset. + In AST2700 SOC which has two soc connection, each soc have its own scu + register control, ast2700-scu0 for soc0, ast2700-scu1 for soc1. maintainers: - Joel Stanley <[email protected]>@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: true
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 10 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +4
-2'#address-cells': - const: 1 + minimum: 1 + maximum: 2 '#size-cells': - const: 1 + minimum: 1 + maximum: 2
Why do the children have 64 bit addressing?
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 66
Quoted 9 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-0'#clock-cells': const: 1@@ -56,6 +62,8 @@ patternProperties: - aspeed,ast2400-pinctrl - aspeed,ast2500-pinctrl - aspeed,ast2600-pinctrl + - aspeed,ast2700-soc0-pinctrl + - aspeed,ast2700-soc1-pinctrl
Are these devices different?
Where is this binding documented (fully)? Provide link to lore patch in the changelog.
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 87
Quoted 8 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +1
-0required: - compatible@@ -76,6 +84,7 @@ patternProperties: - aspeed,ast2400-silicon-id - aspeed,ast2500-silicon-id - aspeed,ast2600-silicon-id + - aspeed,ast2700-silicon-id
This one is fine.
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 90
Quoted 3 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0- const: aspeed,silicon-id reg:
Best regards,
Krzysztof
Re: [PATCH v3 3/4] reset: aspeed: register AST2700 reset auxiliary bus device
In reply to Ryan ChenLe 16/09/2024 ? 11:10, Ryan Chen a ?crit?:
Quoted 4 lines
The AST2700 reset driver is registered as an auxiliary device due to reset and clock controller share the same register region.
Signed-off-by Ryan Chen <[email protected]>
Hi,
...
Quoted 37 lines
drivers/reset/reset-aspeed.c new file +37
-0+static const struct ast2700_reset_signal ast2700_reset0_signals[] = { + [SCU0_RESET_SDRAM ] = { true,SCU0_RESET_CTRL1 ,BIT (0 ) }, + [SCU0_RESET_DDRPHY ] = { true,SCU0_RESET_CTRL1 ,BIT (1 ) }, + [SCU0_RESET_RSA ] = { true,SCU0_RESET_CTRL1 ,BIT (2 ) }, + [SCU0_RESET_SHA3 ] = { true,SCU0_RESET_CTRL1 ,BIT (3 ) }, + [SCU0_RESET_HACE ] = { true,SCU0_RESET_CTRL1 ,BIT (4 ) }, + [SCU0_RESET_SOC ] = { true,SCU0_RESET_CTRL1 ,BIT (5 ) }, + [SCU0_RESET_VIDEO ] = { true,SCU0_RESET_CTRL1 ,BIT (6 ) }, + [SCU0_RESET_2D ] = { true,SCU0_RESET_CTRL1 ,BIT (7 ) }, + [SCU0_RESET_PCIS ] = { true,SCU0_RESET_CTRL1 ,BIT (8 ) }, + [SCU0_RESET_RVAS0 ] = { true,SCU0_RESET_CTRL1 ,BIT (9 ) }, + [SCU0_RESET_RVAS1 ] = { true,SCU0_RESET_CTRL1 ,BIT (10 ) }, + [SCU0_RESET_SM3 ] = { true,SCU0_RESET_CTRL1 ,BIT (11 ) }, + [SCU0_RESET_SM4 ] = { true,SCU0_RESET_CTRL1 ,BIT (12 ) }, + [SCU0_RESET_CRT0 ] = { true,SCU0_RESET_CTRL1 ,BIT (13 ) }, + [SCU0_RESET_ECC ] = { true,SCU0_RESET_CTRL1 ,BIT (14 ) }, + [SCU0_RESET_DP_PCI ] = { true,SCU0_RESET_CTRL1 ,BIT (15 ) }, + [SCU0_RESET_UFS ] = { true,SCU0_RESET_CTRL1 ,BIT (16 ) }, + [SCU0_RESET_EMMC ] = { true,SCU0_RESET_CTRL1 ,BIT (17 ) }, + [SCU0_RESET_PCIE1RST ] = { true,SCU0_RESET_CTRL1 ,BIT (18 ) }, + [SCU0_RESET_PCIE1RSTOE ] = { true,SCU0_RESET_CTRL1 ,BIT (19 ) }, + [SCU0_RESET_PCIE0RST ] = { true,SCU0_RESET_CTRL1 ,BIT (20 ) }, + [SCU0_RESET_PCIE0RSTOE ] = { true,SCU0_RESET_CTRL1 ,BIT (21 ) }, + [SCU0_RESET_JTAG ] = { true,SCU0_RESET_CTRL1 ,BIT (22 ) }, + [SCU0_RESET_MCTP0 ] = { true,SCU0_RESET_CTRL1 ,BIT (23 ) }, + [SCU0_RESET_MCTP1 ] = { true,SCU0_RESET_CTRL1 ,BIT (24 ) }, + [SCU0_RESET_XDMA0 ] = { true,SCU0_RESET_CTRL1 ,BIT (25 ) }, + [SCU0_RESET_XDMA1 ] = { true,SCU0_RESET_CTRL1 ,BIT (26 ) }, + [SCU0_RESET_H2X1 ] = { true,SCU0_RESET_CTRL1 ,BIT (27 ) }, + [SCU0_RESET_DP ] = { true,SCU0_RESET_CTRL1 ,BIT (28 ) }, + [SCU0_RESET_DP_MCU ] = { true,SCU0_RESET_CTRL1 ,BIT (29 ) }, + [SCU0_RESET_SSP ] = { true,SCU0_RESET_CTRL1 ,BIT (30 ) }, + [SCU0_RESET_H2X0 ] = { true,SCU0_RESET_CTRL1 ,BIT (31 ) }, + [SCU0_RESET_PORTA_VHUB ] = { true,SCU0_RESET_CTRL2 ,BIT (0 ) }, + [SCU0_RESET_PORTA_PHY3 ] = { true,SCU0_RESET_CTRL2 ,BIT (1 ) }, + [SCU0_RESET_PORTA_XHCI ] = { true,SCU0_RESET_CTRL2 ,BIT (2 ) }, + [SCU0_RESET_PORTB_VHUB ] = { true,SCU0_RESET_CTRL2 ,BIT (3 ) },
drivers/reset/reset-aspeed.c line 85
Quoted 10 lines
drivers/reset/reset-aspeed.c new file +10
-0+ [SCU0_RESET_PORTB_PHY3] = { true, SCU0_RESET_CTRL2, BIT(4) }, + [SCU0_RESET_PORTB_XHCI] = { true, SCU0_RESET_CTRL2, BIT(5) }, + [SCU0_RESET_PORTA_VHUB_EHCI] = { true, SCU0_RESET_CTRL2, BIT(6) }, + [SCU0_RESET_PORTB_VHUB_EHCI] = { true, SCU0_RESET_CTRL2, BIT(7) }, + [SCU0_RESET_UHCI] = { true, SCU0_RESET_CTRL2, BIT(8) }, + [SCU0_RESET_TSP] = { true, SCU0_RESET_CTRL2, BIT(9) }, + [SCU0_RESET_E2M0] = { true, SCU0_RESET_CTRL2, BIT(10) }, + [SCU0_RESET_E2M1] = { true, SCU0_RESET_CTRL2, BIT(11) }, + [SCU0_RESET_VLINK] = { true, SCU0_RESET_CTRL2, BIT(12) }, +};
The sapces and tabs in both tables look not consistent.
Quoted 67 lines
drivers/reset/reset-aspeed.c new file +67
-0+ +static const struct ast2700_reset_signal ast2700_reset1_signals[] = { + [SCU1_RESET_LPC0 ] = { true,SCU1_RESET_CTRL1 ,BIT (0 ) }, + [SCU1_RESET_LPC1 ] = { true,SCU1_RESET_CTRL1 ,BIT (1 ) }, + [SCU1_RESET_MII ] = { true,SCU1_RESET_CTRL1 ,BIT (2 ) }, + [SCU1_RESET_PECI ] = { true,SCU1_RESET_CTRL1 ,BIT (3 ) }, + [SCU1_RESET_PWM ] = { true,SCU1_RESET_CTRL1 ,BIT (4 ) }, + [SCU1_RESET_MAC0 ] = { true,SCU1_RESET_CTRL1 ,BIT (5 ) }, + [SCU1_RESET_MAC1 ] = { true,SCU1_RESET_CTRL1 ,BIT (6 ) }, + [SCU1_RESET_MAC2 ] = { true,SCU1_RESET_CTRL1 ,BIT (7 ) }, + [SCU1_RESET_ADC ] = { true,SCU1_RESET_CTRL1 ,BIT (8 ) }, + [SCU1_RESET_SD ] = { true,SCU1_RESET_CTRL1 ,BIT (9 ) }, + [SCU1_RESET_ESPI0 ] = { true,SCU1_RESET_CTRL1 ,BIT (10 ) }, + [SCU1_RESET_ESPI1 ] = { true,SCU1_RESET_CTRL1 ,BIT (11 ) }, + [SCU1_RESET_JTAG1 ] = { true,SCU1_RESET_CTRL1 ,BIT (12 ) }, + [SCU1_RESET_SPI0 ] = { true,SCU1_RESET_CTRL1 ,BIT (13 ) }, + [SCU1_RESET_SPI1 ] = { true,SCU1_RESET_CTRL1 ,BIT (14 ) }, + [SCU1_RESET_SPI2 ] = { true,SCU1_RESET_CTRL1 ,BIT (15 ) }, + [SCU1_RESET_I3C0 ] = { true,SCU1_RESET_CTRL1 ,BIT (16 ) }, + [SCU1_RESET_I3C1 ] = { true,SCU1_RESET_CTRL1 ,BIT (17 ) }, + [SCU1_RESET_I3C2 ] = { true,SCU1_RESET_CTRL1 ,BIT (18 ) }, + [SCU1_RESET_I3C3 ] = { true,SCU1_RESET_CTRL1 ,BIT (19 ) }, + [SCU1_RESET_I3C4 ] = { true,SCU1_RESET_CTRL1 ,BIT (20 ) }, + [SCU1_RESET_I3C5 ] = { true,SCU1_RESET_CTRL1 ,BIT (21 ) }, + [SCU1_RESET_I3C6 ] = { true,SCU1_RESET_CTRL1 ,BIT (22 ) }, + [SCU1_RESET_I3C7 ] = { true,SCU1_RESET_CTRL1 ,BIT (23 ) }, + [SCU1_RESET_I3C8 ] = { true,SCU1_RESET_CTRL1 ,BIT (24 ) }, + [SCU1_RESET_I3C9 ] = { true,SCU1_RESET_CTRL1 ,BIT (25 ) }, + [SCU1_RESET_I3C10 ] = { true,SCU1_RESET_CTRL1 ,BIT (26 ) }, + [SCU1_RESET_I3C11 ] = { true,SCU1_RESET_CTRL1 ,BIT (27 ) }, + [SCU1_RESET_I3C12 ] = { true,SCU1_RESET_CTRL1 ,BIT (28 ) }, + [SCU1_RESET_I3C13 ] = { true,SCU1_RESET_CTRL1 ,BIT (29 ) }, + [SCU1_RESET_I3C14 ] = { true,SCU1_RESET_CTRL1 ,BIT (30 ) }, + [SCU1_RESET_I3C15 ] = { true,SCU1_RESET_CTRL1 ,BIT (31 ) }, + [SCU1_RESET_MCU0 ] = { true,SCU1_RESET_CTRL2 ,BIT (0 ) }, + [SCU1_RESET_MCU1 ] = { true,SCU1_RESET_CTRL2 ,BIT (1 ) }, + [SCU1_RESET_H2A_SPI1 ] = { true,SCU1_RESET_CTRL2 ,BIT (2 ) }, + [SCU1_RESET_H2A_SPI2 ] = { true,SCU1_RESET_CTRL2 ,BIT (3 ) }, + [SCU1_RESET_UART0 ] = { true,SCU1_RESET_CTRL2 ,BIT (4 ) }, + [SCU1_RESET_UART1 ] = { true,SCU1_RESET_CTRL2 ,BIT (5 ) }, + [SCU1_RESET_UART2 ] = { true,SCU1_RESET_CTRL2 ,BIT (6 ) }, + [SCU1_RESET_UART3 ] = { true,SCU1_RESET_CTRL2 ,BIT (7 ) }, + [SCU1_RESET_I2C_FILTER ] = { true,SCU1_RESET_CTRL2 ,BIT (8 ) }, + [SCU1_RESET_CALIPTRA ] = { true,SCU1_RESET_CTRL2 ,BIT (9 ) }, + [SCU1_RESET_XDMA ] = { true,SCU1_RESET_CTRL2 ,BIT (10 ) }, + [SCU1_RESET_FSI ] = { true,SCU1_RESET_CTRL2 ,BIT (12 ) }, + [SCU1_RESET_CAN ] = { true,SCU1_RESET_CTRL2 ,BIT (13 ) }, + [SCU1_RESET_MCTP ] = { true,SCU1_RESET_CTRL2 ,BIT (14 ) }, + [SCU1_RESET_I2C ] = { true,SCU1_RESET_CTRL2 ,BIT (15 ) }, + [SCU1_RESET_UART6 ] = { true,SCU1_RESET_CTRL2 ,BIT (16 ) }, + [SCU1_RESET_UART7 ] = { true,SCU1_RESET_CTRL2 ,BIT (17 ) }, + [SCU1_RESET_UART8 ] = { true,SCU1_RESET_CTRL2 ,BIT (18 ) }, + [SCU1_RESET_UART9 ] = { true,SCU1_RESET_CTRL2 ,BIT (19 ) }, + [SCU1_RESET_LTPI0 ] = { true,SCU1_RESET_CTRL2 ,BIT (20 ) }, + [SCU1_RESET_VGAL ] = { true,SCU1_RESET_CTRL2 ,BIT (21 ) }, + [SCU1_RESET_LTPI1 ] = { true,SCU1_RESET_CTRL2 ,BIT (22 ) }, + [SCU1_RESET_ACE ] = { true,SCU1_RESET_CTRL2 ,BIT (23 ) }, + [SCU1_RESET_E2M ] = { true,SCU1_RESET_CTRL2 ,BIT (24 ) }, + [SCU1_RESET_UHCI ] = { true,SCU1_RESET_CTRL2 ,BIT (25 ) }, + [SCU1_RESET_PORTC_USB2UART ] = { true,SCU1_RESET_CTRL2 ,BIT (26 ) }, + [SCU1_RESET_PORTC_VHUB_EHCI ] = { true,SCU1_RESET_CTRL2 ,BIT (27 ) }, + [SCU1_RESET_PORTD_USB2UART ] = { true,SCU1_RESET_CTRL2 ,BIT (28 ) }, + [SCU1_RESET_PORTD_VHUB_EHCI ] = { true,SCU1_RESET_CTRL2 ,BIT (29 ) }, + [SCU1_RESET_H2X ] = { true,SCU1_RESET_CTRL2 ,BIT (30 ) }, + [SCU1_RESET_I3CDMA ] = { true,SCU1_RESET_CTRL2 ,BIT (31 ) }, + [SCU1_RESET_PCIE2RST ] = { false,SCU1_PCIE3_CTRL ,BIT (0 ) }, +};
...
Quoted 10 lines
drivers/reset/reset-aspeed.c new file +10
-0+static int aspeed_reset_probe (struct auxiliary_device *adev, +const struct auxiliary_device_id *id) +{ +struct aspeed_reset *reset; +struct device *dev = &adev->dev; + + reset =devm_kzalloc (dev,sizeof (*reset),GFP_KERNEL ); +if (!reset) +return -ENOMEM ; +
drivers/reset/reset-aspeed.c line 223
Quoted 10 lines
drivers/reset/reset-aspeed.c new file +10
-0+spin_lock_init (&reset->lock); + + reset->info = (struct aspeed_reset_info *)(id->driver_data); + reset->rcdev.owner =THIS_MODULE ; + reset->rcdev.nr_resets = reset->info->nr_resets; + reset->rcdev.ops = &aspeed_reset_ops; + reset->rcdev.of_node = dev->parent->of_node; + reset->rcdev.dev = dev; + reset->rcdev.of_reset_n_cells =1 ; + reset->base = (void __iomem *)adev->dev.platform_data;
The spaces and tabs look broken for 'info' and 'rcdev.dev'.
drivers/reset/reset-aspeed.c line 228
Quoted 5 lines
drivers/reset/reset-aspeed.c new file +5
-0+ +if (!reset->base) +return -ENOMEM ; + +dev_set_drvdata (dev, reset);
Is it needed?
(there is no dev_get_drvdata())
drivers/reset/reset-aspeed.c line 231
Quoted 3 lines
drivers/reset/reset-aspeed.c new file +3
-0+ +return devm_reset_controller_register (dev, &reset->rcdev); +}
...
CJ
Ryan Chen
maintainerRE: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
In reply to Krzysztof KozlowskiQuoted 8 lines
Subject: Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 5 lines · Ryan Chen
Add reset, clock dt bindings for AST2700.
Signed-off-by Ryan Chen <[email protected]>--- .../dt-bindings/clock/aspeed,ast2700-clk.h | 163
Quoted 6 lines
++++++++++++++++++
Quoted 2 lines
.../dt-bindings/reset/aspeed,ast2700-reset.h | 124 +++++++++++++ 2 files changed, 287 insertions(+)This is supposed to be part of the commit adding these bindings. You got this comment already, didn't you?
Sorry, I may mis-understood your point in previous.
I think you are ask, yaml and dt-binding header to be the same patch, right?
Quoted 4 lines
Quoted 4 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.h
Quoted 8 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 6 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0Use compatible as filename.
Modify from aspeed,ast2700-clk.h to aspeed, clk-ast2700.h, is it ok? How about the aspeed,ast2700-reset.h file name is ok ?
Quoted 4 lines
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
In reply to Krzysztof KozlowskiQuoted 10 lines
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 1 line · Ryan Chen
Add compatible support for AST2700 clk, reset, pinctrl, silicon-id for AST2700
scu.
Please wrap commit message according to Linux coding style / submission process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/sub
mitting-patches.rst#L597
Will update it.
Quoted 41 lines
Quoted 15 lines
Signed-off-by Ryan Chen <[email protected]>--- .../devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)diff --git
a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlb/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlindex86ee69c0f45b..127a357051cd100644Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml title: Aspeed System Control Unit · line 10
Quoted 2 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour of theSoC,
Quoted 23 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +6
-1configuring elements such as clocks, pinmux, and reset. + In AST2700 SOC which has two soc connection, each soc have its own + scu register control, ast2700-scu0 for soc0, ast2700-scu1 for soc1. maintainers: - Joel Stanley <[email protected]>@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: true '#address-cells': - const: 1 + minimum: 1 + maximum: 2
Quoted 6 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 4 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-1'#size-cells': - const: 1 + minimum: 1 + maximum: 2Why do the children have 64 bit addressing?
AST2700 is 64bit address, so it also.
It is children example for pinctrl.
syscon1: syscon at 14c02000 {
compatible = "aspeed,ast2700-scu1", "syscon", "simple-mfd";
reg = <0x0 0x14c02000 0x0 0x1000>;
ranges = <0x0 0x0 0x0 0x14c02000 0x0 0x1000>;
#address-cells = <2>;
#size-cells = <2>;
#clock-cells = <1>;
#reset-cells = <1>;
pinctrl1: pinctrl at 400 {
compatible = "aspeed,ast2700-soc1-pinctrl";
reg = <0x0 0x400 0x0 0x100>;
};
};Quoted 13 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 66
Quoted 10 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-0'#clock-cells': const: 1@@ -56,6 +62,8 @@ patternProperties: - aspeed,ast2400-pinctrl - aspeed,ast2500-pinctrl - aspeed,ast2600-pinctrl + - aspeed,ast2700-soc0-pinctrl + - aspeed,ast2700-soc1-pinctrlAre these devices different?
Quoted 2 lines
Where is this binding documented (fully)? Provide link to lore patch in the changelog.
I will remove it in next submit.
It will add in another pinctrl submit patch.
Quoted 11 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 87
Quoted 9 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +1
-0required: - compatible@@ -76,6 +84,7 @@ patternProperties: - aspeed,ast2400-silicon-id - aspeed,ast2500-silicon-id - aspeed,ast2600-silicon-id + - aspeed,ast2700-silicon-idThis one is fine.
Thanks.
Quoted 7 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml patternProperties: · line 90
Quoted 4 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0- const: aspeed,silicon-id reg:Best regards,
Krzysztof
Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 33 lines · Ryan Chen
Quoted 33 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml title: Aspeed System Control Unit · line 10
Quoted 9 lines
diff --git
a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlb/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlindex86ee69c0f45b..127a357051cd100644Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour of theSoC,
Quoted 23 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +6
-1configuring elements such as clocks, pinmux, and reset. + In AST2700 SOC which has two soc connection, each soc have its own + scu register control, ast2700-scu0 for soc0, ast2700-scu1 for soc1. maintainers: - Joel Stanley <[email protected]>@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: true '#address-cells': - const: 1 + minimum: 1 + maximum: 2
Quoted 8 lines
Quoted 6 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 4 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-1'#size-cells': - const: 1 + minimum: 1 + maximum: 2Why do the children have 64 bit addressing?
AST2700 is 64bit address, so it also.
But why do they need it?
Best regards,
Krzysztof
Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
In reply to Ryan ChenQuoted 9 lines · Ryan Chen
Quoted 9 lines
Subject: Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 5 lines · Ryan Chen
Add reset, clock dt bindings for AST2700.
Signed-off-by Ryan Chen <[email protected]>--- .../dt-bindings/clock/aspeed,ast2700-clk.h | 163++++++++++++++++++
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
.../dt-bindings/reset/aspeed,ast2700-reset.h | 124 +++++++++++++ 2 files changed, 287 insertions(+)This is supposed to be part of the commit adding these bindings. You got this comment already, didn't you?
Sorry, I may mis-understood your point in previous.
I think you are ask, yaml and dt-binding header to be the same patch, right?
It is one patch adding the binding for the device and headers.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.hQuoted 8 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 6 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0Use compatible as filename.
Quoted 2 lines
Modify from aspeed,ast2700-clk.h to aspeed,
clk-ast2700.h, is it ok? How about the aspeed,ast2700-reset.h file name is ok ?
No. For both use the same filename, so the full compatible. FULL.
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
In reply to Krzysztof KozlowskiQuoted 45 lines
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 11 lines · Ryan Chen
Quoted 11 lines
Quoted 10 lines
diff --git
a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlb/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlindex86ee69c0f45b..127a357051cd100644Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour ofthe
SoC,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
configuring elements such as clocks, pinmux, and reset.
+ In AST2700 SOC which has two soc connection, each soc have its
+ own scu register control, ast2700-scu0 for soc0, ast2700-scu1 forsoc1.
Quoted 27 lines
Quoted 26 lines
Quoted 14 lines
maintainers:
- Joel Stanley <[email protected]>Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-0@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: trueDocumentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 10 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +4
-2'#address-cells': - const: 1 + minimum: 1 + maximum: 2 '#size-cells': - const: 1 + minimum: 1 + maximum: 2Why do the children have 64 bit addressing?
Quoted 4 lines
Quoted 1 line
AST2700 is 64bit address, so it also.
But why do they need it?
Sorry, I may not understand your point.
Since address-cell = <2>, Do you mean size-cell still 1?
If yes. I do the dts check it need size-cells=<2>, when I do address-cells = <2>
Quoted 3 lines
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
In reply to Krzysztof KozlowskiQuoted 15 lines
Subject: Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 12 lines · Ryan Chen
Quoted 12 lines
Subject: Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 5 lines · Ryan Chen
Add reset, clock dt bindings for AST2700.
Signed-off-by Ryan Chen <[email protected]>--- .../dt-bindings/clock/aspeed,ast2700-clk.h | 163++++++++++++++++++
Quoted 2 lines
.../dt-bindings/reset/aspeed,ast2700-reset.h | 124 +++++++++++++ 2 files changed, 287 insertions(+)
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
This is supposed to be part of the commit adding these bindings. You got this comment already, didn't you?
Sorry, I may mis-understood your point in previous.
I think you are ask, yaml and dt-binding header to be the same patch, right?It is one patch adding the binding for the device and headers.
Thanks.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 12 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.hinclude/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0Use compatible as filename.
Quoted 4 lines
Quoted 2 lines
Modify from aspeed,ast2700-clk.h to aspeed,
clk-ast2700.h, is it ok? How about the aspeed,ast2700-reset.h file name is ok ?No. For both use the same filename, so the full compatible. FULL.
Do you mean remove aspeed,ast2700-reset.h?
And move reset information into "aspeed, clk-ast2700.h"
Quoted 3 lines
Best regards,
Krzysztof
Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 12 lines · Ryan Chen
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 10 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644 include/dt-bindings/reset/aspeed,ast2700-reset.hinclude/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0Use compatible as filename.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Modify from aspeed,ast2700-clk.h to aspeed,
clk-ast2700.h, is it ok? How about the aspeed,ast2700-reset.h file name is ok ?No. For both use the same filename, so the full compatible. FULL.
Do you mean remove aspeed,ast2700-reset.h?
And move reset information into "aspeed,clk-ast2700.h"Quoted 1 line
I did not say that. "For both" means for both files, so you can keep both files.
Best regards,
Krzysztof
Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
In reply to Ryan ChenQuoted 45 lines · Ryan Chen
Quoted 45 lines
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 11 lines · Ryan Chen
Quoted 11 lines
Quoted 10 lines
diff --git
a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlb/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlindex86ee69c0f45b..127a357051cd100644Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +0
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour ofthe
SoC,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
configuring elements such as clocks, pinmux, and reset.
+ In AST2700 SOC which has two soc connection, each soc have its
+ own scu register control, ast2700-scu0 for soc0, ast2700-scu1 forsoc1.
Quoted 27 lines
Quoted 26 lines
Quoted 14 lines
maintainers:
- Joel Stanley <[email protected]>Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-0@@ -21,6 +23,8 @@ properties: - aspeed,ast2400-scu - aspeed,ast2500-scu - aspeed,ast2600-scu + - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: trueDocumentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 10 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +4
-2'#address-cells': - const: 1 + minimum: 1 + maximum: 2 '#size-cells': - const: 1 + minimum: 1 + maximum: 2Why do the children have 64 bit addressing?
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
AST2700 is 64bit address, so it also.
But why do they need it?
Sorry, I may not understand your point.
I asked why do you think children require 64-bit addressing, instead of working with existing 32-bit address.
Quoted 1 line
Since address-cell = <2>, Do you mean size-cell still 1?
No... although that's another point, how bug address size is there? For the children?
Quoted 1 line
If yes. I do the dts check it need size-cells=<2>, when I do address-cells = <2>
Well, I talk about bus and children addressing. It's kind of obvious that changing one property means using different reg...
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
In reply to Krzysztof KozlowskiQuoted 19 lines
Subject: Re: [PATCH v3 2/4] dt-bindings: Add AST2700 bindings
Quoted 16 lines · Ryan Chen
Quoted 16 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
create mode 100644 include/dt-bindings/clock/aspeed,ast2700-clk.h create mode 100644
include/dt-bindings/reset/aspeed,ast2700-reset.hQuoted 8 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h
Quoted 6 lines
include/dt-bindings/clock/aspeed,ast2700-clk.h new file +0
-0Use compatible as filename.
Modify from aspeed,ast2700-clk.h to aspeed,
clk-ast2700.h, is it ok? How about the aspeed,ast2700-reset.h file name is ok ?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
No. For both use the same filename, so the full compatible. FULL.
Do you mean remove aspeed,ast2700-reset.h?
And move reset information into "aspeed,clk-ast2700.h"Quoted 1 line
I did not say that. "For both" means for both files, so you can keep both files.
So, I think you want both file use the same name right? To be following include/dt-bindings/clock/aspeed,ast2700-scu.h include/dt-bindings/reset/aspeed,ast2700-scu.h
Quoted 3 lines
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
In reply to Krzysztof KozlowskiQuoted 63 lines
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 11 lines · Ryan Chen
Quoted 11 lines
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: aspeed: support for AST2700
Quoted 7 lines · Ryan Chen
Quoted 7 lines
Quoted 7 lines
diff --git
a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlb/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yamlindex86ee69c0f45b..127a357051cd100644
---a/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml
+++b/Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yam
Quoted 37 lines
Quoted 37 lines
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
+++ l
(quoted diff) +0
-0@@ -9,6 +9,8 @@ title: Aspeed System Control Unit description: The Aspeed System Control Unit manages the global behaviour ofthe
SoC,
Quoted 4 lines
configuring elements such as clocks, pinmux, and reset.
+ In AST2700 SOC which has two soc connection, each soc have its
+ own scu register control, ast2700-scu0 for soc0, ast2700-scu1
+ forsoc1.
Quoted 26 lines
Quoted 25 lines
Quoted 13 lines
maintainers:
- Joel Stanley <[email protected]> @@ -21,6 +23,8 @@ properties:
- aspeed,ast2400-scu
- aspeed,ast2500-scu
- aspeed,ast2600-scuDocumentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +2
-0+ - aspeed,ast2700-scu0 + - aspeed,ast2700-scu1 - const: syscon - const: simple-mfd@@ -30,10 +34,12 @@ properties: ranges: trueDocumentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml properties: · line 42
Quoted 10 lines
Documentation/devicetree/bindings/mfd/aspeed,ast2x00-scu.yaml +4
-2'#address-cells': - const: 1 + minimum: 1 + maximum: 2 '#size-cells': - const: 1 + minimum: 1 + maximum: 2Why do the children have 64 bit addressing?
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
AST2700 is 64bit address, so it also.
But why do they need it?
Sorry, I may not understand your point.
I asked why do you think children require 64-bit addressing, instead of working with existing 32-bit address.
Quoted 1 line
Since address-cell = <2>, Do you mean size-cell still 1?
Quoted 9 lines
No... although that's another point, how bug address size is there? For the children?
Quoted 2 lines
If yes. I do the dts check it need size-cells=<2>, when I do address-cells = <2>
Well, I talk about bus and children addressing. It's kind of obvious that changing one property means using different reg...
Understood your point, I don?t use so much for size, size-cell = <1> is enough, will keep <1>
Quoted 2 lines
Best regards,
Krzysztof
Ryan Chen
maintainerRE: [PATCH v3 3/4] reset: aspeed: register AST2700 reset auxiliary bus device
In reply to Christophe JAILLETQuoted 56 lines
Subject: Re: [PATCH v3 3/4] reset: aspeed: register AST2700 reset auxiliary bus device
Le 16/09/2024 ? 11:10, Ryan Chen a ?crit?:
Quoted 4 lines
The AST2700 reset driver is registered as an auxiliary device due to reset and clock controller share the same register region.
Signed-off-by Ryan Chen <[email protected]>Hi,
...
Quoted 30 lines
drivers/reset/reset-aspeed.c new file +30
-0+static const struct ast2700_reset_signal ast2700_reset0_signals[] = { + [SCU0_RESET_SDRAM ] = { true,SCU0_RESET_CTRL1 ,BIT (0 ) }, + [SCU0_RESET_DDRPHY ] = { true,SCU0_RESET_CTRL1 ,BIT (1 ) }, + [SCU0_RESET_RSA ] = { true,SCU0_RESET_CTRL1 ,BIT (2 ) }, + [SCU0_RESET_SHA3 ] = { true,SCU0_RESET_CTRL1 ,BIT (3 ) }, + [SCU0_RESET_HACE ] = { true,SCU0_RESET_CTRL1 ,BIT (4 ) }, + [SCU0_RESET_SOC ] = { true,SCU0_RESET_CTRL1 ,BIT (5 ) }, + [SCU0_RESET_VIDEO ] = { true,SCU0_RESET_CTRL1 ,BIT (6 ) }, + [SCU0_RESET_2D ] = { true,SCU0_RESET_CTRL1 ,BIT (7 ) }, + [SCU0_RESET_PCIS ] = { true,SCU0_RESET_CTRL1 ,BIT (8 ) }, + [SCU0_RESET_RVAS0 ] = { true,SCU0_RESET_CTRL1 ,BIT (9 ) }, + [SCU0_RESET_RVAS1 ] = { true,SCU0_RESET_CTRL1 ,BIT (10 ) }, + [SCU0_RESET_SM3 ] = { true,SCU0_RESET_CTRL1 ,BIT (11 ) }, + [SCU0_RESET_SM4 ] = { true,SCU0_RESET_CTRL1 ,BIT (12 ) }, + [SCU0_RESET_CRT0 ] = { true,SCU0_RESET_CTRL1 ,BIT (13 ) }, + [SCU0_RESET_ECC ] = { true,SCU0_RESET_CTRL1 ,BIT (14 ) }, + [SCU0_RESET_DP_PCI ] = { true,SCU0_RESET_CTRL1 ,BIT (15 ) }, + [SCU0_RESET_UFS ] = { true,SCU0_RESET_CTRL1 ,BIT (16 ) }, + [SCU0_RESET_EMMC ] = { true,SCU0_RESET_CTRL1 ,BIT (17 ) }, + [SCU0_RESET_PCIE1RST ] = { true,SCU0_RESET_CTRL1 ,BIT (18 ) }, + [SCU0_RESET_PCIE1RSTOE ] = { true,SCU0_RESET_CTRL1 ,BIT (19 ) }, + [SCU0_RESET_PCIE0RST ] = { true,SCU0_RESET_CTRL1 ,BIT (20 ) }, + [SCU0_RESET_PCIE0RSTOE ] = { true,SCU0_RESET_CTRL1 ,BIT (21 ) }, + [SCU0_RESET_JTAG ] = { true,SCU0_RESET_CTRL1 ,BIT (22 ) }, + [SCU0_RESET_MCTP0 ] = { true,SCU0_RESET_CTRL1 ,BIT (23 ) }, + [SCU0_RESET_MCTP1 ] = { true,SCU0_RESET_CTRL1 ,BIT (24 ) }, + [SCU0_RESET_XDMA0 ] = { true,SCU0_RESET_CTRL1 ,BIT (25 ) }, + [SCU0_RESET_XDMA1 ] = { true,SCU0_RESET_CTRL1 ,BIT (26 ) }, + [SCU0_RESET_H2X1 ] = { true,SCU0_RESET_CTRL1 ,BIT (27 ) }, + [SCU0_RESET_DP ] = { true,SCU0_RESET_CTRL1 ,BIT (28 ) },drivers/reset/reset-aspeed.c
Quoted 10 lines
drivers/reset/reset-aspeed.c new file +10
-0+ [SCU0_RESET_DP_MCU] = { true, SCU0_RESET_CTRL1, BIT(29) }, + [SCU0_RESET_SSP] = { true, SCU0_RESET_CTRL1, BIT(30) }, + [SCU0_RESET_H2X0] = { true, SCU0_RESET_CTRL1, BIT(31) }, + [SCU0_RESET_PORTA_VHUB] = { true, SCU0_RESET_CTRL2, BIT(0) }, + [SCU0_RESET_PORTA_PHY3] = { true, SCU0_RESET_CTRL2, BIT(1) }, + [SCU0_RESET_PORTA_XHCI] = { true, SCU0_RESET_CTRL2, BIT(2) }, + [SCU0_RESET_PORTB_VHUB] = { true, SCU0_RESET_CTRL2, BIT(3) }, + [SCU0_RESET_PORTB_PHY3] = { true, SCU0_RESET_CTRL2, BIT(4) }, + [SCU0_RESET_PORTB_XHCI] = { true, SCU0_RESET_CTRL2, BIT(5) }, + [SCU0_RESET_PORTA_VHUB_EHCI] = { true, SCU0_RESET_CTRL2,BIT(6) },
Review
Quoted 1 line
(quoted diff) +1
-0+ [SCU0_RESET_PORTB_VHUB_EHCI] = { true, SCU0_RESET_CTRL2,BIT(7) },
Quoted 8 lines
drivers/reset/reset-aspeed.c line 85
Quoted 6 lines
drivers/reset/reset-aspeed.c new file +6
-0+ [SCU0_RESET_UHCI] = { true, SCU0_RESET_CTRL2, BIT(8) }, + [SCU0_RESET_TSP] = { true, SCU0_RESET_CTRL2, BIT(9) }, + [SCU0_RESET_E2M0] = { true, SCU0_RESET_CTRL2, BIT(10) }, + [SCU0_RESET_E2M1] = { true, SCU0_RESET_CTRL2, BIT(11) }, + [SCU0_RESET_VLINK] = { true, SCU0_RESET_CTRL2, BIT(12) }, +};The sapces and tabs in both tables look not consistent.
Will update.
Quoted 88 lines
Quoted 51 lines
drivers/reset/reset-aspeed.c new file +50
-0+ +static const struct ast2700_reset_signal ast2700_reset1_signals[] = { + [SCU1_RESET_LPC0 ] = { true,SCU1_RESET_CTRL1 ,BIT (0 ) }, + [SCU1_RESET_LPC1 ] = { true,SCU1_RESET_CTRL1 ,BIT (1 ) }, + [SCU1_RESET_MII ] = { true,SCU1_RESET_CTRL1 ,BIT (2 ) }, + [SCU1_RESET_PECI ] = { true,SCU1_RESET_CTRL1 ,BIT (3 ) }, + [SCU1_RESET_PWM ] = { true,SCU1_RESET_CTRL1 ,BIT (4 ) }, + [SCU1_RESET_MAC0 ] = { true,SCU1_RESET_CTRL1 ,BIT (5 ) }, + [SCU1_RESET_MAC1 ] = { true,SCU1_RESET_CTRL1 ,BIT (6 ) }, + [SCU1_RESET_MAC2 ] = { true,SCU1_RESET_CTRL1 ,BIT (7 ) }, + [SCU1_RESET_ADC ] = { true,SCU1_RESET_CTRL1 ,BIT (8 ) }, + [SCU1_RESET_SD ] = { true,SCU1_RESET_CTRL1 ,BIT (9 ) }, + [SCU1_RESET_ESPI0 ] = { true,SCU1_RESET_CTRL1 ,BIT (10 ) }, + [SCU1_RESET_ESPI1 ] = { true,SCU1_RESET_CTRL1 ,BIT (11 ) }, + [SCU1_RESET_JTAG1 ] = { true,SCU1_RESET_CTRL1 ,BIT (12 ) }, + [SCU1_RESET_SPI0 ] = { true,SCU1_RESET_CTRL1 ,BIT (13 ) }, + [SCU1_RESET_SPI1 ] = { true,SCU1_RESET_CTRL1 ,BIT (14 ) }, + [SCU1_RESET_SPI2 ] = { true,SCU1_RESET_CTRL1 ,BIT (15 ) }, + [SCU1_RESET_I3C0 ] = { true,SCU1_RESET_CTRL1 ,BIT (16 ) }, + [SCU1_RESET_I3C1 ] = { true,SCU1_RESET_CTRL1 ,BIT (17 ) }, + [SCU1_RESET_I3C2 ] = { true,SCU1_RESET_CTRL1 ,BIT (18 ) }, + [SCU1_RESET_I3C3 ] = { true,SCU1_RESET_CTRL1 ,BIT (19 ) }, + [SCU1_RESET_I3C4 ] = { true,SCU1_RESET_CTRL1 ,BIT (20 ) }, + [SCU1_RESET_I3C5 ] = { true,SCU1_RESET_CTRL1 ,BIT (21 ) }, + [SCU1_RESET_I3C6 ] = { true,SCU1_RESET_CTRL1 ,BIT (22 ) }, + [SCU1_RESET_I3C7 ] = { true,SCU1_RESET_CTRL1 ,BIT (23 ) }, + [SCU1_RESET_I3C8 ] = { true,SCU1_RESET_CTRL1 ,BIT (24 ) }, + [SCU1_RESET_I3C9 ] = { true,SCU1_RESET_CTRL1 ,BIT (25 ) }, + [SCU1_RESET_I3C10 ] = { true,SCU1_RESET_CTRL1 ,BIT (26 ) }, + [SCU1_RESET_I3C11 ] = { true,SCU1_RESET_CTRL1 ,BIT (27 ) }, + [SCU1_RESET_I3C12 ] = { true,SCU1_RESET_CTRL1 ,BIT (28 ) }, + [SCU1_RESET_I3C13 ] = { true,SCU1_RESET_CTRL1 ,BIT (29 ) }, + [SCU1_RESET_I3C14 ] = { true,SCU1_RESET_CTRL1 ,BIT (30 ) }, + [SCU1_RESET_I3C15 ] = { true,SCU1_RESET_CTRL1 ,BIT (31 ) }, + [SCU1_RESET_MCU0 ] = { true,SCU1_RESET_CTRL2 ,BIT (0 ) }, + [SCU1_RESET_MCU1 ] = { true,SCU1_RESET_CTRL2 ,BIT (1 ) }, + [SCU1_RESET_H2A_SPI1 ] = { true,SCU1_RESET_CTRL2 ,BIT (2 ) }, + [SCU1_RESET_H2A_SPI2 ] = { true,SCU1_RESET_CTRL2 ,BIT (3 ) }, + [SCU1_RESET_UART0 ] = { true,SCU1_RESET_CTRL2 ,BIT (4 ) }, + [SCU1_RESET_UART1 ] = { true,SCU1_RESET_CTRL2 ,BIT (5 ) }, + [SCU1_RESET_UART2 ] = { true,SCU1_RESET_CTRL2 ,BIT (6 ) }, + [SCU1_RESET_UART3 ] = { true,SCU1_RESET_CTRL2 ,BIT (7 ) }, + [SCU1_RESET_I2C_FILTER ] = { true,SCU1_RESET_CTRL2 ,BIT (8 ) }, + [SCU1_RESET_CALIPTRA ] = { true,SCU1_RESET_CTRL2 ,BIT (9 ) }, + [SCU1_RESET_XDMA ] = { true,SCU1_RESET_CTRL2 ,BIT (10 ) }, + [SCU1_RESET_FSI ] = { true,SCU1_RESET_CTRL2 ,BIT (12 ) }, + [SCU1_RESET_CAN ] = { true,SCU1_RESET_CTRL2 ,BIT (13 ) }, + [SCU1_RESET_MCTP ] = { true,SCU1_RESET_CTRL2 ,BIT (14 ) }, + [SCU1_RESET_I2C ] = { true,SCU1_RESET_CTRL2 ,BIT (15 ) }, + [SCU1_RESET_UART6 ] = { true,SCU1_RESET_CTRL2 ,BIT (16 ) },drivers/reset/reset-aspeed.c
Quoted 10 lines
drivers/reset/reset-aspeed.c new file +10
-0+ [SCU1_RESET_UART7] = { true, SCU1_RESET_CTRL2, BIT(17) }, + [SCU1_RESET_UART8] = { true, SCU1_RESET_CTRL2, BIT(18) }, + [SCU1_RESET_UART9] = { true, SCU1_RESET_CTRL2, BIT(19) }, + [SCU1_RESET_LTPI0] = { true, SCU1_RESET_CTRL2, BIT(20) }, + [SCU1_RESET_VGAL] = { true, SCU1_RESET_CTRL2, BIT(21) }, + [SCU1_RESET_LTPI1] = { true, SCU1_RESET_CTRL2, BIT(22) }, + [SCU1_RESET_ACE] = { true, SCU1_RESET_CTRL2, BIT(23) }, + [SCU1_RESET_E2M] = { true, SCU1_RESET_CTRL2, BIT(24) }, + [SCU1_RESET_UHCI] = { true, SCU1_RESET_CTRL2, BIT(25) }, + [SCU1_RESET_PORTC_USB2UART] = { true, SCU1_RESET_CTRL2,BIT(26) },
Review
Quoted 1 line
(quoted diff) +1
-0+ [SCU1_RESET_PORTC_VHUB_EHCI] = { true, SCU1_RESET_CTRL2,BIT(27) },
Review
Quoted 1 line
(quoted diff) +1
-0+ [SCU1_RESET_PORTD_USB2UART] = { true, SCU1_RESET_CTRL2,BIT(28) },
Review
Quoted 1 line
(quoted diff) +1
-0+ [SCU1_RESET_PORTD_VHUB_EHCI] = { true, SCU1_RESET_CTRL2,BIT(29) },
Quoted 4 lines
drivers/reset/reset-aspeed.c new file +4
-0+ [SCU1_RESET_H2X] = { true, SCU1_RESET_CTRL2, BIT(30) }, + [SCU1_RESET_I3CDMA] = { true, SCU1_RESET_CTRL2, BIT(31) }, + [SCU1_RESET_PCIE2RST] = { false, SCU1_PCIE3_CTRL, BIT(0) }, +};...
Quoted 13 lines
drivers/reset/reset-aspeed.c new file +13
-0+static int aspeed_reset_probe (struct auxiliary_device *adev, +const struct auxiliary_device_id *id) { +struct aspeed_reset *reset; +struct device *dev = &adev->dev; + + reset =devm_kzalloc (dev,sizeof (*reset),GFP_KERNEL ); +if (!reset) +return -ENOMEM ; + +spin_lock_init (&reset->lock); + + reset->info = (struct aspeed_reset_info *)(id->driver_data); + reset->rcdev.owner =THIS_MODULE ;
Quoted 8 lines
drivers/reset/reset-aspeed.c line 223
Quoted 6 lines
drivers/reset/reset-aspeed.c new file +6
-0+ reset->rcdev.nr_resets = reset->info->nr_resets; + reset->rcdev.ops = &aspeed_reset_ops; + reset->rcdev.of_node = dev->parent->of_node; + reset->rcdev.dev = dev; + reset->rcdev.of_reset_n_cells =1 ; + reset->base = (void __iomem *)adev->dev.platform_data;The spaces and tabs look broken for 'info' and 'rcdev.dev'.
Will update by spaces.
Quoted 9 lines
drivers/reset/reset-aspeed.c line 228
Quoted 6 lines
drivers/reset/reset-aspeed.c new file +5
-0+ +if (!reset->base) +return -ENOMEM ; + +dev_set_drvdata (dev, reset);Is it needed?
(there is nodev_get_drvdata())
No need, will remove.
Quoted 7 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+ + return devm_reset_controller_register(dev, &reset->rcdev); }...
CJ