linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add support of TI ICDI to USB simple serial device
@ 2018-10-26 11:38 Dashi Cao
  2018-11-12  9:17 ` Johan Hovold
  0 siblings, 1 reply; 5+ messages in thread
From: Dashi Cao @ 2018-10-26 11:38 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-kernel, linux-serial, Dashi Cao

TI In-Circuit Debug Interface (ICDI) is a debugging interface for TI ARM microcontrollers. It has four USB interfaces and the first two of them are presented as standard ACM serial device. The 3rd interface is the debugging interface and it can be driven as a Linux USB simple serial device. With it, debugging sessions and firmware up/down loading are supported on Linux.

Signed-off-by: Dashi Cao <dscao999@gmail.com>
---
 drivers/usb/serial/usb-serial-simple.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
index 4d0273508043..ae43088b659e 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -109,6 +109,11 @@ DEVICE(suunto, SUUNTO_IDS);
 	{ USB_DEVICE(0x908, 0x0004) }
 DEVICE(siemens_mpi, SIEMENS_IDS);
 
+/* TI In-Circuit Debug Interface */
+#define ICDI_IDS()              \
+	{ USB_DEVICE_INTERFACE_CLASS(0x1cbe, 0x00fd, USB_CLASS_VENDOR_SPEC) }
+DEVICE(ti_icdi, ICDI_IDS);
+
 /* All of the above structures mushed into two lists */
 static struct usb_serial_driver * const serial_drivers[] = {
 	&carelink_device,
@@ -124,6 +129,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
 	&hp4x_device,
 	&suunto_device,
 	&siemens_mpi_device,
+	&ti_icdi_device,
 	NULL
 };
 
@@ -141,6 +147,7 @@ static const struct usb_device_id id_table[] = {
 	HP4X_IDS(),
 	SUUNTO_IDS(),
 	SIEMENS_IDS(),
+	ICDI_IDS(),
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, id_table);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add support of TI ICDI to USB simple serial device
  2018-10-26 11:38 [PATCH] Add support of TI ICDI to USB simple serial device Dashi Cao
@ 2018-11-12  9:17 ` Johan Hovold
  0 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2018-11-12  9:17 UTC (permalink / raw)
  To: Dashi Cao; +Cc: linux-usb, linux-kernel, linux-serial, Felipe Balbi

On Fri, Oct 26, 2018 at 07:38:07PM +0800, Dashi Cao wrote:
> TI In-Circuit Debug Interface (ICDI) is a debugging interface for TI ARM microcontrollers. It has four USB interfaces and the first two of them are presented as standard ACM serial device. The 3rd interface is the debugging interface and it can be driven as a Linux USB simple serial device. With it, debugging sessions and firmware up/down loading are supported on Linux.

Please break your lines at 72 column or so.

