Commit Graph

46223 Commits

Author SHA1 Message Date
Steven J. Magnani e1733d2c39 microblaze: export assembly functions used by modules
Modules that use copy_{to,from}_user(), memcpy(), and memset() fail to build
in certain circumstances.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13 10:46:04 +02:00
Paul Mundt c5eb5b372e Merge branch 'sh/clkfwk' 2010-05-13 17:45:44 +09:00
Kuninori Morimoto 03c5ecd13c sh: Check return value of clk_get on ms7724
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:39 +09:00
Kuninori Morimoto 1030585363 sh: Check return value of clk_get on ecovec24
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:31 +09:00
Magnus Damm fa676ca394 sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
Move the CPG helpers to drivers/sh/clk-cpg.c V2.

This to allow SH-Mobile ARM to share the code with
SH. All functions except the legacy CPG stuff is moved.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:22 +09:00
Magnus Damm 8b5ee113e1 sh: move sh clock.c contents to drivers/sh/clk.
This patch is V2 of the SH clock framework move from
arch/sh/kernel/cpu/clock.c to drivers/sh/clk.c. All
code except the following functions are moved:
clk_init(), clk_get() and clk_put().

The init function is still kept in clock.c since it
depends on the SH-specific machvec implementation.

The symbols clk_get() and clk_put() already exist in
the common ARM clkdev code, those symbols are left in
the SH tree to avoid duplicating them for SH-Mobile ARM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:14 +09:00
Magnus Damm d28bdf05f7 sh: move sh asm/clock.h contents to linux/sh_clk.h V2
This patch is V2 of the clock framework move from
arch/sh/include/asm/clock.h to include/linux/sh_clk.h
and updates the include paths for files that will be
shared between SH and SH-Mobile ARM.

The file asm/clock.h is still kept in this version,
this to depend on as few files as possible at this
point. We keep SH specific stuff in there.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:39:07 +09:00
Magnus Damm 441c2440ab sh: remove unused clock lookup
Now when all clocks are registered using clkdev,
get rid of the special SH-specific clock lookup.

Also ditch the unused module ref counting code.
This patch syncs the SH behaviour with ARM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:38:16 +09:00
Magnus Damm 67bbabbc86 sh: switch boards to clkdev
This patch converts the remaining board clocks
to use clkdev for lookup if needed. The unused
name and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:38:07 +09:00
Magnus Damm 9c352bcab7 sh: switch sh4-202 to clkdev
This patch converts the remaining sh4-202 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:37:59 +09:00
Magnus Damm 38803d7626 sh: switch shx3 to clkdev
This patch converts the remaining shx3 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:37:51 +09:00
Magnus Damm f0e7f90223 sh: switch sh7757 to clkdev
This patch converts the remaining sh7757 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:37:44 +09:00
Magnus Damm d6a94217fb sh: switch sh7763 to clkdev
This patch converts the remaining sh7763 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:37:39 +09:00
Magnus Damm 29497ec42c sh: switch sh7780 to clkdev
This patch converts the remaining sh7780 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:56 +09:00
Magnus Damm 2cf79bea43 sh: switch sh7786 to clkdev
This patch converts the remaining sh7786 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:48 +09:00
Magnus Damm 4a81fe625e sh: switch sh7785 to clkdev
This patch converts the remaining sh7785 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:40 +09:00
Magnus Damm 59aa69d9c2 sh: switch sh7366 to clkdev
This patch converts the remaining sh7366 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:34 +09:00
Magnus Damm 8249a31130 sh: switch sh7343 to clkdev
This patch converts the remaining sh7343 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:27 +09:00
Magnus Damm 925bb17b72 sh: switch sh7722 to clkdev
This patch converts the remaining sh7722 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:21 +09:00
Magnus Damm 00522ac3b1 sh: switch sh7723 to clkdev
This patch converts the remaining sh7723 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:13 +09:00
Magnus Damm b3f9f630d3 sh: switch sh7724 to clkdev
This patch converts the remaining sh7724 clocks
to use clkdev for lookup. The now unused name
and id from struct clk are also removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:08 +09:00
Magnus Damm 53041f020b sh: switch legacy clocks to clkdev
This patch converts the legacy clocks to register
using clkdev. Also the clock name is removed.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:36:02 +09:00
Magnus Damm 914ebf0bbb sh: get rid of div4 clock name
Remove the name parameter from SH_CLK_DIV4() and
adjust the processor specific code. The lookup
happens using clkdev so the name is unused.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:35:05 +09:00
Magnus Damm 1fe3d19883 sh: sh7786 div4 clkdev lookup
Add sh7786 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:59 +09:00
Magnus Damm 956f7f442a sh: sh7785 div4 clkdev lookup
Add sh7785 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:53 +09:00
Magnus Damm 40956e7569 sh: sh7366 div4 clkdev lookup
Add sh7366 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:46 +09:00
Magnus Damm f8ef178c88 sh: sh7343 div4 clkdev lookup
Add sh7343 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:38 +09:00
Magnus Damm 1c4cde2e6d sh: sh7724 div4 clkdev lookup
Add sh7724 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:30 +09:00
Magnus Damm 3f6623497e sh: sh7723 div4 clkdev lookup
Add sh7723 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:23 +09:00
Magnus Damm a3e9f2b72f sh: sh7722 div4 clkdev lookup
Add sh7722 DIV4 clocks to the clkdev lookup list.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:17 +09:00
Magnus Damm d40db0c4a6 sh: div4 reparent workaround
Update the div4 set_parent() callback to use the
flags instead of name to determine parent index.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:34:10 +09:00
Magnus Damm c77a9c3ede sh: get rid of mstp32 clock name and id
Remove the name and the id from SH_CLK_MSTP32().
Now when lookups are handled by clkdev they are
not needed anymore.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:33:17 +09:00
Magnus Damm d8ef3ccc1c sh: sh7786 mstp32 clkdev lookup
Add sh7786 MSTP clocks to the clkdev lookup table.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:33:10 +09:00
Magnus Damm 8bc23d95a0 sh: sh7786 mstp32 index rework
This patch adds sh7786 MSTP enums for mstp_clks[] index.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:33:02 +09:00
Magnus Damm eb85dcaa3e sh: sh7785 mstp32 clkdev lookup
Add sh7785 MSTP clocks to the clkdev lookup table.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:32:54 +09:00
Magnus Damm 5b10a27e9f sh: sh7785 mstp32 index rework
This patch adds sh7785 MSTP enums for mstp_clks[] index.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:32:47 +09:00
Magnus Damm b87cecef4c sh: sh7366 mstp32 clkdev lookup
Add sh7366 MSTP clocks to the clkdev lookup table.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:32:39 +09:00
Magnus Damm 4780683a13 sh: sh7366 mstp32 index rework
This patch adds sh7366 MSTP enums for mstp_clks[] index.
The MSTP bit for the SIU is removed as well since it is
not included in the documentation. Most likely an old
copy paste error from sh7722.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:32:31 +09:00
Magnus Damm 25637f7ae0 sh: sh7343 mstp32 clkdev lookup
Add sh7343 MSTP clocks to the clkdev lookup table.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:32:22 +09:00
Magnus Damm e8b96918a4 sh: sh7343 mstp32 index rework
This patch adds sh7343 MSTP enums for mstp_clks[] index.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-13 17:31:48 +09:00
Steven J. Magnani 538722ca3b microblaze: fix get_user/put_user side-effects
The Microblaze implementations of get_user() and (MMU) put_user() evaluate
the address argument more than once. This causes unexpected side-effects for
invocations that include increment operators, i.e. get_user(foo, bar++).

This patch also removes the distinction between MMU and noMMU put_user().

Without the patch:
  $ echo 1234567890 > /proc/sys/kernel/core_pattern
  $ cat /proc/sys/kernel/core_pattern
  12345

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
2010-05-13 09:21:14 +02:00
Steven J. Magnani 0d5961b7f6 microblaze: re-enable interrupts before calling schedule
schedule() should not be called with interrupts disabled.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13 09:21:01 +02:00
Cyrill Gorcunov 720019908f x86, perf: P4 PMU -- use hash for p4_get_escr_idx()
Linear search over all p4 MSRs should be fine if only
we would not use it in events scheduling routine which
is pretty time critical. Lets use hashes. It should speed
scheduling up significantly.

v2: Steven proposed to use more gentle approach than issue
    BUG on error, so we use WARN_ONCE now

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <20100512174242.GA5190@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-13 08:51:13 +02:00
Roel Kluin 4f018c513a KVM: PPC: Keep index within boundaries in kvmppc_44x_emul_tlbwe()
An index of KVM44x_GUEST_TLB_SIZE is already one too large.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Hollis Blanchard <hollis@penguinppc.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-13 01:33:04 -03:00
Jan Kiszka f8c5fae166 KVM: VMX: blocked-by-sti must not defer NMI injections
As the processor may not consider GUEST_INTR_STATE_STI as a reason for
blocking NMI, it could return immediately with EXIT_REASON_NMI_WINDOW
when we asked for it. But as we consider this state as NMI-blocking, we
can run into an endless loop.

Resolve this by allowing NMI injection if just GUEST_INTR_STATE_STI is
active (originally suggested by Gleb). Intel confirmed that this is
safe, the processor will never complain about NMI injection in this
state.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
KVM-Stable-Tag
Acked-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-13 01:31:37 -03:00
Dongxiao Xu fe19c5a46b KVM: x86: Call vcpu_load and vcpu_put in cpuid_update
cpuid_update may operate VMCS, so vcpu_load() and vcpu_put()
should be called to ensure correctness.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2010-05-13 01:31:02 -03:00
Joerg Roedel 061e2fd168 KVM: SVM: Fix wrong intercept masks on 32 bit
This patch makes KVM on 32 bit SVM working again by
correcting the masks used for iret interception. With the
wrong masks the upper 32 bits of the intercepts are masked
out which leaves vmrun unintercepted. This is not legal on
svm and the vmrun fails.
Bug was introduced by commits 95ba827313 and 3cfc3092.

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2010-05-13 01:24:08 -03:00
Linus Torvalds be835674b5 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/perf_event: Fix oops due to perf_event_do_pending call
  powerpc/swiotlb: Fix off by one in determining boundary of which ops to use
2010-05-12 18:48:26 -07:00
Thomas Abraham b3b84d652d ARM: S5P6440: Add clocks of type 'struct clksrc_clk'.
This patch adds the following.

1. Add new definitions of clock of type 'struct clksrc_clk'.
2. Add gate control function for GATE_SCLK1 which is required
   for new clock additions.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:48 +09:00
