Patchwork [2/5] ft2232_spi: add support for the OpenMoko DebugBoard V2+

login
register
about
Submitter Alex Badea
Date 2010-10-16 12:20:54
Message ID <1287231657-16981-3-git-send-email-vamposdecampos@gmail.com>
Download mbox | patch
Permalink /patch/2122/
State Accepted
Commit r1231
Headers show

Comments

Alex Badea - 2010-10-16 12:20:54
Add support for the OpenMoko Neo1973/Neo FreeRunner debug board
version 2 or 3 (vid:pid 1457:5118).  The new type is called "openmoko".

Information about the debug board can be found at
http://wiki.openmoko.org/wiki/Debug_Board_v3

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
---
 ft2232_spi.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
Carl-Daniel Hailfinger - 2010-11-10 03:27:07
On 16.10.2010 14:20, Alex Badea wrote:
> Add support for the OpenMoko Neo1973/Neo FreeRunner debug board
> version 2 or 3 (vid:pid 1457:5118).  The new type is called "openmoko".
>
> Information about the debug board can be found at
> http://wiki.openmoko.org/wiki/Debug_Board_v3
>
> Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
>   

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
and combined with patch 5/5, committed in r1231.

Regards,
Carl-Daniel

Patch

diff --git a/ft2232_spi.c b/ft2232_spi.c
index 37fa231..f8ba518 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -35,10 +35,16 @@ 
 #define FTDI_FT4232H_PID	0x6011
 #define AMONTEC_JTAGKEY_PID	0xCFF8
 
+#define FIC_VID			0x1457
+#define OPENMOKO_DBGBOARD_PID	0x5118
+
 const struct usbdev_status devs_ft2232spi[] = {
 	{FTDI_VID, FTDI_FT2232H_PID, OK, "FTDI", "FT2232H"},
 	{FTDI_VID, FTDI_FT4232H_PID, OK, "FTDI", "FT4232H"},
 	{FTDI_VID, AMONTEC_JTAGKEY_PID, OK, "Amontec", "JTAGkey"},
+	{FIC_VID, OPENMOKO_DBGBOARD_PID, NT,
+		"First International Computer, Inc.",
+		"OpenMoko Neo1973 Debug board (V2+)"},
 	{},
 };
 
@@ -138,8 +144,11 @@  int ft2232_spi_init(void)
 			ft2232_interface = INTERFACE_A;
 			cs_bits = 0x18;
 			pindir = 0x1b;
-		}
-		else {
+		} else if (!strcasecmp(arg, "openmoko")) {
+			ft2232_vid = FIC_VID;
+			ft2232_type = OPENMOKO_DBGBOARD_PID;
+			ft2232_interface = INTERFACE_A;
+		} else {
 			msg_perr("Error: Invalid device type specified.\n");
 			free(arg);
 			return 1;