Lines Matching refs:sector
284 struct flash_stm32_sector_t sector; local
293 sector.sector_index = offset / FLASH_SECTOR_SIZE;
295 sector.bank = 1;
296 sector.cr = ®s->CR1;
297 sector.sr = ®s->SR1;
299 sector.sector_index -= BANK2_OFFSET / FLASH_SECTOR_SIZE;
300 sector.bank = 1;
301 sector.cr = ®s->CR2;
302 sector.sr = ®s->SR2;
304 sector.bank = 2;
305 sector.cr = ®s->CR1;
306 sector.sr = ®s->SR1;
308 sector.sector_index -= BANK2_OFFSET / FLASH_SECTOR_SIZE;
309 sector.bank = 2;
310 sector.cr = ®s->CR2;
311 sector.sr = ®s->SR2;
313 sector.sector_index = 0;
314 sector.bank = 0;
315 sector.cr = NULL;
316 sector.sr = NULL;
320 sector.sector_index = offset / FLASH_SECTOR_SIZE;
321 sector.bank = 1;
322 sector.cr = ®s->CR1;
323 sector.sr = ®s->SR1;
325 sector.sector_index = 0;
326 sector.bank = 0;
327 sector.cr = NULL;
328 sector.sr = NULL;
332 return sector;
338 struct flash_stm32_sector_t sector = get_sector(dev, offset); local
340 if (sector.bank == 0) {
347 if (*(sector.cr) & FLASH_CR_LOCK) {
356 *(sector.cr) &= ~FLASH_CR_SNB;
357 *(sector.cr) |= (FLASH_CR_SER | ((sector.sector_index << FLASH_CR_SNB_Pos) & FLASH_CR_SNB));
358 *(sector.cr) |= FLASH_CR_START;
363 *(sector.cr) &= ~(FLASH_CR_SER | FLASH_CR_SNB);
382 static int wait_write_queue(const struct flash_stm32_sector_t *sector) argument
386 while (*(sector->sr) & FLASH_SR_QW) {
401 struct flash_stm32_sector_t sector = get_sector(dev, offset); local
403 if (sector.bank == 0) {
409 if (*(sector.cr) & FLASH_CR_LOCK) {
427 *(sector.cr) |= FLASH_CR_PG;
440 wait_write_queue(§or);
447 *(sector.cr) &= (~FLASH_CR_PG);