comparison gsm-fw/services/ffs/drv.c @ 940:0fb9b7f2ef87

gsm-fw/services/ffs/drv.c: Intel single bank flash driver hooked in
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 31 Oct 2015 23:39:41 +0000
parents 4d706a4134b0
children 6b0b2f6dbb20
comparison
equal deleted inserted replaced
939:62ca61292b77 940:0fb9b7f2ef87
188 ffsdrv_null_erase_resume 188 ffsdrv_null_erase_resume
189 }; 189 };
190 190
191 #elif CONFIG_FLASH_WRITE 191 #elif CONFIG_FLASH_WRITE
192 192
193 #if FLASH_IS_AMD_MULTIBANK
194
193 /****************************************************************************** 195 /******************************************************************************
194 * AMD Dual/Multi Bank Driver Functions 196 * AMD Dual/Multi Bank Driver Functions
195 ******************************************************************************/ 197 ******************************************************************************/
196 198
197 // All erase and write operations are performed atomically (interrupts 199 // All erase and write operations are performed atomically (interrupts
357 ffsdrv_amd_write_end, 359 ffsdrv_amd_write_end,
358 ffsdrv_amd_erase_suspend, 360 ffsdrv_amd_erase_suspend,
359 ffsdrv_amd_erase_resume 361 ffsdrv_amd_erase_resume
360 }; 362 };
361 363
364 #elif FLASH_IS_INTEL_ONEBANK
365
366 extern int ffsdrv_ram_intel_sb_init(void);
367 extern void ffsdrv_ram_intel_sb_write_halfword(volatile uint16 *addr,
368 uint16 value);
369 extern void ffsdrv_ram_intel_sb_erase(uint8 block);
370
371 const struct ffsdrv_s ffsdrv = {
372 ffsdrv_ram_intel_sb_init,
373 ffsdrv_ram_intel_sb_erase,
374 ffsdrv_ram_intel_sb_write_halfword,
375 ffsdrv_generic_write,
376 ffsdrv_null_write_end,
377 ffsdrv_null_erase_suspend,
378 ffsdrv_null_erase_resume
379 };
380
381 #else
382
383 #error "Flash hardware type unknown"
384
385 #endif /* flash hardware type */
386
362 #else 387 #else
363 388
364 /* 389 /*
365 * This part will get compiled if we have real FFS (FFS_IN_RAM=0), 390 * This part will get compiled if we have real FFS (FFS_IN_RAM=0),
366 * but not allowed to write to flash (CONFIG_FLASH_WRITE=0). 391 * but not allowed to write to flash (CONFIG_FLASH_WRITE=0).