minor cleanup for dwc3-xilinx glue driver
Subsystems (3)
v2 cover minor cleanup for dwc3-xilinx glue driver
Minor cleanups for the dwc3-xilinx glue driver:
- Fix a comment style violation (missing space before closing delimiter).
- Use reset_control_reset in versal init.
Changes for v2:
- Rephrased commit description for 2/2 patch.
- Drop functional fix (usb: dwc3: xilinx: fix error handling in zynqmp init error paths) from this series.
Radhey Shyam Pandey (2):
usb: dwc3: xilinx: fix missing space before closing comment delimiter
usb: dwc3: xilinx: use reset_control_reset() in versal init
drivers/usb/dwc3/dwc3-xilinx.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
base-commit: c1ecb239fa3456529a32255359fc78b69eb9d847
Signature · 1 line
2.43.0
PATCH v2 1/2 usb: dwc3: xilinx: fix missing space before closing comment delimiter
Add missing space before '*/' in an inline comment to follow the kernel coding style.
---
Changes for v2:
- Add Thinh Nguyen acked by tag.
--- drivers/usb/dwc3/dwc3-xilinx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-xilinx.c +1 -1
@@ -194,7 +194,7 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data) }if (priv_data->usb3_phy) { -/* Set PIPE Power Present signal in FPD Power Present Register*/ +/* Set PIPE Power Present signal in FPD Power Present Register */ writel (FPD_POWER_PRSNT_OPTION , priv_data->regs +XLNX_USB_FPD_POWER_PRSNT );/* Set the PIPE Clock Select bit in FPD PIPE Clock register */ writel (PIPE_CLK_SELECT , priv_data->regs +XLNX_USB_FPD_PIPE_CLK );
Signature · 1 line
2.43.0
PATCH v2 2/2 usb: dwc3: xilinx: use reset_control_reset() in versal init
In reply to Radhey Shyam PandeyReplace reset_control_assert()/deassert() with reset_control_reset(). For dwc3-xilinx, reset_control_reset() routes via the zynqmp reset driver and uses PM_RESET_ACTION_PULSE, which performs assert and deassert in firmware. This results in a single SMC call issuing a reset pulse and taking the IP out of reset.
---
Changes for v2:
- As suggested by Thinh rephrased commit description to explain firmware driven reset sequence.
--- drivers/usb/dwc3/dwc3-xilinx.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/usb/dwc3/dwc3-xilinx.c +4 -12
@@ -98,18 +98,10 @@ static int dwc3_xlnx_init_versal(struct dwc3_xlnx *priv_data)dwc3_xlnx_mask_phy_rst (priv_data, false); -/* Assert and De-assert reset */ - ret =reset_control_assert (crst); -if (ret <0 ) { -dev_err_probe (dev, ret,"failed to assert Reset\n" ); -return ret; - } - - ret =reset_control_deassert (crst); -if (ret <0 ) { -dev_err_probe (dev, ret,"failed to De-assert Reset\n" ); -return ret; - } +/* assert and deassert reset */ + ret =reset_control_reset (crst); +if (ret) +return dev_err_probe (dev, ret,"failed to assert and deassert reset\n" );dwc3_xlnx_mask_phy_rst (priv_data, true);dwc3_xlnx_set_coherency (priv_data,XLNX_USB2_TRAFFIC_ROUTE_CONFIG );
Signature · 1 line
2.43.0
Re: [PATCH v2 2/2] usb: dwc3: xilinx: use reset_control_reset() in versal init
Quoted 45 lines · Radhey Shyam Pandey
Replace reset_control_assert()/deassert() with
reset_control_reset(). For dwc3-xilinx,reset_control_reset()routes via the zynqmp reset driver and usesPM_RESET_ACTION_PULSE, which performs assert and deassert in firmware. This results in a single SMC call issuing a reset pulse and taking the IP out of reset.Signed-off-by Radhey Shyam Pandey <[email protected]>---
Changes for v2:
- As suggested by Thinh rephrased commit description to explain firmware driven reset sequence.--- drivers/usb/dwc3/dwc3-xilinx.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)drivers/usb/dwc3/dwc3-xilinx.c +4
-12@@ -98,18 +98,10 @@ static int dwc3_xlnx_init_versal(struct dwc3_xlnx *priv_data)dwc3_xlnx_mask_phy_rst (priv_data, false); -/* Assert and De-assert reset */ - ret =reset_control_assert (crst); -if (ret <0 ) { -dev_err_probe (dev, ret,"failed to assert Reset\n" ); -return ret; - } - - ret =reset_control_deassert (crst); -if (ret <0 ) { -dev_err_probe (dev, ret,"failed to De-assert Reset\n" ); -return ret; - } +/* assert and deassert reset */ + ret =reset_control_reset (crst); +if (ret) +return dev_err_probe (dev, ret,"failed to assert and deassert reset\n" );dwc3_xlnx_mask_phy_rst (priv_data, true);dwc3_xlnx_set_coherency (priv_data,XLNX_USB2_TRAFFIC_ROUTE_CONFIG );Signature · 1 line
2.43.0
Thanks,
Thinh