Lines Matching refs:device_data
21 void cryp_wait_until_done(struct cryp_device_data *device_data)
23 while (cryp_is_logic_busy(device_data))
29 * @device_data: Pointer to the device data struct for base address.
31 int cryp_check(struct cryp_device_data *device_data)
35 if (NULL == device_data)
38 peripheralid2 = readl_relaxed(&device_data->base->periphId2);
45 readl_relaxed(&device_data->base->periphId0))
47 readl_relaxed(&device_data->base->periphId1))
49 readl_relaxed(&device_data->base->periphId3))
51 readl_relaxed(&device_data->base->pcellId0))
53 readl_relaxed(&device_data->base->pcellId1))
55 readl_relaxed(&device_data->base->pcellId2))
57 readl_relaxed(&device_data->base->pcellId3))) {
66 * @device_data: Pointer to the device data struct for base address.
69 void cryp_activity(struct cryp_device_data *device_data,
72 CRYP_PUT_BITS(&device_data->base->cr,
80 * @device_data: Pointer to the device data struct for base address.
82 void cryp_flush_inoutfifo(struct cryp_device_data *device_data)
90 cryp_activity(device_data, CRYP_CRYPEN_DISABLE);
91 cryp_wait_until_done(device_data);
93 CRYP_SET_BITS(&device_data->base->cr, CRYP_CR_FFLUSH_MASK);
99 while (readl_relaxed(&device_data->base->sr) !=
106 * @device_data: Pointer to the device data struct for base address.
110 int cryp_set_configuration(struct cryp_device_data *device_data,
116 if (NULL == device_data || NULL == cryp_config)
147 writel_relaxed(cr_for_kse, &device_data->base->cr);
148 cryp_wait_until_done(device_data);
160 * @device_data: Pointer to the device data struct for base address.
164 int cryp_configure_protection(struct cryp_device_data *device_data,
170 CRYP_WRITE_BIT(&device_data->base->cr,
173 CRYP_PUT_BITS(&device_data->base->cr,
183 * @device_data: Pointer to the device data struct for base address.
185 int cryp_is_logic_busy(struct cryp_device_data *device_data)
187 return CRYP_TEST_BITS(&device_data->base->sr,
193 * @device_data: Pointer to the device data struct for base address.
196 void cryp_configure_for_dma(struct cryp_device_data *device_data,
199 CRYP_SET_BITS(&device_data->base->dmacr,
205 * @device_data: Pointer to the device data struct for base address.
209 int cryp_configure_key_values(struct cryp_device_data *device_data,
213 while (cryp_is_logic_busy(device_data))
219 &device_data->base->key_1_l);
221 &device_data->base->key_1_r);
225 &device_data->base->key_2_l);
227 &device_data->base->key_2_r);
231 &device_data->base->key_3_l);
233 &device_data->base->key_3_r);
237 &device_data->base->key_4_l);
239 &device_data->base->key_4_r);
250 * @device_data: Pointer to the device data struct for base address.
254 int cryp_configure_init_vector(struct cryp_device_data *device_data,
260 while (cryp_is_logic_busy(device_data))
266 &device_data->base->init_vect_0_l);
268 &device_data->base->init_vect_0_r);
272 &device_data->base->init_vect_1_l);
274 &device_data->base->init_vect_1_r);
286 * @device_data: Pointer to the device data struct for base address.
289 void cryp_save_device_context(struct cryp_device_data *device_data,
294 struct cryp_register __iomem *src_reg = device_data->base;
296 (struct cryp_config *)device_data->current_ctx;
302 cryp_activity(device_data, CRYP_CRYPEN_DISABLE);
303 cryp_wait_until_done(device_data);
306 cryp_configure_for_dma(device_data, CRYP_DMA_DISABLE_BOTH);
349 * @device_data: Pointer to the device data struct for base address.
352 void cryp_restore_device_context(struct cryp_device_data *device_data,
355 struct cryp_register __iomem *reg = device_data->base;
357 (struct cryp_config *)device_data->current_ctx;