--- zzzz-none-000/linux-2.6.28.10/drivers/mtd/chips/cfi_util.c 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/drivers/mtd/chips/cfi_util.c 2011-07-18 10:10:56.000000000 +0000 @@ -34,10 +34,13 @@ qry[0] = cfi_build_cmd('Q', map, cfi); qry[1] = cfi_build_cmd('R', map, cfi); qry[2] = cfi_build_cmd('Y', map, cfi); - - val[0] = map_read(map, base + osf*0x10); - val[1] = map_read(map, base + osf*0x11); - val[2] = map_read(map, base + osf*0x12); + /*--- printk(" qry[0]: '%#x'\n", (unsigned int)qry[0].x[0]); ---*/ + /*--- printk(" qry[1]: '%#x'\n", (unsigned int)qry[1].x[0]); ---*/ + /*--- printk(" qry[2]: '%#x'\n", (unsigned int)qry[2].x[0]); ---*/ + + val[0] = map_cmd_read(map, base + osf*0x10); + val[1] = map_cmd_read(map, base + osf*0x11); + val[2] = map_cmd_read(map, base + osf*0x12); if (!map_word_equal(map, qry[0], val[0])) return 0; @@ -62,7 +65,9 @@ /* QRY not found probably we deal with some odd CFI chips */ /* Some revisions of some old Intel chips? */ cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); +#ifdef CONFIG_MTD_CFI_INTELEXT cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); +#endif /*--- #ifdef CONFIG_MTD_CFI_INTELEXT ---*/ cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); if (cfi_qry_present(map, base, cfi)) return 1; @@ -80,7 +85,9 @@ struct cfi_private *cfi) { cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); +#ifdef CONFIG_MTD_CFI_INTELEXT cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); +#endif /*--- #ifdef CONFIG_MTD_CFI_INTELEXT ---*/ } EXPORT_SYMBOL_GPL(cfi_qry_mode_off);