From patchwork Mon Dec 10 07:09:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 1855431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5077FDFB79 for ; Mon, 10 Dec 2012 07:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752417Ab2LJHJx (ORCPT ); Mon, 10 Dec 2012 02:09:53 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:45112 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053Ab2LJHJb (ORCPT ); Mon, 10 Dec 2012 02:09:31 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qBA79PpL009175; Mon, 10 Dec 2012 01:09:26 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBA79P77004504; Mon, 10 Dec 2012 12:39:25 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Mon, 10 Dec 2012 12:39:25 +0530 Received: from a0131933lt.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBA79KlR030499; Mon, 10 Dec 2012 12:39:24 +0530 From: Lokesh Vutla To: CC: , , , , , Ambresh K Subject: [PATCH 9/9] memory: emif: use default custom config parameter. Date: Mon, 10 Dec 2012 12:39:18 +0530 Message-ID: <1355123358-5273-10-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1355123358-5273-1-git-send-email-lokeshvutla@ti.com> References: <1355123358-5273-1-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Ambresh K In-case of low power mode selected and custom parameters are not configured, then use default configuration. Signed-off-by: Ambresh K --- drivers/memory/emif.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 70f6e0f..e58fde4 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -722,9 +722,13 @@ static u32 get_pwr_mgmt_ctrl(u32 freq, struct emif_data *emif, u32 ip_rev) if (cust_cfgs && (cust_cfgs->mask & EMIF_CUSTOM_CONFIG_LPMODE)) { lpmode = cust_cfgs->lpmode; - timeout_perf = cust_cfgs->lpmode_timeout_performance; - timeout_pwr = cust_cfgs->lpmode_timeout_power; - freq_threshold = cust_cfgs->lpmode_freq_threshold; + + if (cust_cfgs->lpmode_timeout_performance) + timeout_perf = cust_cfgs->lpmode_timeout_performance; + if (cust_cfgs->lpmode_timeout_power) + timeout_pwr = cust_cfgs->lpmode_timeout_power; + if (cust_cfgs->lpmode_freq_threshold) + freq_threshold = cust_cfgs->lpmode_freq_threshold; } /* Timeout based on DDR frequency */