Lines Matching defs:cust_cfgs
380 struct emif_custom_configs *cust_cfgs = emif->plat_data->custom_configs;
382 if (cust_cfgs && (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE)) {
383 lpmode = cust_cfgs->lpmode;
384 timeout_perf = cust_cfgs->lpmode_timeout_performance;
385 timeout_pwr = cust_cfgs->lpmode_timeout_power;
386 freq_threshold = cust_cfgs->lpmode_freq_threshold;
817 static int is_custom_config_valid(struct emif_custom_configs *cust_cfgs,
822 if ((cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE) &&
823 (cust_cfgs->lpmode != EMIF_LP_MODE_DISABLE))
824 valid = cust_cfgs->lpmode_freq_threshold &&
825 cust_cfgs->lpmode_timeout_performance &&
826 cust_cfgs->lpmode_timeout_power;
828 if (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL)
829 valid = valid && cust_cfgs->temp_alert_poll_interval_ms;
841 struct emif_custom_configs *cust_cfgs = NULL;
849 cust_cfgs = devm_kzalloc(emif->dev, sizeof(*cust_cfgs),
852 if (!cust_cfgs)
856 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE;
857 cust_cfgs->lpmode = be32_to_cpup(lpmode);
860 &cust_cfgs->lpmode_timeout_performance);
863 &cust_cfgs->lpmode_timeout_power);
866 &cust_cfgs->lpmode_freq_threshold);
870 cust_cfgs->mask |=
872 cust_cfgs->temp_alert_poll_interval_ms =
877 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART;
879 if (!is_custom_config_valid(cust_cfgs, emif->dev)) {
880 devm_kfree(emif->dev, cust_cfgs);
884 emif->plat_data->custom_configs = cust_cfgs;
1009 struct emif_custom_configs *cust_cfgs;
1063 cust_cfgs = pd->custom_configs;
1064 if (cust_cfgs && is_custom_config_valid(cust_cfgs, dev)) {
1065 temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL);
1067 memcpy(temp, cust_cfgs, sizeof(*cust_cfgs));