Lines Matching refs:SecMap
233 static int KBinSector(struct flash_type * SecMap, unsigned int SecNo);
234 static uint32_t SectorStart(struct flash_type * SecMap, int SecNo);
235 static unsigned int SectorNumber(struct flash_type * SecMap, uint32_t Offset);
311 static int KBinSector(struct flash_type * SecMap, unsigned int SecNo) in KBinSector() argument
316 if (SecNo < SecMap->ft_deltas[i].nSectors) in KBinSector()
317 return SecMap->ft_deltas[i].nKB; in KBinSector()
318 SecNo -= SecMap->ft_deltas[i].nSectors; in KBinSector()
328 static uint32_t SectorStart(struct flash_type * SecMap, int SecNo) in SectorStart() argument
334 if ((unsigned int)SecNo < SecMap->ft_deltas[i].nSectors) in SectorStart()
335 return 1024 * (Offset + (SecMap->ft_deltas[i].nKB * SecNo)); in SectorStart()
336 SecNo -= SecMap->ft_deltas[i].nSectors; in SectorStart()
337 Offset += SecMap->ft_deltas[i].nSectors * SecMap->ft_deltas[i].nKB; in SectorStart()
345 static unsigned int SectorNumber(struct flash_type * SecMap, uint32_t Offset) in SectorNumber() argument
353 ((SecMap->ft_deltas[i].nSectors * SecMap->ft_deltas[i].nKB))) in SectorNumber()
354 return SecNo + (Offset / SecMap->ft_deltas[i].nKB); in SectorNumber()
355 SecNo += SecMap->ft_deltas[i].nSectors; in SectorNumber()
356 Offset -= SecMap->ft_deltas[i].nSectors * SecMap->ft_deltas[i].nKB; in SectorNumber()