Thomas Abraham 39b7781b16 ARM: S5P6440: Rename clkset_mmc_spi to clkset_group1
The clock source options avaialable in the clkset_mmc_spi are
applicable to clocks such as sclk_post, sclk_dispcon and
sclk_fimgvg. So this set is renamed as clkset_group1 to indicate
that it can be used as clock sources for other clocks and not
just for sclk_spi and sclk_mmc clocks.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:48 +09:00
Thomas Abraham 213907dc1b ARM: S5P6440: Add clocks of type 'struct clk'.
Add definitions of clocks of type 'struct clk'.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:47 +09:00
Thomas Abraham 697f8a9fe7 ARM: S5P6440: Remove usage of clk_p_low and add clk_pclk_low clock
The pclk_low clock is of type 'struct clk' whereas on S5P6440,
the pclk_low clock is more suitable to be of type 'struct clksrc_clk'
(since pclk_low clock is a divided clock of hclk_low clock).

This patch modifies the following.

1. Removes the definition and usage of clk_p_clk clock.
2. Adds the clk_pclk_low clock of type 'struct clksrc_clk' clock.
3. Adds clk_pclk_low to the list of system clocks.
4. The clock rate of pclk_low is derived from the clk_pclk_low clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:47 +09:00
Thomas Abraham 93ad94db55 ARM: S5P6440: Remove usage of clk_h_low and add clk_hclk_low clock
The clk_h_low clock is of type 'struct clk' whereas on S5P6440,
the hclk_low clock is more suitable to be of type 'struct clksrc_clk'
(since hclk_low clock is derived from a choice of clock sources and
then divided by a divisor).

This patch modifies the following.

1. Removes the definition and usage of clk_h_clk clock.
2. Adds the clk_hclk_low clock of type 'struct clksrc_clk' clock.
3. Adds clk_hclk_low to the list of system clocks.
4. The clock rate of hclk_low is derived from the clk_hclk_low clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:46 +09:00
Thomas Abraham 47051461ab ARM: S5P6440: Remove usage of clk_p and add clk_pclk clock
The clk_p clock is of type 'struct clk' whereas on S5P6440,
the pclk is more suitable to be of type 'struct clksrc_clk'
(since pclk clock is divided version of hclk).

This patch modifies the following.

1. Adds the 'clk_pclk' clock which is of type 'struct clksrc_clk'.
2. Adds clk_pclk into the list of sysclks.
3. The clock rate 'pclk' is modified to be derived from clk_pclk.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:46 +09:00
Thomas Abraham e4f44f8269 ARM: S5P6440: Remove usage of clk_h and add clk_hclk clock
The clk_h clock is of type 'struct clk' whereas on S5P6440,
the hclk is more suitable to be of type 'struct clksrc_clk'
(since hclk clock is divided version of armclk)

This patch modifies the following.

1. Adds the 'clk_hclk' clock which is of type 'struct clksrc_clk'.
2. Removes all references to the clk_h clock.
3. Addes clk_hclk into the list of sysclks.
4. The clock rate 'hclk' is modified to be derived from clk_hclk.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:42:46 +09:00
Benjamin Herrenschmidt 131c6c9edd Merge commit 'kumar/merge' into merge 2010-05-13 11:42:40 +10:00
Thomas Abraham 9c72d016e2 ARM: S5P6440: Remove usage of clk_arm and add clk_armclk clock
The clk_arm clock is of type 'struct clk' whereas on S5P6440,
the arm clock is more suitable to be of type 'struct clksrc_clk'
(since arm clock is divided version of apll clock).

This patch modifies the following.

1. Removes the usage of clk_arm clock (defined in plat-s5p) and
   defines the new clock 'clk_armclk' of type 'struct clksrc_clk'.

2. Rearranges the assignment of clock rate for the fout_a/m/epll
   clocks. This will help in calculating the clock rate of fclk
   from clk_armclk clock and setup the clock rate for fout_m/epll
   for subsequent patches which depend on it.

3. Modifies the clock rate calculation of fclk to be based on
   the newly added clk_armclk clock.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:14:48 +09:00
Thomas Abraham 30d5834960 ARM: S5P6440: Change dout_mpll clock type to clksrc_clk clock type.
This patch modifies the following.

1. Modifies the dout_mpll clock type as clksrc_clk clock type.
   This modification allows the use of common clock code in
   managing the dout_mpll clock (which otherwise would need
   custom defined functions such as s5p6440_clk_doutmpll_get_rate).

2. s5p6440_clk_doutmpll_get_rate function is removed as it is
   no longer needed.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:14:48 +09:00
Thomas Abraham fb04911465 ARM: S5P6440: Register apll/mpll/epll mout clocks.
This patch modifies the following.

1. Registers the mout_apll clksrc_clk clock.

2. The mout_mpll and mout_epll were registered as 'struct clk'
   types and then their parents were setup using the s3c_set_clksrc
   function. This patch reduces the two steps into one by registering
   the mout_mpll and mout_epll clocks using the s3c_register_clksrc
   function.

3. As per point 2 above, the init_parents array is no longer required.
   So the mout clocks are now put together in a new array named 'sysclks'.
   The sysclks array will list the system level clocks and more
   clocks will be added to it in the subsequent patches.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-13 10:14:47 +09:00
Daniel Walker 29d3dedf22 arm: msm: video: add msm_fb.h
Also drops the old mddi structure, which conflicts with the new
file.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:41 -07:00
Daniel Walker 869a2a09e4 arm: msm: smd: fix initcall prototype compiler warning
This fixes the following warning,

arch/arm/mach-msm/smd_debug.c:240: warning: initialization from incompatible pointer type

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:39 -07:00
Daniel Walker 42df2c9916 arm: msm: trout: fix build failure without UART
Without a debug uart selected you get this failure,

arch/arm/mach-msm/board-trout.c:85: error: 'MSM_DEBUG_UART_PHYS' undeclared here (not in a function)
arch/arm/mach-msm/board-trout.c:86: error: 'MSM_DEBUG_UART_BASE' undeclared here (not in a function)

This just removes these lines in that case.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:37 -07:00
Daniel Walker 3a9f346a95 arm: msm: smd: remove Kconfig menu option
This removes the Kconfig menu option. SMD can still be selected
but it's done inside the Kconfig file and not via the menu.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:35 -07:00
Daniel Walker 0aec66d493 arm: msm: smd: fix SMD modem processor sync condition
When booting up we need to wait for the modem processor to
partially boot. This is because the modem processor does
resource allocation for us. If we don't wait the modem won't
honor our requests and we end up crashing or in an unknown
state. This change just formalizes the waiting process.

Signed-off-by: Daniel Walker <c_dwalke@quicinc.com>
2010-05-12 09:19:33 -07:00
Daniel Walker b13525c263 arm: msm: smd: ifdef dsp irq handler
This irq handler isn't used in all cases, so add the proper ifdef. This
eliminates a compiler warning due to the function not getting used.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:29 -07:00
Daniel Walker 3843ac3a5c arm: msm: smd: remove unneeded predefines
This just removed some unneeded predefines. One needed a whole
function moved down further. The others could just be deleted.

No functional changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:06 -07:00
Daniel Walker 74df1d07ee arm: msm: smd: msm7x30 a2m clean up
This moves the msm_a2m_int() function into the header, and
does a small macro clean up to be more inline with Linux
norms. No functional changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:04 -07:00
Daniel Walker 1a86fbc167 arm: msm: smd: convert unsigned addr to unsigned long
"unsigned" translates to "unsigned int", but this value holds an
address. We always want to use unsigned long for addresses since
it will change size to fit the machine.

This just convert the one address holder to unsigned long.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:19:03 -07:00
Daniel Walker bf83de4037 arm: msm: smd: use either package v3 or v4 not both
This modifies SMD to use either the package v3 or package v4,
but not both. The current code tries to allocate as v4 on all
system which can produce a scary looking error message on boot up,

smem_find(16, 40): wrong size 16424
smd_alloc_channel() cid=02 size=08192 'SMD_RPCCALL'

With this error the code then falls back on the package v3 allocation
method. This method is inefficient because it causes a slow down
on some systems even when the allocation method can be determined
at compile time. It also causes a kernel size increase that effects
all system and is not needed.

This change corrects the allocation to use one method or the other
and not both.

Signed-off-by: Daniel Walker <c_dwalke@quicinc.com>
2010-05-12 09:18:32 -07:00
Daniel Walker 79848a2a73 arm: msm: smd: checkpatch clean up of smd/proc_comm
This cleans up coding style. There are no run time changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:39 -07:00
Dima Zavin 93873bcbd1 [ARM] msm: smd: Force the half_channel struct aligmnent to 4
Forcing the alignment prevents gcc from generating byte reads for word
member variables. Lack of this caused issues when the app processor
modified struct members and the modem saw a partial word write.

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:37 -07:00
Dima Zavin b42dc44afc arm: msm: correctly signal the apps-to-modem irq in smd/proc_comm
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:35 -07:00
Brian Swetland 636eb9cbae msm: smd: provide atomic channel writes
Some smd clients may write from multiple threads, in which case it's
not safe to call smd_write without holding a lock.  smd_write_atomic()
provides the same functionality as smd_write() but obtains the smd
lock first.

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:31 -07:00
Iliyan Malchev 1207babdcd [ARM] msm: add /proc/last_radio_log when supported by the modem.
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:24 -07:00
Brian Swetland 34f719b0c2 msm/qsd: smd: avoid race condition in smd channel allocation
Don't mark a channel as allocated if we failed to allocate it
(perhaps the modem updated one table but not the other, etc)

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:21 -07:00
Haley Teng 7632fba051 [ARM] msm: smd: Update the correct fTAIL pointer after reading from fifo
When we read data out of the sender's fifo, we need to advance the sender's
tail pointer, not the receiver's.

Signed-off-by: Haley Teng <Haley_Teng@htc.com>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:16 -07:00
Brian Swetland 37521a3181 [ARM] msm: smd: add support for DSP SMD channels
- QSD8250 has a DSP that speaks SMD, in addition to the modem
- handle a separate list of modem vs dsp channels
- install dsp smd irq handler as necessary

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:11 -07:00
Brian Swetland 03e00cd350 [ARM] msm: cleanup smd, separate debugfs support
- pull debug code into smd_debug.c
- move necessary structures and defines into smd_private.h
- fix some comment formatting, etc

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:09 -07:00
Arve Hjønnevåg ec9d3d14ff [ARM] msm: Add 8k power collapse support to smd
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:07 -07:00
Arve Hjønnevåg 283794100d [ARM] msm: Add item argument to smsm_change_state and smsm_get_state
The new protocol require writing to two state fields, and reading
several fields.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:03 -07:00
Brian Swetland 5b0f5a3f60 msm: smd: initial support for smd v2
- support both v2 and v1 style smd channels
- support both v2 and v1 smsm shared state
- update smsm state defines and smem item enum
- prep work for dealing with smd to qdsp6
- simplify some smem access to minimize use of smem_alloc() at runtime

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:15:01 -07:00
Brian Swetland 4d4fb2660d [ARM] msm: smd: don't crash if the smd channel table doesn't exist
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:59 -07:00
Brian Swetland 2eb44eb9c8 [ARM] msm: shared memory interface for baseband processor ipc
This code provides the low level interface to the "shared memory
state machine" (smsm), and the virtual serial channels (smd), used
to communicate with the baseband processor.  Higher level transports
(rpc, ethernet, AT command channel, etc) ride on top of this.

