Lines Matching refs:cust_cfgs

755 	struct emif_custom_configs *cust_cfgs = emif->plat_data->custom_configs;  in get_pwr_mgmt_ctrl()  local
757 if (cust_cfgs && (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE)) { in get_pwr_mgmt_ctrl()
758 lpmode = cust_cfgs->lpmode; in get_pwr_mgmt_ctrl()
759 timeout_perf = cust_cfgs->lpmode_timeout_performance; in get_pwr_mgmt_ctrl()
760 timeout_pwr = cust_cfgs->lpmode_timeout_power; in get_pwr_mgmt_ctrl()
761 freq_threshold = cust_cfgs->lpmode_freq_threshold; in get_pwr_mgmt_ctrl()
1238 static int is_custom_config_valid(struct emif_custom_configs *cust_cfgs, in is_custom_config_valid() argument
1243 if ((cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE) && in is_custom_config_valid()
1244 (cust_cfgs->lpmode != EMIF_LP_MODE_DISABLE)) in is_custom_config_valid()
1245 valid = cust_cfgs->lpmode_freq_threshold && in is_custom_config_valid()
1246 cust_cfgs->lpmode_timeout_performance && in is_custom_config_valid()
1247 cust_cfgs->lpmode_timeout_power; in is_custom_config_valid()
1249 if (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL) in is_custom_config_valid()
1250 valid = valid && cust_cfgs->temp_alert_poll_interval_ms; in is_custom_config_valid()
1262 struct emif_custom_configs *cust_cfgs = NULL; in of_get_custom_configs() local
1270 cust_cfgs = devm_kzalloc(emif->dev, sizeof(*cust_cfgs), in of_get_custom_configs()
1273 if (!cust_cfgs) in of_get_custom_configs()
1277 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE; in of_get_custom_configs()
1278 cust_cfgs->lpmode = be32_to_cpup(lpmode); in of_get_custom_configs()
1281 &cust_cfgs->lpmode_timeout_performance); in of_get_custom_configs()
1284 &cust_cfgs->lpmode_timeout_power); in of_get_custom_configs()
1287 &cust_cfgs->lpmode_freq_threshold); in of_get_custom_configs()
1291 cust_cfgs->mask |= in of_get_custom_configs()
1293 cust_cfgs->temp_alert_poll_interval_ms = in of_get_custom_configs()
1298 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART; in of_get_custom_configs()
1300 if (!is_custom_config_valid(cust_cfgs, emif->dev)) { in of_get_custom_configs()
1301 devm_kfree(emif->dev, cust_cfgs); in of_get_custom_configs()
1305 emif->plat_data->custom_configs = cust_cfgs; in of_get_custom_configs()
1430 struct emif_custom_configs *cust_cfgs; in get_device_details() local
1486 cust_cfgs = pd->custom_configs; in get_device_details()
1487 if (cust_cfgs && is_custom_config_valid(cust_cfgs, dev)) { in get_device_details()
1488 temp = devm_kzalloc(dev, sizeof(*cust_cfgs), GFP_KERNEL); in get_device_details()
1490 memcpy(temp, cust_cfgs, sizeof(*cust_cfgs)); in get_device_details()