From: kishon <a0393678@ti.com>
To: linux-omap@vger.kernel.org, Partha Basak <p-basak2@ti.com>
Cc: "Datta, Shubhrajyoti" <shubhrajyoti@ti.com>,
"Varadarajan, Charulatha" <charu@ti.com>,
Nishant Kamat <nskamat@ti.com>,
"ABRAHAM, KISHON VIJAY" <kishon@ti.com>
Subject: [RFC/PATCH] Fix to support multiple HWMODS for a single device
Date: Sun, 22 Aug 2010 15:20:53 +0530 [thread overview]
Message-ID: <4C70F2FD.1080208@ti.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-RFC-PATCH-Fix-to-support-multiple-HWMODS-for-a-singl.patch --]
[-- Type: text/x-patch, Size: 1888 bytes --]
>From 24ffaa67c44065a9caa3ee3525dd863d32c67269 Mon Sep 17 00:00:00 2001
From: Kishon Vijay Abraham I <kishon@ti.com>
Date: Sun, 22 Aug 2010 15:06:42 +0530
Subject: [RFC/PATCH] Fix to support multiple HWMODS for a single device
The current code expects multiple HWMODS to be filled in consecutive
memory location before passing to omap_device_build_ss(). Ignoring this
will result in incorrect data being populated in omap_hwmod_fill_resources().
This means before calling omap_device_build_ss() the user has to create memory
chunks, copy all the HWMOD structures to it taking care of the mutex
variable as well.
This fix does some pointer calculations to the existing function
omap_device_fill_resources() in order to fill the resources properly.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/plat-omap/omap_device.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
mode change 100644 => 100755 arch/arm/plat-omap/omap_device.c
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
old mode 100644
new mode 100755
index d2b1609..8013292
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -289,12 +289,12 @@ int omap_device_count_resources(struct omap_device *od)
*/
int omap_device_fill_resources(struct omap_device *od, struct resource *res)
{
- struct omap_hwmod *oh;
+ struct omap_hwmod **oh;
int c = 0;
int i, r;
- for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) {
- r = omap_hwmod_fill_resources(oh, res);
+ for (i = 0, oh = od->hwmods; i < od->hwmods_cnt; i++, oh++) {
+ r = omap_hwmod_fill_resources(*oh, res);
res += r;
c += r;
}
@@ -694,7 +694,6 @@ int omap_device_enable_hwmods(struct omap_device *od)
{
struct omap_hwmod *oh;
int i;
-
for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++)
omap_hwmod_enable(oh);
--
1.7.0.4
reply other threads:[~2010-08-22 9:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4C70F2FD.1080208@ti.com \
--to=a0393678@ti.com \
--cc=charu@ti.com \
--cc=kishon@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nskamat@ti.com \
--cc=p-basak2@ti.com \
--cc=shubhrajyoti@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).