Signed-off-by: Brian Swetland <swetland@google.com>
2010-05-12 09:14:52 -07:00
Dima Zavin 830d843b75 [ARM] msm: sdcc: Make slot status irq be a resource
Also, convert all SDCC IRQ resources to be named. No longer pass status_irq
in the platform_data

Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:50 -07:00
San Mehat 5d4f77ffef [ARM] msm: common: Add SDC device runtime registration
Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:48 -07:00
Daniel Walker 1b802ff79f arm: msm: add board file for Nexus One (ie. mahimahi)
This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:43 -07:00
Willie Ruan 1b70de32ac [ARM] msm: add new vreg IDs for MSM7X30
Signed-off-by: Willie Ruan <wruan@quicinc.com>
2010-05-12 09:14:41 -07:00
Matt Wilson 0e44106de5 arm: msm: add vreg reference count
Support independent enable and disable by clients for common
vreg. First enable switches on and last disable switches off.

This change has no check for voltage level so clients
must agree on level for common vreg.

Signed-off-by: Matthew Wilson <mtwilson@quicinc.com>
2010-05-12 09:14:40 -07:00
Daniel Walker 4eab62519f arm: msm: warning fix in acpuclock.c
Fixes the following warning,

arch/arm/mach-msm/acpuclock-arm11.c:138: warning: 'freq_table' defined but not used

when CONFIG_CPU_FREQ_TABLE is not enabled.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:38 -07:00
Steve Muckle 4783de9bba arm: msm: status for vreg
Keep track of the success/failure of the last vreg proc comm
command, and return that on debugfs reads.

Signed-off-by: Steve Muckle <smuckle@quicinc.com>
2010-05-12 09:14:36 -07:00
Steve Muckle 0c50b444b6 arm: msm: return error pointer in vreg_get if vreg not found
Signed-off-by: Steve Muckle <smuckle@quicinc.com>
2010-05-12 09:14:34 -07:00
Daniel Walker 2012e49e8a arm: msm: move board-dream.c to board-trout.c
Move the naming of this board file back to the original Google naming.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:33 -07:00
Daniel Walker 43b39f9f04 arm: msm: add cpu frequency controls
This adds acpuclock-arm11.c from Google. This provides control
over the cpu frequency for arm11 cpu's.

This has shared authorship between Google, and Qualcomm. Most
of it was written by Mike Chan at Google.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:14:20 -07:00
Brian Swetland 9f68fcdb8f msm: add dsb() syncronization to datamover driver
Avoids problems on the scorpion core.

Signed-off-by: Brian Swetland <swetland@google.com>
2010-05-12 09:14:17 -07:00
Arve Hjønnevåg c5541079da [ARM] msm: dma: Enable dma clock while dma is active
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-05-12 09:14:14 -07:00
Arve Hjønnevåg a6407dd7b8 [ARM] msm: dma: disable_irq -> disable_irq_nosync
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-05-12 09:14:11 -07:00
Dima Zavin 5f5d585167 [ARM] msm: Update list of proc_comm enums.
Signed-off-by: Dima Zavin <dima@android.com>
2010-05-12 09:14:00 -07:00
Arve Hjønnevåg d6ada25776 [ARM] msm: irq: fix lockdep issues
Signed-off-by: Brian Swetland <swetland@google.com>
2010-05-12 09:13:56 -07:00
Arve Hjønnevåg 36cf1b55b4 [ARM] msm: Add MSM_DEBUG_UART option.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2010-05-12 09:13:53 -07:00
Arve Hjønnevåg 6bd631e17e [ARM] msm: halibut: Add memory configuration. 2010-05-12 09:13:49 -07:00
Daniel Walker a32d2feb80 arm: msm: add board file for QSD8x50 SURF and FFA
This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:13:44 -07:00
Daniel Walker 8d747cdb3d arm: msm: add board file for MSM7x30 SURF and FFA
This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:13:35 -07:00
Daniel Walker 2682fd3df5 arm: msm: add board file for MSM7x25/MSM7x27 SURF and FFA
This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:13:34 -07:00
Daniel Walker 614ad98148 arm: msm: add board file for the HTC Sapphire device
This adds a basic board file without Kconfig changes.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-12 09:13:32 -07:00
Srinidhi Kasagar f4a27aed48 ARM: 6125/1: ARM TWD: move TWD registers to common header
This moves the TWD register set of MPcore to a common
existing file so that watchdog driver can access it

Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-12 11:18:13 +01:00
Tejun Heo 308eb7add8 ia64: add sparse annotation to __ia64_per_cpu_var()
ia64 has its own optimized percpu accessor - __ia64_per_cpu_var().
Add percpu sparse annotations to it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
2010-05-12 12:10:39 +02:00
Maurus Cuelenaere 6cd82ffe0c ARM: SAMSUNG: Move HWMON from plat-s3c24xx to plat-samsung
Move HWMON platform definition from plat-s3c24xx to plat-samsung
and adjust mach-bast to use the new s3c_hwmon_set_platdata().
This allows usage of dev-hwmon by other Samsung SoCs.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 17:43:03 +09:00
Martin Schwidefsky 57d84906f0 [S390] correct address of _stext with CONFIG_SHARED_KERNEL=y
As of git commit 1844c9bc0b head64.S/head31.S
are not included in head.S anymore but build as an extra object. This breaks
shared kernel support because the .org statement in head64.S/head31.S for
CONFIG_SHARED_KERNEL=y will have a different effect. The end address of the
head.text section in head.o will be added to the .org value, to compensate
for this subtract 0x11000 to get the required value of 0x100000 again.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-12 09:32:26 +02:00
Gerald Schaefer 545c174d1f [S390] ptrace: fix return value of do_syscall_trace_enter()
strace may change the system call number, so regs->gprs[2] must not
be read before tracehook_report_syscall_entry(). This fixes a bug
where "strace -f" will hang after a vfork().

Cc: <stable@kernel.org>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-12 09:32:26 +02:00
David S. Miller 278554bd65 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	Documentation/feature-removal-schedule.txt
	drivers/net/wireless/ath/ar9170/usb.c
	drivers/scsi/iscsi_tcp.c
	net/ipv4/ipmr.c
2010-05-12 00:05:35 -07:00
Paul Mackerras 0fe1ac48be powerpc/perf_event: Fix oops due to perf_event_do_pending call
Anton Blanchard found that large POWER systems would occasionally
crash in the exception exit path when profiling with perf_events.
The symptom was that an interrupt would occur late in the exit path
when the MSR[RI] (recoverable interrupt) bit was clear.  Interrupts
should be hard-disabled at this point but they were enabled.  Because
the interrupt was not recoverable the system panicked.

The reason is that the exception exit path was calling
perf_event_do_pending after hard-disabling interrupts, and
perf_event_do_pending will re-enable interrupts.

The simplest and cleanest fix for this is to use the same mechanism
that 32-bit powerpc does, namely to cause a self-IPI by setting the
decrementer to 1.  This means we can remove the tests in the exception
exit path and raw_local_irq_restore.

This also makes sure that the call to perf_event_do_pending from
timer_interrupt() happens within irq_enter/irq_exit.  (Note that
calling perf_event_do_pending from timer_interrupt does not mean that
there is a possible 1/HZ latency; setting the decrementer to 1 ensures
that the timer interrupt will happen immediately, i.e. within one
timebase tick, which is a few nanoseconds or 10s of nanoseconds.)

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: stable@kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-05-12 14:34:00 +10:00
Kukjin Kim 0ad73cefa2 ARM: SAMSUNG: Remove static of S5P SoCs sysclass
This patch removes static of s5p6440_sysclass, s5p6442_sysclass,
and s5pv210_sysclass for defintion as extern.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 11:15:09 +09:00
Ben Dooks afdd225d0f ARM: SAMSUNG: Remove old email address for ben-linux@fluff.org
The address ben@fluff.org is old, ben-linux@fluff.org has been in use
for a long time, and we should fixup all the occasions of the older
address to avoid confusion.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 10:06:28 +09:00
H. Peter Anvin c9775b4cc5 x86, fpu: Use static_cpu_has() to implement use_xsave()
use_xsave() is now just a special case of static_cpu_has(), so use
static_cpu_has().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
2010-05-11 17:49:54 -07:00
H. Peter Anvin a3c8acd043 x86: Add new static_cpu_has() function using alternatives
For CPU-feature-specific code that touches performance-critical paths,
introduce a static patching version of [boot_]cpu_has().  This is run
at alternatives time and is therefore not appropriate for most
initialization code, but on the other hand initialization code is
generally not performance critical.

On gcc 4.5+ this uses the new "asm goto" feature.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
2010-05-11 17:47:07 -07:00
Linus Torvalds b2464ab202 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kprobes/x86: Fix removed int3 checking order
  perf: Fix static strings treated like dynamic ones
2010-05-11 17:37:24 -07:00
Vasily Khoruzhick 192ff91fc8 ARM: RX1950: configure GPG13-15 as input before suspend
According to datasheet GPG13-15 must be configured as input in NAND
boot mode, otherwise device will not be able to wake up

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 09:20:28 +09:00
Vasily Khoruzhick 0741b7d269 ARM: RX1950: Add suspend/resume support for RX1950
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 09:19:54 +09:00
Vasily Khoruzhick c4761b69f4 ARM: S3C24XX: Locate kernel at 0x30108000 if PM_H1940 is enabled
If PM_H1940 is enabled, kernel _must_ be located upper then 0x30008000,
because this area (0x30000000-0x30100000) can be used by bootloader. If
kernel is located at 0x30008000, bootloader will corrupt kernel's code during
resume.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 09:19:24 +09:00
Vasily Khoruzhick c394f17799 ARM: S3C2440: Add HP iPAQ RX1950 machine support
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Denis Grigoriev <dgreenday@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-12 09:19:01 +09:00
Joerg Roedel 795e74f7a6 Merge branch 'iommu/largepages' into amd-iommu/2.6.35
Conflicts:
	arch/x86/kernel/amd_iommu.c
