Lines Matching refs:qry
270 static void flash_printqry(struct cfi_qry *qry) in flash_printqry() argument
272 u8 *p = (u8 *)qry; in flash_printqry()
1651 static void cfi_reverse_geometry(struct cfi_qry *qry) in cfi_reverse_geometry() argument
1656 for (i = 0, j = qry->num_erase_regions - 1; i < j; i++, j--) { in cfi_reverse_geometry()
1657 tmp = get_unaligned(&qry->erase_region_info[i]); in cfi_reverse_geometry()
1658 put_unaligned(get_unaligned(&qry->erase_region_info[j]), in cfi_reverse_geometry()
1659 &qry->erase_region_info[i]); in cfi_reverse_geometry()
1660 put_unaligned(tmp, &qry->erase_region_info[j]); in cfi_reverse_geometry()
1684 static int cmdset_intel_init(flash_info_t *info, struct cfi_qry *qry) in cmdset_intel_init() argument
1763 static int cmdset_amd_init(flash_info_t *info, struct cfi_qry *qry) in cmdset_amd_init() argument
1904 static int __flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) in __flash_detect_cfi() argument
1918 flash_read_cfi(info, qry, FLASH_OFFSET_CFI_RESP, in __flash_detect_cfi()
1920 info->interface = le16_to_cpu(qry->interface_desc); in __flash_detect_cfi()
1957 static int flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) in flash_detect_cfi() argument
1966 if (__flash_detect_cfi(info, qry)) in flash_detect_cfi()
1977 static void flash_fixup_amd(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_amd() argument
1980 if (qry->num_erase_regions > 1) { in flash_fixup_amd()
1985 cfi_reverse_geometry(qry); in flash_fixup_amd()
1989 cfi_reverse_geometry(qry); in flash_fixup_amd()
1994 static void flash_fixup_atmel(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_atmel() argument
2010 cfi_reverse_geometry(qry); in flash_fixup_atmel()
2013 static void flash_fixup_stm(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_stm() argument
2016 if (qry->num_erase_regions > 1) { in flash_fixup_stm()
2023 cfi_reverse_geometry(qry); in flash_fixup_stm()
2028 cfi_reverse_geometry(qry); in flash_fixup_stm()
2033 static void flash_fixup_sst(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_sst() argument
2052 static void flash_fixup_num(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_num() argument
2060 if (qry->max_buf_write_size > 0x8 && in flash_fixup_num()
2068 qry->max_buf_write_size = 0x8; in flash_fixup_num()
2087 struct cfi_qry qry; in flash_get_size() local
2090 memset(&qry, 0, sizeof(qry)); in flash_get_size()
2100 if (flash_detect_cfi(info, &qry)) { in flash_get_size()
2101 info->vendor = le16_to_cpu(get_unaligned(&qry.p_id)); in flash_get_size()
2102 info->ext_addr = le16_to_cpu(get_unaligned(&qry.p_adr)); in flash_get_size()
2103 num_erase_regions = qry.num_erase_regions; in flash_get_size()
2113 flash_printqry(&qry); in flash_get_size()
2120 cmdset_intel_init(info, &qry); in flash_get_size()
2124 cmdset_amd_init(info, &qry); in flash_get_size()
2142 flash_fixup_amd(info, &qry); in flash_get_size()
2145 flash_fixup_atmel(info, &qry); in flash_get_size()
2148 flash_fixup_stm(info, &qry); in flash_get_size()
2151 flash_fixup_sst(info, &qry); in flash_get_size()
2154 flash_fixup_num(info, &qry); in flash_get_size()
2173 info->size = 1 << qry.dev_size; in flash_get_size()
2192 &qry.erase_region_info[i])); in flash_get_size()
2267 info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size); in flash_get_size()
2268 tmp = 1 << qry.block_erase_timeout_typ; in flash_get_size()
2270 (1 << qry.block_erase_timeout_max); in flash_get_size()
2271 tmp = (1 << qry.buf_write_timeout_typ) * in flash_get_size()
2272 (1 << qry.buf_write_timeout_max); in flash_get_size()
2276 tmp = (1 << qry.word_write_timeout_typ) * in flash_get_size()
2277 (1 << qry.word_write_timeout_max); in flash_get_size()