Lines Matching refs:map_banks
49 static struct map_info* map_banks[FLASH_BANK_MAX]; variable
177 map_banks[idx] = (struct map_info *)kmalloc(sizeof(struct map_info), GFP_KERNEL); in init_tqm_mtd()
178 if(map_banks[idx] == NULL) in init_tqm_mtd()
184 memset((void *)map_banks[idx], 0, sizeof(struct map_info)); in init_tqm_mtd()
185 map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL); in init_tqm_mtd()
186 if(map_banks[idx]->name == NULL) in init_tqm_mtd()
192 memset((void *)map_banks[idx]->name, 0, 16); in init_tqm_mtd()
194 sprintf(map_banks[idx]->name, "TQM8xxL%d", idx); in init_tqm_mtd()
195 map_banks[idx]->size = flash_size; in init_tqm_mtd()
196 map_banks[idx]->buswidth = 4; in init_tqm_mtd()
197 map_banks[idx]->read8 = tqm8xxl_read8; in init_tqm_mtd()
198 map_banks[idx]->read16 = tqm8xxl_read16; in init_tqm_mtd()
199 map_banks[idx]->read32 = tqm8xxl_read32; in init_tqm_mtd()
200 map_banks[idx]->copy_from = tqm8xxl_copy_from; in init_tqm_mtd()
201 map_banks[idx]->write8 = tqm8xxl_write8; in init_tqm_mtd()
202 map_banks[idx]->write16 = tqm8xxl_write16; in init_tqm_mtd()
203 map_banks[idx]->write32 = tqm8xxl_write32; in init_tqm_mtd()
204 map_banks[idx]->copy_to = tqm8xxl_copy_to; in init_tqm_mtd()
205 map_banks[idx]->map_priv_1 = in init_tqm_mtd()
209 mtd_banks[idx] = do_map_probe("cfi_probe", map_banks[idx]); in init_tqm_mtd()
259 if(map_banks[idx] != NULL) in init_tqm_mtd()
261 if(map_banks[idx]->name != NULL) in init_tqm_mtd()
263 kfree(map_banks[idx]->name); in init_tqm_mtd()
264 map_banks[idx]->name = NULL; in init_tqm_mtd()
266 kfree(map_banks[idx]); in init_tqm_mtd()
267 map_banks[idx] = NULL; in init_tqm_mtd()
288 kfree(map_banks[idx]->name); in cleanup_tqm_mtd()
289 kfree(map_banks[idx]); in cleanup_tqm_mtd()