2010-05-11 17:40:57 +02:00
Haojian Zhuang baffe1699c [ARM] pxa: add namespace on ssp
In order to prevent code ambiguous, add namespace on functions in ssp driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Haojian Zhuang 2503991a56 [ARM] mmp: append device support in jasper
Support regulator MAX8649, PMIC MAX8925 into the Jasper.
Backlight & power supply components of MAX8925 are enabled in Jasper.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Haojian Zhuang fed2405580 [ARM] mmp: update twsi index
Sync twsi index to register index. It's used to avoid typo error.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Mingliang Hu d49ea9e30b [ARM] mmp: add smc registers definition
Signed-off-by: Mingliang Hu <mhu4@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:06 +02:00
Haojian Zhuang f455787083 [ARM] mmp: add dma support to mmp2
Add DMA support in MMP2.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:05 +02:00
Haojian Zhuang 7f39403c56 [ARM] mmp: update mfp setting
Update mfp setting for mmp2.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:05 +02:00
Mingliang Hu 8ae84427bb [ARM] mmp: fix clock tick rate in mmp2
In MMP2, clock tick rate should be 6500000.

Signed-off-by: Mingliang Hu <mhu4@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:05 +02:00
Haojian Zhuang 55d3936d30 [ARM] mmp: configure gpio pins from 128 to 192
In mmp2, 6 banks of GPIO registers are supported. So we can support 192
GPIO pins at most.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:05 +02:00
Haojian Zhuang d24123bfae [ARM] mmp: update mmp2 defconfig
Enable MAX8649 & MAX8925 regulator, dynamic debug, Marvell Jasper platform.
Disable DNOTIFY, MAX8660 regulator, 88pm860x PMIC.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:05 +02:00
Haojian Zhuang 66b1964750 [ARM] mmp: enable L2 in mmp2
Enable Tauros2 L2 in mmp2. Tauros2 L2 is shared in Marvell ARM cores.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:04 +02:00
Haojian Zhuang e598863690 [ARM] mmp: update clock register function
Use clk_add_table in order to sync with clock driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:04 +02:00
Eric Miao f97cab28b1 [ARM] pxa: make it clear by converting MMC 'delay_detect' to millisecond
delay_detect in HZ is confusing, convert it to be millisecond based. And
thus remove those unnecessary call to msecs_to_jiffies() at runtime for
this field. Other constants are converted assuming HZ == 100, which are
basically true for those platforms.

The assignment in csb726.c was incorrect, and is fixed in this patch as
a result.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Daniel Mack <daniel@caiaq.de>
2010-05-11 17:25:04 +02:00
Marek Vasut fb25cb3309 [ARM] pxa/vpac270: fix now invalid bit of UP2OCR
This patch removes write to UP2OCR[DMSTATE] (ex-UP2OCR_DPPUBE) which is invalid
on PXA270C5 and later.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:04 +02:00
Marek Vasut bcc399bb49 [ARM] pxa/vpac270: add OneNAND support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:04 +02:00
Marek Vasut aeec134688 [ARM] pxa/vpac270: remove TS_IRQ magic number
The touchscreen GPIO IRQ was used as a magic number. Define it properly in the
board header file. This is a simple cleanup patch.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut 052345aec0 [ARM] pxa/vpac270: add ide support
This patch adds support for the on-board IDE channel. I tested this with a CDROM
connected over 2.5-3.5 IDE reduction with external power supplied to the CDROM.
This was not tested with the Voipac 270-HDD-000 (official Voipac HDD module),
but I expect no problems.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut 83a4a10226 [ARM] pxa/vpac270: Add DS1339 RTC support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut 1a8fb70e48 [ARM] pxa/vpac270: Add touchscreen support
This adds support for the UCB1400 touchscreen found in the VPAC270 device.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut 947fb57e3a [ARM] pxa/vpac270: add ethernet support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut 3d98f8816a [ARM] pxa/vpac270: UDC and UHC support
NOTE:
I wasn't able to get it running without reseting the HXOE (so it's there based
on my tests with the hardware). I'll have to investigate it properly when I have
more time.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:03 +02:00
Marek Vasut addff0faec [ARM] pxa: add support for Voipac PXA270 PCMCIA
PCMCIA support for Voipac PXA270

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:02 +02:00
Marek 543cd84255 [ARM] pxa: add basic support for Voipac PXA270 SBC
This patch adds basic support for the Voipac PXA270 SBC.
The device consists of the following hardware:
- PXA270 @ 520 MHz
- 256MB RAM (sparsemem, 2*128MB regions)
- 64MB NOR flash
- 640x480 LCD
- Ports: 2xUHC, 1xUDC, 1xPCMCIA, VGA, FFUART, 2xPS2, Speaker, MIC

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:02 +02:00
Marek Vasut b637799248 [ARM] pxa: add basic support for the Aeronix Zipit Z2 handheld
This patch adds support for the Zipit Z2. The parts missing from this
patch are the battery support, SPI driver for the LCD and support for
the Silicon Serial ID chip.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:02 +02:00
Igor Grinberg 8188097523 [ARM] pxa/cm-x300: update the memory fixup.
CM-X300 bootloader passes DRAM configuration information in ATAGS,
however, the first memory bank is reported at actual physical address 0x8000000.
Use the configuration information supplied by the bootloader and
cope with the necessity to have PHYS_ADDR=0xa0000000.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:02 +02:00
Igor Grinberg d176d64b54 [ARM] pxa/cm-x300: add regulator on vcc_core
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:02 +02:00
Igor Grinberg e4e309708e [ARM] pxa/cm-x300: fix da903x IRQ line assignment
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:01 +02:00
Igor Grinberg d768c67c0c [ARM] pxa/cm-x300: da903x WLED is not connected on cm-x300
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:01 +02:00
Igor Grinberg 03ba7e07f5 [ARM] pxa/cm-x300.c: add battery charger support
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:01 +02:00
Eric Miao b1d9bf1d98 [ARM] pxa: remove pxa_gpio_mode() and files
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:01 +02:00
Eric Miao cb8f3c7dea [ARM] pxa/tosa: move CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES to mach/Kconfig
Tosa is now able to use generic matrix keypad driver instead of the deprecated
tosakbd.c, where CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES is still useful.  Move
it to mach/Kconfig.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao cb432b358d [ARM] pxa/corgi: cleanup GPIO configurations and low power mode settings
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao e63f591a8c [ARM] pxa/corgi: use generic GPIO API and remove pxa_gpio_mode()
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao b6eede1126 [ARM] pxa/spitz: use generic GPIO API and remove pxa_gpio_mode()
REVISIT: change to GPIO18 is ugly, need to make sure whether that's
really necessary - GPIO18_RDY as an VLIO input signal - we don't
normally need to do such kind of trick during low power mode.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao 1fe8c2bcad [ARM] pxa: allow MFP_LPM_INPUT to be explicitly specified
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao c09f431c33 [ARM] pxa: allow keypad GPIOs to wakeup when configured as generic
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:25:00 +02:00
Eric Miao 1106143d7a [ARM] pxa: add MFP_LPM_KEEP_OUTPUT flag to pin config
Some pins are expected to keep their last level during suspend, and
introduce MFP_LPM_KEEP_OUTPUT for this.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Julia Lawall c8ee5c6951 [ARM] pxa: use resource_size() in ssp.c
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Julia Lawall 077de1ad5a [ARM] pxa: avoid NULL dereferencing in error handling of ssp.c
The assignments of res to the results of the two calls to
platform_get_resource make it impossible to use res in the error handling
code in the arguments to release_mem_region.

The semantic match that finds the former problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@

if ((E == NULL && ...) || ...)
{
 ... when != false ((E == NULL && ...) || ...)
     when != true  ((E != NULL && ...) || ...)
     when != iter(E,...) S1
     when != E = E1
(
 sizeof(E->f)
|
* E->f
)
 ... when any
 return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Haojian Zhuang 07871c195a [ARM] mmp: enable ssp in aspenite
Configure both ssp and wm8753 in aspenite.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Haojian Zhuang 7e4992288e [ARM] mmp: support ssp in pxa168
Support ssp devices in PXA168. PXA168 could reuse the code of PXA SSP.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
Haojian Zhuang 004690f052 [ARM] pxa: simplify ifdef in ssp.h
Try to keep minimum ifdef in ssp.h.  Some of the definitions are valid
only to specific SoCs, and device drivers should be responsible to take
care of these difference.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Eric Miao 866d091dcb [ARM] pxa: remove incorrect select PXA_SSP in Kconfig
PXA_SSP is actually used by drivers like drivers/spi/pxa2xx_spi.c and
sound/soc/pxa/pxa-ssp.c, not by boards. Remove those incorrect 'select'
from Kconfig and make SOC_PXA_SSP to select.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Haojian Zhuang 54c39b420f [ARM] pxa: move ssp into common plat-pxa
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Eric Miao be1194cca5 [ARM] pxa: remove unnecessary #include of <mach/ssp.h>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Eric Miao 83f2889643 [ARM] pxa: merge regs-ssp.h into ssp.h
No need to separate them as they should be together from the begining.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:58 +02:00
Eric Miao c9840daa70 [ARM] pxa: correct SSCR0_SCR to support multiple SoCs
The previous definitions of SSCR0_SCR and SSCR0_SerClkDiv() prevented
them being used simultaneously when supporting multiple PXA SoCs, esp.
in drivers/spi/pxa2xx_spi.c, make them correct.

The change from SSCR0_SerClkDiv(2) to SSCR0_SCR(2), will make the result
a little bit different in pxa2xx_spi_probe(), however, since that's only
used as a default initialization value, it's acceptable.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:57 +02:00
Eric Miao 793ffb9ed3 [ARM] pxa: remove the now legacy SSP API
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:57 +02:00
Eric Miao 639b91a364 [ARM] pxa: remove now un-used corgi_ssp.c and corgi_lcd.c
The only use of corgi_ssp.c is corgi_ts.c, which is now deprecated
and removed. Remove corgi_ssp.c and corgi_lcd.c and their relevant
function declarations and data structures.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Pavel Machek <pavel@ucw.cz>
2010-05-11 17:24:57 +02:00
Joerg Roedel a523572596 x86/amd-iommu: Add amd_iommu=off command line option
This patch adds a command line option to tell the AMD IOMMU
driver to not initialize any IOMMU it finds.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2010-05-11 17:12:33 +02:00
Lin Ming 8e6d5573af perf, powerpc: Implement group scheduling transactional APIs
[paulus@samba.org: Set cpuhw->event[i]->hw.config in
power_pmu_commit_txn.]

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100508102841.GA10650@brick.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-11 17:08:24 +02:00
Ben Dooks fcef85c0c1 ARM: SAMSUNG: Add spinlock locking to GPIO banks
Add locking to each GPIO bank to allow for SMP capable code
to use the gpiolib functions. See the gpio-core.h header file
for more information.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-11 17:45:46 +09:00
Masami Hiramatsu 829e924585 kprobes/x86: Fix removed int3 checking order
Fix kprobe/x86 to check removed int3 when failing to get kprobe
from hlist. Since we have a time window between checking int3
exists on probed address and getting kprobe on that address,
we can have following scenario:

 -------
 CPU1                     CPU2
 hit int3
 check int3 exists
                          remove int3
                          remove kprobe from hlist
 get kprobe from hlist
 no kprobe->OOPS!
 -------

This patch moves int3 checking if there is no kprobe on that
address for fixing this problem as follows:

 ------
 CPU1                     CPU2
 hit int3
                          remove int3
                          remove kprobe from hlist
 get kprobe from hlist
 no kprobe->check int3 exists
          ->rollback&retry
 ------

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
Cc: Dave Anderson <anderson@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20100427223348.2322.9112.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-11 09:14:25 +02:00
Paul Mundt 4b478ee2a1 sh: All SH-X3 cores support NUMA and SMP, update Kconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 15:24:04 +09:00
Paul Mundt 21823259a7 sh: Ensure active regions have a backing PMB entry.
In the NUMA or memory hot-add case where system memory has been
partitioned up, we immediately run in to a situation where the existing
PMB entry doesn't cover the new range (primarily as a result of the entry
size being shrunk to match the node size early in the initialization). In
order to fix this up it's necessary to preload a PMB mapping for the new
range prior to activation in order to circumvent reset by MMU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 13:52:50 +09:00
Paul Mundt dfbca89987 sh: Reject small mappings for PMB bolting.
The minimum section size for the PMB is 16M, so just always error
out early if the specified size is too small. This permits us to
unconditionally call in to pmb_bolt_mapping() with variable sizes
without wasting a TLB and cache flush for the range.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 13:50:29 +09:00
Paul Mundt 4bc277ac9c sh: bootmem refactoring.
This reworks much of the bootmem setup and initialization code allowing
us to get rid of duplicate work between the NUMA and non-NUMA cases. The
end result is that we end up with a much more flexible interface for
supporting more complex topologies (fake NUMA, highmem, etc, etc.) which
is entirely LMB backed. This is an incremental step for more NUMA work as
well as gradually enabling migration off of bootmem entirely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 13:32:19 +09:00
Paul Mundt 15f2a7967a Merge branches 'sh/clkfwk' and 'sh/kexec' 2010-05-11 11:53:11 +09:00
Hiroshi DOYU 4f615d575c sh: clkfwk: Use debugfs_remove_recursive() for rewinding
Rewinding each debugfs entries to unregister if an error happens.

