arm: stm32mp: stm32prog: add "Device Name" in iproduct during DFU USB enumeration
authorPatrick Delaunay <patrick.delaunay@st.com>
Tue, 16 Jun 2020 16:25:14 +0000 (18:25 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 7 Jul 2020 14:01:23 +0000 (16:01 +0200)
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 <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c

index 969245e..30547f9 100644 (file)
@@ -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@Device ID /0x%03X, @Revision ID /0x%04X",
-                get_cpu_dev(), get_cpu_rev());
+                "USB download gadget@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) {