FreeCalypso > hg > fc-magnetite
diff src/cs/drivers/drv_app/ffs/board/dev.c @ 528:63cedcedea87
FFS dev.c flash device table reworked as described in TCS211-fw-arch
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 13 Oct 2018 07:38:13 +0000 |
parents | 43853399dbee |
children | b48e9892ee65 |
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/ffs/board/dev.c Tue Oct 09 08:09:53 2018 +0000 +++ b/src/cs/drivers/drv_app/ffs/board/dev.c Sat Oct 13 07:38:13 2018 +0000 @@ -128,6 +128,7 @@ }; #endif +#ifdef CONFIG_TARGET_LEONARDO // 128x64kb static const struct block_info_s flash_128x64[] = { @@ -260,6 +261,7 @@ { 0x7e0000, 16 }, { 0x7f0000, 16 } }; +#endif // 16x64kB static const struct block_info_s flash_16x64[] = @@ -344,6 +346,7 @@ const struct flash_info_s flash_info[] = { +#if 0 //BOARD 34. Ram device 4x4kB. Note it is necessary to hardwire the conf //in cfgffs.c { &flash_4x4[0], 0, MANUFACT_RAM, 0x0404, @@ -352,31 +355,68 @@ // Ram device 8x8kB. Note it is necessary to hardwire the conf in cfgffs.c { &flash_8x8[0], 0, MANUFACT_RAM, 0x080D, FFS_DRIVER_RAM, 8}, - - /********** AMD Devices ***********************************************/ +#endif #ifdef CONFIG_TARGET_PIRELLI + // Spansion S71PL129NC0 used in Pirelli DP-L10 // ID made up (same as what Pirelli's fw uses), not using autodetect // This is an aftermarket FFS config for the Pirelli target { &flash_32x256[0], (char *) 0x02480000, MANUFACT_AMD, 0x2101, FFS_DRIVER_AMD, 6 }, -#endif -#ifdef CONFIG_TARGET_FCFAM +#elif defined(CONFIG_TARGET_FCFAM) + // We are using the same flash+pSRAM chip in our own // FreeCalypso hardware designs, but on a different chip select. // Let's use the first 2 MiB of the 2nd bank for the FFS. { &flash_32x256[0], (char *) 0x01800000, MANUFACT_AMD, 0x2101, FFS_DRIVER_AMD, 8 }, -#endif + +#elif defined(CONFIG_TARGET_COMPAL) + + /* aftermarket FFS configurations for FreeCalypso on Mot C1xx phones */ + + // Intel 28F160C3-T 16Mb. Using top-most 8x8kB (parameter) sectors. + // Changed for C11x aftermarket FFS config: 64x3 at 0x1C0000 + { &flash_16x64[0], (char *) 0x1C0000, MANUFACT_INTEL, 0x88C2, + FFS_DRIVER_INTEL_SB, 3 }, - // AMD Am29DL640F. Ignoring the 8kB sectors + /* + * A user in the field found that some Mot C11x phones have 2 MiB + * of flash, but use some different flash chip, not our familiar + * 28F160C3-T. This chip reports manufacturer ID 0x20 and device + * ID 0x88CE, but the CFI structure lists the same sector geometry + * as our familiar 28F160C3-T. Let's treat this mystery flash chip + * as equivalent to our familiar one. + */ + { &flash_16x64[0], (char *) 0x1C0000, 0x20, 0x88CE, + FFS_DRIVER_INTEL_SB, 3 }, + + // Intel 28F320C3-T, 32Mb. Using top-most 8x8kB (parameter) sectors. + // Changed for C139 aftermarket FFS config: 64x3 at 0x3C0000 + { &flash_16x64[0], (char *) 0x3C0000, MANUFACT_INTEL, 0x88C4, + FFS_DRIVER_INTEL_SB, 3 }, + + // Intel 28F640C3-B, 64Mb. Using top-most 16x64kB sectors + // Changed for C155 aftermarket FFS config: 64x13 at 0x700000 + { &flash_16x64[0], (char *) 0x700000, MANUFACT_INTEL, 0x88CD, + FFS_DRIVER_INTEL_SB, 13 }, + +#else + + /* original table from TI/Openmoko, used on TI and Openmoko targets */ + + /********** AMD Devices ***********************************************/ + +#ifdef CONFIG_TARGET_LEONARDO + // AMD Am29DL640F. Ignoring the 8kB sectors // Multi-id device: 0x227E, 0x2221, 0x2200. Converted to 0x2100 { &flash_16x64[0], (char *) 0x01800000, MANUFACT_AMD, 0x2100, FFS_DRIVER_AMD, 15 }, +#endif - // AMD Am29DL640G. Ignoring the 8kB sectors + // AMD Am29DL640G. Ignoring the 8kB sectors // Multi-id device: 0x227E, 0x2202, 0x2201. Converted to 0x0201 { &flash_16x64[0], (char *) 0x700000, MANUFACT_AMD, 0x0201, FFS_DRIVER_AMD, 15 }, @@ -459,48 +499,27 @@ { &flash_16x64[0], (char *) 0x700000, MANUFACT_FUJITSU, 0x0201, FFS_DRIVER_AMD_SB, 15 }, +#ifdef CONFIG_TARGET_LEONARDO // Fujitsu MB84VF5F5F4J2 stacked device. Using the 2nd sub device // The 8x8 are located both in top and bottom, thus only 126 // blocks are used. { &flash_128x64[0], (char *) 0x1810000, MANUFACT_FUJITSU, 0xB496, FFS_DRIVER_AMD_SB, 126 }, +#endif /********** Intel Devices *********************************************/ // Intel 28F160C3-T 16Mb. Using top-most 8x8kB (parameter) sectors. -#if defined(CONFIG_TARGET_C139) || defined(CONFIG_TARGET_C11X) - // Changed for C11x aftermarket FFS config: 64x3 at 0x1C0000 - { &flash_16x64[0], (char *) 0x1C0000, MANUFACT_INTEL, 0x88C2, - FFS_DRIVER_INTEL_SB, 3 }, -#else { &flash_8x8[0], (char *) 0x1F0000, MANUFACT_INTEL, 0x88C2, FFS_DRIVER_INTEL_SB, 8 }, -#endif - - /* - * A user in the field found that some Mot C11x phones have 2 MiB - * of flash, but use some different flash chip, not our familiar - * 28F160C3-T. This chip reports manufacturer ID 0x20 and device - * ID 0x88CE, but the CFI structure lists the same sector geometry - * as our familiar 28F160C3-T. Let's treat this mystery flash chip - * as equivalent to our familiar one. - */ - { &flash_16x64[0], (char *) 0x1C0000, 0x20, 0x88CE, - FFS_DRIVER_INTEL_SB, 3 }, // Intel 28F160C3-B, 16Mb. Using top-most 6x64kB sectors { &flash_16x64[0], (char *) 0x1A0000, MANUFACT_INTEL, 0x88C3, FFS_DRIVER_INTEL_SB, 6 }, // Intel 28F320C3-T, 32Mb. Using top-most 8x8kB (parameter) sectors. -#if defined(CONFIG_TARGET_C139) || defined(CONFIG_TARGET_C11X) - // Changed for C139 aftermarket FFS config: 64x3 at 0x3C0000 - { &flash_16x64[0], (char *) 0x3C0000, MANUFACT_INTEL, 0x88C4, - FFS_DRIVER_INTEL_SB, 3 }, -#else { &flash_8x8[0], (char *) 0x3F0000, MANUFACT_INTEL, 0x88C4, FFS_DRIVER_INTEL_SB, 8 }, -#endif // Intel 28F320C3-B, 32Mb. Using top-most 8x64kB sectors { &flash_16x64[0], (char *) 0x380000, MANUFACT_INTEL, 0x88C5, @@ -579,7 +598,9 @@ { &flash_16x64[0], (char *) 0x380000, MANUFACT_TOSHIBA, 0x009C, FFS_DRIVER_AMD, 8 }, +#endif +#if 0 /********** Special/Test Devices **************************************/ // Intel 28F160C3-B, 16Mb. Single bank driver @@ -622,6 +643,7 @@ // PC Test/Simulation flash 4x4kB { &flash_4x4[0], (char *) 0x000000, MANUFACT_TEST, 0x0404, FFS_DRIVER_TEST, 4 }, +#endif // terminator { 0, 0, 0, 0 }