Based on the commit ca4caa4e1d

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:51:25 +09:00
Magnus Damm 9e1985e13d sh: get rid of div6 clock names
Get rid of div6 clock names on
sh7343/sh7366/sh7722/sh7723/sh7724

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:55 +09:00
Magnus Damm 098ec49b68 sh: tie in div6 clocks using clkdev
Use clkdev for div6 lookup on SH-Mobile processors:
sh7343/sh7366/sh7722/sh7723/sh7724

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:51 +09:00
Magnus Damm 08134c3c62 sh: get rid of hwblk clock names
Remove the clock name from sh7722/sh7723/sh7724
hwblk clocks. Lookup is handled by clkdev.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:47 +09:00
Magnus Damm d97432f101 sh: allow registering clocks without name
Modify the SuperH clock code to support struct clk
with NULL as name. Such clocks will not be hooked
up to debugfs.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:43 +09:00
Magnus Damm fd30401b07 sh: tie in hwblk clocks using clkdev
Use clkdev for lookup of hwblk clocks on
sh7722/sh7723/sh7724.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:39 +09:00
Magnus Damm e4e0669797 sh: scif and tmu clkdev changes
Modify sh7722/sh7723/sh7724 to use clkdev for
TMU and SCIF clock lookups.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:35 +09:00
Magnus Damm f3d51e13fe sh: hwblk index rework
Rework the sh7722/sh7723/sh7724 hwblk code to use the
hwblk id as index in the mstp clock array.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-11 11:48:31 +09:00
Thomas Abraham f001d5b28b ARM: S5P: Add USB External Crystal clock definition
Add USB external crystal clock definition Xusbxti to common S5P clock code.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-11 09:55:44 +09:00
Jongpill Lee b78232da3f ARM: S5PV210: Bug fix on PWM Timer
This patch fixes return value in below functions
- pwm_cfg_src_is_tclk
- tcfg_to_divisor
- pwm_tdiv_has_div1
- pwm_tdiv_div_bits

And this patch changes Copyright ordering.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-11 09:32:40 +09:00
Jongpill Lee dcd897dba1 ARM: S5P6442: Bug fix on PWM Timer
This patch fixes return value in below functions
- pwm_cfg_src_is_tclk
- tcfg_to_divisor
- pwm_tdiv_has_div1
- pwm_tdiv_div_bits

And this patch changes Copyright ordering.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-11 09:32:39 +09:00
Jongpill Lee 474b62f573 ARM: S5P6440: Bug fix on PWM Timer
This patch fixes return value in below functions
- pwm_cfg_src_is_tclk
- tcfg_to_divisor
- pwm_tdiv_has_div1
- pwm_tdiv_div_bits

And this patch changes Copyright ordering, and addes 'based on' information.

Signed-off-by: Jongpill Lee <boyko.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-11 09:32:39 +09:00
Jan Kiszka ce60d4d5d5 uml: i386: Avoid redefinition of NR_syscalls
The i386 subarch happens to pull in original NR_syscalls. Maybe we can
make that work for all host arch, but for now just avoid the clash by
using an all-upper-case name.

  CC      arch/um/kernel/skas/syscall.o/data/linux-2.6/arch/um/kernel/skas/syscall.c:13:1: warning: "NR_syscalls" redefined
In file included from /data/linux-2.6/arch/x86/include/asm/unistd.h:3,
                 from /data/linux-2.6/arch/um/sys-i386/shared/sysdep/syscalls.h:6,
                 from /data/linux-2.6/arch/um/kernel/skas/syscall.c:10:
/data/linux-2.6/arch/x86/include/asm/unistd_32.h:349:1: warning: this is the location of the previous definition

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-10 23:38:15 +02:00
H. Peter Anvin dce8bf4e11 x86, fpu: Use the proper asm constraint in use_xsave()
The proper constraint for a receiving 8-bit variable is "=qm", not
"=g" which equals "=rim"; even though the "i" will never match, bugs
can and do happen due to the difference between "q" and "r".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
2010-05-10 13:41:41 -07:00
H. Peter Anvin c3f8978ea3 x86, fpu: Unbreak FPU emulation
Unbreak FPU emulation, broken by checkin
86603283326c9e95e5ad4e9fdddeec93cac5d9ad:
x86: Introduce 'struct fpu' and related API

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com>
2010-05-10 13:37:16 -07:00
Avi Kivity 8660328332 x86: Introduce 'struct fpu' and related API
Currently all fpu state access is through tsk->thread.xstate.  Since we wish
to generalize fpu access to non-task contexts, wrap the state in a new
'struct fpu' and convert existing access to use an fpu API.

Signal frame handlers are not converted to the API since they will remain
task context only things.

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-3-git-send-email-avi@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-05-10 10:48:55 -07:00
Avi Kivity c9ad488289 x86: Eliminate TS_XSAVE
The fpu code currently uses current->thread_info->status & TS_XSAVE as
a way to distinguish between XSAVE capable processors and older processors.
The decision is not really task specific; instead we use the task status to
avoid a global memory reference - the value should be the same across all
threads.

Eliminate this tie-in into the task structure by using an alternative
instruction keyed off the XSAVE cpu feature; this results in shorter and
faster code, without introducing a global memory reference.

[ hpa: in the future, this probably should use an asm jmp ]

Signed-off-by: Avi Kivity <avi@redhat.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-05-10 10:39:33 -07:00
Paul Mundt 5e2ff328c0 sh: rework memory limits to work with LMB.
This reworks the memory limit handling to tie in through the available
LMB infrastructure. This requires a bit of reordering as we need to have
all of the LMB reservations taken care of prior to establishing the
limits.

While we're at it, the crash kernel reservation semantics are reworked
so that we allocate from the bottom up and reduce the risk of having
to disable the memory limit due to a clash with the crash kernel
reservation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-10 20:17:25 +09:00
Ingo Molnar cc49b092d3 Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into oprofile 2010-05-10 13:13:40 +02:00
Ingo Molnar 7c224a03a7 Merge commit 'v2.6.34-rc7' into oprofile
Merge reason: Update to Linus's latest -rc.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-10 13:12:29 +02:00
Anand Gadiyar a8cd4561ea fix "seperate" typos in comments
s/seperate/separate

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-10 11:56:30 +02:00
Paul Mundt 19d8f84f86 sh: enable LMB region setup via machvec.
This plugs in a memory init callback in the machvec to permit boards to
wire up various bits of memory directly in to LMB. A generic machvec
implementation is provided that simply wraps around the normal
Kconfig-derived memory start/size.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-10 15:39:05 +09:00
H. Peter Anvin 3998d09535 x86, hypervisor: add missing <linux/module.h>
EXPORT_SYMBOL() needs <linux/module.h> to be included; fixes modular
builds of the VMware balloon driver, and any future modular drivers
which depends on the hypervisor.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Greg KH <greg@kroah.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Ky Srinivasan <ksrinivasan@novell.com>
Cc: Dmitry Torokhov <dtor@vmware.com>
LKML-Reference: <4BE49778.6060800@zytor.com>
2010-05-09 22:46:54 -07:00
Ben Dooks 63b1f51b24 ARM: SAMSUNG: Update S3C2416 entry with S3C2450
These devices are so similar that they share the same SoC
ID code, so note this.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:47 +09:00
Ben Dooks eb90de4a2d ARM: S3C2413: Update GPIO pull-up support
Ensure the right get/set pull code is selected and assigned to the GPIO
core.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:46 +09:00
Ben Dooks e12ef7f02e ARM: S3C2416: Use s3c2440 style i2c controller
The s3c2416 i2c controllers are compatible with the s3c2440 style i2c
block, so change the device name appropriately.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>y
2010-05-10 11:44:45 +09:00
Ben Dooks a6e1ec7f69 ARM: S3C2416: Add support for OHCI on SMDK2416
Add device definition and ensure that the host port is powered up
at start time. Full power control can be added at a later date.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:44 +09:00
Ben Dooks c140c98ac1 ARM: S3C2416: Add support for second HSMMC channel
Add support for the second HSMMC channel on the S3C2416.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:44 +09:00
Ben Dooks 8d6f865830 ARM: S3C2416: Add basic clock support
Add basic clock support for the PLLs, HSMMC channels and
PWM clocks. This is enough to get a basic system up and
running.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:43 +09:00
Ben Dooks af337f3e63 ARM: S3C2443: Move parts of the clock code to common clock file
To share code with some of the newer parts such as the S3C2416, move
parts of arch/arm/mach-s3c2443/clock.c to a common file called
arch/arm/plat-s3c24xx/s3c2443-clock.c.