And use the common subject prefix (e.g. "USB: serial: add support
of TI ICD...").

> Signed-off-by: Dashi Cao <dscao999@gmail.com>

You never replied to Felipe's question whether you had verified that this
doesn't break OpenOCD?

> ---
>  drivers/usb/serial/usb-serial-simple.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
> index 4d0273508043..ae43088b659e 100644
> --- a/drivers/usb/serial/usb-serial-simple.c
> +++ b/drivers/usb/serial/usb-serial-simple.c
> @@ -109,6 +109,11 @@ DEVICE(suunto, SUUNTO_IDS);
>  	{ USB_DEVICE(0x908, 0x0004) }
>  DEVICE(siemens_mpi, SIEMENS_IDS);
>  
> +/* TI In-Circuit Debug Interface */
> +#define ICDI_IDS()              \
> +	{ USB_DEVICE_INTERFACE_CLASS(0x1cbe, 0x00fd, USB_CLASS_VENDOR_SPEC) }
> +DEVICE(ti_icdi, ICDI_IDS);

Please use a TI_ prefix for ICDI_IDS as well.

Can you post the lsusb -v output (or usb-devices) for the device for
reference?

> +
>  /* All of the above structures mushed into two lists */
>  static struct usb_serial_driver * const serial_drivers[] = {
>  	&carelink_device,
> @@ -124,6 +129,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
>  	&hp4x_device,
>  	&suunto_device,
>  	&siemens_mpi_device,
> +	&ti_icdi_device,
>  	NULL
>  };
>  
> @@ -141,6 +147,7 @@ static const struct usb_device_id id_table[] = {
>  	HP4X_IDS(),
>  	SUUNTO_IDS(),
>  	SIEMENS_IDS(),
> +	ICDI_IDS(),
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(usb, id_table);

Thanks,
Johan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add support of TI ICDI to USB simple serial device
  2018-10-13  9:10 Da Shi Cao
  2018-10-15  5:49 ` Felipe Balbi
@ 2018-10-18 16:53 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2018-10-18 16:53 UTC (permalink / raw)
  To: Da Shi Cao; +Cc: linux-usb, linux-terminal, linux-kernel

On Sat, Oct 13, 2018 at 05:10:50PM +0800, Da Shi Cao wrote:
> In-Circuit Debug Interface is a debugging interface for TI ARM
> microcontrollers. It has three USB interfaces and two of them are
> presented as standard ACM serial device. The 3rd interface is the
> debugging interface and it can be driven as a Linux USB simple
> terminal. With it, debugging session and firmware up/down loading are
> supported on Linux.
> 
> Signed-off-by: Dashi Cao <dscao999@hotmail.com, dscao999@gmail.com>
> ---
>  drivers/usb/serial/usb-serial-simple.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/serial/usb-serial-simple.c
> b/drivers/usb/serial/usb-serial-simple.c
> index 4d0273508043..ae43088b659e 100644
> --- a/drivers/usb/serial/usb-serial-simple.c
> +++ b/drivers/usb/serial/usb-serial-simple.c
> @@ -109,6 +109,11 @@ DEVICE(suunto, SUUNTO_IDS);
>         { USB_DEVICE(0x908, 0x0004) }
>  DEVICE(siemens_mpi, SIEMENS_IDS);
> 
> +/* TI In-Circuit Debug Interface */
> +#define ICDI_IDS()              \
> +       { USB_DEVICE_INTERFACE_CLASS(0x1cbe, 0x00fd, USB_CLASS_VENDOR_SPEC) }
> +DEVICE(ti_icdi, ICDI_IDS);
> +
>  /* All of the above structures mushed into two lists */
>  static struct usb_serial_driver * const serial_drivers[] = {
>         &carelink_device,
> @@ -124,6 +129,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
>         &hp4x_device,
>         &suunto_device,
>         &siemens_mpi_device,
> +       &ti_icdi_device,
>         NULL
>  };
> 
> @@ -141,6 +147,7 @@ static const struct usb_device_id id_table[] = {
>         HP4X_IDS(),
>         SUUNTO_IDS(),
>         SIEMENS_IDS(),
> +       ICDI_IDS(),
>         { },
>  };
>  MODULE_DEVICE_TABLE(usb, id_table);
> --
> 2.11.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/email-clients.txt in order to fix this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add support of TI ICDI to USB simple serial device
  2018-10-13  9:10 Da Shi Cao
@ 2018-10-15  5:49 ` Felipe Balbi
  2018-10-18 16:53 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2018-10-15  5:49 UTC (permalink / raw)
  To: Da Shi Cao, linux-usb, linux-terminal; +Cc: linux-kernel


Hi,

Da Shi Cao <dscao999@gmail.com> writes:

> In-Circuit Debug Interface is a debugging interface for TI ARM
> microcontrollers. It has three USB interfaces and two of them are
> presented as standard ACM serial device. The 3rd interface is the
> debugging interface and it can be driven as a Linux USB simple
> terminal. With it, debugging session and firmware up/down loading are
> supported on Linux.
>
> Signed-off-by: Dashi Cao <dscao999@hotmail.com, dscao999@gmail.com>

Just to make sure: did you test to verify that this doesn't regress OpenOCD?

-- 
balbi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Add support of TI ICDI to USB simple serial device
@ 2018-10-13  9:10 Da Shi Cao
  2018-10-15  5:49 ` Felipe Balbi
  2018-10-18 16:53 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Da Shi Cao @ 2018-10-13  9:10 UTC (permalink / raw)
  To: linux-usb, linux-terminal; +Cc: linux-kernel

In-Circuit Debug Interface is a debugging interface for TI ARM
microcontrollers. It has three USB interfaces and two of them are
presented as standard ACM serial device. The 3rd interface is the
debugging interface and it can be driven as a Linux USB simple
terminal. With it, debugging session and firmware up/down loading are
supported on Linux.

Signed-off-by: Dashi Cao <dscao999@hotmail.com, dscao999@gmail.com>
---
 drivers/usb/serial/usb-serial-simple.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/serial/usb-serial-simple.c
b/drivers/usb/serial/usb-serial-simple.c
index 4d0273508043..ae43088b659e 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -109,6 +109,11 @@ DEVICE(suunto, SUUNTO_IDS);
        { USB_DEVICE(0x908, 0x0004) }
 DEVICE(siemens_mpi, SIEMENS_IDS);

+/* TI In-Circuit Debug Interface */
+#define ICDI_IDS()              \
+       { USB_DEVICE_INTERFACE_CLASS(0x1cbe, 0x00fd, USB_CLASS_VENDOR_SPEC) }
+DEVICE(ti_icdi, ICDI_IDS);
+
 /* All of the above structures mushed into two lists */
 static struct usb_serial_driver * const serial_drivers[] = {
        &carelink_device,
@@ -124,6 +129,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
        &hp4x_device,
        &suunto_device,
        &siemens_mpi_device,
+       &ti_icdi_device,
        NULL
 };

@@ -141,6 +147,7 @@ static const struct usb_device_id id_table[] = {
        HP4X_IDS(),
        SUUNTO_IDS(),
        SIEMENS_IDS(),
+       ICDI_IDS(),
        { },
 };
 MODULE_DEVICE_TABLE(usb, id_table);
--
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-12  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 11:38 [PATCH] Add support of TI ICDI to USB simple serial device Dashi Cao
2018-11-12  9:17 ` Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2018-10-13  9:10 Da Shi Cao
2018-10-15  5:49 ` Felipe Balbi
2018-10-18 16:53 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).