Lines Matching refs:cust_cfgs

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