Lines Matching refs:qry
262 static void flash_printqry(struct cfi_qry *qry) in flash_printqry() argument
264 u8 *p = (u8 *)qry; in flash_printqry()
1643 static void cfi_reverse_geometry(struct cfi_qry *qry) in cfi_reverse_geometry() argument
1648 for (i = 0, j = qry->num_erase_regions - 1; i < j; i++, j--) { in cfi_reverse_geometry()
1649 tmp = get_unaligned(&qry->erase_region_info[i]); in cfi_reverse_geometry()
1650 put_unaligned(get_unaligned(&qry->erase_region_info[j]), in cfi_reverse_geometry()
1651 &qry->erase_region_info[i]); in cfi_reverse_geometry()
1652 put_unaligned(tmp, &qry->erase_region_info[j]); in cfi_reverse_geometry()
1676 static int cmdset_intel_init(flash_info_t *info, struct cfi_qry *qry) in cmdset_intel_init() argument
1755 static int cmdset_amd_init(flash_info_t *info, struct cfi_qry *qry) in cmdset_amd_init() argument
1896 static int __flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) in __flash_detect_cfi() argument
1910 flash_read_cfi(info, qry, FLASH_OFFSET_CFI_RESP, in __flash_detect_cfi()
1912 info->interface = le16_to_cpu(qry->interface_desc); in __flash_detect_cfi()
1949 static int flash_detect_cfi(flash_info_t *info, struct cfi_qry *qry) in flash_detect_cfi() argument
1958 if (__flash_detect_cfi(info, qry)) in flash_detect_cfi()
1969 static void flash_fixup_amd(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_amd() argument
1972 if (qry->num_erase_regions > 1) { in flash_fixup_amd()
1977 cfi_reverse_geometry(qry); in flash_fixup_amd()
1981 cfi_reverse_geometry(qry); in flash_fixup_amd()
1986 static void flash_fixup_atmel(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_atmel() argument
2002 cfi_reverse_geometry(qry); in flash_fixup_atmel()
2005 static void flash_fixup_stm(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_stm() argument
2008 if (qry->num_erase_regions > 1) { in flash_fixup_stm()
2015 cfi_reverse_geometry(qry); in flash_fixup_stm()
2020 cfi_reverse_geometry(qry); in flash_fixup_stm()
2025 static void flash_fixup_sst(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_sst() argument
2044 static void flash_fixup_num(flash_info_t *info, struct cfi_qry *qry) in flash_fixup_num() argument
2052 if (qry->max_buf_write_size > 0x8 && in flash_fixup_num()
2060 qry->max_buf_write_size = 0x8; in flash_fixup_num()
2079 struct cfi_qry qry; in flash_get_size() local
2082 memset(&qry, 0, sizeof(qry)); in flash_get_size()
2092 if (flash_detect_cfi(info, &qry)) { in flash_get_size()
2093 info->vendor = le16_to_cpu(get_unaligned(&qry.p_id)); in flash_get_size()
2094 info->ext_addr = le16_to_cpu(get_unaligned(&qry.p_adr)); in flash_get_size()
2095 num_erase_regions = qry.num_erase_regions; in flash_get_size()
2105 flash_printqry(&qry); in flash_get_size()
2112 cmdset_intel_init(info, &qry); in flash_get_size()
2116 cmdset_amd_init(info, &qry); in flash_get_size()
2134 flash_fixup_amd(info, &qry); in flash_get_size()
2137 flash_fixup_atmel(info, &qry); in flash_get_size()
2140 flash_fixup_stm(info, &qry); in flash_get_size()
2143 flash_fixup_sst(info, &qry); in flash_get_size()
2146 flash_fixup_num(info, &qry); in flash_get_size()
2165 info->size = 1 << qry.dev_size; in flash_get_size()
2184 &qry.erase_region_info[i])); in flash_get_size()
2259 info->buffer_size = 1 << le16_to_cpu(qry.max_buf_write_size); in flash_get_size()
2260 tmp = 1 << qry.block_erase_timeout_typ; in flash_get_size()
2262 (1 << qry.block_erase_timeout_max); in flash_get_size()
2263 tmp = (1 << qry.buf_write_timeout_typ) * in flash_get_size()
2264 (1 << qry.buf_write_timeout_max); in flash_get_size()
2268 tmp = (1 << qry.word_write_timeout_typ) * in flash_get_size()
2269 (1 << qry.word_write_timeout_max); in flash_get_size()