From 6dae516af25692d73b41c5461e00736613aaab13 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Mon, 18 Feb 2013 00:52:25 +0200 Subject: cold-flash: accept also OMAP3630 in the ASIC ID Accept also OMAP3630 in the ASIC ID offset 4. With this patch it's possible communicate also with N950/N9. When plugging in the USB cable into a powered-off device, it seems to start in cold-flash mode, and currently 0xFFFF fails with "Invalid ASIC ID." So far only loading & booting kernel with "0xFFFF -m kernel:zImage -l -b" has been tested, and it works. WARNING: When booting a self-made kernel on N950/N9, NOLO will detect this and will permanently show a crappy disclaimer about warranty voided during the boot, even if you boot again with a stock Nokia kernel. This may also impact some SW functionality. I have no idea how to reset this condition. --- src/cold-flash.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/cold-flash.c') diff --git a/src/cold-flash.c b/src/cold-flash.c index 9467832..77c393d 100644 --- a/src/cold-flash.c +++ b/src/cold-flash.c @@ -319,6 +319,7 @@ int init_cold_flash(struct usb_device_info * dev) { uint8_t asic_buffer[127]; int asic_size = 69; + const char * chip = NULL; int i; if ( dev->flash_device->protocol != FLASH_COLD ) @@ -346,8 +347,12 @@ int init_cold_flash(struct usb_device_info * dev) { if ( memcmp(asic_buffer+1, "\x01\x05\x01", 3) != 0 ) ERROR_RETURN("Invalid ASIC ID", -1); - /* ID Subblock - OMAP chip version (check for OMAP3430) */ - if ( memcmp(asic_buffer+4, "\x34\x30\x07", 3) != 0 ) + /* ID Subblock - OMAP chip version (check for OMAP3430 or 3630) */ + if ( memcmp(asic_buffer+4, "\x34\x30\x07", 3) == 0 ) + chip = "OMAP3430"; + else if ( memcmp(asic_buffer+4, "\x36\x30\x07", 3) == 0 ) + chip = "OMAP3630"; + else ERROR_RETURN("Invalid ASIC ID", -1); /* Reserved1 - header */ @@ -366,7 +371,7 @@ int init_cold_flash(struct usb_device_info * dev) { if ( memcmp(asic_buffer+58, "\x15\x09\x01", 3) != 0 ) ERROR_RETURN("Invalid ASIC ID", -1); - printf("Detected OMAP3430 chip\n"); + printf("Detected %s chip\n", chip); return 0; -- cgit v1.2.3