summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2016-12-24 18:23:28 +0100
committerPali Rohár <pali.rohar@gmail.com>2016-12-24 18:23:28 +0100
commit08485a0c094cf021e5abedd001741da9d0fd1474 (patch)
tree7c7d9726780950c82efbea791be569a5d1820044
parentb4314bce152c52ee49ccc9f9a318390ec686bf2a (diff)
download0xFFFF-08485a0c094cf021e5abedd001741da9d0fd1474.tar.bz2
all: Add basic support for Nokia N9
-rw-r--r--src/device.c2
-rw-r--r--src/device.h1
-rw-r--r--src/usb-device.c6
3 files changed, 7 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index d50d129..db2c6a7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -32,6 +32,7 @@ static const char * devices[] = {
[DEVICE_RX_48] = "RX-48",
[DEVICE_RX_51] = "RX-51",
[DEVICE_RM_680] = "RM-680",
+ [DEVICE_RM_696] = "RM-696",
};
enum device device_from_string(const char * device) {
@@ -65,6 +66,7 @@ static const char * long_devices[] = {
[DEVICE_RX_48] = "Nokia N810 Wimax",
[DEVICE_RX_51] = "Nokia N900",
[DEVICE_RM_680] = "Nokia N950",
+ [DEVICE_RM_696] = "Nokia N9",
};
const char * device_to_long_string(enum device device) {
diff --git a/src/device.h b/src/device.h
index 9b58dbe..8d38e39 100644
--- a/src/device.h
+++ b/src/device.h
@@ -31,6 +31,7 @@ enum device {
DEVICE_RX_48, /* Nokia N810 WiMax */
DEVICE_RX_51, /* Nokia N900 */
DEVICE_RM_680, /* Nokia N950 */
+ DEVICE_RM_696, /* Nokia N9 */
DEVICE_COUNT,
};
diff --git a/src/usb-device.c b/src/usb-device.c
index 4c3e762..5379b82 100644
--- a/src/usb-device.c
+++ b/src/usb-device.c
@@ -47,8 +47,8 @@
static struct usb_flash_device usb_devices[] = {
{ 0x0421, 0x0096, -1, -1, -1, FLASH_DISK, { DEVICE_RX_44, 0 } },
- { 0x0421, 0x0105, 2, 1, -1, FLASH_NOLO, { DEVICE_SU_18, DEVICE_RX_44, DEVICE_RX_48, DEVICE_RX_51, DEVICE_RM_680, 0 } },
- { 0x0421, 0x0106, 0, -1, -1, FLASH_COLD, { DEVICE_RX_51, DEVICE_RM_680, 0 } },
+ { 0x0421, 0x0105, 2, 1, -1, FLASH_NOLO, { DEVICE_SU_18, DEVICE_RX_44, DEVICE_RX_48, DEVICE_RX_51, DEVICE_RM_680, DEVICE_RM_696, 0 } },
+ { 0x0421, 0x0106, 0, -1, -1, FLASH_COLD, { DEVICE_RX_51, DEVICE_RM_680, DEVICE_RM_696, 0 } },
{ 0x0421, 0x0189, -1, -1, -1, FLASH_DISK, { DEVICE_RX_48, 0 } },
{ 0x0421, 0x01c7, -1, -1, -1, FLASH_DISK, { DEVICE_RX_51, 0 } },
{ 0x0421, 0x01c8, 1, 1, -1, FLASH_MKII, { DEVICE_RX_51, DEVICE_RM_680, 0 } },
@@ -234,6 +234,8 @@ static struct usb_device_info * usb_device_is_valid(struct usb_device * dev) {
ret->device = DEVICE_RX_51;
else if ( strcmp(product, "Nokia N950") == 0 || strcmp(product, "Sync Mode") == 0 || strcmp(product, "N950 (Update mode)") == 0 )
ret->device = DEVICE_RM_680;
+ else if ( strcmp(product, "N9 (Update mode)") == 0 || strcmp(product, "Nxy (Update mode)") == 0 )
+ ret->device = DEVICE_RM_696;
else if ( strcmp(product, "Nokia USB ROM") == 0 )
ret->device = DEVICE_ANY;
else