Lines Matching refs:cust_cfgs
372 struct emif_custom_configs *cust_cfgs = emif->plat_data->custom_configs; in get_pwr_mgmt_ctrl() local
374 if (cust_cfgs && (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE)) { in get_pwr_mgmt_ctrl()
375 lpmode = cust_cfgs->lpmode; in get_pwr_mgmt_ctrl()
376 timeout_perf = cust_cfgs->lpmode_timeout_performance; in get_pwr_mgmt_ctrl()
377 timeout_pwr = cust_cfgs->lpmode_timeout_power; in get_pwr_mgmt_ctrl()
378 freq_threshold = cust_cfgs->lpmode_freq_threshold; in get_pwr_mgmt_ctrl()
808 static int is_custom_config_valid(struct emif_custom_configs *cust_cfgs, in is_custom_config_valid() argument
813 if ((cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE) && in is_custom_config_valid()
814 (cust_cfgs->lpmode != EMIF_LP_MODE_DISABLE)) in is_custom_config_valid()
815 valid = cust_cfgs->lpmode_freq_threshold && in is_custom_config_valid()
816 cust_cfgs->lpmode_timeout_performance && in is_custom_config_valid()
817 cust_cfgs->lpmode_timeout_power; in is_custom_config_valid()
819 if (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL) in is_custom_config_valid()
820 valid = valid && cust_cfgs->temp_alert_poll_interval_ms; in is_custom_config_valid()
831 struct emif_custom_configs *cust_cfgs = NULL; in of_get_custom_configs() local
839 cust_cfgs = devm_kzalloc(emif->dev, sizeof(*cust_cfgs), in of_get_custom_configs()
842 if (!cust_cfgs) in of_get_custom_configs()
846 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE; in of_get_custom_configs()
847 cust_cfgs->lpmode = be32_to_cpup(lpmode); in of_get_custom_configs()
850 &cust_cfgs->lpmode_timeout_performance); in of_get_custom_configs()
853 &cust_cfgs->lpmode_timeout_power); in of_get_custom_configs()
856 &cust_cfgs->lpmode_freq_threshold); in of_get_custom_configs()
860 cust_cfgs->mask |= in of_get_custom_configs()
862 cust_cfgs->temp_alert_poll_interval_ms = in of_get_custom_configs()
867 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART; in of_get_custom_configs()
869 if (!is_custom_config_valid(cust_cfgs, emif->dev)) { in of_get_custom_configs()
870 devm_kfree(emif->dev, cust_cfgs); in of_get_custom_configs()
874 emif->plat_data->custom_configs = cust_cfgs; in of_get_custom_configs()
985 struct emif_custom_configs *cust_cfgs; in get_device_details() local
1039 cust_cfgs = pd->custom_configs; in get_device_details()
1040 if (cust_cfgs && is_custom_config_valid(cust_cfgs, dev)) { in get_device_details()
1041 temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL); in get_device_details()
1043 memcpy(temp, cust_cfgs, sizeof(*cust_cfgs)); in get_device_details()