[U-Boot] [RESEND][PATCH v1 3/4] board: stm32mp1: Add tx_fifo_sz_array support
Patrick DELAUNAY
patrick.delaunay at st.com
Fri Mar 22 10:18:51 UTC 2019
> From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Marek Vasut
> Sent: lundi 18 mars 2019 19:47
>
> On 3/18/19 5:59 PM, Patrice CHOTARD wrote:
> > Hi Marek
> >
> > +Patrick
> >
> > On 3/14/19 1:00 PM, Marek Vasut wrote:
> >> On 3/14/19 11:51 AM, Patrice Chotard wrote:
> >>> Allows to use an array of tx-fifo-size defined in device tree as
> >>> following:
> >>> g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
> >>>
> >>> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> >>> ---
> >>>
> >>> board/st/stm32mp1/stm32mp1.c | 11 +++++++++--
> >>> 1 file changed, 9 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/board/st/stm32mp1/stm32mp1.c
> >>> b/board/st/stm32mp1/stm32mp1.c index 54feca0ecff5..81c080ff3199
> >>> 100644
> >>> --- a/board/st/stm32mp1/stm32mp1.c
> >>> +++ b/board/st/stm32mp1/stm32mp1.c
> >>> @@ -42,6 +42,7 @@ int board_usb_init(int index, enum usb_init_type init)
> >>> int node;
> >>> int phy_provider;
> >>> int ret;
> >>> + int count;
> >>>
> >>> /* find the usb otg node */
> >>> node = fdt_node_offset_by_compatible(blob, -1, "snps,dwc2"); @@
> >>> -138,8 +139,14 @@ int board_usb_init(int index, enum usb_init_type init)
> >>> "g-rx-fifo-size", 0);
> >>> stm32mp_otg_data.np_tx_fifo_sz = fdtdec_get_int(blob, node,
> >>> "g-np-tx-fifo-size", 0);
> >>> - stm32mp_otg_data.tx_fifo_sz = fdtdec_get_int(blob, node,
> >>> - "g-tx-fifo-size", 0);
> >>> +
> >>> + count = fdtdec_get_int_array_count(blob, node, "g-tx-fifo-size",
> >>> +
> &stm32mp_otg_data.tx_fifo_sz_array[DWC2_SIZE_OFFS],
> >>> + ARRAY_SIZE(stm32mp_otg_data.tx_fifo_sz_array));
> >>> +
> >>> + if (count != -FDT_ERR_NOTFOUND)
> >>> + stm32mp_otg_data.tx_fifo_sz_array[DWC2_SIZE_NB_OFFS] =
> count;
> >>
> >> This should be in the driver , not board code.
> >
> > Ok, Patrick Delaunay will rework the dwc2 gadget driver to be able to
> > retrieve device tree properties.
> > The series will be sent soon.
>
> Thanks.
>
> That said, are these fixes for current release or stuff for the next one ?
I am preparing a serie for the next release.
I think it is too late for the current one and the serie depends of the stm32mp1 baord update not yet merged.
- DWC2 USB gadget migration to driver model (minimal)
- change STM32MP1 board to use USB gadget uclass
- introduce STUSB1600 Type C controller for DK2
These Seis will superseded the Patrice patch.
=> after this serie, the USB should be work in upstream tree for stm32mp1 board.
I expect to sent the serie next week.
Regards
> --
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Regards
Patrick
More information about the U-Boot
mailing list