Lines Matching refs:dsr

114 	u32 dsr;  member
184 static void di_report_tamper_info(struct imxdi_dev *imxdi, u32 dsr) in di_report_tamper_info() argument
192 if (dsr & DSR_VTD) in di_report_tamper_info()
196 if (dsr & DSR_CTD) in di_report_tamper_info()
200 if (dsr & DSR_TTD) in di_report_tamper_info()
204 if (dsr & DSR_SAD) in di_report_tamper_info()
209 if (dsr & DSR_EBD) in di_report_tamper_info()
213 if (dsr & DSR_ETAD) in di_report_tamper_info()
217 if (dsr & DSR_ETBD) in di_report_tamper_info()
221 if (dsr & DSR_WTD) in di_report_tamper_info()
225 if (dsr & DSR_MCO) in di_report_tamper_info()
230 if (dsr & DSR_TCO) in di_report_tamper_info()
242 static int di_handle_failure_state(struct imxdi_dev *imxdi, u32 dsr) in di_handle_failure_state() argument
246 dev_dbg(&imxdi->pdev->dev, "DSR register reports: %08X\n", dsr); in di_handle_failure_state()
249 di_report_tamper_info(imxdi, dsr); in di_handle_failure_state()
267 static int di_handle_valid_state(struct imxdi_dev *imxdi, u32 dsr) in di_handle_valid_state() argument
274 if (dsr & DSR_CAF) in di_handle_valid_state()
280 static int di_handle_invalid_state(struct imxdi_dev *imxdi, u32 dsr) in di_handle_invalid_state() argument
337 static int di_handle_invalid_and_failure_state(struct imxdi_dev *imxdi, u32 dsr) in di_handle_invalid_and_failure_state() argument
346 if (dsr & (DSR_WTD | DSR_ETBD | DSR_ETAD | DSR_EBD | DSR_SAD | in di_handle_invalid_and_failure_state()
375 di_write_busy_wait(imxdi, dsr & (DSR_WTD | DSR_ETBD | DSR_ETAD | in di_handle_invalid_and_failure_state()
379 dsr = readl(imxdi->ioaddr + DSR); in di_handle_invalid_and_failure_state()
380 if ((dsr & ~(DSR_NVF | DSR_SVF | DSR_WBF | DSR_WNF | in di_handle_invalid_and_failure_state()
384 dsr & ~(DSR_NVF | DSR_SVF | DSR_WBF | DSR_WNF | in di_handle_invalid_and_failure_state()
394 dsr = readl(imxdi->ioaddr + DSR); in di_handle_invalid_and_failure_state()
395 if (dsr & DSR_SVF) { in di_handle_invalid_and_failure_state()
407 return di_handle_invalid_state(imxdi, dsr); in di_handle_invalid_and_failure_state()
413 u32 dsr; in di_handle_state() local
415 dsr = readl(imxdi->ioaddr + DSR); in di_handle_state()
417 switch (dsr & (DSR_NVF | DSR_SVF)) { in di_handle_state()
420 rc = di_handle_invalid_state(imxdi, dsr); in di_handle_state()
424 rc = di_handle_failure_state(imxdi, dsr); in di_handle_state()
429 rc = di_handle_invalid_and_failure_state(imxdi, dsr); in di_handle_state()
433 rc = di_handle_valid_state(imxdi, dsr); in di_handle_state()
508 imxdi->dsr = 0; in di_write_wait()
515 imxdi->dsr & (DSR_WCF | DSR_WEF), msecs_to_jiffies(1)); in di_write_wait()
526 if (imxdi->dsr & DSR_WEF) { in di_write_wait()
558 u32 dcr, dsr; in dryice_rtc_set_time() local
562 dsr = readl(imxdi->ioaddr + DSR); in dryice_rtc_set_time()
564 if (!(dcr & DCR_TCE) || (dsr & DSR_SVF)) { in dryice_rtc_set_time()
570 if ((dcr & DCR_TCSL) || (dsr & DSR_SVF)) { in dryice_rtc_set_time()
663 u32 dsr, dier; in dryice_irq() local
667 dsr = readl(imxdi->ioaddr + DSR); in dryice_irq()
671 if (dsr & DSR_SVF) { in dryice_irq()
682 di_report_tamper_info(imxdi, dsr); in dryice_irq()
696 if (dsr & (DSR_WCF | DSR_WEF)) { in dryice_irq()
701 imxdi->dsr |= dsr; in dryice_irq()
711 if (dsr & DSR_CAF) { in dryice_irq()