Lines Matching refs:cfi

910 			    struct flchip *chips, struct cfi_private *cfi);
915 struct cfi_private *cfi) in jedec_read_mfr() argument
918 mask = (1 << (cfi->device_type * 8)) -1; in jedec_read_mfr()
925 struct cfi_private *cfi) in jedec_read_id() argument
929 osf = cfi->interleave *cfi->device_type; in jedec_read_id()
930 mask = (1 << (cfi->device_type * 8)) -1; in jedec_read_id()
937 struct cfi_private *cfi) in jedec_reset() argument
940 cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); in jedec_reset()
946 cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); in jedec_reset()
978 struct flchip *chips, struct cfi_private *cfi) in jedec_probe_chip() argument
983 if (!cfi->numchips) { in jedec_probe_chip()
984 switch (cfi->device_type) { in jedec_probe_chip()
986 cfi->addr_unlock1 = 0x555; in jedec_probe_chip()
987 cfi->addr_unlock2 = 0x2aa; in jedec_probe_chip()
990 cfi->addr_unlock1 = 0xaaa; in jedec_probe_chip()
991 if (map->buswidth == cfi->interleave) { in jedec_probe_chip()
993 cfi->addr_unlock2 = 0x555; in jedec_probe_chip()
995 cfi->addr_unlock2 = 0x554; in jedec_probe_chip()
999 cfi->addr_unlock1 = 0x1555; in jedec_probe_chip()
1000 cfi->addr_unlock2 = 0xaaa; in jedec_probe_chip()
1003 printk(KERN_NOTICE "Eep. Unknown jedec_probe device type %d\n", cfi->device_type); in jedec_probe_chip()
1017 if ((base + cfi->addr_unlock1) >= map->size) { in jedec_probe_chip()
1020 base, cfi->addr_unlock1, map->size -1); in jedec_probe_chip()
1024 if ((base + cfi->addr_unlock2) >= map->size) { in jedec_probe_chip()
1027 base, cfi->addr_unlock2, map->size -1); in jedec_probe_chip()
1033 jedec_reset(base, map, cfi); in jedec_probe_chip()
1036 if(cfi->addr_unlock1) { in jedec_probe_chip()
1037 cfi_send_gen_cmd(0xaa, cfi->addr_unlock1, base, map, cfi, CFI_DEVICETYPE_X8, NULL); in jedec_probe_chip()
1038 cfi_send_gen_cmd(0x55, cfi->addr_unlock2, base, map, cfi, CFI_DEVICETYPE_X8, NULL); in jedec_probe_chip()
1040 cfi_send_gen_cmd(0x90, cfi->addr_unlock1, base, map, cfi, CFI_DEVICETYPE_X8, NULL); in jedec_probe_chip()
1042 if (!cfi->numchips) { in jedec_probe_chip()
1046 cfi->mfr = jedec_read_mfr(map, base, cfi); in jedec_probe_chip()
1047 cfi->id = jedec_read_id(map, base, cfi); in jedec_probe_chip()
1049 cfi->mfr, cfi->id, cfi->interleave, cfi->device_type); in jedec_probe_chip()
1051 if (cfi->mfr == jedec_table[i].mfr_id && in jedec_probe_chip()
1052 cfi->id == jedec_table[i].dev_id) { in jedec_probe_chip()
1053 if (!cfi_jedec_setup(cfi, i)) in jedec_probe_chip()
1060 cfi->addr_unlock1 |= cfi->addr_unlock1 << 4; in jedec_probe_chip()
1061 cfi->addr_unlock2 |= cfi->addr_unlock2 << 4; in jedec_probe_chip()
1064 cfi->addr_unlock1 = cfi->addr_unlock2 = 0; in jedec_probe_chip()
1073 mfr = jedec_read_mfr(map, base, cfi); in jedec_probe_chip()
1074 id = jedec_read_id(map, base, cfi); in jedec_probe_chip()
1076 if ((mfr != cfi->mfr) || (id != cfi->id)) { in jedec_probe_chip()
1079 jedec_reset(base, map, cfi); in jedec_probe_chip()
1085 for (i=0; i<cfi->numchips; i++) { in jedec_probe_chip()
1088 if (jedec_read_mfr(map, chips[i].start, cfi) == cfi->mfr && in jedec_probe_chip()
1089 jedec_read_id(map, chips[i].start, cfi) == cfi->id) { in jedec_probe_chip()
1092 jedec_reset(chips[i].start, map, cfi); in jedec_probe_chip()
1095 if (jedec_read_mfr(map, base, cfi) != cfi->mfr || in jedec_probe_chip()
1096 jedec_read_id(map, base, cfi) != cfi->id) { in jedec_probe_chip()
1106 jedec_reset(base, map, cfi); in jedec_probe_chip()
1107 if (jedec_read_mfr(map, base, cfi) == cfi->mfr && in jedec_probe_chip()
1108 jedec_read_id(map, base, cfi) == cfi->id) { in jedec_probe_chip()
1118 if (cfi->numchips == MAX_CFI_CHIPS) { in jedec_probe_chip()
1123 chips[cfi->numchips].start = base; in jedec_probe_chip()
1124 chips[cfi->numchips].state = FL_READY; in jedec_probe_chip()
1125 cfi->numchips++; in jedec_probe_chip()
1129 jedec_reset(base, map, cfi); in jedec_probe_chip()
1132 map->name, cfi->interleave, cfi->device_type*8, base, in jedec_probe_chip()