Update the build configuration to deal with this new file.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:42 +09:00
Ben Dooks d11a7d7100 ARM: S3C24XX: Identify S3C2416 if S3C2412/S3C2413 built in
Extend the ARMv5 ID code to deal with S3C2416 being built with
S3C2412/S3C2413 enabled, as these have their ID registers in a
different place.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:41 +09:00
Yauhen Kharuzhy d24131470f ARM: S3C2416: Add initial support of SMDK2416
Add support of SMDK2416 development board.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:40 +09:00
Yauhen Kharuzhy f1290a49c5 ARM: S3C2416: Add arch support
Add arch/arm/mach-s3c2416 for support of the Samsung S3C2416 SoC.

This patch adds support of the S3C2416 SoC, clocks, timers,
and initial IRQ support (without support of secondary set of registers).

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
[ben-linux@fluff.org: removed files to be reworked, fixed conflicts]
[ben-linux@fluff.org: use s3c2443 reset instead of specific reset code]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:39 +09:00
Ben Dooks 4e04691bc6 ARM: SAMSUNG: Add s3c_disable_clocks() and tidy init+disable usage
Add s3c_disable_clocks() and change the clock registration code to use
the s3c_register_clocks() followed by s3c_disable_clocks() instead of
the loops it was using.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:38 +09:00
Ben Dooks e561aacc70 ARM: SAMSUNG: Move S3C6400 PLL code to <plat/pll.h> for re-use
The S3C6400 EPLL code matches the S3C2416 and compatible SoCs, so move
it from mach-s3c64xx into <plat/pll.h> for easy reuse.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:37 +09:00
Yauhen Kharuzhy 7cfdee9f67 ARM: S3C2416: Add S3C2416-specific registers definitions
Add macros for S3C2416 SoC support.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
[ben-linux@fluff.org: removed files that need changing]
[ben-linux@fluff.org: Fix S3C2416_GPH0_TXD0 definition]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-10 11:44:03 +09:00
H. Peter Anvin 96f6e775b5 x86, hypervisor: Export the x86_hyper* symbols
Export x86_hyper and the related specific structures, allowing for
hypervisor identification by modules.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Greg KH <greg@kroah.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Ky Srinivasan <ksrinivasan@novell.com>
Cc: Dmitry Torokhov <dtor@vmware.com>
LKML-Reference: <4BE49778.6060800@zytor.com>
2010-05-09 01:10:34 -07:00
H. Peter Anvin d7be0ce6af Merge commit 'v2.6.34-rc6' into x86/cpu 2010-05-08 14:59:58 -07:00
Ingo Molnar e7858f52a5 Merge branch 'cpu_stop' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into sched/core 2010-05-08 18:11:19 +02:00
Cyrill Gorcunov c7993165ef x86, perf: P4 PMU -- check for proper event index in RAW events
RAW events are special and we should be ready for user passing
in insane event index values.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <20100508112717.315897547@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-08 14:17:53 +02:00
Cyrill Gorcunov 3f51b7119d x86, perf: P4 PMU -- Get rid of redundant check for array index
The caller already has done such a check.
And it was wrong anyway, it had to be '>=' rather than '>'

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <20100508112717.130386882@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-08 14:17:53 +02:00
Cyrill Gorcunov 137351e0fe x86, perf: P4 PMU -- protect sensible procedures from preemption
Steven reported:

|
| I'm getting:
|
| Pid: 3477, comm: perf Not tainted 2.6.34-rc6 #2727
| Call Trace:
|  [<ffffffff811c7565>] debug_smp_processor_id+0xd5/0xf0
|  [<ffffffff81019874>] p4_hw_config+0x2b/0x15c
|  [<ffffffff8107acbc>] ? trace_hardirqs_on_caller+0x12b/0x14f
|  [<ffffffff81019143>] hw_perf_event_init+0x468/0x7be
|  [<ffffffff810782fd>] ? debug_mutex_init+0x31/0x3c
|  [<ffffffff810c68b2>] T.850+0x273/0x42e
|  [<ffffffff810c6cab>] sys_perf_event_open+0x23e/0x3f1
|  [<ffffffff81009e6a>] ? sysret_check+0x2e/0x69
|  [<ffffffff81009e32>] system_call_fastpath+0x16/0x1b
|
| When running perf record in latest tip/perf/core
|

Due to the fact that p4 counters are shared between HT threads
we synthetically divide the whole set of counters into two
non-intersected subsets. And while we're "borrowing" counters
from these subsets we should not be preempted (well, strictly
speaking in p4_hw_config we just pre-set reference to the
subset which allow to save some cycles in schedule routine
if it happens on the same cpu). So use get_cpu/put_cpu pair.

Also p4_pmu_schedule_events should use smp_processor_id rather
than raw_ version. This allow us to catch up preemption issue
(if there will ever be).

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <20100508112716.963478928@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-08 14:17:53 +02:00
Cyrill Gorcunov de902d967f x86, perf: P4 PMU -- configure predefined events
If an event is not RAW we should not exit p4_hw_config
early but call x86_setup_perfctr as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Robert Richter <robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-08 14:17:52 +02:00
Catalin Marinas e814d826dc ARM: 6110/1: Fix Thumb-2 kernel builds when UACCESS_WITH_MEMCPY is enabled
The patch adds the ENDPROC declarations for the __copy_to_user_std and
__clear_user_std functions. Without these, the compiler generates BXL to
ARM when compiling the kernel in Thumb-2 mode.

Reported-by: Kyungmin Park <kmpark@infradead.org>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-08 10:45:26 +01:00
Catalin Marinas b8349b569a ARM: 6112/1: Use the Inner Shareable I-cache and BTB ops on ARMv7 SMP
The standard I-cache Invalidate All (ICIALLU) and Branch Predication
Invalidate All (BPIALL) operations are not automatically broadcast to
the other CPUs in an ARMv7 MP system. The patch adds the Inner Shareable
variants, ICIALLUIS and BPIALLIS, if ARMv7 and SMP.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-08 10:44:30 +01:00
Catalin Marinas f4d6477f7f ARM: 6111/1: Implement read/write for ownership in the ARMv6 DMA cache ops
The Snoop Control Unit on the ARM11MPCore hardware does not detect the
cache operations and the dma_cache_maint*() functions may leave stale
cache entries on other CPUs. The solution implemented in this patch
performs a Read or Write For Ownership in the ARMv6 DMA cache
maintenance functions. These LDR/STR instructions change the cache line
state to shared or exclusive so that the cache maintenance operation has
the desired effect.

Tested-by: George G. Davis <gdavis@mvista.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-08 10:44:30 +01:00
Catalin Marinas b5a07faade ARM: 6106/1: Implement copy_to_user_page() for noMMU
Commit 7959722 introduced calls to copy_(to|from)_user_page() from
access_process_vm() in mm/nommu.c. The copy_to_user_page() was not
implemented on noMMU ARM.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-08 10:44:22 +01:00
Catalin Marinas b1a9ceb2e0 ARM: 6105/1: Fix the __arm_ioremap_caller() definition in nommu.c
Commit 31aa8fd6 introduced the __arm_ioremap_caller() function but the
nommu.c version did not have the _caller suffix.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-08 10:44:21 +01:00
H. Peter Anvin e08cae4181 x86: Clean up the hypervisor layer
Clean up the hypervisor layer and the hypervisor drivers, using an ops
structure instead of an enumeration with if statements.

The identity of the hypervisor, if needed, can be tested by testing
the pointer value in x86_hyper.

