Lines Matching refs:priv
59 struct flash_priv *priv = dev->data; in flash_lpc_erase() local
66 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_lpc_erase()
71 prepare_erase_write(offset, len, priv->sector_size); in flash_lpc_erase()
79 k_sem_give(&priv->write_lock); in flash_lpc_erase()
87 struct flash_priv *priv = dev->data; in flash_lpc_read() local
90 addr = offset + priv->pflash_block_base; in flash_lpc_read()
100 struct flash_priv *priv = dev->data; in flash_lpc_write() local
105 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_lpc_write()
109 addr = offset + priv->pflash_block_base; in flash_lpc_write()
112 prepare_erase_write(offset, len, priv->sector_size); in flash_lpc_write()
117 k_sem_give(&priv->write_lock); in flash_lpc_write()
160 struct flash_priv *priv = dev->data; in flash_lpc_init() local
162 k_sem_init(&priv->write_lock, 1, 1); in flash_lpc_init()
164 priv->pflash_block_base = DT_REG_ADDR(SOC_NV_FLASH_NODE); in flash_lpc_init()
167 priv->sector_size = FSL_FEATURE_SYSCON_FLASH_SECTOR_SIZE_BYTES; in flash_lpc_init()