Lines Matching refs:cust_cfgs

371 	struct emif_custom_configs *cust_cfgs = emif->plat_data->custom_configs;  in get_pwr_mgmt_ctrl()  local
373 if (cust_cfgs && (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE)) { in get_pwr_mgmt_ctrl()
374 lpmode = cust_cfgs->lpmode; in get_pwr_mgmt_ctrl()
375 timeout_perf = cust_cfgs->lpmode_timeout_performance; in get_pwr_mgmt_ctrl()
376 timeout_pwr = cust_cfgs->lpmode_timeout_power; in get_pwr_mgmt_ctrl()
377 freq_threshold = cust_cfgs->lpmode_freq_threshold; in get_pwr_mgmt_ctrl()
807 static int is_custom_config_valid(struct emif_custom_configs *cust_cfgs, in is_custom_config_valid() argument
812 if ((cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE) && in is_custom_config_valid()
813 (cust_cfgs->lpmode != EMIF_LP_MODE_DISABLE)) in is_custom_config_valid()
814 valid = cust_cfgs->lpmode_freq_threshold && in is_custom_config_valid()
815 cust_cfgs->lpmode_timeout_performance && in is_custom_config_valid()
816 cust_cfgs->lpmode_timeout_power; in is_custom_config_valid()
818 if (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL) in is_custom_config_valid()
819 valid = valid && cust_cfgs->temp_alert_poll_interval_ms; in is_custom_config_valid()
830 struct emif_custom_configs *cust_cfgs = NULL; in of_get_custom_configs() local
838 cust_cfgs = devm_kzalloc(emif->dev, sizeof(*cust_cfgs), in of_get_custom_configs()
841 if (!cust_cfgs) in of_get_custom_configs()
845 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE; in of_get_custom_configs()
846 cust_cfgs->lpmode = be32_to_cpup(lpmode); in of_get_custom_configs()
849 &cust_cfgs->lpmode_timeout_performance); in of_get_custom_configs()
852 &cust_cfgs->lpmode_timeout_power); in of_get_custom_configs()
855 &cust_cfgs->lpmode_freq_threshold); in of_get_custom_configs()
859 cust_cfgs->mask |= in of_get_custom_configs()
861 cust_cfgs->temp_alert_poll_interval_ms = in of_get_custom_configs()
866 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART; in of_get_custom_configs()
868 if (!is_custom_config_valid(cust_cfgs, emif->dev)) { in of_get_custom_configs()
869 devm_kfree(emif->dev, cust_cfgs); in of_get_custom_configs()
873 emif->plat_data->custom_configs = cust_cfgs; in of_get_custom_configs()
984 struct emif_custom_configs *cust_cfgs; in get_device_details() local
1038 cust_cfgs = pd->custom_configs; in get_device_details()
1039 if (cust_cfgs && is_custom_config_valid(cust_cfgs, dev)) { in get_device_details()
1040 temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL); in get_device_details()
1042 memcpy(temp, cust_cfgs, sizeof(*cust_cfgs)); in get_device_details()