From: Patrice CHOTARD Date: Thu, 2 Jul 2020 07:16:49 +0000 Subject: [PATCH] arm: stm32mp: stm32prog: add "Device Name" in iproduct during DFU USB enumeration In-Reply-To: <20200616182508.1.I15e9f84cc4116350cbec881d243a86f28b819123@changeid> References: <20200616182508.1.I15e9f84cc4116350cbec881d243a86f28b819123@changeid> Message-ID: <4af08ff2-e98d-3ef4-6651-3cdb7ebb6c32@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Patrick On 6/16/20 6:25 PM, Patrick Delaunay wrote: > Add "Device Name" in iproduct during DFU USB enumeration > to have this information in STM32CubeProgrammer trace > (this tools is compatible with @Name since v2.3) > > Signed-off-by: Patrick Delaunay > --- > > arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c > index 969245e199..30547f94c9 100644 > --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c > +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c > @@ -197,10 +197,12 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev) > bool result; > /* USB download gadget for STM32 Programmer */ > char product[128]; > + char name[SOC_NAME_SIZE]; > > + get_soc_name(name); > snprintf(product, sizeof(product), > - "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X", > - get_cpu_dev(), get_cpu_rev()); > + "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X, @Name /%s,", > + get_cpu_dev(), get_cpu_rev(), name); > g_dnl_set_product(product); > > if (stm32prog_data->phase == PHASE_FLASHLAYOUT) { Reviewed-by: Patrice Chotard Thanks