From: Lokesh Vutla <lokeshvutla@ti.com> To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, santosh.shilimkar@ti.com, gregkh@linuxfoundation.org, b-cousson@ti.com, lokeshvutla@ti.com Subject: [PATCH 1/9] memory: emif: Correct the lpmode timeout calculation Date: Mon, 10 Dec 2012 12:39:10 +0530 [thread overview] Message-ID: <1355123358-5273-2-git-send-email-lokeshvutla@ti.com> (raw) In-Reply-To: <1355123358-5273-1-git-send-email-lokeshvutla@ti.com> The driver tries to round up the specified timeout cycles to next power of 2 value. But this is done wrongly. Correcting this here. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- drivers/memory/emif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 06d31c9..8589aba 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -731,9 +731,9 @@ static u32 get_pwr_mgmt_ctrl(u32 freq, struct emif_data *emif, u32 ip_rev) if (timeout < 16) { timeout = 0; } else { - timeout = __fls(timeout) - 3; if (timeout & (timeout - 1)) - timeout++; + timeout <<= 1; + timeout = __fls(timeout) - 3; } switch (lpmode) { -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: lokeshvutla@ti.com (Lokesh Vutla) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/9] memory: emif: Correct the lpmode timeout calculation Date: Mon, 10 Dec 2012 12:39:10 +0530 [thread overview] Message-ID: <1355123358-5273-2-git-send-email-lokeshvutla@ti.com> (raw) In-Reply-To: <1355123358-5273-1-git-send-email-lokeshvutla@ti.com> The driver tries to round up the specified timeout cycles to next power of 2 value. But this is done wrongly. Correcting this here. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- drivers/memory/emif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 06d31c9..8589aba 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -731,9 +731,9 @@ static u32 get_pwr_mgmt_ctrl(u32 freq, struct emif_data *emif, u32 ip_rev) if (timeout < 16) { timeout = 0; } else { - timeout = __fls(timeout) - 3; if (timeout & (timeout - 1)) - timeout++; + timeout <<= 1; + timeout = __fls(timeout) - 3; } switch (lpmode) { -- 1.7.9.5
next prev parent reply other threads:[~2012-12-10 7:09 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-10 7:09 [PATCH 0/9] memory: emif: miscellaneous bug fixes for EMIF driver Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla [this message] 2012-12-10 7:09 ` [PATCH 1/9] memory: emif: Correct the lpmode timeout calculation Lokesh Vutla 2012-12-10 7:09 ` [PATCH 2/9] memory: emif: setup LP settings on freq update Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 3/9] memory: emif: handle overflow for timing for LP mode Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 4/9] memory: emif: Handle devices which are not rated for >85C Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 5/9] memory: emif: use restart if power_off not present when out of spec Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 6/9] memory: emif: debugfs: Remove MR4= string print Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 7/9] memory: emif: disable phy_fast_dll_lock Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 8/9] memory: emif: fix timings initialization issue Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla 2012-12-10 7:09 ` [PATCH 9/9] memory: emif: use default custom config parameter Lokesh Vutla 2012-12-10 7:09 ` Lokesh Vutla
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1355123358-5273-2-git-send-email-lokeshvutla@ti.com \ --to=lokeshvutla@ti.com \ --cc=b-cousson@ti.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=santosh.shilimkar@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.