aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory/emif.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memory/emif.c')
-rw-r--r--drivers/memory/emif.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index bd223c7c3e72..cadf1cc19aaf 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1263,7 +1263,7 @@ static void __init_or_module of_get_custom_configs(struct device_node *np_emif,
1263{ 1263{
1264 struct emif_custom_configs *cust_cfgs = NULL; 1264 struct emif_custom_configs *cust_cfgs = NULL;
1265 int len; 1265 int len;
1266 const int *lpmode, *poll_intvl; 1266 const __be32 *lpmode, *poll_intvl;
1267 1267
1268 lpmode = of_get_property(np_emif, "low-power-mode", &len); 1268 lpmode = of_get_property(np_emif, "low-power-mode", &len);
1269 poll_intvl = of_get_property(np_emif, "temp-alert-poll-interval", &len); 1269 poll_intvl = of_get_property(np_emif, "temp-alert-poll-interval", &len);
@@ -1277,7 +1277,7 @@ static void __init_or_module of_get_custom_configs(struct device_node *np_emif,
1277 1277
1278 if (lpmode) { 1278 if (lpmode) {
1279 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE; 1279 cust_cfgs->mask |= EMIF_CUSTOM_CONFIG_LPMODE;
1280 cust_cfgs->lpmode = *lpmode; 1280 cust_cfgs->lpmode = be32_to_cpup(lpmode);
1281 of_property_read_u32(np_emif, 1281 of_property_read_u32(np_emif,
1282 "low-power-mode-timeout-performance", 1282 "low-power-mode-timeout-performance",
1283 &cust_cfgs->lpmode_timeout_performance); 1283 &cust_cfgs->lpmode_timeout_performance);
@@ -1292,7 +1292,8 @@ static void __init_or_module of_get_custom_configs(struct device_node *np_emif,
1292 if (poll_intvl) { 1292 if (poll_intvl) {
1293 cust_cfgs->mask |= 1293 cust_cfgs->mask |=
1294 EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL; 1294 EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL;
1295 cust_cfgs->temp_alert_poll_interval_ms = *poll_intvl; 1295 cust_cfgs->temp_alert_poll_interval_ms =
1296 be32_to_cpup(poll_intvl);
1296 } 1297 }
1297 1298
1298 if (of_find_property(np_emif, "extended-temp-part", &len)) 1299 if (of_find_property(np_emif, "extended-temp-part", &len))