The MS-HyperV private state is moved into a normal global variable
(it's per-system state, not per-CPU state).  Being a normal bss
variable, it will be left at all zero on non-HyperV platforms, and so
can generally be tested for HyperV-specific features without
additional qualification.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Greg KH <greg@kroah.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Ky Srinivasan <ksrinivasan@novell.com>
LKML-Reference: <4BE49778.6060800@zytor.com>
2010-05-07 17:13:04 -07:00
Greg Kroah-Hartman 9fa0231742 x86, HyperV: fix up the license to mshyperv.c
This should have been GPLv2 only, we cut and pasted from the wrong file
originally, sorry.

Also removed some unneeded boilerplate license code, we all know where
to find the GPLv2, and that there's no warranty as that is implicit from
the license.

Cc: Ky Srinivasan <ksrinivasan@novell.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
LKML-Reference: <20100507235541.GA15448@kroah.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-05-07 17:00:25 -07:00
Jacob Pan 2b107d9363 x86: Avoid check hlt for newer cpus
Check hlt instruction was targeted for some older CPUs. It is an expensive
operation in that it takes 4 ticks to break out the check.  We can avoid
such check completely for newer x86 cpus (family >= 5).

[ hpa: corrected family > 5 to family >= 5 ]

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
LKML-Reference: <1273269585-14346-1-git-send-email-jacob.jun.pan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-05-07 15:31:17 -07:00
Linus Torvalds 417a9ef1f4 Merge branch 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB: pxa_camera: move fifo reset direct before dma start
  V4L/DVB: video: testing unsigned for less than 0
  V4L/DVB: mx1-camera: compile fix
  V4L/DVB: budget: Oops: "BUG: unable to handle kernel NULL pointer 	dereference"
  V4L/DVB: ngene: Workaround for stuck DiSEqC pin
  V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
  V4L/DVB: v4l: fix config dependencies: mxb and saa7191 are V4L2 drivers, not V4L1
  V4L/DVB: feature-removal: announce videotext.h removal
  V4L/DVB: V4L - vpfe capture - fix for kernel crash
  V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver
  V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
  V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declaration
  V4L/DVB: saa7146: fix up bytesperline if it is an impossible value
  V4L/DVB: V4L: vpfe_capture - free ccdc_lock when memory allocation fails
  V4L/DVB: V4L - Makfile:Removed duplicate entry of davinci
  V4L/DVB: omap24xxcam: potential buffer overflow
2010-05-07 13:58:56 -07:00
Russell King 4bddaf6609 Merge branch 'for-russell' of git://codeaurora.org/quic/kernel/dwalker/linux-msm into devel-stable 2010-05-07 21:40:43 +01:00
Russell King 35c44933ef Merge branch 'gemini_fix' of git://git.berlios.de/gemini-board into devel-stable 2010-05-07 21:39:35 +01:00
Daniel Walker 1252fa3154 Revert "arm: msm: add oprofile pmu support"
This reverts commit ee3c454b8d.

As request by Russell King.

Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-05-07 12:09:52 -07:00
Jassi Brar c4806174c5 ARM: S3C2412: DMA: Remove I2S FIFO address
The S3C DMA API doesn't make use of hw_addr.to/from and also
the FIFO addresses are provided from the I2S drivers. So these
fields are redundant.
This patch removes the hw_addr.to/from fields for I2S and the
inclusion of header, paving way for the header to be moved closer
to the I2S controller drivers.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07 16:35:44 +01:00
David S. Miller e0e33280fe Revert "microblaze: Kill NET_SKB_PAD and NET_IP_ALIGN overrides."
This reverts commit 39e0786d3c.

On request from microblaze developers, they are going to handle
this differently.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-07 02:55:33 -07:00
Lin Ming 4d1c52b02d perf, x86: implement group scheduling transactional APIs
Convert to the transactional PMU API and remove the duplication of
group_sched_in().

Reviewed-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: David Miller <davem@davemloft.net>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1272002172.5707.61.camel@minggr.sh.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:03 +02:00
Peter Zijlstra ab608344bc perf, x86: Improve the PEBS ABI
Rename perf_event_attr::precise to perf_event_attr::precise_ip and
widen it to 2 bits. This new field describes the required precision of
the PERF_SAMPLE_IP field:

  0 - SAMPLE_IP can have arbitrary skid
  1 - SAMPLE_IP must have constant skid
  2 - SAMPLE_IP requested to have 0 skid
  3 - SAMPLE_IP must have 0 skid

And modify the Intel PEBS code accordingly. The PEBS implementation
now supports up to precise_ip == 2, where we perform the IP fixup.

Also s/PERF_RECORD_MISC_EXACT/&_IP/ to clarify its meaning, this bit
should be set for each PERF_SAMPLE_IP field known to match the actual
instruction triggering the event.

This new scheme allows for a PEBS mode that uses the buffer for more
than a single event.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:02 +02:00
Peter Zijlstra 2b0b5c6fe9 perf, x86: Consolidate some code repetition
Remove some duplicated logic.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:02 +02:00
Peter Zijlstra 1e9a6d8d44 perf, x86: Remove PEBS SAMPLE_RAW support
Its broken, we really should get PERF_SAMPLE_REGS sorted.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:01 +02:00
Robert Richter a1f2b70a94 perf, x86: Use weight instead of cmask in for_each_event_constraint()
There may exist constraints with a cmask set to zero. In this case
for_each_event_constraint() will not work properly. Now weight is used
instead of the cmask for loop exit detection. Weight is always a value
other than zero since the default contains the HWEIGHT from the
counter mask and in other cases a value of zero does not fit too.

This is in preparation of ibs event constraints that wont have a
cmask.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271190201-25705-7-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:01 +02:00
Robert Richter 31fa58af57 perf, x86: Pass enable bit mask to __x86_pmu_enable_event()
To reuse this function for events with different enable bit masks,
this mask is part of the function's argument list now.

The function will be used later to control ibs events too.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271190201-25705-6-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:00 +02:00
Robert Richter 9d0fcba67e perf, x86: Call x86_setup_perfctr() from .hw_config()
The perfctr setup calls are in the corresponding .hw_config()
functions now. This makes it possible to introduce config functions
for other pmu events that are not perfctr specific.

Also, all of a sudden the code looks much nicer.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271190201-25705-4-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:00 +02:00
Robert Richter c1726f343b perf, x86: Move x86_setup_perfctr()
Move x86_setup_perfctr(), no other changes made.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271190201-25705-3-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:31:00 +02:00
Robert Richter 4261e0e0ef perf, x86: Move perfctr init code to x86_setup_perfctr()
Split __hw_perf_event_init() to configure pmu events other than
perfctrs. Perfctr code is moved to a separate function
x86_setup_perfctr(). This and the following patches refactor the code.

Split in multiple patches for better review.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1271190201-25705-2-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:30:59 +02:00
Ingo Molnar cce9131781 Merge branch 'perf/urgent' into perf/core
Merge reason: Resolve patch dependency

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-05-07 11:30:30 +02:00
Paul Mundt 7aed3b34fb sh: shuffle the elfcorehdr handling over to the crash dump code.
The elfcorehdr parsing was just tossed in setup.c, but nothing outside of
the crash dump code/vmcore bits require it, so we just move it out of the
way, as per ppc.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 17:58:55 +09:00
Paul Mundt aa424bbb8c sh: Ensure that X2 TLB settings are reflected in vmcore.
This rolls in the X2TLB config settings for vmcore.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 17:14:00 +09:00
Paul Mundt d523e1ae6a sh: flag kdump as broken on SMP for now.
There's still quite a bit of shootdown logic that needs to be hacked up
to support SMP for kdump properly, so just add in a BROKEN_ON_SMP
dependency for now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 16:39:09 +09:00
Paul Mundt 080e71e13d sh: bump up extra LMB reservations in bootmem init.
This bumps up the extra LMB reservations in ordering so that they're
accounted for prior to iterating over the region list. This ensures that
reservations are visible both within the LMB and bootmem context.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 15:10:42 +09:00
Paul Mundt 36fa06d6b5 sh: convert initrd reservation to LMB.
This switches over from bootmem -> LMB for the initrd area reservation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 15:10:07 +09:00
Paul Mundt a5ec395071 sh: convert kexec crash kernel management to LMB.
This migrates the crash kernel handling off of bootmem and over to LMB.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07 14:54:55 +09:00
David S. Miller 39e0786d3c microblaze: Kill NET_SKB_PAD and NET_IP_ALIGN overrides.
NET_IP_ALIGN defaults to 2, no need to override.

NET_SKB_PAD is now 64, which is much larger than microblaze's
L1_CACHE_SIZE so no need to override that either.

Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-06 22:01:53 -07:00
Ky Srinivasan a2a47c6c3d x86: Detect running on a Microsoft HyperV system
This patch integrates HyperV detection within the framework currently
used by VmWare. With this patch, we can avoid having to replicate the
HyperV detection code in each of the Microsoft HyperV drivers.

Reworked and tweaked by Greg K-H to build properly.

Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
LKML-Reference: <20100506190841.GA1605@kroah.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Vadim Rozenfeld <vrozenfe@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "K.Prasad" <prasad@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-05-06 18:24:15 -07:00
Ben Dooks 0c3767b161 ARM: n30: Just call s3c24xx_init_irq() directly from machine definition
The n30_init_irq() call is simply a call to s3c24xx_init_irq, so
just remove it and update the machine definitions to call the IRQ
initialision call directly.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 10:01:28 +09:00
Ben Dooks 8a19ebb093 ARM: n30: Fixup gpiolib calls for mmc power
Move to using gpio_request() and gpio_set_value() for the MMC power
control calls.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:59:11 +09:00
Pinkava J 271d323237 ARM: n30: Add support for power on/off on Acer n30 / Acer n35 MMC card reader
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:33 +09:00
Pinkava J 50cdba782c ARM: n30: Add support for MMC card reader on Acer n30 / Acer n35
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:32 +09:00
Pinkava J aeb1b7e49f ARM: n35: Enable wake-up by Power button on Acer n35
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:32 +09:00
Pinkava J 319887ee80 ARM: n35: Add support for LEDs on Acer n35
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:32 +09:00
Pinkava J 8ecad34918 ARM: n30: Add RTC platform device for Acer n30 / Acer n35
Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:31 +09:00
Pinkava J be7c4cf632 ARM: n30: fix: suspended wrong USB port on Acer n35
There is bug in USB setup code for Acer n35 (it is related directly to s3c2410,
see doc). We want suspend host port (is not connected) but device port should be
active.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:31 +09:00
Pinkava J ff3c25fa1b ARM: n30: Enable Acer n35 if Acer n30 is selected
All code already present for Acer n35 is useless unless MACH_N35 is defined.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
[ben-linux@fluff.org: minor edit of subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-05-07 09:41:31 +09:00
Sekhar Nori 243bc65447 davinci: edma: fix coding style issue related to usage of braces
In the edma driver, there are couple of instances where braces
are used for a single statement 'if' construct.

There are other instances where 'else' part of the if-else construct
does not use braces even if the 'if' part is a multi-line statement.

This patch fixes both.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:55:38 -07:00
Sekhar Nori 3f68b98a75 davinci: edma: use a more intuitive name for edma_info
'edma_info' structure inside the edma driver represents
a single instance of edma channel controller. Call it
'edma_cc' instead. This also avoids readers confusing
it with an instance of edma_soc_info structre which
carries the platform data for a single channel controller
instance.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:55:38 -07:00
Uwe Kleine-König b7d41d6d58 V4L/DVB: mx1-camera: compile fix
This fixes a regression of

	7d58289 (mx1: prefix SOC specific defines with MX1_ and deprecate old names)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:51 -03:00
Cyril Chemparathy e2800007f3 Davinci: serial - conditional reset via pwremu
With this patch, AR7 type uart ports are not reset via pwremu registers.  This
allows davinci_serial_init() reuse on tnetv107x soc.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:10 -07:00
Cyril Chemparathy 9ee1acefa8 Davinci: serial - use ioremap()
This patch implements davinci serial cleanups towards having this code
reusable on tnetv107x.

The change reuses the platform data membase field to hold the remapped space.
By disabling the UPF_IOREMAP flag in the platform data, we prevent
the 8250 driver from repeating the ioremap.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:10 -07:00
Cyril Chemparathy da0122ca8b Davinci: serial - remove unnecessary define
The uart pdata array is already terminated by a zero flag field.

This patch reuses this terminator and eliminates DAVINCI_MAX_NR_UARTS
definition.  This way, future platforms can have different number of uarts
initialized via davinci_serial_init().

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:10 -07:00
Cyril Chemparathy c78a5bc2e7 Davinci: watchdog reset separation across socs
The earlier watchdog reset mechanism had a couple of limitations.  First, it
embedded a reference to "davinci_wdt_device" inside common code.  This
forced all derived platforms (da8xx and tnetv107x) to define such a device.
This also would have caused problems in including multiple socs in a single
build due to symbol redefinition.

With this patch, davinci_watchdog_reset() now takes the platform device as an
argument.  The davinci_soc_info struct has been extended to include a reset
function and a watchdog platform_device.  arch_reset() then uses these
elements to reset the system in a SoC specific fashion.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:09 -07:00
Cyril Chemparathy 5b3a05ca91 Davinci: eliminate pinmux offset verbosity
Pinmux registers are sequential, and do not need to be enumerated out as they
currently are.  This reduces code volume and keeps things simple.

If some future SoC comes up with a discontiguous register map, PINMUX() can
then be expanded with local token pasting.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:09 -07:00
Cyril Chemparathy b27b6d03f2 Davinci: gpio - fine grained locking
This patch eliminates the global gpio_lock, and implements a per-controller
lock instead.  This also switches to irqsave/irqrestore locks in case gpios
are manipulated in isr.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:09 -07:00
Cyril Chemparathy 686b634a07 Davinci: gpio - controller type support
This patch allows for gpio controllers that deviate from those found on
traditional davinci socs.  davinci_soc_info has an added field to indicate the
soc-specific gpio controller type.  The gpio initialization code then bails
out if necessary.

More elements (tnetv107x) to be added later into enum davinci_gpio_type.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:08 -07:00
Cyril Chemparathy c12f415a91 Davinci: gpio - register layout invariant inlines
This patch renders the inlined gpio accessors in gpio.h independent of the
underlying controller's register layout.  This is done by including three new
fields in davinci_gpio_controller to hold the addresses of the set, clear, and
in data registers.

Other changes:

1. davinci_gpio_regs structure definition moved to gpio.c.  This structure is
no longer common across all davinci socs (davinci_gpio_controller is).

2. controller base address calculation code (gpio2controller()) moved to
gpio.c as this was no longer necessary for the inline implementation.

3. modified inline range checks to use davinci_soc_info.gpio_num instead of
DAVINCI_N_GPIO.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:08 -07:00
Cyril Chemparathy 99e9e52de6 Davinci: gpio - structs and functions renamed
Renamed gpio types to something more sensible:
	struct gpio_controller	--> struct davinci_gpio_regs
	struct davinci_gpio	--> struct davinci_gpio_controller
	gpio2controller()	--> gpio2regs()
	irq2controller()	--> irq2regs()

This change also moves davinci_gpio_controller definition to gpio.h.
Eventually, the gpio registers structure will be moved to gpio.c and no longer
a common cross-soc definition.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:08 -07:00
Cyril Chemparathy ba4a984e83 Davinci: gpio - minor cleanup
macroized repeated container_of()s to improve readability.
unified direction in/out functions.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:08 -07:00
Sergei Shtylyov 7a9978a1e2 DaVinci: move IDE platform device to its proper place
The IDE platform device is registered in three different places (2 board files
for DM644x and in dm646x.c for DM646x) while both the IDE base address and the
IDE IRQ are the same for both SoCs -- therefore,  the proper place for the IDE
platform seems to be in devices.c. Merge the IDE platform data and registration
code and create davinci_init_ide() in place of dm646x_init_ide()...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:07 -07:00
Thomas Koeller 280faffb4e davinci: mach/common.h: add missing includes
linux/compiler.h is required for __iomem
linux/types.h is required u32

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:07 -07:00
Cyril Chemparathy d6961e6889 Davinci: configurable pll divider mask
This patch allows socs to override the divider ratio mask by setting an
optional field (div_ratio_mask) in the pll_data structure.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:07 -07:00
Thomas Koeller ce100669d2 davinci: DM365: Allow use of GPIO64_57
Extended the MUX configuration to allow use of GPIO
terminals 64..57.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:06 -07:00
Sergei Shtylyov 002cb2d2f1 DA830 EVM: use DA8XX_AEMIF_*_BASE #define's
The board file #define's its own version of EMIFA base addresses, while there
are DA8XX_AEMIF_*_BASE macros #define'd in <mach/da8xx.h>.  Start using them
instead.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:06 -07:00
Sergei Shtylyov 7034217467 DaVinci: move AEMIF #define's to the proper headers
Currently each DaVinci board file #define's its own version of the EMIFA base
addresses (all named DAVINCI_ASYNC_EMIF_*_BASE), which leads to duplication.
Move these #define's to the SoC specific headers, changing their prefixes from
'DAVINCI' to the 'DM355', 'DM644X', and 'DM646X' since all these base addresses
are SoC specific...

And while at it, rename DM646X_ASYNC_EMIF_DATA_CE0_BASE to
DM646X_ASYNC_EMIF_CS2_SPACE_BASE in order to match the DM646x datasheet.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:06 -07:00
Cyril Chemparathy ef03592a1a Davinci: tnetv107x cpu types
Added tnetv107x cpu type definitions and cpu identification macros.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:05 -07:00
Cyril Chemparathy 6cc20cd8ed Davinci: tnetv107x IRQ definitions
IRQ numbers as defined for tnetv107x cp_intc.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:05 -07:00
Cyril Chemparathy 7520f4eded Davinci: tnetv107x LPSC modules
Added definitions for LPSC modules in the tnetv107x SOC

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:05 -07:00
Cyril Chemparathy 0e23f71d60 Davinci: tnetv107x pin list
Added list of muxed pins on the tnetv107x SOC.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:04 -07:00
Cyril Chemparathy 3821d10a53 Davinci: promote da8xx_pinmux_setup()
Rename da8xx_pinmux_setup() to davinci_cfg_reg_list() and promote it for use in
other SOCs that may need the ability to configure multiple pins in one shot.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:04 -07:00
Cyril Chemparathy 52958be3ad Davinci: support LPSC SwRstDisable state
The current clock control code always gates the clock (PSC state Disable = 2)
on clk_disable().  Some on-chip peripherals (e.g. LCD controller on TNETV107X)
need to be put into SwRstDisable = 0 on clock disable, to maintain
hardware sanity.

This patch extends the davinci_psc_config() arguments to pass in the desired
module state instead of a boolean enable/disable.  Further, clk_disable() now
checks for the PSC_SWRSTDISABLE clk flag before selecting the target state.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:04 -07:00
Cyril Chemparathy 449ef7f6a9 Davinci: cpintc host map configuration
Host map configuration instructs the interrupt controller to route interrupt
channels to FIQ or IRQ lines.  Currently, DA8xx family of devices leave these
registers at their reset-default values.

TNETV107X however does not have sane reset defaults, and therefore this
architecture needs to reconfigure the host-map such that channels 0 and 1
go to FIQ, and the remaining channels raise IRQs.

This patch adds an optional host map argument to cp_intc_init() for this.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:04 -07:00
Cyril Chemparathy 8ca2e597fc Davinci: enable timer clock before use
timer_init() programs timer64 hardware.  The module should ideally be brought
out of reset before this happens.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:03 -07:00
Cyril Chemparathy b722049d7e Davinci: allow SOCs based on other ARM CPUs
Preliminary modification prior to adding support for TNETV107X based on
ARM1176.  This change allows for CPUs other than ARM926T to be used for Davinci
derivative SoCs.  Existing devices (DA8x and DMx) operate unchanged.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:03 -07:00
Anuj Aggarwal a7e05065f5 davinci: edma: clear interrupt status for interrupt enabled channels only
Currently, the ISR in the EDMA driver clears the pending interrupt for all
channels without regard to whether that channel has a registered callback
or not.

This causes problems for devices like DM355/DM365 where the multimedia
accelerator uses EDMA by polling on the interrupt pending bits of some of the
EDMA channels. Since these channels are actually allocated through the Linux
EDMA driver (by an out-of-kernel module), the same shadow region is used by
Linux and accelerator. There a race between the Linux ISR and the polling code
running on the accelerator on the IPR (interrupt pending register).

This patch fixes the issue by making the ISR clear the interrupts only for
those channels which have interrupt enabled. The channels which are allocated
for the purpose of being polled on by the accelerator will not have a callback
function provided and so will not have IER (interrupt enable register) bits set.

Tested on DM365 and OMAP-L137/L138 with audio and MMC/SD (as EDMA users).

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
CC: Archith John Bency <archith@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:02 -07:00
Vipin Bhandari d154fed723 davinci: da830/omap-l137 evm: use 8-wire MMC/SD card support
The merge for 2.6.34 brings in 8-bit support to the DaVinci MMC/SD driver.

This patch updates the platform data for DA830/OMAP-L137 EVM to use 8-wire
support available in the driver.

Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:02 -07:00
Vipin Bhandari 8ccfd3f074 davinci: da830/omap-l137 evm: add support for GPIO based MMC/SD card detection
The DA830/OMAP-L137 EVM has GPIO based card detection logic, but the current
code does not use it.

Add support for GPIO based card detection to avoid reading the card to see
if a card is present or not.

Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:02 -07:00
Kevin Hilman 21ce873d21 davinci: sparse: gpio: void casting
Cleanup usage of void pointers when using genirq.  genirq API
takes and returns void *, where this GPIO API is using those
as __iomem pointers.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:01 -07:00
Kevin Hilman 28552c2eae davinci: misc cleanups from sparse
- Convert data/functions to static
- include headers for missing declarations
- pointer cleanups:  struct foo *__iomem f --> struct foo __iomem *f;

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-05-06 15:02:01 -07:00
Rabin Vincent af7dc2281f ARM: 6104/1: nomadik-gpio: use clk API
Add clocks with appropriate names in platforms that use it, and use the
clk API in nomadik-gpio.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-06 20:17:20 +01:00
Rabin Vincent dc6048c7f9 ARM: 6103/1: nomadik: define clocks statically
Add a table for clocks to be defined statically, so that new clocks can
be added without having to call nmdk_clk_create() for each of them.
Remove the now unused nmdk_clk_create() function.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-06 20:17:20 +01:00
Rabin Vincent 2210d6453b ARM: 6102/1: nomadik-gpio: set a default trigger for interrupts
Set a default trigger type for interrupts, otherwise if request_irq is
called without specifiying a trigger type, the interrupt will not
actually be enabled.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-06 20:17:19 +01:00
Rabin Vincent 7a852d8060 ARM: 6101/1: nomadik-gpio: don't enable in set_type
On this peripheral, setting the trigger type enables the interrupt, and
the current set_type() implementation unconditionally enables the
interrupt, even if it is called when the interrupt is disabled.  Fix
set_type() to:

 - if the interrupt is disabled, defer the actual trigger setting to
   when it is unmasked

 - if the interrupt is enabled, change the type immediately by clearing
   the old type and then re-enabling with the new type.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-06 20:17:19 +01:00
Rabin Vincent 040e5ecdda ARM: 6100/1: nomadik-gpio: factor out helper to enable/disable irqs
Remove some nearly-duplicated code to make the following patch simpler.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-05-06 20:17:18 +01:00