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.
This commit is contained in:
Aaro Koskinen authored and Pali Rohár committed 2013-02-18 00:18:44 +01:00
1 parent f5a9d273ce
commit 6dae516af2
1 file changed
+8 -3
+8 -3
View File
@@ -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;