diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-02-18 00:52:25 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2013-02-18 00:18:44 +0100 |
commit | 6dae516af25692d73b41c5461e00736613aaab13 (patch) | |
tree | a8ae3d5b900a035de2c1b80d4dfdba571ffda308 /src/cold-flash.c | |
parent | f5a9d273ce7c57519de406b1a84dc71fc12674e6 (diff) | |
download | 0xFFFF-6dae516af25692d73b41c5461e00736613aaab13.tar.bz2 |
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.
Diffstat (limited to 'src/cold-flash.c')
-rw-r--r-- | src/cold-flash.c | 11 |
1 files changed, 8 insertions, 3 deletions
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; |