Lines Matching refs:priv
184 struct flash_priv *priv = dev->data; in flash_mcux_erase() local
189 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_mcux_erase()
193 addr = offset + priv->pflash_block_base; in flash_mcux_erase()
196 rc = FLASH_Erase(&priv->config, in flash_mcux_erase()
208 k_sem_give(&priv->write_lock); in flash_mcux_erase()
227 struct flash_priv *priv = dev->data; in flash_mcux_read() local
236 addr = offset + priv->pflash_block_base; in flash_mcux_read()
246 rc = FLASH_Read(&priv->config, addr, data, len); in flash_mcux_read()
255 rc = FLASH_VerifyErase(&priv->config, in flash_mcux_read()
294 struct flash_priv *priv = dev->data; in flash_mcux_write() local
299 if (k_sem_take(&priv->write_lock, K_FOREVER)) { in flash_mcux_write()
303 addr = offset + priv->pflash_block_base; in flash_mcux_write()
306 rc = FLASH_Program(&priv->config, in flash_mcux_write()
318 k_sem_give(&priv->write_lock); in flash_mcux_write()
367 struct flash_priv *priv = dev->data; in flash_mcux_init() local
371 k_sem_init(&priv->write_lock, 1, 1); in flash_mcux_init()
373 rc = FLASH_Init(&priv->config); in flash_mcux_init()
375 FLASH_GetProperty(&priv->config, FLASH_PROP_BLOCK_BASE, &pflash_block_base); in flash_mcux_init()
377 priv->pflash_block_base = (uint32_t) pflash_block_base; in flash_mcux_init()