FreeCalypso > hg > freecalypso-sw
changeset 218:fee45482aa2a
FFS: hopefully-correct initialization for the FFS_IN_RAM configuration
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 06 Jan 2014 08:43:35 +0000 |
parents | 30a173257f4a |
children | 2beb88a3d528 |
files | gsm-fw/services/ffs/cfgffs.c gsm-fw/services/ffs/drv.c gsm-fw/services/ffs/task.c |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gsm-fw/services/ffs/cfgffs.c Mon Jan 06 08:07:36 2014 +0000 +++ b/gsm-fw/services/ffs/cfgffs.c Mon Jan 06 08:43:35 2014 +0000 @@ -21,6 +21,7 @@ struct dev_s dev = { .base = _RAMFFS_area, .binfo = ramffs_block_info, + .manufact = MANUFACT_RAM, .blocksize = RAMFFS_BLKSIZE_BYTES, .blocksize_ld = RAMFFS_BLKSIZE_LOG2, .driver = FFS_DRIVER_RAM, @@ -42,6 +43,8 @@ struct dev_s dev = { .base = (char *) 0x380000, .binfo = mokoffs_blocks, + .manufact = MANUFACT_SAMSUNG, + .device = 0x22A0, .blocksize = 0x10000, .blocksize_ld = 16, .driver = FFS_DRIVER_AMD, @@ -65,6 +68,7 @@ struct dev_s dev = { .base = (char *) FLASH2_BASE_ADDR, .binfo = pirhack_ffs_blocks, + .manufact = MANUFACT_AMD, .blocksize = 0x40000, .blocksize_ld = 18, .driver = FFS_DRIVER_AMD,
--- a/gsm-fw/services/ffs/drv.c Mon Jan 06 08:07:36 2014 +0000 +++ b/gsm-fw/services/ffs/drv.c Mon Jan 06 08:43:35 2014 +0000 @@ -189,7 +189,7 @@ } const struct ffsdrv_s ffsdrv = { - ffsdrv_ram_init, + ffsdrv_null_init, ffsdrv_ram_erase, ffsdrv_ram_write_halfword, ffsdrv_generic_write,
--- a/gsm-fw/services/ffs/task.c Mon Jan 06 08:07:36 2014 +0000 +++ b/gsm-fw/services/ffs/task.c Mon Jan 06 08:43:35 2014 +0000 @@ -208,6 +208,9 @@ tmp_int_level = TCD_Interrupt_Level; // Backup Int level TCD_Interrupt_Level = 0xC0; // The Interrups are not yet enabled... +#if FFS_IN_RAM + ffsdrv_ram_init(); +#endif ffs_init_status = ffs_initialize(); TCD_Interrupt_Level = tmp_int_level; // Restore Int level @@ -250,7 +253,7 @@ char *temp_path; req_id_t temp_id; -#if (BOARD == 34) +#if FFS_IN_RAM // Non formatted FFS should be formatted // So we don't have to use PCTM to format it if (fs.initerror == EFFS_NOFORMAT) @@ -258,7 +261,7 @@ ffs_format_nb("/", 0x2BAD, 0); } - ffs_InitRFCap(); + /* ffs_InitRFCap(); */ #endif ttr(TTrTask, "ffs_init() %d" NL, ffs_init_status);