From: Tony Lindgren <tony@atomide.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>, Paul Walmsley <paul@pwsan.com>
Subject: Re: Converting vrfb.c
Date: Fri, 28 Sep 2012 08:00:53 -0700 [thread overview]
Message-ID: <20120928150052.GA4840@atomide.com> (raw)
In-Reply-To: <1348833847.2437.36.camel@deskari>
* Tomi Valkeinen <tomi.valkeinen@ti.com> [120928 05:05]:
> Hi,
>
> I'm a bit at loss how to deal with drivers/video/omap2/vrfb.c.
>
> VRFB is part of the SDRAM controller on OMAP2 and OMAP3. vrfb.c uses the
> following functions from sdrc.h:
>
> omap2_sms_write_rot_control();
> omap2_sms_write_rot_size();
> omap2_sms_write_rot_physical_ba();
>
> There are no other dependencies to the sdrc.c.
>
> Those functions are quite simple:
>
> void omap2_sms_write_rot_control(u32 val, unsigned ctx)
> {
> sms_write_reg(val, SMS_ROT_CONTROL(ctx));
> }
>
> void omap2_sms_write_rot_size(u32 val, unsigned ctx)
> {
> sms_write_reg(val, SMS_ROT_SIZE(ctx));
> }
>
> void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx)
> {
> sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx));
> }
>
> vrfb.c is in turn used by omapfb and omap v4l2 driver.
>
>
> So... Should I just remove the sdrc.h dependency and make vrfb.c ioremap
> those SMS registers itself? Those three registers are VRFB specific, so
> they are not used by anyone else. In that case I'd need to pass the SMS
> base address to vrfb.c somehow.
>
> Or should I have some kind of platform data passed to vrfb.c, which
> contains func pointers to the above three functions?
>
> Or should vrfb.c be moved into mach-omap2/? But then how would omapfb
> call it? Passing vrfb functions as pointers in omapfb platform data?
Maybe just export those functions in sdrc.c for now? Eventually
that should be just a regular device driver too..
Or maybe Paul has some better ideas?
Regards,
Tony
next prev parent reply other threads:[~2012-09-28 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 12:04 Converting vrfb.c Tomi Valkeinen
2012-09-28 15:00 ` Tony Lindgren [this message]
2012-10-03 18:41 ` Tony Lindgren
2012-10-04 10:18 ` Tomi Valkeinen
2012-10-04 16:33 ` Tony Lindgren
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=20120928150052.GA4840@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tomi.valkeinen@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).