From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Ernesto Ramos Falcon <ernesto@ti.com>,
Shivananda Hebbar <x0hebbar@ti.com>,
Fernando Guzman Lugo <x0095840@ti.com>,
Ivan Gomez Castellanos <ivan.gomez@ti.com>,
Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: [PATCH 1/2] DSPBRIDGE: fix a wrong clk index for gpt8
Date: Thu, 10 Jun 2010 07:14:04 -0500 [thread overview]
Message-ID: <1276172045-17267-1-git-send-email-omar.ramirez@ti.com> (raw)
Mismatch between index for gpt clocks will result in writting
out of bounds into dsp clock timer array when requesting gpt8,
for the other gpt the bogus code is being masked as it falls
within the array's range.
Discovered-by: Ernesto Ramos Falcon <ernesto@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
drivers/dsp/bridge/core/dsp-clock.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/dsp/bridge/core/dsp-clock.c b/drivers/dsp/bridge/core/dsp-clock.c
index 4613de9..dba0535 100644
--- a/drivers/dsp/bridge/core/dsp-clock.c
+++ b/drivers/dsp/bridge/core/dsp-clock.c
@@ -212,7 +212,8 @@ int dsp_clk_enable(IN enum dsp_clk_id clk_id)
clk_enable(iva2_clk);
break;
case GPT_CLK:
- timer[clk_id] = omap_dm_timer_request_specific(DMT_ID(clk_id));
+ timer[clk_id - 1] =
+ omap_dm_timer_request_specific(DMT_ID(clk_id));
break;
case MCBSP_CLK:
mcbsp_clk_prepare(true, clk_id);
@@ -287,7 +288,7 @@ int dsp_clk_disable(IN enum dsp_clk_id clk_id)
clk_disable(iva2_clk);
break;
case GPT_CLK:
- omap_dm_timer_free(timer[clk_id]);
+ omap_dm_timer_free(timer[clk_id - 1]);
break;
case MCBSP_CLK:
mcbsp_clk_prepare(false, clk_id);
--
1.7.1
next reply other threads:[~2010-06-10 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 12:14 Omar Ramirez Luna [this message]
2010-06-10 12:14 ` [PATCH 2/2] DSPBRIDGE: reorganize gpt8 overflow handling Omar Ramirez Luna
2010-06-14 17:59 ` Ramirez Luna, Omar
2010-06-14 17:59 ` [PATCH 1/2] DSPBRIDGE: fix a wrong clk index for gpt8 Ramirez Luna, Omar
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=1276172045-17267-1-git-send-email-omar.ramirez@ti.com \
--to=omar.ramirez@ti.com \
--cc=ernesto@ti.com \
--cc=ivan.gomez@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=x0095840@ti.com \
--cc=x0hebbar@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).