From: Komal Shah <komal_shah802003@yahoo.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] ARM: OMAP: Add minimal OMAP2430 support
Date: Sun, 11 Jun 2006 01:37:56 -0700 (PDT) [thread overview]
Message-ID: <20060611083756.85274.qmail@web37912.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060606175856.GS16454@atomide.com>
--- Tony Lindgren <tony@atomide.com> wrote:
> * Komal Shah <komal_shah802003@yahoo.com> [060605 20:08]:
> > --- Tony Lindgren <tony@atomide.com> wrote:
> >
> > >
> > > Well one thing we should change is to make it possible to compile
> in
> > > all
> > > 24xx boards. This involves changing things like PRCM register
> access
> > > to use a base address instead of ifdefs.
> > >
> > > I know we this is quite a bit of work now, but it pays off in the
> > > long
> > > run. Something like this has proven to work well for portable
> code
> > > across various omaps/platforms:
> > >
> > > #define OMAP2420_PRCM_SOME_BASE 0xaaaaaaaa
> > > #define OMAP2430_PRCM_SOME_BASE 0xbbbbbbbb
> > >
> > > #define PRCM_SOME_REG1_OFFSET 0x10
> > > #define REG1_AAAA (1 << 31)
> > > #define REG1_BBBB (1 << 30)
> > > #define REG1_CCCC (1 << 29)
> > >
> > > #define PRCM_SOME_REG2_OFFSET 0x20
> > > #define REG2_AAAA (1 << 2)
> > > #define REG2_BBBB (1 << 1)
> > > #define REG2_CCCC (1 << 0)
> > >
> > > #define PRCM_SOME_REG3_OFFSET 0x30
> > >
> > > static unsigned long prcm_vbase;
> > >
> > > #define prcm_readl(r) __raw_readl(prcm_vbase + (r))
> > > #define prcm_writel(v, r) __raw_writel((v), prcm_vbase + (r))
> > >
> > > static int prcm_do_something(void)
> > > {
> > > u32 reg;
> > >
> > > reg = prcm_readl(PRCM_SOME_REG1_OFFSET);
> > > reg |= REG1_BBBB;
> > > prcm_writel(reg, PRCM_SOME_REG1_OFFSET);
> > > }
> > >
> > > static int __init prcm_init(void)
> > > {
> > > if (cpu_is_omap2420())
> > > prcm_vbase = OMAP2420_PRCM_SOME_BASE;
> > > else if (cpu_is_omap2430())
> > > prcm_vbase = OMAP2430_PRCM_SOME_BASE;
> > >
> > > return 0;
> > > }
> > >
> >
> > Thanx for the review. I will work on this, once I come back from
> Japan
> > :). At home, both the 2430 boards are not-booting and I had tough
> time
> > with CSST and switch settings, so was not able to flash bootloader
> on
> > 2430SDP-EVM ES1.0 chips. But it will not be hard to make
> compile-only
> > patch for review.
>
After looking at the files which are needed to change for
prcm_read/write[l], clock.c needs the major update. I hope Richard is
OK with going from __REG32(...) to __raw_read/write[l] based prcm_rw
wrappers?
Anyways, I have started doing that changes for other files.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
next prev parent reply other threads:[~2006-06-11 8:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 11:44 [PATCH] ARM: OMAP: Add minimal OMAP2430 support Komal Shah
2006-06-05 16:54 ` Tony Lindgren
2006-06-06 3:08 ` Komal Shah
2006-06-06 17:58 ` Tony Lindgren
2006-06-11 8:37 ` Komal Shah [this message]
2006-06-11 10:08 ` Juha Yrjölä
-- strict thread matches above, loose matches on Subject: below --
2006-06-11 13:22 Woodruff, Richard
2006-06-11 13:54 ` Juha Yrjölä
2006-06-12 6:43 ` Komal Shah
2006-06-12 16:07 ` Tony Lindgren
2006-06-12 16:35 ` Komal Shah
2006-06-11 13:09 Woodruff, Richard
2006-06-11 12:15 Woodruff, Richard
2006-06-11 12:50 ` Juha Yrjölä
2006-05-21 13:50 Woodruff, Richard
2006-05-18 12:30 Woodruff, Richard
2006-05-21 12:23 ` Komal Shah
2006-05-17 10:50 Komal Shah
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=20060611083756.85274.qmail@web37912.mail.mud.yahoo.com \
--to=komal_shah802003@yahoo.com \
--cc=linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.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