diff options
author | Amelie Delaunay <amelie.delaunay@foss.st.com> | 2021-01-05 10:48:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-12 12:54:42 +0100 |
commit | 2979ee7a91127a2d6fddd4e98d450ee782115772 (patch) | |
tree | acfb34a57c166e6547fe51d35eb45f3e9056f577 /drivers/usb/dwc2/params.c | |
parent | 8653d71ce3763aedcf3d2331f59beda3fecd79e4 (diff) | |
download | linux-stable-2979ee7a91127a2d6fddd4e98d450ee782115772.tar.gz linux-stable-2979ee7a91127a2d6fddd4e98d450ee782115772.tar.bz2 linux-stable-2979ee7a91127a2d6fddd4e98d450ee782115772.zip |
usb: dwc2: set ahbcfg parameter for STM32MP15 OTG HS and FS
STM32MP15 ahbcfg register default value sets Burst length/type (HBSTLEN)
to Single (32-bit accesses on AHB), which is not recommended, according
to STM32MP157 Reference manual [1].
This patch sets Burst length/type (HBSTLEN) so that bus transactions
target 16x32 bit accesses. This improves OTG controller performance.
[1] https://www.st.com/resource/en/reference_manual/dm00327659.pdf, p.3149
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20210105094855.30763-2-amelie.delaunay@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 267543c3dc38..0df693319f0a 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -177,6 +177,7 @@ static void dwc2_set_stm32mp15_fsotg_params(struct dwc2_hsotg *hsotg) p->i2c_enable = false; p->activate_stm_fs_transceiver = true; p->activate_stm_id_vb_detection = true; + p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT; p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } @@ -189,6 +190,7 @@ static void dwc2_set_stm32mp15_hsotg_params(struct dwc2_hsotg *hsotg) p->host_rx_fifo_size = 440; p->host_nperio_tx_fifo_size = 256; p->host_perio_tx_fifo_size = 256; + p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT; p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } |