From: David Brownell <dbrownell@users.sourceforge.net>
Minor GPIO cleanups: remove needless #include, and omap_gpio_init()
should be __init, as well as all the board init code calling it.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-fsample.c | 2 +-
arch/arm/mach-omap1/board-h3.c | 2 +-
arch/arm/mach-omap1/board-innovator.c | 2 +-
arch/arm/mach-omap1/board-perseus2.c | 2 +-
arch/arm/plat-omap/gpio.c | 3 +--
5 files changed, 5 insertions(+), 6 deletions(-)diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 62e42c7..f65baa9 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -246,7 +246,7 @@ static void __init fsample_init_smc91x(void)
mdelay(50);
}-void omap_fsample_init_irq(void)
+static void __init omap_fsample_init_irq(void)
{
omap1_init_common_hw();
omap_init_irq();
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 9d2346f..7b260b7 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -455,7 +455,7 @@ static void __init h3_init_smc91x(void)
}
}-void h3_init_irq(void)
+static void __init h3_init_irq(void)
{
omap1_init_common_hw();
omap_init_irq();
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index cb00530..7e63a41 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -308,7 +308,7 @@ static void __init innovator_init_smc91x(void)
}
}-void innovator_init_irq(void)
+static void __init innovator_init_irq(void)
{
omap1_init_common_hw();
omap_init_irq();
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index fa4be96..1d5c8d5 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-oma...
From: David Brownell <dbrownell@users.sourceforge.net>
More GPIO/IRQ cleanup:
- compile-time removal of much useless code
* mpuio support on non-OMAP1.
* 15xx/730/24xx gpio support on 1610
* 15xx/730/16xx gpio support on 24xx
* etc- remove all BUG() calls, which are always bad news ... replaced some
with normal fault reports for that call, others with WARN_ON(1).- small mpuio bugfix: add missing set_type() method
Oh, and fix a minor merge issue: inode->u.generic_ip is now gone.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 166 +++++++++++++++++++++++++++++++++++----------
1 files changed, 130 insertions(+), 36 deletions(-)diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 970439e..948185e 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -267,21 +267,34 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
u32 l;switch (bank->method) {
+#ifdef CONFIG_ARCH_OMAP1
case METHOD_MPUIO:
reg += OMAP_MPUIO_IO_CNTL;
break;
+#endif
+#ifdef CONFIG_ARCH_OMAP15XX
case METHOD_GPIO_1510:
reg += OMAP1510_GPIO_DIR_CONTROL;
break;
+#endif
+#ifdef CONFIG_ARCH_OMAP16XX
case METHOD_GPIO_1610:
reg += OMAP1610_GPIO_DIRECTION;
break;
+#endif
+#ifdef CONFIG_ARCH_OMAP730
case METHOD_GPIO_730:
reg += OMAP730_GPIO_DIR_CONTROL;
break;
+#endif
+#ifdef CONFIG_ARCH_OMAP24XX
case METHOD_GPIO_24XX:
reg += OMAP24XX_GPIO_OE;
break;
+#endif
+ default:
+ WARN_ON(1);
+ return;
}
l = __raw_readl(reg);
if (is_input)
@@ -309,6 +322,7 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
u32 l = 0;switch (bank->method) {
+#ifdef CONFIG_ARCH_OMAP1
case METHOD_MPUIO:
reg += OMAP_MPUIO_OUTPUT;
l = __raw_readl(reg);
@@ -317,6 +331,8 @@ static void _set_gp...
From: Jonathan McDowell <noodles@earth.li>
This appears to be due to the addition of keymapsize to the
omap_kp_platform_data structure. The patch below fixes things up for
the Delta; other boards appear to have already had this done.Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-ams-delta.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index ad6265f..fa2da74 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -182,10 +182,11 @@ static struct resource ams_delta_kp_resources[] = {
};static struct omap_kp_platform_data ams_delta_kp_data = {
- .rows = 8,
- .cols = 8,
- .keymap = ams_delta_keymap,
- .rep = 1,
+ .rows = 8,
+ .cols = 8,
+ .keymap = ams_delta_keymap,
+ .keymapsize = ARRAY_SIZE(ams_delta_keymap),
+ .delay = 9,
};static struct platform_device ams_delta_kp_device = {
--
1.4.4.2-
From: Marek Vasut <marek.vasut@gmail.com>
There is one extra brace in z71 board file, this patch fixes it.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-palmz71.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index d02eb34..5d73e8c 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -251,7 +251,7 @@ static const struct ads7846_platform_data palmz71_ts_info = {
.get_pendown_state = palmz71_get_pendown_state,
};-static struct spi_board_info __initdata palmz71_boardinfo[] = { {
+static struct spi_board_info __initdata palmz71_boardinfo[] = {
{
/* MicroWire (bus 2) CS0 has an ads7846e */
.modalias = "ads7846",
--
1.4.4.2-
Fix typo in gpio
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 948185e..61567ef 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1092,7 +1092,7 @@ static struct irq_chip mpuio_irq_chip = {
.name = "MPUIO",
.ack = mpuio_ack_irq,
.mask = mpuio_mask_irq,
- .unmask = mpuio_unmask_irq
+ .unmask = mpuio_unmask_irq,
.set_type = gpio_irq_type,
};--
1.4.4.2-
From: David Brownell <dbrownell@users.sourceforge.net>
This adds generic support for the "debug board" LEDs used by most of
TI's OMAP reference boards, and board-specific support for the H4.It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2.
Those should be able to switch easily to this version, and clean up
some of the omap1-specific code.In addition to H4 support, one key improvement is supporting not just
the "old" ARM debug LED API (with timer and idle LEDs, plus four that
can be handy for kernel debugging), but it also supports the "new"
generic LED API (most useful for usermode stuff IMO). Either or both
APIs can be enabled.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 1 +
arch/arm/mach-omap2/board-h4.c | 14 ++
arch/arm/plat-omap/Kconfig | 5 +
arch/arm/plat-omap/Makefile | 2 +-
arch/arm/plat-omap/debug-leds.c | 319 +++++++++++++++++++++++++++++++++++++++
5 files changed, 340 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index aab97cc..2a1aca7 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -20,6 +20,7 @@ config MACH_OMAP_GENERIC
config MACH_OMAP_H4
bool "OMAP 2420 H4 board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
+ select OMAP_DEBUG_LEDS if LEDS || LEDS_OMAP_DEBUGconfig MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 1e7ed6d..452193f 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -266,12 +266,26 @@ static struct platform_device h4_lcd_device = {
.id = -1,
};+static struct resource h4_led_resources[] = {
+ [0] = {
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device h4_led_device = {
+ .name = "omap_dbg_led",
+ .id = -1,
+ .num_resources =...
Do we need that in mainline? Why would you not use led subsystem?
--
Dmitry
-
There are two LED subsystems, the new/generic one and the original ARM one.
No matter which one you meant, the answer is that it's already using it. ;)
-
Perhaps there is nothing in CodingStyle for if () continuation
lines. Looks like it is needed. This is ETOOMUCHINDENTATION by
at least one tab. Should be more like:+ if (machine_is_omap_h4()
+ || machine_is_omap_h3()
+ || machine_is_omap_h2()
+ || machine_is_omap_perseus2())fs, eh?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
My stance, || goes at EOL, and final ) not standalone:
if (foo ||
bar ||
baz ||
etc)
do_something;Jan
--
-
-
Yes, but CodingStyle is a just set of guidelines and common practices.
It doesn't cover multi-line if () statements, which is the subject of---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
On Apr 4 2007 14:26, Randy Dunlap (rd) wrote:
David Brownell (db) wrote:
Jan Engelhardt (je) wrote:
je>>>
je>>> My stance, || goes at EOL, and final ) not standalone:
db>>
db>> You are still violating the "only TABs used for indent" rule.
rd>
rd>Yes, but CodingStyle is a just set of guidelines and common practices.
rd>It doesn't cover multi-line if () statements, which is the subject of
rd>the current controvers^W discussion.s/Yes/No/. The example block I posted does use /^\t+/.
Jan
--
-
I don't think it's a MUA thing. I think David is talking about the
spaces after the ^\t that are used for indenting immediately under
the "if".--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Exactly.
if (There was a young lady named Bright
Whose speed was far faster than light) {
She set out one day
in a relative way
}
And returned on the previous nightobeys the only-ident-by-tabs rule, as does
if (To control chain reactions, your odds
Improve if you've got cadmium rods) {
In your fission reactor
Their lack is a factor
}
In screams of "A meltdown! Ye gods!"Now, the former makes it hard to tell what's condition vs consequent.
(Or whatever the correct technical term is in cases like these.)- Dave
-
My fu dictates that continuation lines (line 2 in this example)
should have more indent than line 1, and that the inner block code
(lines 3 and 4) should have more indent than line 2. Using
/^\t+\x20{2,8}/ on continuation line(s) is perfect because it does
not cause either the continuation line(s) or the inner block code to
move too much to the right.Jan
--
-
Yes. Where "indent" is measured -- always!! -- in tabs.
Documentation/Coding style is quite explicit on that point:Outside of comments, documentation and except in Kconfig,
spaces are never used for indentation ...Note also:
Statements longer than 80 columns will be broken into sensible
chunks. Descendants are always substantially shorter than the
parent and are placed substantially to the right. The same applies
to function headers with a long argument list. Long strings are
as well broken into shorter strings.So not just "more" indent, but "substantially more". (Although one
We disagree. The "inner" block should in all cases have one-tab indent.
And CodingStyle says that line 2 should have "substantially more" indent...
Think of it this way: when the condition becomes so complex that it
no longer fits on one line, that block should never be re-indented.
Only the condition needs to be reworked to fit into 80 columns.The entire point of "substantially more" is to stand out from the normal
"indent by one tab" rule" ... so that it's not mistaken for anythingNo, that's a clear violation of CodingStyle on two separate points:
(a) the "always use tabs" rule, (b) the "substantially more" rule.Note also that the notion of using spaces is for indents is clearly
described there as "heresy" .. your fu needs review if not overhaul.- Dave
-
Well, I did not consider that "space" to be indent, as in:
if($previous_line_was_an_if)
($indent, $padding) = (/^(\t+)(\x20{2,})/);If the condition becomes so complex that it's "too complex", it should
You disagree. "We", as in, the kernel coders, though I do not speak for
them, seem to do it much the way I described, judging from the code they
wrote/write.Please see the referenced perl script [1] that heuristically tries to figure
out the number of space-continued (SC) vs. tab-continued (TC) lines (L)
following an if (IF) statement.linux-2.6.21-rc6$ find . -type f -iname '*.[ch]' -print0 | \
xargs -0 cat | ./findcontL:7227630 IF:352877 NOCONT:309465 SC:30395 TC:8689 ##
NOCONT: 87.7% SC:8.6% TC:2.5%(Does not quite add up to 100%, but I'll let someone
else figure that out.)Jan
====
[1] https://svn.ahn.hopto.org/hxtools/trunk/supp/findcont
-
... agree with what I said, since that's exactly what CodingStyle says,
and what essentially every line of kernel code does today. (There areYour eyes are broken then ... or maybe you're focussing exclusively
on code that violates the most basic coding guidelines like:if (...) {
THAT WAS ONE MORE TAB
}and
for (...) {
THAT WAS ALSO ONE MORE TAB
}Come on, stop wasting everyone's time with utter nonsense.
- Indent always uses tabs
- When breaking long lines (including long conditions)
* STILL indent with tabs
* ... and more than one, to be "substantially" more indentedThat's what Documentation/CodingStyle says **TODAY** so stop with the flamage.
-
Hello David,
Sorry? I could have simply told you to look into kernel/signal.c LINE
220 (that's in the recalc_sigpending_tsk() function), to see that
THERE IS code which uses /^\t+\x20/ to indent wrapped if continuation
lines:fastcall void recalc_sigpending_tsk(struct task_struct *t)
{
if (t->signal->group_stop_count > 0 ||
(freezing(t)) ||
PENDING(&t->pending, &t->blocked) ||
PENDING(&t->signal->shared_pending, &t->blocked))
set_tsk_thread_flag(t, TIF_SIGPENDING);
else
clear_tsk_thread_flag(t, TIF_SIGPENDING);
}And this is not the only function. But since I figured you would
...I wrote that script that actually proves my point (minus script
bugs - errare est humanum) that \t+\x20 is PREDOMINANT in kernel
code. Whether that invalidates what CodingStyle says is another
debate (which at best Randy just decides and sends a patch for whichI was never debating these two things. I was, however, if you have
not noticed yet, about wrapped if lines:if (foo ||
continuation_with_2_or_more_spaces)
code_with_1_tab;
and
if (foo ||
continuation_with_2_tabs)
code_with_1_tab;The former is what kernel code does "**TODAY**".
Thank you.
Jan
--
-
Actually, you did. Go back and see the point I was specifically
disagreeing with. It related to the body of the "if" block,
which you had said would **NOT** indent by a single tab.
-
Ok somewhere is a bug. What is the body an if block, for you? To avoid
that confusion, I termed these "condition" and "code":if(condition1 || /* if() line */
condition2) { /* continuation line */
code; /* body */
code; /* body */
}And I think I made that pretty clear in <http://lkml.org/lkml/2007/4/5/293>,
which part is what, and how I like things.
In <http://lkml.org/lkml/2007/4/6/133>, the loop begins then.
Yes, it does not match "(a) only use tabs", but it matches the
rest of kernel code.Jan
--
-
David Brownell wrote:
I usually indent this way if expressions exceed the 80 columns limit:
if (foo___________ &&
bar___________) {
doit;
}
and
if ((one___________ ||
one_and_a_half) &&
two___________) {
doit;
}
and
call(abc_______,
def___);
andstatic int definition(abc_______,
def___)
{
...and I know I'm not the only one. Yes, this means I indent with tabs and
spaces --- if I wrap within expressions or within lists of function
arguments. Of course there are always leading tabs before spaces, never
leading spaces.PS: Everyone please try to avoid blowing CodingStyle up to a 200 pages
document. Thanks.
--
Stefan Richter
-=====-=-=== -=-- --==-
http://arcgraph.de/sr/
-
---
I disagree vigorously - the operators should be at the front of the
line, so that the logical structure is clear. [The editor I'm doing
this in won't let me use tabs, so I won't even try to do an
example...]As other people have noted in this thread, it's a rule that would earn
Emerson's "foolish consistency" label, if it actually were followed
slavishly. In fact, the kernel looks like people tend to do the right
thing, rather than always following the letter of the law.Tab indenting is a good rule for the general case, but there are also
places (and breaking long conditionals is at the top of the list)
where it's much more important to express the structure, and the
structure has too many logical sub-points to line up with the
relatively small number of 8-space tabs available in an 80-character
line.Of course, expressions too complicated to fit the rule are also a sign
that you might want to simplify things...scott
-
Please change your coding style to conform to Documentation/CodingStyle.
*** Only indent with tabs!! ***
Every one of those examples violates that simple rule.
Why does *anyone* have even the slightest difficulty understanding such a
simple rule? I realize that two of those words have more than a singleBetter yet, try to stick to its guidelines rather than growing lots of
exceptions saying when your personal style says you ought to use spaces
instead of tabs for indents, etcRandy, next time you criticise coding style, please make sure that the
code in question actually violates the existing rules first ... this
thread has been way too much noise, given that the usage you criticized
was in full conformance with that document, and the proposed fixes were
in blatant violation ...- Dave
-
David,
please stop to be more Catholic than the Pope.
commit 0aa599c5644fddd3052433c5335260108a8a39a2
drivers/usb/net/usbnet.hhttp://tglx.de/private/tglx/usbnet.png
/me recommends emacs-develock.el for colorful white space wreckage
display !You probably want to look at more files contributed by david-b before
you look at mine :)tglx
-
Then I'd have to switch to EMACS ... no thanks! ;)
At the risk of switching to a VI/EMACS flamewar (could that be
an improvement?) "let c_space_errors=1" shows the same sort of
thing ... albeit a bit more usefully, it just highlights the
single useless space character at the beginning of that line.I last touched that header in 2005 ... next time I have reason to
touch it, I'll likely fix that little thing! Patches accepted. :)This particular issue doesn't actually affect indentation, since the
tab trumps that space. So it's a bit off-agenda for this particular
flamage. I tend to fix such space errors whenever I trip over them;
e.g. "git show 438d6c2c015cf63bf7e9bdc2033d435433ac8455".- Dave
-
Here is what I have in my .vimrc:
highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/--
Dmitry
-
David,
How does your own rule make SPACE-TAB-TAB more acceptable than
TAB-TAB-SPACE ? Just because TAB trumps the space but not the other way
round ?You started nitpicking, so please accept the backfire.
tglx
P.S: Please remove me from CC. I regret already, that I dragged myself
into this highly sophisticated and useful waste of electrons. I just had
that file opened in my favorite editor while I was skimming through
LKML.-
Because when you display the text, it doesn't affect the
alignment == indentation. In fact you have to turn on
nonstandard editor options to even see if this happened.
Not everyone does so, which is why such things persist.So in practical terms "\n \t" and "\n\t" are identical;
although the former "should not" be used, it doesn't
actually affect what CodingStyle is primarily trying to-
That's not what CodingStyle is trying to control. Not "what the
code looks like" at all.Think why this line is here at the end of Chapter 1.
Get a decent editor and don't leave whitespace at the end of lines.
By the way, "git show --color 0aa599c -- drivers/usb/net/usbnet.h"
would catch this kind of breakage if you have git.-
That's news to many folk. "What the code looks like" has always
been the fundamental reason to have coding conventions. If you
look at coding convention documents over the last fifty years or
so you will notice that's what they're about ... even back in the
days when "text" came on punched cards or line printer output.The "extraneous hidden whitespace" stuff is sort of a new issue.
I happened across a discussion of it on the GCC list last month ...
it's a meme that wasn't widespread even five years ago.That "get a decent editor" thing is because some editors are so deeply
broken that they think it's actually OK to replace tabs with whitespace,
or automatically add extraneous whitespace. Also, because some emailer
tools do the same thing. (Yet another reason to dislike Microsoft, sigh.)Secondarily, it's also because having "hidden" spaces can cause hassles
when maintaining code.Me, i've always been offended by all the wasted disk space, but I think
I'm a minority there. ;)- Dave
-
Tabs should be used for indent, not padding. People wanting to use
different-sized tabs can change settings in their editor, i.e.
to make a tab 12 instead of 8. Or 6. Or whatever. If tabs only ever
appear at the front, this works, it breaks when tabs are used to line
up foo->bar=1; foo->boom=17; statements.Jan
--
-
Precisely.
If someone really likes
if (a &&
b)or
if (
a
&&
b
)then let be it (in his/her code), but please don't fight
if (a &&
b)Just make sure only tabs are used for indent, i.e., the last is:
\t*if (a &&
\t*\s\s\s\sb)another example:
\t*if (condition1 && (a +
\t* b))
^^^^^^^^^^^^^^^^^^^ <<< spaces, not tabsI think the current CodingStyle is clear enough but improvements there
aren't prohibited.
--
Krzysztof Halasa
-
Or in other words:
- When a new scope is opened, increase indentations by 8 characters.
Use a tab for that.
- When wrapping within an expression, start the new line at the same
column at which the (sub-)expression started.I won't change this anymore in any legacy code I write patches for. But
I also won't stand in the way of anybody who happens to submit patches/Does/ anybody have difficulties?
What I said at the top of this posting has not been newly grown recently
but has been common practice for many years. It's not my personal style.(Note, I'm not saying one style is better than the other, nor am I
saying that only one style can be allowed, nor am I saying that it's
fine to have several different styles.)
--
Stefan Richter
-=====-=-=== -=-- --==-
http://arcgraph.de/sr/
-
Yeah, well, I've already given up. But please try to understand,
David, that CodingStyle can have mistakes in it, just like some of
the kernel code does. And like I said earlier, it's just a set of
guidelines.And I haven't seen any flamage here (referring to another posting).
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
[I can't believe I'm stepping into an indentation flamewar, but here goes...]
> Please change your coding style to conform to Documentation/CodingStyle.
>
> *** Only indent with tabs!! ***
>
> Every one of those examples violates that simple rule.Yes, Documentation/CodingStyle says that we should only indent with
tabs. However, that simple rule has to be interpreted with some
common sense, and the case of multi-line if conditions is definitely a
case where using only tabs makes code much less readable.If you want an excuse, you could say that in code like
if (foo___________ &&
bar___________) {
doit;that the line with "bar" on it is properly indented with one tab
(since it is part of the if statement that is also indented one tab),
and then four spaces are used to align the "bar" with the previous
line. So only tabs are used for indentation, and the spaces after the
tab are used for alignment, and the letter of the law is observed.If you have a git tree handy, you can do "git show 68380b58" and see
that Linus himself wrote:if (get_wq_data(work) == cwq
&& work_pending(work)
&& !list_empty(&work->entry)) {I have to admit that I would have put the &&s at the ends of the
previous lines rather than where Linus put them, but... egads! Linus
put spaces before the &&s to line them up nicely!"more in the breach" and all that I guess...
- R.
-
---
I'm happy to see Linus did it exactly the way I would have...
So, perhaps the rule in CodingStyle should be clarified to say that
indentation is used to show nesting depth and always expressed in TAB
characters, but additional spacing may be used following the
structural TABs to appropriately format continuation lines...scott
-
At least you weren't the target of attacks there ... for daring to
Having a style guide is supposed to mean, among other things, that
Yeah, well even the chief penguin wrangler has occasionally
admitted to human imperfections. Not exclusively related toI approve in particular of that location: beginning of line, where
they aren't masking the intent of the condition from a casual scan.
If there's a "right" place, that's it.In particular, if you see lots of "&&" or "||" neatly lined up it
helps you understand something about when the conditional's bodyYeah, nobody likes style nazis. On the other hand, it's rather
unusual to be the target of style nazism for actually following
the style guide!! You'd think that maybe the folk objecting to
that style guide might maybe choose a more direct way to address
their particular frustrations, eh? :)- Dave
-
About time...
http://en.wikipedia.org/wiki/Godwin%27s_LawJan
--
-
With respect to coding style discussions, "style nazi" happens to be
what's called a "term of art".But if your invocation of Godwin's law helps stop this, I'll be glad.
-
On Fri, 2007-04-06 at 14:38 -0700, Roland Dreier wrote:
My favorite form uses only tabs and would make that look like:
if(
get_wq_data(work) =3D=3D cwq &&
work_pending(work) &&
!list_empty(&work->entry)
) {
...
...
}Putting the && at the front would be OK with me too, it does make them
more obvious and easier to find.I don't find too many people who like my style but that's OK. I think
it makes everything a lot easier to read and everything lines up with
8-space tabs or 2 or 3 space tabs. Plus, reformatting other people's
code gives me a good chance to read it as I go. :-)
--=20
Zan Lynx <zlynx@acm.org>
Spaces are used to indent all over the kernel; using a few spaces to pad
out some indentation into the proper place is accepted practice,
regardless of what CodingStyle says. The most important rule probably
needs to be explicitly added:Break any of these rules sooner than say anything outright barbarous.[1]
Though the first para of CodingStyle is very clear that it is a set of
guidelines rather than strict rules.J
1: http://www.k-1.com/Orwell/index.cgi/work/essays/language.html
-
Not universally. And I must say it feels wrong to be the target of even
-
Yes. And the second one is just ugly IMHO.
That's why 3 of us (IIRC) have suggested using a few spaces onbut I'm ready to drop it and hope that I never have to look at
that code. :)--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
I personally ident multi-line conditionals in "if" and "while" with
tabs to the keyword level, then pad with spaces so 2nd+ line starts in
the same column as first part of the condition (i.e one column to the
right from opening paren). Logical operation goes to EOL.Also with multi-line condition and single-line body I often use braces
to separate them better.--
Dmitry
-
That's clearly wrong -- it uses non-tab characters for indents.
Which means that unless you think
if (this_longthing
|| that longthing
|| another
...)
the condition;That basically means "after subsys init and before other drivers", yes?
For platform level init code, that's a fairly significant category.- Dave
-
Maybe it should have an alias then?
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
From: David Brownell <dbrownell@users.sourceforge.net>
Additional cleanup for debug boards on H2/P2/H3/H4: move the init
code that's not board-specific into a new file where it can be easily
shared between all the different boards (avoiding code duplication,
and making it easier to support more devices). Make H4 use that.This should be easy to drop in to the OMAP1 boards using these debug
cards; the only difference seems to be that the p2 does an extra reset
of the smc using the fpga (probably all boards could do that, if it's
necessary) and doesn't use the gpio mux or request APIs.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 2 +-
arch/arm/mach-omap2/board-h4.c | 46 +------------------
arch/arm/plat-omap/Kconfig | 9 +++-
arch/arm/plat-omap/Makefile | 1 +
arch/arm/plat-omap/debug-devices.c | 86 ++++++++++++++++++++++++++++++++++++
include/asm-arm/arch-omap/board.h | 4 ++
6 files changed, 102 insertions(+), 46 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 2a1aca7..4c90cc7 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -20,7 +20,7 @@ config MACH_OMAP_GENERIC
config MACH_OMAP_H4
bool "OMAP 2420 H4 board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
- select OMAP_DEBUG_LEDS if LEDS || LEDS_OMAP_DEBUG
+ select OMAP_DEBUG_DEVICESconfig MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 452193f..f125f43 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -131,26 +131,6 @@ static struct platform_device h4_flash_device = {
.resource = &h4_flash_resource,
};-static struct resource h4_smc91x_resources[] = {
- [0] = {
- .start = OMAP24XX_ETHR_START, /* Physical */
- .end = OMAP24XX_ET...
From: Syed Mohammed Khasim <x0khasim@ti.com>
This patch adds minimal OMAP2430 support to get the kernel booting on 2430SDP.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 8 +
arch/arm/mach-omap2/Makefile | 1 +
arch/arm/mach-omap2/board-2430sdp.c | 226 +++++++++++++++++++++++++++++
arch/arm/mach-omap2/devices.c | 2 +-
arch/arm/mach-omap2/gpmc.c | 7 +
arch/arm/mach-omap2/id.c | 6 +
arch/arm/mach-omap2/io.c | 20 +++
include/asm-arm/arch-omap/board-2430sdp.h | 41 +++++
include/asm-arm/arch-omap/hardware.h | 4 +
include/asm-arm/arch-omap/io.h | 10 ++
include/asm-arm/arch-omap/irqs.h | 1 +
include/asm-arm/arch-omap/omap24xx.h | 12 ++
12 files changed, 337 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 4c90cc7..47c8b57 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -10,6 +10,10 @@ config ARCH_OMAP2420
depends on ARCH_OMAP24XX
select OMAP_DM_TIMER+config ARCH_OMAP2430
+ bool "OMAP2430 support"
+ depends on ARCH_OMAP24XX
+
comment "OMAP Board Type"
depends on ARCH_OMAP2@@ -25,3 +29,7 @@ config MACH_OMAP_H4
config MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
+
+config MACH_OMAP_2430SDP
+ bool "OMAP 2430 SDP board"
+ depends on ARCH_OMAP2 && ARCH_OMAP24XX
\ No newline at end of file
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 266d88e..b05b738 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -14,5 +14,6 @@ obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o
# Specific board support
obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
+...
From: David Brownell <dbrownell@users.sourceforge.net>
H4 has two peripheral ports, one for "download" and one for OTG.
The one to use is selected through Kconfig.NOTE: not yet working; I suspect there's a clock still turned off
or something like that, since neither port responds.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 21 ++++++++++++++++++
arch/arm/mach-omap2/board-h4.c | 46 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 47c8b57..d4a366d 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -26,6 +26,27 @@ config MACH_OMAP_H4
depends on ARCH_OMAP2 && ARCH_OMAP24XX
select OMAP_DEBUG_DEVICES+config MACH_OMAP_H4_OTG
+ bool "Use USB OTG connector, not device connector (S1.10)"
+ depends on MACH_OMAP_H4
+ help
+ Set this if you've set S1.10 (on the mainboard) to use the
+ Mini-AB (OTG) connector and OTG transceiver with the USB0
+ port, instead of the Mini-B ("download") connector with its
+ non-OTG transceiver.
+
+ Note that the "download" connector can be used to bootstrap
+ the system from the OMAP mask ROM. Also, since this is a
+ development platform, you can also force the OTG port into
+ a non-OTG operational mode.
+
+config MACH_OMAP2_H4_USB1
+ bool "Use USB1 port, not UART2 (S3.3)"
+ depends on MACH_OMAP_H4
+ help
+ Set this if you've set SW3.3 (on the CPU card) so that the
+ expansion connectors receive USB1 signals instead of UART2.
+
config MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index f125f43..b1cebdd 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -278,7 +278,11 @@ s...
Hmm, it would be nice to merge this with patch that makes it
working... for easier review.No c++ comments, please... but I somehow suspect this one is fixed
later in series.--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
I've merged the later fixes into this patch, please see the reposted
series and renumbered patch:[PATCH 1/7] ARM: OMAP: USB peripheral support on H4
That was fixed in the later patch too.
Regards,
Tony
-
From: =?utf-8?q?Marek_Va=C5=A1ut?= <marek.vasut@gmail.com>
This patch adds board file and necessary includes for Palm Tungsten|T.
Signed-off-by: Marek Va
Eek2.
Marek, I guess it would be easier to use your name without
diacritics... Otherwise it probably needs to be utf-8, but not
mime-damaged.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
As I see it, that eek2 is correct UTF-8, and since the body charset was
utf-8 I don't see this as a problem.As far as the first goes, doesn't git parse qp-encoded From lines?
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
-
I do not think eek2 is correct utf-8. It seems to short for that. (It
should be s with v over it.Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
BTW, your mailer appears to be rather broken.
The thread previous to your reply was being sent to Marek Vašut
MarekVa@ucw.cz, which returns a non-delivery error.--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
-
And yes, it seems mutt on zaurus is really broken; sorry about that,
I'll try to be more careful in future.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
Which is precisely what I see when viewing the message in an entirely
utf-8 based environment using mutt, whether that be the original message,
your message, my reply to your message, your subsequent reply, or even
while composing this reply.However, on my VT console, the š displays as an inverse ? since it's
missing the correct glyph in its font - maybe that's the problem you're
seeing?--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
-
It is correct. From the original raw message:
| Content-Type: text/plain; charset=UTF-8
| Content-Transfer-Encoding: quoted-printable
[…]
| Signed-off-by: Marek Va=C5=A1ut <marek.vasut@gmail.com>0xC5 0xA1 is an UTF-8-encoded U+0161 LATIN SMALL LETTER S WITH CARON.
--
ilmari
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen
-
From: =?utf-8?q?Marek_Va=C5=A1ut?= <marek.vasut@gmail.com>
This patch makes minor changes in palmz71 board file (formating changes) and
renames one GPIO (PALMZ71_PINTDAV_GPIO to PALMZ71_PENIRQ_GPIO) in
board-palmz71.h and board-palmz71.c .Signed-off-by: Marek Va
From: Syed Mohammed Khasim <x0khasim@ti.com>
This patch adds minimal OMAP2430 support to plat-omap files to
get the kernel booting on 2430SDP.Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/devices.c | 6 +++-
arch/arm/plat-omap/dmtimer.c | 2 +
arch/arm/plat-omap/gpio.c | 76 ++++++++++++++++++++++++++++++++++-------
arch/arm/plat-omap/mcbsp.c | 15 +++++---
4 files changed, 80 insertions(+), 19 deletions(-)diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index dbc3f44..eeb33fe 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -429,6 +429,10 @@ static inline void omap_init_rng(void) {}
*/
static int __init omap_init_devices(void)
{
+/*
+ * Need to enable relevant once for 2430 SDP
+ */
+#ifndef CONFIG_MACH_OMAP_2430SDP
/* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
@@ -438,7 +442,7 @@ static int __init omap_init_devices(void)
omap_init_uwire();
omap_init_wdt();
omap_init_rng();
-
+#endif
return 0;
}
arch_initcall(omap_init_devices);
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 45f0439..659619f 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -506,6 +506,8 @@ int omap_dm_timer_init(void)
BUG_ON(dm_source_clocks[i] == NULL);
}
#endif
+ if (cpu_is_omap243x())
+ dm_timers[0].phys_base = 0x49018000;for (i = 0; i < dm_timer_count; i++) {
#ifdef CONFIG_ARCH_OMAP2
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 61567ef..eb9245b 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -85,10 +85,17 @@
/*
* omap24xx specific GPIO registers
*/
-#define OMAP24XX_GPIO1_BASE (void __iomem *)0x48018000
-#define OMAP24XX_GPIO2_BASE (void __iomem *)0x4801a000
-#define OMAP24XX_G...
From: Vladimir Ananiev <vovan888@gmail.com>
This adds basic support for Siemens SX1. More patches are available,
with video driver, mixer, and serial ports working. That is enough to
do gsm calls with right userland.Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/Kconfig | 11 +
arch/arm/mach-omap1/Makefile | 1 +
arch/arm/mach-omap1/board-sx1.c | 494 +++++++++++++++++++++++++++++++++
include/asm-arm/arch-omap/board-sx1.h | 46 +++
include/asm-arm/arch-omap/hardware.h | 4 +
5 files changed, 556 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index c3f2b20..96e3bb3 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -104,6 +104,17 @@ config MACH_OMAP_PALMTT
http://www.hackndev.com/palm/tt/ for more information.
Say Y here if you have this PDA model, say N otherwise.+config MACH_SX1
+ bool "Siemens SX1"
+ depends on ARCH_OMAP1 && ARCH_OMAP15XX
+ help
+ Support for the Siemens SX1 phone. To boot the kernel,
+ you'll need a SX1 compatible bootloader; check out
+ http://forum.oslik.ru and
+ http://www.handhelds.org/moin/moin.cgi/SiemensSX1
+ for more information.
+ Say Y here if you have such a phone, say NO otherwise.
+
config MACH_NOKIA770
bool "Nokia 770"
depends on ARCH_OMAP1 && ARCH_OMAP16XX
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index d008c7e..6ebed81 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
obj-$(CONFIG_MACH_OMAP_PALMTT) += board-palmtt.o
obj-$(CONFIG_MACH_NOKIA770) += board-nokia770.o
obj-$(CONFIG_MACH_AMS_DELTA) += board-ams-delta.o
+obj-$(CONFIG_MACH_SX1) += board-sx1.oifeq ($(CONFIG_ARCH_OMAP15XX),y)
# Innovator-1510 FPGA
diff --git a/arch/arm/mach-omap1/board...
From: Syed Mohammed Khasim <x0khasim@ti.com>
This patch enables I2C-2 support for 2430 SDP.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/devices.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index cb5e775..bc42a7d 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -52,11 +52,13 @@ static struct platform_device omap_i2c_device2 = {
static void omap_init_i2c(void)
{
/* REVISIT: Second I2C not in use on H4? */
- if (machine_is_omap_h4() || machine_is_omap_2430sdp())
+ if (machine_is_omap_h4())
return;- omap_cfg_reg(J15_24XX_I2C2_SCL);
- omap_cfg_reg(H19_24XX_I2C2_SDA);
+ if (!cpu_is_omap2430()) {
+ omap_cfg_reg(J15_24XX_I2C2_SCL);
+ omap_cfg_reg(H19_24XX_I2C2_SDA);
+ }
(void) platform_device_register(&omap_i2c_device2);
}--
1.4.4.2-
From: Andrzej Zaborowski <balrog@zabor.org>
Wait a fixed amount of time between writing to the columns
register and reading rows state to allow the keypad to respond
on Palm Tungsten E and Zire 71. The value for Zire 71 keypad
was tested by Marek Vasut.Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-palmz71.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 786142b..54abbaa 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -76,6 +76,7 @@ static struct omap_kp_platform_data palmz71_kp_data = {
.cols = 8,
.keymap = palmz71_keymap,
.rep = 1,
+ .delay = 80,
};static struct resource palmz71_kp_resources[] = {
--
1.4.4.2-
From: David Brownell <dbrownell@users.sourceforge.net>
Speedup and shrink GPIO irq handling code, by using a pointer
that's available in the irq_chip structure instead of calling
the get_gpio_bank() function. On OMAP1 this saves 44 words,
most of which were in IRQ critical path methods. Hey, every
few instructions help.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index eb9245b..83613f7 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -584,7 +584,7 @@ static int gpio_irq_type(unsigned irq, unsigned type)
&& (type & (IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH)))
return -EINVAL;- bank = get_gpio_bank(gpio);
+ bank = get_irq_chip_data(irq);
spin_lock(&bank->lock);
retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type);
if (retval == 0) {
@@ -823,7 +823,7 @@ static int gpio_wake_enable(unsigned int irq, unsigned int enable)if (check_gpio(gpio) < 0)
return -ENODEV;
- bank = get_gpio_bank(gpio);
+ bank = get_irq_chip_data(irq);
retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable);return retval;
@@ -1038,7 +1038,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
static void gpio_irq_shutdown(unsigned int irq)
{
unsigned int gpio = irq - IH_GPIO_BASE;
- struct gpio_bank *bank = get_gpio_bank(gpio);
+ struct gpio_bank *bank = get_irq_chip_data(irq);_reset_gpio(bank, gpio);
}
@@ -1046,7 +1046,7 @@ static void gpio_irq_shutdown(unsigned int irq)
static void gpio_ack_irq(unsigned int irq)
{
unsigned int gpio = irq - IH_GPIO_BASE;
- struct gpio_bank *bank = get_gpio_bank(gpio);
+ struct gpio_bank *bank = get_irq_chip_data(irq);_clear_gpio_irqstatus(bank, gpio);
}
@@ -1054,7 +1054,7...
From: Komal Shah <komal_shah802003@yahoo.com>
Replace OMAP1610 to OMAP2420.
Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/board-h4.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h
index 7ef664b..6cfc8e3 100644
--- a/include/asm-arm/arch-omap/board-h4.h
+++ b/include/asm-arm/arch-omap/board-h4.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-omap/board-h4.h
*
- * Hardware definitions for TI OMAP1610 H4 board.
+ * Hardware definitions for TI OMAP2420 H4 board.
*
* Initial creation by Dirk Behme <dirk.behme@de.bosch.com>
*
--
1.4.4.2-
From: David Brownell <dbrownell@users.sourceforge.net>
GPIO and MPUIO wake updates:
- Hook MPUIOs into the irq wakeup framework too. This uses a platform
device to update irq enables during system sleep states, instead of
a sys_device, since the latter is no longer needed for such things.- Also forward enable/disable irq wake requests to the relevant GPIO
controller, so the top level IRQ dispatcher can (eventually) handle
these wakeup events automatically if more than one GPIO pin needs to
be a wakeup event source.- Minor tweak to the 24xx non-wakeup gpio stuff: no need to check such
read-only data under the spinlock.This assumes (maybe wrongly?) that only 16xx can do GPIO wakeup; without
a 15xx I can't test such stuff.Also this expects the top level IRQ dispatcher to properly handle requests
to enable/disable irq wake, which is currently known to be wrong: omap1
saves the flags but ignores them, omap2 doesn't even save it. (Wakeup
events are, wrongly, hardwired in the relevant mach-omapX/pm.c file ...)
So MPUIO irqs won't yet trigger system wakeup.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 93 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 83 insertions(+), 10 deletions(-)diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 83613f7..7e90cea 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -773,29 +773,35 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
{
switch (bank->method) {
#ifdef CONFIG_ARCH_OMAP16XX
+ case METHOD_MPUIO:
case METHOD_GPIO_1610:
spin_lock(&bank->lock);
- if (enable)
+ if (enable) {
bank->suspend_wakeup |= (1 << gpio);
- else
+ enable_irq_wake(bank->irq);
+ } else {
+ disable_irq_wake(bank->irq);
bank->suspend_wakeup &= ~(1 << gpio);
+ }...
This patch syncs omap specific headers with linux-omap.
Most of the changes needed because of bitrot caused by
driver changes in linux-omap tree. Integrating this
is needed for adding support for various omap drivers.Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/aic23.h | 4 +-
include/asm-arm/arch-omap/board-apollon.h | 9 -
include/asm-arm/arch-omap/board-h4.h | 3 -
include/asm-arm/arch-omap/board.h | 41 +++--
include/asm-arm/arch-omap/dsp.h | 250 -----------------------------
include/asm-arm/arch-omap/dsp_common.h | 32 ++--
include/asm-arm/arch-omap/gpio-switch.h | 54 ++++++
include/asm-arm/arch-omap/gpmc.h | 2 +
include/asm-arm/arch-omap/hardware.h | 9 +
include/asm-arm/arch-omap/io.h | 11 ++
include/asm-arm/arch-omap/irqs.h | 19 ++-
include/asm-arm/arch-omap/lcd_lph8923.h | 14 --
include/asm-arm/arch-omap/lcd_mipid.h | 24 +++
include/asm-arm/arch-omap/led.h | 24 +++
include/asm-arm/arch-omap/mcspi.h | 1 -
include/asm-arm/arch-omap/memory.h | 13 ++
include/asm-arm/arch-omap/menelaus.h | 17 ++-
include/asm-arm/arch-omap/omap16xx.h | 12 +-
include/asm-arm/arch-omap/omap24xx.h | 9 +
include/asm-arm/arch-omap/omapfb.h | 131 +++++++++------
include/asm-arm/arch-omap/sram.h | 4 +-
include/asm-arm/arch-omap/usb.h | 40 ++++-
22 files changed, 334 insertions(+), 389 deletions(-)diff --git a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h
index 6513065..aec2d65 100644
--- a/include/asm-arm/arch-omap/aic23.h
+++ b/include/asm-arm/arch-omap/aic23.h
@@ -110,7 +110,7 @@
#define TLV320AIC23ID1 (0x1a) // cs low
#define TLV320AIC23ID2 (0x1b) // cs high-void tlv320aic23_power_up(void);
-void tlv320aic23_power_down(void);
+void aic23_power_up(void);
+void aic23_power_down(void...
This patch syncs omap specific core code with linux-omap.
Most of the changes are needed to fix bitrot caused by
driver updates in linux-omap tree.Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/Kconfig | 17 ++--
arch/arm/mach-omap1/Makefile | 5 +-
arch/arm/mach-omap1/devices.c | 71 +++++++++------
arch/arm/mach-omap2/Kconfig | 27 +++++-
arch/arm/mach-omap2/Makefile | 7 ++
arch/arm/mach-omap2/devices.c | 60 +++++++++++-
arch/arm/mach-omap2/gpmc.c | 12 ++-
arch/arm/mach-omap2/io.c | 24 +++++-
arch/arm/plat-omap/Kconfig | 8 ++
arch/arm/plat-omap/Makefile | 12 +++-
arch/arm/plat-omap/common.c | 8 ++-
arch/arm/plat-omap/devices.c | 70 ++++++++++++++-
arch/arm/plat-omap/dmtimer.c | 2 +-
arch/arm/plat-omap/fb.c | 72 ++++++++++++----
arch/arm/plat-omap/sram.c | 77 ++++++++++-------
arch/arm/plat-omap/usb.c | 199 ++++++++++++++++++++++++++++++++--------
16 files changed, 525 insertions(+), 146 deletions(-)diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 96e3bb3..0002de8 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -22,6 +22,7 @@ comment "OMAP Board Type"
config MACH_OMAP_INNOVATOR
bool "TI Innovator"
depends on ARCH_OMAP1 && (ARCH_OMAP15XX || ARCH_OMAP16XX)
+ select OMAP_MCBSP
help
TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
have such a board.
@@ -29,6 +30,7 @@ config MACH_OMAP_INNOVATOR
config MACH_OMAP_H2
bool "TI H2 Support"
depends on ARCH_OMAP1 && ARCH_OMAP16XX
+ select OMAP_MCBSP
help
TI OMAP 1610/1611B H2 board support. Say Y here if you have such
a board.
@@ -36,6 +38,7 @@ config MACH_OMAP_H2
config MACH_OMAP_H3
bool "TI H3 Support"
depends on ARCH_OMAP1 && ARCH_OMAP16XX
+ select GPIOEXPANDER_OMAP
help
TI OMAP 1710 H3 board support. Say Y here if you have such
a board.
@...
This patch syncs omap board specific files with linux-omap.
Patch consists mostly of driver updates done in linux-omap
tree for drivers not yet in mainline kernel.Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-ams-delta.c | 59 +++++++-----
arch/arm/mach-omap1/board-h2.c | 79 ++++++++++++++
arch/arm/mach-omap1/board-h3.c | 41 ++++++++
arch/arm/mach-omap1/board-nokia770.c | 53 ++++++++--
arch/arm/mach-omap1/board-osk.c | 1 +
arch/arm/mach-omap1/board-palmte.c | 123 ----------------------
arch/arm/mach-omap1/board-palmtt.c | 4 +-
arch/arm/mach-omap1/board-palmz71.c | 14 ++--
arch/arm/mach-omap1/board-voiceblue.c | 2 +-
arch/arm/mach-omap2/board-h4.c | 180 +++++++++++++++++++++++++++++++--
10 files changed, 380 insertions(+), 176 deletions(-)diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index fa2da74..c73ca61 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -34,20 +34,20 @@ static u8 ams_delta_latch1_reg;
static u16 ams_delta_latch2_reg;static int ams_delta_keymap[] = {
- KEY(0, 0, KEY_F1), /* Advert */
+ KEY(0, 0, KEY_F1), /* Advert */- KEY(3, 0, KEY_COFFEE), /* Games */
+ KEY(3, 0, KEY_COFFEE), /* Games */
KEY(2, 0, KEY_QUESTION), /* Directory */
- KEY(3, 2, KEY_CONNECT), /* Internet */
- KEY(2, 1, KEY_SHOP), /* Services */
- KEY(1, 1, KEY_PHONE), /* VoiceMail */
+ KEY(3, 2, KEY_CONNECT), /* Internet */
+ KEY(2, 1, KEY_SHOP), /* Services */
+ KEY(1, 1, KEY_PHONE), /* VoiceMail */- KEY(1, 0, KEY_DELETE), /* Delete */
- KEY(2, 2, KEY_PLAY), /* Play */
- KEY(0, 1, KEY_PAGEUP), /* Up */
- KEY(3, 1, KEY_PAGEDOWN), /* Down */
- KEY(0, 2, KEY_EMAIL), /* ReadEmail */
- KEY(1, 2, KEY_STOP), /* Stop */
+ KEY(1, 0, KEY_DELETE), /* Delete */
+ KEY(2, 2, KEY_PLAY), /* Play */
+ KEY(0, 1, KEY_PAGEUP), /* Up */
+ KEY(3, 1, KEY_P...
Updating system time and reprogramming timer can cause latency
issues on busy systems with lots of interrupts with constant
updating of time and reprogramming the system timer.If a non-timer dyntick interrupt happens within a jiffy from
the last interrupt, updating time and reprogramming the timer
is unnecessary as we will get a timer interrupt soon anyways.Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/timer32k.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index 2653106..c37d7b4 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -219,6 +219,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id)static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id)
{
+ unsigned long now;
+
+ now = omap_32k_sync_timer_read();
+
+ /* Don't bother reprogramming timer if last tick was before next
+ * jiffie. We will get another interrupt when previously programmed
+ * timer expires. This cuts down interrupt load quite a bit.
+ */
+ if (now - omap_32k_last_tick < OMAP_32K_TICKS_PER_HZ)
+ return IRQ_HANDLED;
+
return _omap_32k_timer_interrupt(irq, dev_id);
}--
1.4.4.2-
Tabify mux.c
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/mux.c | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 0439906..0575097 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -53,8 +53,8 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1)
MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1)/* 24xx GPMC chipselects, wait pin monitoring */
-MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1)
-MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1)
+MUX_CFG_24XX("E2_GPMC_NCS2", 0x08e, 0, 1, 1, 1)
+MUX_CFG_24XX("L2_GPMC_NCS7", 0x093, 0, 1, 1, 1)
MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1)
MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1)
MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1)
@@ -67,18 +67,18 @@ MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1)
MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1)/* 24xx GPIO */
-MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
-MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1)
-MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
-MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
-MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
-MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1)
-MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
-MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
+MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
+MUX_CFG_24XX("P21_242X_GPIO12", 0x0ca, 3, 0, 0, 1)
+MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
+MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
+MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
+MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1)
+MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
+MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
MUX_CFG_2...
From: David Brownell <dbrownell@users.sourceforge.net>
Add init support for the TUSB6010 EVM board, as connected to H4.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/usb-tusb6010.c | 333 ++++++++++++++++++++++++++++++++++++
1 files changed, 333 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
new file mode 100644
index 0000000..5f276c5
--- /dev/null
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -0,0 +1,333 @@
+/*
+ * linux/arch/arm/mach-omap/omap2/usb-tusb6010.c
+ *
+ * Copyright (C) 2006 Nokia Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+
+#include <linux/usb/musb.h>
+
+#include <asm/arch/gpmc.h>
+#include <asm/arch/gpio.h>
+
+
+static u8 async_cs, sync_cs;
+static unsigned refclk_psec;
+
+
+/* t2_ps, when quantized to fclk units, must happen no earlier than
+ * the clock after after t1_NS.
+ *
+ * Return a possibly updated value of t2_ps, converted to nsec.
+ */
+static unsigned
+next_clk(unsigned t1_NS, unsigned t2_ps, unsigned fclk_ps)
+{
+ unsigned t1_ps = t1_NS * 1000;
+ unsigned t1_f, t2_f;
+
+ if ((t1_ps + fclk_ps) < t2_ps)
+ return t2_ps / 1000;
+
+ t1_f = (t1_ps + fclk_ps - 1) / fclk_ps;
+ t2_f = (t2_ps + fclk_ps - 1) / fclk_ps;
+
+ if (t1_f >= t2_f)
+ t2_f = t1_f + 1;
+
+ return (t2_f * fclk_ps) / 1000;
+}
+
+/* NOTE: timings are from tusb 6010 datasheet Rev 1.8, 12-Sept 2006 */
+
+static int tusb_set_async_mode(unsigned sysclk_ps, unsigned fclk_ps)
+{
+ struct gpmc_timings t;
+ unsigned t_acsnh_advnh = sysclk_ps + 3000;
+ unsig...
...
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Following is an updated version. I'll add also gpmc_get_fclk_period()
to 60/90 ARM: OMAP: Merge gpmc changes from N800 tree.Tony
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
This patch adds a generic mailbox interface considering IVA
(Image Video Accelerator) use on 2420, but this patch itself
doesn't contain any IVA driver.Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/mailbox.c | 206 ++++++++++++++++++++
arch/arm/mach-omap2/mailbox.c | 310 ++++++++++++++++++++++++++++++
arch/arm/plat-omap/mailbox.c | 352 +++++++++++++++++++++++++++++++++++
arch/arm/plat-omap/mailbox.h | 193 +++++++++++++++++++
include/asm-arm/arch-omap/mailbox.h | 68 +++++++
5 files changed, 1129 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
new file mode 100644
index 0000000..877b838
--- /dev/null
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -0,0 +1,206 @@
+/*
+ * Mailbox reservation modules for DSP
+ *
+ * Copyright (C) 2006 Nokia Corporation
+ * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/resource.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <asm/arch/mailbox.h>
+#include <asm/arch/irqs.h>
+#include <asm/io.h>
+
+#define MAILBOX_ARM2DSP1 0x00
+#define MAILBOX_ARM2DSP1b 0x04
+#define MAILBOX_DSP2ARM1 0x08
+#define MAILBOX_DSP2ARM1b 0x0c
+#define MAILBOX_DSP2ARM2 0x10
+#define MAILBOX_DSP2ARM2b 0x14
+#define MAILBOX_ARM2DSP1_Flag 0x18
+#define MAILBOX_DSP2ARM1_Flag 0x1c
+#define MAILBOX_DSP2ARM2_Flag 0x20
+
+unsigned long mbox_base;
+
+struct omap_mbox1_fifo {
+ unsigned long cmd;
+ unsigned long data;
+ unsigned long flag;
+};
+
+struct omap_...
Update omap h2 defconfig
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/configs/omap_h2_1610_defconfig | 88 +++++++++++++++++++++++++------
1 files changed, 71 insertions(+), 17 deletions(-)diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index b0efd4c..2881622 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -1,10 +1,15 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.17
-# Thu Jun 29 15:25:18 2006
+# Linux kernel version: 2.6.19
+# Thu Dec 7 15:16:40 2006
#
CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
@@ -26,16 +31,21 @@ CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
+# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
@@ -47,6 +57,8 @@ CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_SLOB is not set
@@ -64,7 +76,10 @@ CONFIG_MODULE_UNLOAD=y
#
# Block layer
#
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set#
# IO Schedulers
@@ -86,7 +101,7 @@ CONFIG_DEFAULT_...
Add omap osk defconfig
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/configs/omap_osk_5912_defconfig | 1120 ++++++++++++++++++++++++++++++
1 files changed, 1120 insertions(+), 0 deletions(-)diff --git a/arch/arm/configs/omap_osk_5912_defconfig b/arch/arm/configs/omap_osk_5912_defconfig
new file mode 100644
index 0000000..c4d46e4
--- /dev/null
+++ b/arch/arm/configs/omap_osk_5912_defconfig
@@ -0,0 +1,1120 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.19
+# Thu Dec 7 16:32:04 2006
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+C...
Fix gpmc header
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/gpmc.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
index c49b262..434672d 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -88,7 +88,7 @@ extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk);
extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
extern void gpmc_cs_free(int cs);
-extern void gpmc_cs_set_reserved(int cs, int reserved);
+extern int gpmc_cs_set_reserved(int cs, int reserved);
extern int gpmc_cs_reserved(int cs);#endif
--
1.4.4.2-
From: Syed Mohammed Khasim <x0khasim@ti.com>
I2C-1 for 2430 was commented previously, enabled in this patch.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/devices.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 2fac7d3..3e84a03 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -136,8 +136,10 @@ static void omap_init_i2c(void)
* it can include clocking and address info, maybe more.
*/
if (cpu_is_omap24xx()) {
- omap_cfg_reg(M19_24XX_I2C1_SCL);
- omap_cfg_reg(L15_24XX_I2C1_SDA);
+ if (machine_is_omap_h4()) {
+ omap_cfg_reg(M19_24XX_I2C1_SCL);
+ omap_cfg_reg(L15_24XX_I2C1_SDA);
+ }
} else {
omap_cfg_reg(I2C_SCL);
omap_cfg_reg(I2C_SDA);
@@ -501,13 +503,13 @@ static int __init omap_init_devices(void)
* in alphabetical order so they're easier to sort through.
*/
omap_init_dsp();
- omap_init_i2c();
omap_init_kp();
omap_init_mmc();
omap_init_uwire();
omap_init_wdt();
omap_init_rng();
#endif
+ omap_init_i2c();
return 0;
}
arch_initcall(omap_init_devices);
--
1.4.4.2-
From: Syed Mohammed Khasim <x0khasim@ti.com>
This patch updates the board-2430sdp.h for TWL PIH interrupts.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/board-2430sdp.h | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)diff --git a/include/asm-arm/arch-omap/board-2430sdp.h b/include/asm-arm/arch-omap/board-2430sdp.h
index 6749ad7..e9c65ce 100644
--- a/include/asm-arm/arch-omap/board-2430sdp.h
+++ b/include/asm-arm/arch-omap/board-2430sdp.h
@@ -34,8 +34,11 @@
#define OMAP24XX_ETHR_GPIO_IRQ 149
#define SDP2430_CS0_BASE 0x04000000-/*
- * Just a place holder, need to add more
- */
+#define TWL4030_IRQNUM INT_24XX_SYS_NIRQ
+
+/* TWL4030 Primary Interrupt Handler (PIH) interrupts */
+#define IH_TWL4030_BASE IH_BOARD_BASE
+#define IH_TWL4030_END (IH_TWL4030_BASE+8)
+#define NR_IRQS (IH_TWL4030_END)-#endif /* __ASM_ARCH_OMAP_2430SDP_H */
+#endif /* __ASM_ARCH_OMAP_2430SDP_H */
--
1.4.4.2-
From: Komal Shah <komal_shah802003@yahoo.com>
- and fix the file path.
Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-2430sdp.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 77e77c1..7e76fbf 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -1,5 +1,5 @@
/*
- * linux/arch/arm/mach-omap/omap2/board-2430sdp.c
+ * linux/arch/arm/mach-omap2/board-2430sdp.c
*
* Copyright (C) 2006 Texas Instruments
*
@@ -19,8 +19,6 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
-#include <linux/workqueue.h>
-#include <linux/input.h>
#include <linux/err.h>
#include <linux/clk.h>@@ -31,15 +29,9 @@
#include <asm/mach/flash.h>#include <asm/arch/gpio.h>
-#include <asm/arch/gpioexpander.h>
#include <asm/arch/mux.h>
-#include <asm/arch/usb.h>
-#include <asm/arch/irda.h>
#include <asm/arch/board.h>
#include <asm/arch/common.h>
-#include <asm/arch/keypad.h>
-#include <asm/arch/menelaus.h>
-#include <asm/arch/dma.h>
#include <asm/arch/gpmc.h>
#include "prcm-regs.h"--
1.4.4.2-
From: David Brownell <dbrownell@users.sourceforge.net>
Mistral-specific:
- Add PWL-driven LCD backlight device
- Apply power to the board even when the LCD isn't configured; things
like EEPROM, temperature sensor, and wakeup switch depend on it.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-osk.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 253c539..df9681d 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -293,6 +293,18 @@ static struct platform_device osk5912_kp_device = {
.resource = osk5912_kp_resources,
};+static struct omap_backlight_config mistral_bl_data = {
+ .default_intensity = 0xa0,
+};
+
+static struct platform_device mistral_bl_device = {
+ .name = "omap-bl",
+ .id = -1,
+ .dev = {
+ .platform_data = &mistral_bl_data,
+ },
+};
+
static struct platform_device osk5912_lcd_device = {
.name = "lcd_osk",
.id = -1,
@@ -300,6 +312,7 @@ static struct platform_device osk5912_lcd_device = {static struct platform_device *mistral_devices[] __initdata = {
&osk5912_kp_device,
+ &mistral_bl_device,
&osk5912_lcd_device,
};@@ -373,6 +386,15 @@ static void __init osk_mistral_init(void)
} else
printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");+ /* LCD: backlight, and power; power controls other devices on the
+ * board, like the touchscreen, EEPROM, and wakeup (!) switch.
+ */
+ omap_cfg_reg(PWL);
+ if (omap_request_gpio(2) == 0) {
+ omap_set_gpio_direction(2, 0 /* out */);
+ omap_set_gpio_dataout(2, 1 /* on */);
+ }
+
platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
}
#else
--
1.4.4.2-
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Adding OMAP_GPIO_OUT/ON defines could be fixed later on for all
omap_set_gpio_direction/dataout().Regards,
Tony
-
From: Kyungmin Park <kyungmin.park@samsung.com>
- Add etherent gpmc handling
- Remove unused mux setting
- Add MMC switch pin commentsSigned-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-apollon.c | 50 ++++++++++++++++++++++++++--------
1 files changed, 38 insertions(+), 12 deletions(-)diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 3bb49c1..5e1cada 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -27,6 +27,8 @@
#include <linux/delay.h>
#include <linux/leds.h>
#include <linux/irq.h>
+#include <linux/err.h>
+#include <linux/clk.h>#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -187,16 +189,42 @@ static struct platform_device *apollon_devices[] __initdata = {
static inline void __init apollon_init_smc91x(void)
{
unsigned long base;
+ unsigned int rate;
+ struct clk *l3ck;
+ int eth_cs;
+
+ l3ck = clk_get(NULL, "core_l3_ck");
+ if (IS_ERR(l3ck))
+ rate = 100000000;
+ else
+ rate = clk_get_rate(l3ck);
+
+ eth_cs = APOLLON_ETH_CS;/* Make sure CS1 timings are correct */
- GPMC_CONFIG1_1 = 0x00011203;
- GPMC_CONFIG2_1 = 0x001f1f01;
- GPMC_CONFIG3_1 = 0x00080803;
- GPMC_CONFIG4_1 = 0x1c091c09;
- GPMC_CONFIG5_1 = 0x041f1f1f;
- GPMC_CONFIG6_1 = 0x000004c4;
-
- if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) {
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200);
+
+ if (rate >= 160000000) {
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
+ } else if (rate >= 130000000) {
+ gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
+ g...
From: Dirk Behme <dirk.behme_at_gmail.com>
ARM: OMAP: Fix warning in timer32k.c if CONFIG_NO_IDLE_HZ
isn't set:arch/arm/plat-omap/timer32k.c:221: warning:
'omap_32k_timer_handler' defined but not usedSigned-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/timer32k.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index c37d7b4..a98de90 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -217,6 +217,18 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}+static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
+{
+ unsigned long flags;
+
+ write_seqlock_irqsave(&xtime_lock, flags);
+ _omap_32k_timer_interrupt(irq, dev_id);
+ write_sequnlock_irqrestore(&xtime_lock, flags);
+
+ return IRQ_HANDLED;
+}
+
+#ifdef CONFIG_NO_IDLE_HZ
static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id)
{
unsigned long now;
@@ -233,18 +245,6 @@ static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id)
return _omap_32k_timer_interrupt(irq, dev_id);
}-static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
-{
- unsigned long flags;
-
- write_seqlock_irqsave(&xtime_lock, flags);
- _omap_32k_timer_interrupt(irq, dev_id);
- write_sequnlock_irqrestore(&xtime_lock, flags);
-
- return IRQ_HANDLED;
-}
-
-#ifdef CONFIG_NO_IDLE_HZ
/*
* Programs the next timer interrupt needed. Called when dynamic tick is
* enabled, and to reprogram the ticks to skip from pm_idle. Note that
--
1.4.4.2-
NAK the obfuscated email address.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Updated patch following. I'll also fix it in other patches
from Dirk:55/90 ARM: OMAP: H3 workqueue fixes
56/90 ARM: OMAP: Make board palmz71 compile again
64/90 ARM: OMAP: Fix warning in pm.cTony
This patch updates 32KiHZ timer code to compile.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/timer32k.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index a98de90..f28e128 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -42,6 +42,7 @@
#include <linux/spinlock.h>
#include <linux/err.h>
#include <linux/clk.h>
+#include <linux/clocksource.h>#include <asm/system.h>
#include <asm/hardware.h>
@@ -171,15 +172,6 @@ omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
static unsigned long omap_32k_last_tick = 0;/*
- * Returns elapsed usecs since last 32k timer interrupt
- */
-static unsigned long omap_32k_timer_gettimeoffset(void)
-{
- unsigned long now = omap_32k_sync_timer_read();
- return omap_32k_ticks_to_usecs(now - omap_32k_last_tick);
-}
-
-/*
* Returns current time from boot in nsecs. It's OK for this to wrap
* around for now, as it's just a relative time stamp.
*/
@@ -302,7 +294,6 @@ static __init void omap_init_32k_timer(void)if (cpu_class_is_omap1())
setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
- omap_timer.offset = omap_32k_timer_gettimeoffset;
omap_32k_last_tick = omap_32k_sync_timer_read();#ifdef CONFIG_ARCH_OMAP2
@@ -337,5 +328,4 @@ static void __init omap_timer_init(void)struct sys_timer omap_timer = {
.init = omap_timer_init,
- .offset = NULL, /* Initialized later */
};
--
1.4.4.2-
From: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-h3.c | 12 +++++++-----
include/asm-arm/arch-omap/irda.h | 1 +
2 files changed, 8 insertions(+), 5 deletions(-)diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 1ce0ec3..4167f34 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -296,9 +296,11 @@ static int h3_select_irda(struct device *dev, int state)
return err;
}-static void set_trans_mode(void *data)
+static void set_trans_mode(struct work_struct *work)
{
- int *mode = data;
+ struct omap_irda_config *irda_config =
+ container_of(work, struct omap_irda_config, gpio_expa.work);
+ int mode = irda_config->mode;
unsigned char expa;
int err = 0;@@ -308,7 +310,7 @@ static void set_trans_mode(void *data)
expa &= ~0x03;
- if (*mode & IR_SIRMODE) {
+ if (mode & IR_SIRMODE) {
expa |= 0x01;
} else { /* MIR/FIR */
expa |= 0x03;
@@ -323,9 +325,9 @@ static int h3_transceiver_mode(struct device *dev, int mode)
{
struct omap_irda_config *irda_config = dev->platform_data;+ irda_config->mode = mode;
cancel_delayed_work(&irda_config->gpio_expa);
- PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
-#error this is not permitted - mode is an argument variable
+ PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
schedule_delayed_work(&irda_config->gpio_expa, 0);return 0;
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h
index 345a649..96bb12f 100644
--- a/include/asm-arm/arch-omap/irda.h
+++ b/include/asm-arm/arch-omap/irda.h
@@ -31,6 +31,7 @@ struct omap_irda_config {
unsigned long src_start;
int tx_trigger;
int rx_trigger;
+ int mode;
};#endif
--
1.4.4.2-
Here's a version with fixed email address.
Tony
From: Dirk Behme <dirk.behme_at_gmail.com>
ARM: OMAP: Fix compilation issues in board-palmz71.c
Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-palmz71.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index b1ef1be..6a53f12 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -260,7 +260,6 @@ static struct spi_board_info __initdata palmz71_boardinfo[] = { {
* 26 /* command + data + overhead */,
.bus_num = 2,
.chip_select = 0,
- }
} };static struct omap_usb_config palmz71_usb_config __initdata = {
@@ -295,7 +294,7 @@ static struct omap_board_config_kernel palmz71_config[] = {
};static irqreturn_t
-palmz71_powercable(int irq, void *dev_id, struct pt_regs *regs)
+palmz71_powercable(int irq, void *dev_id)
{
if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) {
printk(KERN_INFO "PM: Power cable connected\n");
@@ -347,7 +346,7 @@ palmz71_gpio_setup(int early)
"palmz71-cable", 0))
printk(KERN_ERR
"IRQ request for power cable failed!\n");
- palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0, 0);
+ palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0);
}
}--
1.4.4.2-
Fixed email address on this one too.
Tony
From: David Brownell <dbrownell@users.sourceforge.net>
Support the camera connector on the OSK Mistral add-on board:
- define muxing for both camera controllers
- mux both of them for Mistral
- teach ov9640 glue about mistral powerup/powerdownSigned-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-osk.c | 32 ++++++++++++++++++++++++++++++++
arch/arm/mach-omap1/mux.c | 24 ++++++++++++++++++++++++
include/asm-arm/arch-omap/mux.h | 23 +++++++++++++++++++++++
3 files changed, 79 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index df9681d..969dec5 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -356,6 +356,38 @@ static void __init osk_mistral_init(void)
* can't talk to the ads or even the i2c eeprom.
*/+ /* parallel camera interface */
+ omap_cfg_reg(J15_1610_CAM_LCLK);
+ omap_cfg_reg(J18_1610_CAM_D7);
+ omap_cfg_reg(J19_1610_CAM_D6);
+ omap_cfg_reg(J14_1610_CAM_D5);
+ omap_cfg_reg(K18_1610_CAM_D4);
+ omap_cfg_reg(K19_1610_CAM_D3);
+ omap_cfg_reg(K15_1610_CAM_D2);
+ omap_cfg_reg(K14_1610_CAM_D1);
+ omap_cfg_reg(L19_1610_CAM_D0);
+ omap_cfg_reg(L18_1610_CAM_VS);
+ omap_cfg_reg(L15_1610_CAM_HS);
+ omap_cfg_reg(M19_1610_CAM_RSTZ);
+ omap_cfg_reg(Y15_1610_CAM_OUTCLK);
+
+ /* serial camera interface */
+ omap_cfg_reg(H19_1610_CAM_EXCLK);
+ omap_cfg_reg(W13_1610_CCP_CLKM);
+ omap_cfg_reg(Y12_1610_CCP_CLKP);
+ /* CCP_DATAM CONFLICTS WITH UART1.TX (and serial console) */
+ // omap_cfg_reg(Y14_1610_CCP_DATAM);
+ omap_cfg_reg(W14_1610_CCP_DATAP);
+
+ /* CAM_PWDN */
+ if (omap_request_gpio(11) == 0) {
+ omap_cfg_reg(N20_1610_GPIO11);
+ omap_set_gpio_direction(11, 0 /* out */);
+ omap_set_gpio_dataout(11, 0 /* off */);
+ } else
+ pr_debug("OSK+Mistral: CAM_PWDN is awol\n");
+
+
// omap_cfg_reg(P19_1610_GPIO6); // BUSY
omap_cfg_re...
From: David Brownell <dbrownell@users.sourceforge.net>
Move all DMAREQ for TUSB6010 into its chip setup; it shouldn't be in
either the board-specific code, or the tusb6010 glue. (Note, we still
aren't passing the "which channels" info to the driver...)Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-h4.c | 5 +++--
arch/arm/mach-omap2/usb-tusb6010.c | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 100aea4..e85bbeb 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -476,9 +476,10 @@ static void __init tusb_evm_setup(void)
*/
omap_cfg_reg(J15_24XX_GPIO99);
irq = 99;
- omap_cfg_reg(AA10_242X_DMAREQ0);
- omap_cfg_reg(AA6_242X_DMAREQ1);
dmachan = (1 << 1) | (1 << 0);
+#if !(defined(CONFIG_MTD_OMAP_NOR) || defined(CONFIG_MTD_OMAP_NOR_MODULE))
+ dmachan |= (1 << 5) | (1 << 4) (1 << 3) | (1 << 2);
+#endif
break;
}diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 5f276c5..497f733 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -17,6 +17,7 @@#include <asm/arch/gpmc.h>
#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>static u8 async_cs, sync_cs;
@@ -322,6 +323,21 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
/* REVISIT let the driver know what DMA channels work */
if (!dmachan)
tusb_device.dev.dma_mask = NULL;
+ else {
+ /* assume OMAP 2420 ES2.0 and later */
+ if (dmachan & (1 << 0))
+ omap_cfg_reg(AA10_242X_DMAREQ0);
+ if (dmachan & (1 << 1))
+ omap_cfg_reg(AA6_242X_DMAREQ1);
+ if (dmachan & (1 << 2))
+ omap_cfg_reg(E4_242X_DMAREQ2);
+ if (dmachan & (1 << ...
From: Tony Lindgren <tmlind@baageli.(none)>
Mostly cosmetic to sync up with linux-omap tree
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/Kconfig | 2 +-
arch/arm/mach-omap2/devices.c | 6 +++---
arch/arm/plat-omap/devices.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index 0002de8..5a87aa9 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -46,7 +46,7 @@ config MACH_OMAP_H3
config MACH_OMAP_OSK
bool "TI OSK Support"
depends on ARCH_OMAP1 && ARCH_OMAP16XX
- select TPS65010
+ select OMAP_MCBSP
help
TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
if you have such a board.
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index a0c6730..b603bc5 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -24,7 +24,7 @@
#include <asm/arch/mux.h>
#include <asm/arch/gpio.h>-#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
+#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)#define OMAP2_I2C_BASE2 0x48072000
#define OMAP2_I2C_INT2 57
@@ -42,8 +42,8 @@ static struct resource i2c_resources2[] = {
};static struct platform_device omap_i2c_device2 = {
- .name = "i2c_omap",
- .id = 2,
+ .name = "i2c_omap",
+ .id = 2,
.num_resources = ARRAY_SIZE(i2c_resources2),
.resource = i2c_resources2,
};
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 3e84a03..2e0419f 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -112,8 +112,8 @@ static struct resource i2c_resources1[] = {
/* DMA not used; works around erratum writing to non-empty i2c fifo */static struct platform_device omap_i2c_device1 = {
- .name = "i2c_omap",
- ....
From: Kai Svahn <kai.svahn@nokia.com>
This patch merges gpmc changes from N800 tree.
Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/gpmc.c | 7 +++++++
include/asm-arm/arch-omap/gpmc.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index a3f31f0..b6b47f2 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -111,6 +111,13 @@ unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
return (time_ns * 1000 + tick_ps - 1) / tick_ps;
}+unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns)
+{
+ unsigned long ticks = gpmc_ns_to_ticks(time_ns);
+
+ return ticks * gpmc_get_fclk_period() / 1000;
+}
+
#ifdef DEBUG
static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
int time, const char *name)
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
index 434672d..0fe920a 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -81,6 +81,7 @@ struct gpmc_timings {
};extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
+extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
extern u32 gpmc_cs_read_reg(int cs, int idx);
--
1.4.4.2-
Here's an updated version for gpmc_get_fclk_period() needed in
patch 43/90.Regards,
Tony
From: Kai Svahn <kai.svahn@nokia.com>
This patch merges omap specific driver headers from
N800 tree.Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/blizzard.h | 12 ++++
include/asm-arm/arch-omap/eac.h | 101 ++++++++++++++++++++++++++++++++++
include/asm-arm/arch-omap/menelaus.h | 23 +++++++-
include/asm-arm/arch-omap/mmc.h | 67 ++++++++++++++++++++++
include/asm-arm/arch-omap/onenand.h | 19 ++++++
5 files changed, 221 insertions(+), 1 deletions(-)diff --git a/include/asm-arm/arch-omap/blizzard.h b/include/asm-arm/arch-omap/blizzard.h
new file mode 100644
index 0000000..8d160f1
--- /dev/null
+++ b/include/asm-arm/arch-omap/blizzard.h
@@ -0,0 +1,12 @@
+#ifndef _BLIZZARD_H
+#define _BLIZZARD_H
+
+struct blizzard_platform_data {
+ void (*power_up)(struct device *dev);
+ void (*power_down)(struct device *dev);
+ unsigned long (*get_clock_rate)(struct device *dev);
+
+ unsigned te_connected : 1;
+};
+
+#endif
diff --git a/include/asm-arm/arch-omap/eac.h b/include/asm-arm/arch-omap/eac.h
new file mode 100644
index 0000000..5a4c831
--- /dev/null
+++ b/include/asm-arm/arch-omap/eac.h
@@ -0,0 +1,101 @@
+/*
+ * linux/include/asm-arm/arch-omap2/eac.h
+ *
+ * Defines for Enhanced Audio Controller
+ *
+ * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
+ *
+ * Copyright (C) 2006 Nokia Corporation
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Gener...
From: Kai Svahn <kai.svahn@nokia.com>
This patch merges board specific files from N800 tree.
Nokia has published the files at:http://repository.maemo.org/pool/maemo3.0/free/source/
kernel-source-rx-34_2.6.18.orig.tar.gz
kernel-source-rx-34_2.6.18-osso29.diff.gzSigned-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 5 +
arch/arm/mach-omap2/Makefile | 4 +
arch/arm/mach-omap2/board-n800-audio.c | 357 ++++++++++++++++++++++
arch/arm/mach-omap2/board-n800-bt.c | 42 +++
arch/arm/mach-omap2/board-n800-dsp.c | 158 ++++++++++
arch/arm/mach-omap2/board-n800-flash.c | 61 ++++
arch/arm/mach-omap2/board-n800-mmc.c | 279 +++++++++++++++++
arch/arm/mach-omap2/board-n800-pm.c | 77 +++++
arch/arm/mach-omap2/board-n800-usb.c | 102 ++++++
arch/arm/mach-omap2/board-n800.c | 525 ++++++++++++++++++++++++++++++++
include/asm-arm/arch-omap/board.h | 24 ++-
11 files changed, 1632 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 83608e4..845daa6 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -22,9 +22,14 @@ config MACH_OMAP_GENERIC
bool "Generic OMAP board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX+config MACH_NOKIA_N800
+ bool "Nokia N800"
+ depends on ARCH_OMAP24XX
+
config MACH_OMAP2_TUSB6010
bool
depends on ARCH_OMAP2 && ARCH_OMAP2420
+ default y if MACH_NOKIA_N800config MACH_OMAP_H4
bool "OMAP 2420 H4 board"
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 626d9b8..5eee94f 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -20,6 +20,10 @@ obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
+o...
2 comments:
a. lots of printk() calls need log levels added as well as some
indication of the source of the message, like a driver/module name
or subsystem name[*]b. externs should be in header files.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
I've update these to use dev_err() or dev_dbg() where possible,
Updated patch attached.
Tony
From: Kai Svahn <kai.svahn@nokia.com>
This patch merges omap2 PM code from N800 tree.
Patch adds support for sleep while idle for omap2
and handy serial console debbugging code. It also
moves code from pm-domain.c to pm.c.This code can be used as a base for developing
power management for all omap24xx boards.Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Makefile | 2 +-
arch/arm/mach-omap2/pm-domain.c | 299 ------------
arch/arm/mach-omap2/pm.c | 969 ++++++++++++++++++++++++++++-----------
arch/arm/mach-omap2/sleep.S | 23 +-
include/asm-arm/arch-omap/pm.h | 66 +---
5 files changed, 719 insertions(+), 640 deletions(-)diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5eee94f..60373f5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -9,7 +9,7 @@ obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o \
obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o# Power Management
-obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o
+obj-$(CONFIG_PM) += pm.o sleep.o# DSP
obj-$(CONFIG_OMAP_DSP) += mailbox_mach.o
diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c
deleted file mode 100644
index 2494091..0000000
--- a/arch/arm/mach-omap2/pm-domain.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/pm-domain.c
- *
- * Power domain functions for OMAP2
- *
- * Copyright (C) 2006 Nokia Corporation
- * Tony Lindgren <tony@atomide.com>
- *
- * Some code based on earlier OMAP2 sample PM code
- * Copyright (C) 2005 Texas Instruments, Inc.
- * Richard Woodruff <r-woodruff2@ti.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <lin...
externs in header files, please.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Updated patch attached.
Tony
From: Dirk Behme <dirk.behme_at_gmail.com>
ARM: OMAP2: Fix warning in pm.c:
arch/arm/mach-omap2/pm.c: In function 'omap2_pm_init':
arch/arm/mach-omap2/pm.c:854: warning: ignoring return value
of 'subsys_create_file', declared with attribute
warn_unused_resultSigned-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/pm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1034eb9..27d7f85 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -851,7 +851,9 @@ int __init omap2_pm_init(void)
pm_set_ops(&omap_pm_ops);
pm_idle = omap2_pm_idle;- subsys_create_file(&power_subsys, &sleep_while_idle_attr);
+ l = subsys_create_file(&power_subsys, &sleep_while_idle_attr);
+ if (l)
+ printk(KERN_ERR "subsys_create_file failed: %d\n", l);return 0;
}
--
1.4.4.2-
Fixed email address on this one too.
Tony
From: Dirk Behme <dirk.behme@gmail.com>
Convert interrupt flags SA_* to IRQF_*
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-palmz71.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 6a53f12..3936190 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -342,7 +342,7 @@ palmz71_gpio_setup(int early)
}
omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1);
if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
- palmz71_powercable, SA_SAMPLE_RANDOM,
+ palmz71_powercable, IRQF_SAMPLE_RANDOM,
"palmz71-cable", 0))
printk(KERN_ERR
"IRQ request for power cable failed!\n");
--
1.4.4.2-
From: Kai Svahn <kai.svahn@nokia.com>
This patch syncs framebuffer headers with N800 tree.
Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
include/asm-arm/arch-omap/hwa742.h | 12 +++++++
include/asm-arm/arch-omap/omapfb.h | 61 ++++++++++++++++++++++++++++++------
2 files changed, 63 insertions(+), 10 deletions(-)diff --git a/include/asm-arm/arch-omap/hwa742.h b/include/asm-arm/arch-omap/hwa742.h
new file mode 100644
index 0000000..577f492
--- /dev/null
+++ b/include/asm-arm/arch-omap/hwa742.h
@@ -0,0 +1,12 @@
+#ifndef _HWA742_H
+#define _HWA742_H
+
+struct hwa742_platform_data {
+ void (*power_up)(struct device *dev);
+ void (*power_down)(struct device *dev);
+ unsigned long (*get_clock_rate)(struct device *dev);
+
+ unsigned te_connected:1;
+};
+
+#endif
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h
index adf1d81..46d7a4f 100644
--- a/include/asm-arm/arch-omap/omapfb.h
+++ b/include/asm-arm/arch-omap/omapfb.h
@@ -38,30 +38,47 @@
#define OMAPFB_SYNC_GFX OMAP_IO(37)
#define OMAPFB_VSYNC OMAP_IO(38)
#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
-#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old)
+#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
-#define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window)
+#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
+#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
+#define OMAPFB_SETUP_MEM OMAP_IOW(55, s...
From: Trilok Soni <soni.trilok@gmail.com>
- Update file headers with correct file paths.
Signed-off-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-apollon.c | 2 +-
arch/arm/mach-omap2/board-n800-audio.c | 2 +-
arch/arm/mach-omap2/board-n800-flash.c | 2 +-
arch/arm/mach-omap2/board-n800-usb.c | 2 +-
arch/arm/mach-omap2/board-n800.c | 2 +-
arch/arm/mach-omap2/usb-tusb6010.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 5e1cada..5488961 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -4,7 +4,7 @@
* Copyright (C) 2005,2006 Samsung Electronics
* Author: Kyungmin Park <kyungmin.park@samsung.com>
*
- * Modified from mach-omap/omap2/board-h4.c
+ * Modified from mach-omap2/board-h4.c
*
* Code for apollon OMAP2 board. Should work on many OMAP2 systems where
* the bootloader passes the board-specific data to the kernel.
diff --git a/arch/arm/mach-omap2/board-n800-audio.c b/arch/arm/mach-omap2/board-n800-audio.c
index 1608d3d..8e36691 100644
--- a/arch/arm/mach-omap2/board-n800-audio.c
+++ b/arch/arm/mach-omap2/board-n800-audio.c
@@ -1,5 +1,5 @@
/*
- * linux/arch/arm/mach-omap/omap2/board-n800-audio.c
+ * linux/arch/arm/mach-omap2/board-n800-audio.c
*
* Copyright (C) 2006 Nokia Corporation
* Contact: Juha Yrj?l?
diff --git a/arch/arm/mach-omap2/board-n800-flash.c b/arch/arm/mach-omap2/board-n800-flash.c
index 3a4c52a..cd302ab 100644
--- a/arch/arm/mach-omap2/board-n800-flash.c
+++ b/arch/arm/mach-omap2/board-n800-flash.c
@@ -1,5 +1,5 @@
/*
- * linux/arch/arm/mach-omap/omap2/board-n800-flash.c
+ * linux/arch/arm/mach-omap2/board-n800-flash.c
*
* Copyright (C) 2006 Nokia Corporation
* Author: Juha Yrjola
diff --git a/arch/arm/mach-omap2/board-n800-usb.c b/arch/arm/mach-o...
From: Imre Deak <imre.deak@solidboot.com>
- in addition to fixed FB regions - as passed by the bootloader -
allow dynamic allocations
- do some more checking against overlapping / reserved regions
- move the FB specific parts out from sram.c to fb.cSigned-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/io.c | 4 +-
arch/arm/mach-omap2/io.c | 3 +-
arch/arm/plat-omap/fb.c | 271 +++++++++++++++++++++++++++++++++----
arch/arm/plat-omap/sram.c | 60 ++-------
include/asm-arm/arch-omap/sram.h | 3 -
5 files changed, 256 insertions(+), 85 deletions(-)diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index fab8b0b..81c4e73 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -17,11 +17,11 @@
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/tc.h>
-#include <asm/arch/omapfb.h>extern int omap1_clk_init(void);
extern void omap_check_revision(void);
extern void omap_sram_init(void);
+extern void omapfb_reserve_sdram(void);/*
* The machine specific code may provide the extra mapping besides the
@@ -121,7 +121,7 @@ void __init omap1_map_common_io(void)
#endifomap_sram_init();
- omapfb_reserve_mem();
+ omapfb_reserve_sdram();
}/*
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 4640d9a..c3dafcb 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -29,6 +29,7 @@ extern int omap2_clk_init(void);
extern void omap2_check_revision(void);
extern void omap2_init_memory(void);
extern void gpmc_init(void);
+extern void omapfb_reserve_sdram(void);/*
* The machine specific code may provide the extra mapping besides the
@@ -94,7 +95,7 @@ void __init omap2_map_common_io(void)omap2_check_revision();
omap_sram_init();
- omapfb_reserve_mem();
+ omapfb_reserve_sdram();
}void __init omap2...
On Wed, 4 Apr 2007 14:05:47 -0400 Tony Lindgren wrote:
Referring to multiple places in this patch, please use the preferred
kernel "long comment" style as documented in
Documentation/CodingStyle, Ch. 8, Commenting:The preferred style for long (multi-line) comments is:
/*
* This is the preferred style for multi-line
* comments in the Linux kernel source code.
* Please use it consistently.
*
* Description: A column of asterisks on the left side,
* with beginning and ending almost-blank lines.---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Following is an updated patch.
Tony
From: Imre Deak <imre.deak@solidboot.com>
This is needed, so that disabling the SoSSI clock during idle can
be prevented.Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/clock.c | 34 ++++++++++++++++++++++++++++++++++
arch/arm/mach-omap1/clock.h | 21 +++++++++++++++++++--
2 files changed, 53 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index f625f6d..5d9faa6 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -49,6 +49,15 @@ static void omap1_uart_recalc(struct clk * clk)
clk->rate = 12000000;
}+static void omap1_sossi_recalc(struct clk *clk)
+{
+ u32 div = omap_readl(MOD_CONF_CTRL_1);
+
+ div = (div >> 17) & 0x7;
+ div++;
+ clk->rate = clk->parent->rate / div;
+}
+
static int omap1_clk_enable_dsp_domain(struct clk *clk)
{
int retval;
@@ -396,6 +405,31 @@ static int omap1_set_ext_clk_rate(struct clk * clk, unsigned long rate)
return 0;
}+static int omap1_set_sossi_rate(struct clk *clk, unsigned long rate)
+{
+ u32 l;
+ int div;
+ unsigned long p_rate;
+
+ p_rate = clk->parent->rate;
+ /* Round towards slower frequency */
+ div = (p_rate + rate - 1) / rate;
+ div--;
+ if (div < 0 || div > 7)
+ return -EINVAL;
+
+ l = omap_readl(MOD_CONF_CTRL_1);
+ l &= ~(7 << 17);
+ l |= div << 17;
+ omap_writel(l, MOD_CONF_CTRL_1);
+
+ clk->rate = p_rate / (div + 1);
+ if (unlikely(clk->flags & RATE_PROPAGATES))
+ propagate_rate(clk);
+
+ return 0;
+}
+
static long omap1_round_ext_clk_rate(struct clk * clk, unsigned long rate)
{
return 96000000 / calc_ext_dsor(rate);
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index 4d6060c..6eadf72 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -17,6 +17,8 @@ static int omap1_clk_enable_generic(struct clk * c...
From: Imre Deak <imre.deak@solidboot.com>
Clocks with the follow parent rate mode were not updating their
children at propagate rate time.Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/clock.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 3d017b0..0a60324 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -284,6 +284,8 @@ void followparent_recalc(struct clk *clk)
return;clk->rate = clk->parent->rate;
+ if (unlikely(clk->flags & RATE_PROPAGATES))
+ propagate_rate(clk);
}/* Propagate rate to children */
--
1.4.4.2-
From: Imre Deak <imre.deak@solidboot.com>
The SoSSI driver should already take care of this by enabling / disabling
its clock when necessary, so this legacy callout from the PM idle code
is not needed any more.Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/pm.c | 5 +----
arch/arm/plat-omap/dma.c | 6 ------
include/asm-arm/arch-omap/dma.h | 1 -
3 files changed, 1 insertions(+), 11 deletions(-)diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 49efe90..743029a 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -155,11 +155,8 @@ void omap_pm_idle(void)
use_idlect1 = omap_dm_timer_modify_idlect_mask(use_idlect1);
#endif- if (omap_dma_running()) {
+ if (omap_dma_running())
use_idlect1 &= ~(1 << 6);
- if (omap_lcd_dma_ext_running())
- use_idlect1 &= ~(1 << 12);
- }/* We should be able to remove the do_sleep variable and multiple
* tests above as soon as drivers, timer and DMA code have been fixed.
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 2d86b10..c64785e 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1347,11 +1347,6 @@ void omap_stop_lcd_dma(void)
omap_writew(w, OMAP1610_DMA_LCD_CTRL);
}-int omap_lcd_dma_ext_running(void)
-{
- return lcd_dma.ext_ctrl && lcd_dma.active;
-}
-
/*----------------------------------------------------------------------------*/static int __init omap_init_dma(void)
@@ -1493,7 +1488,6 @@ EXPORT_SYMBOL(omap_free_lcd_dma);
EXPORT_SYMBOL(omap_enable_lcd_dma);
EXPORT_SYMBOL(omap_setup_lcd_dma);
EXPORT_SYMBOL(omap_stop_lcd_dma);
-EXPORT_SYMBOL(omap_lcd_dma_ext_running);
EXPORT_SYMBOL(omap_set_lcd_dma_b1);
EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer);
EXPORT_SYMBOL(omap_set_lcd_dma_ext_controller);
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/a...
From: Imre Deak <imre.deak@solidboot.com>
These were left out from the board file when merging these drivers,
add them here.Call GPIO init from the board file as well, since the platform device init
code uses the GPIO API.Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-nokia770.c | 88 ++++++++++++++++++++++++++++++++++
1 files changed, 88 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 8ea0cef..acb2331 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -33,9 +33,14 @@
#include <asm/arch/dsp_common.h>
#include <asm/arch/aic23.h>
#include <asm/arch/gpio.h>
+#include <asm/arch/omapfb.h>
+#include <asm/arch/hwa742.h>
+#include <asm/arch/lcd_mipid.h>#include "../plat-omap/dsp/dsp_common.h"
+#define ADS7846_PENDOWN_GPIO 15
+
static void __init omap_nokia770_init_irq(void)
{
/* On Nokia 770, the SleepX signal is masked with an
@@ -96,6 +101,41 @@ static struct platform_device *nokia770_devices[] __initdata = {
&nokia770_kp_device,
};+static void mipid_shutdown(struct mipid_platform_data *pdata)
+{
+ if (pdata->nreset_gpio != -1) {
+ printk(KERN_INFO "shutdown LCD\n");
+ omap_set_gpio_dataout(pdata->nreset_gpio, 0);
+ msleep(120);
+ }
+}
+
+static struct mipid_platform_data nokia770_mipid_platform_data = {
+ .shutdown = mipid_shutdown,
+};
+
+static void mipid_dev_init(void)
+{
+ const struct omap_lcd_config *conf;
+
+ conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
+ if (conf != NULL) {
+ nokia770_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
+ nokia770_mipid_platform_data.data_lines = conf->data_lines;
+ }
+}
+
+static void ads7846_dev_init(void)
+{
+ if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0)
+ printk(KERN_ERR "can't get ad...
From: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Add onennand board specific support for N800
Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-n800-flash.c | 97 +++++++++++++++++++++++++++++++-
include/asm-arm/arch-omap/onenand.h | 1 +
2 files changed, 97 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap2/board-n800-flash.c b/arch/arm/mach-omap2/board-n800-flash.c
index cd302ab..4005cfb 100644
--- a/arch/arm/mach-omap2/board-n800-flash.c
+++ b/arch/arm/mach-omap2/board-n800-flash.c
@@ -12,16 +12,23 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <asm/mach/flash.h>
+#include <linux/mtd/onenand_regs.h>
+
+#include <asm/io.h>
#include <asm/arch/onenand.h>
#include <asm/arch/board.h>
+#include <asm/arch/gpmc.h>static struct mtd_partition n800_partitions[8];
+static int n800_onenand_setup(void __iomem *);
+
static struct omap_onenand_platform_data n800_onenand_data = {
.cs = 0,
.gpio_irq = 26,
.parts = n800_partitions,
- .nr_parts = 0 /* filled later */
+ .nr_parts = 0, /* filled later */
+ .onenand_setup = n800_onenand_setup
};static struct platform_device n800_onenand_device = {
@@ -32,6 +39,94 @@ static struct platform_device n800_onenand_device = {
},
};+static unsigned short omap2_onenand_readw(void __iomem *addr)
+{
+ return readw(addr);
+}
+
+static void omap2_onenand_writew(unsigned short value, void __iomem *addr)
+{
+ writew(value, addr);
+}
+
+static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base)
+{
+ const int min_gpmc_clk_period = 18;
+ struct gpmc_timings t;
+ int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
+ u32 reg;
+
+ tick_ns = gpmc_round_ns_to_ticks(1);
+ div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);
+ gpmc_clk_ns = div * tick_ns;
+ if (gpmc_clk_ns >= 24)
+ ...
FYI, it's common practice to put a comma at the end of the last
That won't generate a syntax error (with gcc) and it allows someone
to add lines after it without touching that line (e.g., like the
nr_parts line here).---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
Updated patch following.
Tony
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
---
arch/arm/mach-omap2/board-n800-audio.c | 61 ++++++++++++++++++-------------
1 files changed, 35 insertions(+), 26 deletions(-)diff --git a/arch/arm/mach-omap2/board-n800-audio.c b/arch/arm/mach-omap2/board-n800-audio.c
index 8e36691..fa6ab86 100644
--- a/arch/arm/mach-omap2/board-n800-audio.c
+++ b/arch/arm/mach-omap2/board-n800-audio.c
@@ -2,7 +2,7 @@
* linux/arch/arm/mach-omap2/board-n800-audio.c
*
* Copyright (C) 2006 Nokia Corporation
- * Contact: Juha Yrj?l?
+ * Contact: Juha Yrjola
* Jarkko Nikula <jarkko.nikula@nokia.com>
*
* This program is free software; you can redistribute it and/or
@@ -23,7 +23,6 @@#include <linux/err.h>
#include <linux/clk.h>
-#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/spi/tsc2301.h>@@ -44,47 +43,63 @@ static int enable_audio;
static int audio_ok;
static spinlock_t audio_lock;-
/*
- * Leaving EAC pins multiplexed to EAC functionality results
- * in about 2 mA extra current leaked. The workaround is to
- * multiplex the EAC pins to protected mode (with pull-ups enabled)
+ * Leaving EAC and sys_clkout2 pins multiplexed to those subsystems results
+ * in about 2 mA extra current leak when audios are powered down. The
+ * workaround is to multiplex them to protected mode (with pull-ups enabled)
* whenever audio is not being used.
*/
-static int mux_disabled;
+static int eac_mux_disabled = 0;
+static int clkout2_mux_disabled = 0;
static u32 saved_mux[2];static void n800_enable_eac_mux(void)
{
- if (!mux_disabled)
+ if (!eac_mux_disabled)
return;
- __raw_writel(saved_mux[0], IO_ADDRESS(0x480000e8));
__raw_writel(saved_mux[1], IO_ADDRESS(0x48000124));
- mux_disabled = 0;
+ eac_mux_disabled = 0;
}static void n800_disable_eac_mux...
From: Kevin Hilman <khilman@mvista.com>
Add mappings for SDRC ans SMS so that omap2_memory_init() works on the
2430. This also allows the mpurate= command-line option to work.Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/io.c | 17 ++++++++++++-----
include/asm-arm/arch-omap/io.h | 7 +++++++
include/asm-arm/arch-omap/omap24xx.h | 3 ++-
3 files changed, 21 insertions(+), 6 deletions(-)diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index c3dafcb..871fde3 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -61,6 +61,18 @@ static struct map_desc omap2_io_desc[] __initdata = {
.length = OMAP243X_GPMC_SIZE,
.type = MT_DEVICE
},
+ {
+ .virtual = OMAP243X_SDRC_VIRT,
+ .pfn = __phys_to_pfn(OMAP243X_SDRC_PHYS),
+ .length = OMAP243X_SDRC_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = OMAP243X_SMS_VIRT,
+ .pfn = __phys_to_pfn(OMAP243X_SMS_PHYS),
+ .length = OMAP243X_SMS_SIZE,
+ .type = MT_DEVICE
+ },
#endif
{
.virtual = DSP_MEM_24XX_VIRT,
@@ -102,11 +114,6 @@ void __init omap2_init_common_hw(void)
{
omap2_mux_init();
omap2_clk_init();
-/*
- * Need to Fix this for 2430
- */
-#ifndef CONFIG_ARCH_OMAP2430
omap2_init_memory();
-#endif
gpmc_init();
}
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h
index 289082d..d2fe0d0 100644
--- a/include/asm-arm/arch-omap/io.h
+++ b/include/asm-arm/arch-omap/io.h
@@ -80,6 +80,13 @@
#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */
#define OMAP243X_GPMC_VIRT 0xFE000000
#define OMAP243X_GPMC_SIZE SZ_1M
+#define OMAP243X_SDRC_PHYS OMAP24XX_SDRC_BASE
+#define OMAP243X_SDRC_VIRT 0xFD000000
+#define OMAP243X_SDRC_SIZE SZ_1M
+#define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE
+#define OMAP243X_SMS_VIRT 0xFC000000
+#define OMAP243X_SMS_SIZE SZ_1M
+
#endif#define IO_OFFSET 0x90000000
diff --g...
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Device init for OMAP24xx Enhanced Audio Controller
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/devices.c | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index b603bc5..767140c 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -23,6 +23,7 @@
#include <asm/arch/board.h>
#include <asm/arch/mux.h>
#include <asm/arch/gpio.h>
+#include <asm/arch/eac.h>#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
@@ -201,6 +202,38 @@ static void omap_init_mcspi(void)
static inline void omap_init_mcspi(void) {}
#endif+#ifdef CONFIG_SND_OMAP24XX_EAC
+
+#define OMAP2_EAC_BASE 0x48090000
+
+static struct resource omap2_eac_resources[] = {
+ {
+ .start = OMAP2_EAC_BASE,
+ .end = OMAP2_EAC_BASE + 0x109,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device omap2_eac_device = {
+ .name = "omap24xx-eac",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(omap2_eac_resources),
+ .resource = omap2_eac_resources,
+ .dev = {
+ .platform_data = NULL,
+ },
+};
+
+void omap_init_eac(struct eac_platform_data *pdata)
+{
+ omap2_eac_device.dev.platform_data = pdata;
+ platform_device_register(&omap2_eac_device);
+}
+
+#else
+void omap_init_eac(struct eac_platform_data *pdata) {}
+#endif
+
/*-------------------------------------------------------------------------*/static int __init omap2_init_devices(void)
--
1.4.4.2-
From: Kyungmin Park <kyungmin.park@samsung.com>
Add apollon gpio keys using gpio-keys input
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Makefile | 3 +-
arch/arm/mach-omap2/board-apollon-keys.c | 79 ++++++++++++++++++++++++++++++
arch/arm/mach-omap2/board-apollon.c | 53 --------------------
3 files changed, 81 insertions(+), 54 deletions(-)diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 60373f5..31993f3 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -19,7 +19,8 @@ mailbox_mach-objs := mailbox.o
obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o
-obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o
+obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \
+ board-apollon-keys.o
obj-$(CONFIG_MACH_NOKIA_N800) += board-n800.o board-n800-flash.o \
board-n800-mmc.o board-n800-bt.o \
board-n800-audio.o board-n800-usb.o \
diff --git a/arch/arm/mach-omap2/board-apollon-keys.c b/arch/arm/mach-omap2/board-apollon-keys.c
new file mode 100644
index 0000000..6cd29ec
--- /dev/null
+++ b/arch/arm/mach-omap2/board-apollon-keys.c
@@ -0,0 +1,79 @@
+/*
+ * linux/arch/arm/mach-omap2/board-apollon-keys.c
+ *
+ * Copyright (C) 2007 Samsung Electronics
+ * Author: Kyungmin Park <kyungmin.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
+#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>
+
+#define SW_ENTER_GPIO16...
From: Imre Deak <imre.deak@solidboot.com>
H2 / H3 boards use this chip, update their board files.
Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-h2.c | 77 +++++++++++++++++++++++++++++++++++
arch/arm/mach-omap1/board-h3.c | 88 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 165 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index d97ff63..4438390 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -28,6 +28,9 @@
#include <linux/mtd/partitions.h>
#include <linux/input.h>
#include <linux/workqueue.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/tsc2101.h>
+#include <linux/clk.h>#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -297,6 +300,78 @@ static struct platform_device h2_lcd_device = {
.id = -1,
};+struct {
+ struct clk *mclk;
+ int initialized;
+} h2_tsc2101;
+
+#define TSC2101_MUX_MCLK_ON R10_1610_MCLK_ON
+#define TSC2101_MUX_MCLK_OFF R10_1610_MCLK_OFF
+
+static int h2_tsc2101_init(struct spi_device *spi)
+{
+ int r;
+
+ if (h2_tsc2101.initialized) {
+ printk(KERN_ERR "tsc2101: already initialized\n");
+ return -ENODEV;
+ }
+
+ /* Get the MCLK */
+ h2_tsc2101.mclk = clk_get(&spi->dev, "mclk");
+ if (IS_ERR(h2_tsc2101.mclk)) {
+ dev_err(&spi->dev, "unable to get the clock MCLK\n");
+ return PTR_ERR(h2_tsc2101.mclk);
+ }
+ if ((r = clk_set_rate(h2_tsc2101.mclk, 12000000)) < 0) {
+ dev_err(&spi->dev, "unable to set rate to the MCLK\n");
+ goto err;
+ }
+
+ omap_cfg_reg(TSC2101_MUX_MCLK_OFF);
+ omap_cfg_reg(N15_1610_UWIRE_CS1);
+
+ return 0;
+err:
+ clk_put(h2_tsc2101.mclk);
+ return r;
+}
+
+static void h2_tsc2101_cleanup(struct spi_device *spi)
+{
+ clk_put(h2_tsc2101.mclk);
+ omap_cfg_reg(TSC2101_MUX_MCLK_OFF);
+}
+
+static vo...
From: David Brownell <david-b@pacbell.net>
Fix Kconfig sequencing: the 2430 SDP keeps getting stuffed
in the middle of H4 dependencies, so the various H4-specific
config options aren't displayed as depending on H4.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Kconfig | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 845daa6..60bfa75 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -37,10 +37,6 @@ config MACH_OMAP_H4
select OMAP_DEBUG_DEVICES
select GPIOEXPANDER_OMAP-config MACH_OMAP_2430SDP
- bool "OMAP 2430 SDP board"
- depends on ARCH_OMAP2 && ARCH_OMAP24XX
-
config MACH_OMAP_H4_TUSB
bool "TUSB 6010 EVM board"
depends on MACH_OMAP_H4
@@ -78,3 +74,8 @@ config MACH_OMAP2_H4_USB1
config MACH_OMAP_APOLLON
bool "OMAP 2420 Apollon board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX
+
+config MACH_OMAP_2430SDP
+ bool "OMAP 2430 SDP board"
+ depends on ARCH_OMAP2 && ARCH_OMAP24XX
+
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Partial fix for CONFIG_LEDS breakage ... at least allow platforms
using the debug-leds support (H4 for now) to build with the generic
LED support, and default the LED that would be the timer LED to
trigger using the "heartbeat" (timer driven, rate depends on load).Right now only H2 and P2 seem to have working LED support; this
at least makes H4 less broken.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/debug-leds.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 511d6a5..9128a80 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpga;
static u16 led_state, hw_led_state;-#ifdef CONFIG_LEDS
-#define old_led_api() 1
-#else
-#define old_led_api() 0
-#endif
-
#ifdef CONFIG_LEDS_OMAP_DEBUG
#define new_led_api() 1
#else
@@ -202,7 +196,8 @@ struct dbg_led {
static struct dbg_led dbg_leds[] = {
/* REVISIT at least H2 uses different timer & cpu leds... */
#ifndef CONFIG_LEDS_TIMER
- { .mask = 1 << 0, .cdev.name = "d4:green", }, /* timer */
+ { .mask = 1 << 0, .cdev.name = "d4:green",
+ .cdev.default_trigger = "heartbeat", },
#endif
#ifndef CONFIG_LEDS_CPU
{ .mask = 1 << 1, .cdev.name = "d5:green", }, /* !idle */
@@ -274,10 +269,10 @@ static int /* __init */ fpga_probe(struct platform_device *pdev)
fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE);
__raw_writew(~0, &fpga->leds);- if (old_led_api()) {
- leds_event = h2p2_dbg_leds_event;
- leds_event(led_start);
- }
+#ifdef CONFIG_LEDS
+ leds_event = h2p2_dbg_leds_event;
+ leds_event(led_start);
+#endifif (new_led_api()) {
newled_init(&pdev->dev);
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Fix build bug ... next_timer_interrupt() depends on NO_IDLE_HZ
or else (new style) NO_HZ, so don't assume it's always present.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/pm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 27d7f85..64e67e5 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -389,8 +389,12 @@ static void omap2_pm_dump(int mode, int resume, unsigned int us)
}if (!resume)
+#if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
printk("--- Going to %s %s (next timer after %u ms)\n", s1, s2,
jiffies_to_msecs(next_timer_interrupt() - jiffies));
+#else
+ printk("--- Going to %s %s\n", s1, s2);
+#endif
else
printk("--- Woke up (slept for %u.%03u ms)\n", us / 1000, us % 1000);
for (i = 0; i < reg_count; i++)
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Somehow this got lost in a merge ...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e7baca2..b995945 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -363,6 +363,7 @@ config ARCH_LH7A40X
config ARCH_OMAP
bool "TI OMAP"
select GENERIC_GPIO
+ select GENERIC_TIME
help
Support for TI's OMAP platform (OMAP1 and OMAP2).--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Fix GCC-reported compile time bug which prevents booting
when the framebuffer code is disabled.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/fb.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 8441e50..5082496 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -327,7 +327,10 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long start_avail,
- unsigned long size_avail) {}
+ unsigned long size_avail)
+{
+ return 0;
+}#endif
--
1.4.4.2-
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-n800-audio.c | 2 +-
arch/arm/mach-omap2/board-n800.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap2/board-n800-audio.c b/arch/arm/mach-omap2/board-n800-audio.c
index fa6ab86..6bdf1c8 100644
--- a/arch/arm/mach-omap2/board-n800-audio.c
+++ b/arch/arm/mach-omap2/board-n800-audio.c
@@ -31,7 +31,7 @@#include "../plat-omap/dsp/dsp_common.h"
-#if defined(CONFIG_SPI_TSC2301_AUDIO) && defined(CONFIG_SND_OMAP24XX_EAC)
+#if defined(CONFIG_SND_SOC_TSC2301) && defined(CONFIG_SND_OMAP24XX_EAC)
#define AUDIO_ENABLEDstatic struct clk *sys_clkout2;
diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index 69e5d36..bb805cf 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -409,7 +409,7 @@ static struct platform_device n800_keypad_led_device = {
};
#endif-#if defined(CONFIG_SPI_TSC2301_TOUCHSCREEN)
+#if defined(CONFIG_TOUCHSCREEN_TSC2301)
static void __init n800_ts_set_config(void)
{
const struct omap_lcd_config *conf;
--
1.4.4.2-
On Wed, 4 Apr 2007 14:06:03 -0400
Tony, I don't think so that we would like to use that one even it
was accidentally pushed into linux-omap tree and corrected later on
with another patch?Below is the patch which fits better here. We don't want to change
CONFIG_SPI_TSC2301_AUDIO -> CONFIG_SND_SOC_TSC2301 until there is
real SOC driver for TSC2301 audio.--
Jarkko========= CUT HERE
From: Jarkko Nikula <jarkko.nikula@nokia.com>
Date: Thu, 5 Apr 2007 08:48:43 +0300
Subject: [PATCH] ARM: OMAP: Update TSC2301 touchscreen config name in N800 board fileSigned-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
arch/arm/mach-omap2/board-n800.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index 69e5d36..bb805cf 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -409,7 +409,7 @@ static struct platform_device n800_keypad_led_device = {
};
#endif-#if defined(CONFIG_SPI_TSC2301_TOUCHSCREEN)
+#if defined(CONFIG_TOUCHSCREEN_TSC2301)
static void __init n800_ts_set_config(void)
{
const struct omap_lcd_config *conf;
--
1.4.4.4
-
Thanks, I've refreshed it.
Tony
From: Kevin Hilman <khilman@mvista.com>
The PRCM base register is different on 242x and 243x. Use
the #ifdef'd #define from omap24xx.h instead of the locally
defined one.Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/pm.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 64e67e5..cb1ae46 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -51,7 +51,6 @@
#include <asm/arch/dma.h>
#include <asm/arch/board.h>-#define PRCM_BASE 0x48008000
#define PRCM_REVISION 0x000
#define PRCM_SYSCONFIG 0x010
#define PRCM_IRQSTATUS_MPU 0x018
@@ -150,7 +149,7 @@ static void (*omap2_sram_idle)(void);
static void (*omap2_sram_suspend)(int dllctrl);
static void (*saved_idle)(void);-static u32 prcm_base = IO_ADDRESS(PRCM_BASE);
+static u32 prcm_base = IO_ADDRESS(OMAP24XX_PRCM_BASE);static inline void prcm_write_reg(int idx, u32 val)
{
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Remove the OMAP1 version of omap_dm_timer_get_fclk(), and its associated
compile-time warning. It would only BUG() if called, while it's only
called on OMAP2.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/dmtimer.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 36073df..3856f5a 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -271,11 +271,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)#if defined(CONFIG_ARCH_OMAP1)
-struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
-{
- BUG();
-}
-
/**
* omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
* @inputmask: current value of idlect mask
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Fix oops in omap16xx mpuio suspend/resume code; field wasn't initialized
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/gpio.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 7e90cea..b645ba4 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1178,6 +1178,8 @@ static struct platform_device omap_mpuio_device = {static inline void mpuio_init(void)
{
+ platform_set_drvdata(&omap_mpuio_device, &gpio_bank_1610[0]);
+
if (platform_driver_register(&omap_mpuio_driver) == 0)
(void) platform_device_register(&omap_mpuio_device);
}
--
1.4.4.2-
From: David Brownell <david-b@pacbell.net>
Bugfixes for the OSK led support:
- Fix Kconfig merge glitches: Mistral handles idle and timer leds just fine
- Fix pm_suspend() runtime botch: can't sleep, so can't touch tps65010 ledsImprovements:
- Switch sense of Mistral idle led, so idle == offProbably the TPS65010 leds should be handled only by the "new led" API.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/Kconfig | 7 +++++--
arch/arm/mach-omap1/leds-osk.c | 6 +++---
arch/arm/mach-omap1/pm.c | 11 -----------
3 files changed, 8 insertions(+), 16 deletions(-)diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b995945..ddaa5b3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -668,7 +668,8 @@ config LEDSconfig LEDS_TIMER
bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
- MACH_OMAP_H2 || MACH_OMAP_PERSEUS2
+ OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
+ || MACH_OMAP_PERSEUS2
depends on LEDS
default y if ARCH_EBSA110
help
@@ -684,7 +685,9 @@ config LEDS_TIMERconfig LEDS_CPU
bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \
- !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2
+ !ARCH_OMAP) \
+ || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
+ || MACH_OMAP_PERSEUS2
depends on LEDS
help
If you say Y here, the red LED will be used to give a good real
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 0cbf1b0..86de303 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -133,13 +133,13 @@ void osk_leds_event(led_event_t evt)
mistral_setled();
break;- case led_idle_start:
- hw_led_state |= IDLE_LED;
+ case led_idle_start: /* idle == off */
+ hw_led_state &= ~IDLE_LED;
mistral_setled();
break;case led_idle_end:
- hw_led_state &= ~IDLE_LED;
+ hw_led...
From: Jarkko Nikula <jarkko.nikula@nokia.com>
FIXME section in function omap2_allow_mpu_retention didn't allow MPU to
enter into retention even if system was idle. MPU retention works fine at
least in Nokia N800.Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/pm.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index cb1ae46..ef2c067 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -573,8 +573,7 @@ static int omap2_allow_mpu_retention(void)
if (sti_console_enabled)
return 0;- /* FIXME: Enable soon */
- return 0;
+ return 1;
}static void omap2_enter_mpu_retention(void)
--
1.4.4.2-
From: Eduardo Valentin <eduardo.valentin@indt.org.br>
This is an updated patch to fix lcd for H2 board. It uses platform_data
field to pass spi_device to lcd driver.Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/board-h2.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 4438390..810dabb 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -308,6 +308,17 @@ struct {
#define TSC2101_MUX_MCLK_ON R10_1610_MCLK_ON
#define TSC2101_MUX_MCLK_OFF R10_1610_MCLK_OFF+static void h2_lcd_dev_init(struct spi_device *tsc2101)
+{
+ /* The LCD is connected to the GPIO pins of the TSC2101, so
+ * we have to tie them here. We can also register the LCD driver
+ * first only here, where we know that the TSC driver is ready.
+ */
+
+ h2_lcd_device.dev.platform_data = tsc2101;
+ platform_device_register(&h2_lcd_device);
+}
+
static int h2_tsc2101_init(struct spi_device *spi)
{
int r;
@@ -331,6 +342,8 @@ static int h2_tsc2101_init(struct spi_device *spi)
omap_cfg_reg(TSC2101_MUX_MCLK_OFF);
omap_cfg_reg(N15_1610_UWIRE_CS1);+ h2_lcd_dev_init(spi);
+
return 0;
err:
clk_put(h2_tsc2101.mclk);
@@ -413,7 +426,6 @@ static struct platform_device *h2_devices[] __initdata = {
&h2_smc91x_device,
&h2_irda_device,
&h2_kp_device,
- &h2_lcd_device,
&h2_mcbsp1_device,
};--
1.4.4.2-
| David Miller | Re: Slow DOWN, please!!! |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Greg KH | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Josip Rodin | bnx2_poll panicking kernel |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
