Commit Graph

8282 Commits

Author SHA1 Message Date
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
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
Ajay Kumar Gupta
1e753451eb musb: fix power field to hold all possible values
MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus
the 'power' field has to hold values above 255.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-30 09:25:07 -07:00
Linus Torvalds
6bec11921a Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6061/1: PL061 GPIO: Bug fix - setting gpio for HIGH_LEVEL interrupt is not working.
  ARM: 5957/1: ARM: RealView SD/MMC Card detection and write-protect using GPIOLIB
  ARM: 6030/1: KS8695: enable console
  ARM: 6060/1: PL061 GPIO: Setting gpio val after changing direction to OUT.
  ARM: 6059/1: PL061 GPIO: Changing *_irq_chip_data with *_irq_data for real irqs.
  ARM: 6023/1: update bcmring_defconfig to latest version and fix build error
  ARM: fix build error in arch/arm/kernel/process.c
2010-04-29 17:17:35 -07:00
Colin Tuckley
b56ba8aa6f ARM: 5957/1: ARM: RealView SD/MMC Card detection and write-protect using GPIOLIB
The switch to using GPIOLIB broke the sd/mmc card detection on the
RealView development boards if GPIO_PL061 was not selected.
This patch selects GPIO_PL061 if GPIOLIB is selected.
The sense of the return value from mmc_status has also changed
and is corrected.

Signed-off-by: Colin Tuckley <colin.tuckley@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-28 22:21:52 +01:00
Linus Torvalds
17282b9855 Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (39 commits)
  omap: delete unused bootloader tag variables
  omap: Devkit8000: Remove unused pins
  omap: Devkit8000: Change position of init calls
  omap: Devkit8000: Remove unnecessary include file
  omap: Devkit8000: Fix typo in pin name
  omap: Devkit8000: Add missing package selection
  omap: Devkit8000: Fix typo in supplies
  n8x0_defconfig: remove CONFIG_NILFS2_FS override
  omap: board-sdp-flash.c: Fix typos in debug output
  omap4: Fix McBSP4 base address
  omap: rx51_defconfig: Remove CONFIG_SYSFS_DEPRECATED*=y options
  omap: rx51_defconfig: Remove duplicate phonet
  omap: fix a gpmc nand problem
  AM3517: initialize i2c subsystem after mux subsystem
  omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
  omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is notenabled
  OMAP4: Clocks: Change SPI Instance Names
  omap: Devkit8000: Fix wrong usb port on Devkit8000
  OMAP4: Fix for CONTROL register Base
  OMAP4-HSMMC: FIX for MMC5 Controller IRQ Base
  ...
2010-04-27 08:27:26 -07:00
Aaro Koskinen
223e632c7a omap: delete unused bootloader tag variables
They are not needed and add over 512 bytes to kernel data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
cf25eb950d omap: Devkit8000: Remove unused pins
Old code from original patch contains beagle board pins that are
not available on the Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
faec32e5bf omap: Devkit8000: Change position of init calls
Change position of calling serial and ethernet initialization.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
184644a633 omap: Devkit8000: Remove unnecessary include file
Remove include otg.h.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
3cdc6ee54a omap: Devkit8000: Fix typo in pin name
Replace wrong sdr_cke[01] with sdrc_cke[01].

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
51824c5f5e omap: Devkit8000: Add missing package selection
Devkit8000 uses the CUS package for OMAP3530.

This patch adds missing package selection for CUS and enables
CONFIG_MUX.

Replace whitespace with tab in Kconfig.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
6057db52a2 omap: Devkit8000: Fix typo in supplies
Replace wrong vdss_dsi with vdds_dsi.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Francisco Alecrim
57ed0e7b72 n8x0_defconfig: remove CONFIG_NILFS2_FS override
arch/arm/configs/n8x0_defconfig:1061:warning: override: reassigning to
symbol NILFS2_FS

Signed-off-by: Francisco Alecrim <francisco.alecrim@openbossa.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Thomas Weber
31849483f1 omap: board-sdp-flash.c: Fix typos in debug output
Corrected type of flash in output (OneNAND => NOR).
Removed whitespace after newline in output.
Removed double whitespace in output.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Santosh Shilimkar
aee44c30e3 omap4: Fix McBSP4 base address
This patch fixes the McBSP4 base address for OMAP4

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Jarkko Nikula
cc352a3432 omap: rx51_defconfig: Remove CONFIG_SYSFS_DEPRECATED*=y options
Modern udev will not work with the CONFIG_SYSFS_DEPRECATED*=y options and
it seems also that the Maemo release works without when testing with the
Maemo 2.6.28 kernel.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:37:24 -07:00
Jarkko Nikula
c8fa4d2738 omap: rx51_defconfig: Remove duplicate phonet
Phonet is enabled by the commit bce54fed94
and this duplicate gives a warning when doing make rx51_defconfig.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
stanley.miao
11e1ef2d10 omap: fix a gpmc nand problem
If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause
a Oops.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
stanley.miao
5241b6b3bf AM3517: initialize i2c subsystem after mux subsystem
The initialize of i2c subsystem will set pinmux, so it should be done
after the initialize of mux subsystem initialization.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
stanley.miao
908c08d523 omap: remove one of the define of INT_34XX_BENCH_MPU_EMUL
INT_34XX_BENCH_MPU_EMUL was defined twice, another is at Line 312.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
stanley.miao
562468bd69 omap: fix the compile error if CONFIG_MTD_NAND_OMAP2 is notenabled
If CONFIG_MTD_NAND_OMAP2 is not enabled, there will be a compile error,
"gpmc_nand_init() is not defined". Add a inline noop function to fix it.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Abraham Arce
c8334810db OMAP4: Clocks: Change SPI Instance Names
Change the name for the spi instances on omap44xx_clks to match
the names omap2 spi driver gives:

omap-mcspi.1 -> omap2_mcspi.1
omap-mcspi.2 -> omap2_mcspi.2
omap-mcspi.3 -> omap2_mcspi.3
omap-mcspi.4 -> omap2_mcspi.4

Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Thomas Weber
2135bb53fb omap: Devkit8000: Fix wrong usb port on Devkit8000
Disable the nonexistent ehci port on Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Santosh Shilimkar
3655e0b415 OMAP4: Fix for CONTROL register Base
This patch fixes the base address of CONTROL register on OMAP4430SDP.
The control base is used by peripherals like MMC1 for PBIAS configuration.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
kishore kadiyala
9df76b7f17 OMAP4-HSMMC: FIX for MMC5 Controller IRQ Base
This patch fixes HSMMC Controller5 IRQ Base.

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Enric Balletbo i Serra
f6b74535b5 omap3: Fix EHCI port for IGEP v2 board
IGEP v2 uses EHCI port 1 instead of EHCI port 2.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Tony Lindgren
1dea5c6b58 omap: Fix n8x0 mmc_mmc_init compile warnings and typos
Fix warning: 'return' with a value, in function returning void
in n8x0_mmc_init. Also fix a search and replace typo.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Tony Lindgren
67d24820c2 omap2: Fix ARM processor check for 24xx
The value to check is 7 for V6 instead. The code has been
working as it falls through to 24xx code if the other checks
fail.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
Richard Woodruff
df571c4ab3 omap4: Fix build break when used with gcc-4.4.1 (2009-q3)
This patch adds  argument to smc calls as gcc-4.4.1 requires it
otherwise the build breaks with 2009-q3 toolchanin.

arch/arm/mach-omap2/omap-headsmp.S: Assembler messages:
arch/arm/mach-omap2/omap-headsmp.S:36: Error: missing expression -- `smc'
arch/arm/mach-omap2/omap-headsmp.S:55: Error: missing expression -- `smc'
arch/arm/mach-omap2/omap-headsmp.S:63: Error: missing expression -- `smc'
make[1]: *** [arch/arm/mach-omap2/omap-headsmp.o] Error 1

Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-23 15:35:11 -07:00
manjugk manjugk
519e61666f omap: DMA: Init CDAC to zero
The register DMA4_CDAC needs to be initialized to zero
before starting DMA transfer.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Govindraj R <govindraj.raja@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Reported-by:S, Venkatraman <svenkatr@ti.com>
Signed-off-by: Manjunatha GK <manjugk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-22 17:34:27 -07:00
Janusz Krzysztofik
29501577a7 omap: gpio: fix incorrect matching of IRQ_TYPE_EDGE_BOTH
Since IRQ_TYPE_EDGE_BOTH is defined as (IRQ_TYPE_EDGE_FALLING |
IRQ_TYPE_EDGE_RISING), testing against it with a bitwise AND also matches
both single-edge cases in addition to the intended both edges case. Fix it,
replacing with a more accurate expression.

Created and tested againts linux-2.6.34-rc3.
Applicable to 2.6.33-stable as well.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-22 17:32:36 -07:00
Felipe Balbi
46cdc4e431 arm: omap1: remove dead code from timer32k.c
Trivial patch, no functional changes

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-22 17:32:36 -07:00
Aaro Koskinen
2decb12e3e omap: fix clocksource_32k to start from zero
When the 32k sync timer is used for sched_clock(), it should count
time from the kernel boot (clocksource init) instead of the last HW
reset. Otherwise printk.time values will jump suddenly during the boot:

	[    0.000000] calling  omap2_clk_arch_init+0x0/0x138 @ 1
	[    0.000000] initcall omap2_clk_arch_init+0x0/0x138 returned -22 after 0 usecs
	[    0.000000] initcall omap2_clk_arch_init+0x0/0x138 returned with error code -22
	[    0.000000] calling  omap_init_clocksource_32k+0x0/0x98 @ 1
	[  508.697937] initcall omap_init_clocksource_32k+0x0/0x98 returned 0 after 0 usecs
	[  508.697967] calling  omap_init_devices+0x0/0x38 @ 1
	[  508.698425] initcall omap_init_devices+0x0/0x38 returned 0 after 0 usecs

This will confuse tools such as scripts/bootgraph.pl.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-04-22 17:32:36 -07:00
Leo Chen
313af42b5b ARM: 6023/1: update bcmring_defconfig to latest version and fix build error
update bcmring_defconfig to the latest kernel version, this will fix the
KAutobuild error.

Signed-off-by: Leo Hao Chen <leochen@broadcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-22 12:30:12 +01:00
Tony Lindgren
e2bca7c76a Merge branch 'for_2.6.34rc_a' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus 2010-04-21 15:26:56 -07:00
Russell King
4260415f6a ARM: fix build error in arch/arm/kernel/process.c
/tmp/ccJ3ssZW.s: Assembler messages:
/tmp/ccJ3ssZW.s:1952: Error: can't resolve `.text' {.text section} - `.LFB1077'

This is caused because:

	.section .data
	.section .text
	.section .text
	.previous

does not return us to the .text section, but the .data section; this
makes use of .previous dangerous if the ordering of previous sections
is not known.

Fix up the other users of .previous; .pushsection and .popsection are
a safer pairing to use than .section and .previous.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-21 08:45:21 +01:00
Ernst Schwab
b1cdbb5f83 ARM: 5974/1: arm/mach-at91 Makefile: remove two blanks.
Cosmetic change to mach-at91 Makefile: remove two blanks introduced
by earlier patches.

Signed-off-by: Ernst Schwab <eschwab@online.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14 11:22:44 +01:00
Mika Westerberg
3f2d4f561f ARM: 6052/1: kdump: make kexec work in interrupt context
When crash happens in interrupt context there is no userspace context.
We always use current->active_mm in those cases.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14 11:11:31 +01:00
Imre Deak
82c6f5a5b3 ARM: 6051/1: VFP: preserve the HW context when calling signal handlers
From: Imre Deak <imre.deak@nokia.com>

Signal handlers can use floating point, so prevent them to corrupt
the main thread's VFP context. So far there were two signal stack
frame formats defined based on the VFP implementation, but the user
struct used for ptrace covers all posibilities, so use it for the
signal stack too.

Introduce also a new user struct for VFP exception registers. In
this too fields not relevant to the current VFP architecture are
ignored.

Support to save / restore the exception registers was added by
Will Deacon.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14 11:11:30 +01:00
Imre Deak
5c5cac6385 ARM: 6050/1: VFP: fix the SMP versions of vfp_{sync,flush}_hwstate
From: Imre Deak <imre.deak@nokia.com>

Recently the UP versions of these functions were refactored and as
a side effect it became possible to call them for the current thread.
This isn't true for the SMP versions however, so fix this up.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14 11:11:30 +01:00
Nicolas Pitre
7e5a69e83b ARM: 6007/1: fix highmem with VIPT cache and DMA
The VIVT cache of a highmem page is always flushed before the page
is unmapped.  This cache flush is explicit through flush_cache_kmaps()
in flush_all_zero_pkmaps(), or through __cpuc_flush_dcache_area() in
kunmap_atomic().  There is also an implicit flush of those highmem pages
that were part of a process that just terminated making those pages free
as the whole VIVT cache has to be flushed on every task switch. Hence
unmapped highmem pages need no cache maintenance in that case.

However unmapped pages may still be cached with a VIPT cache because the
cache is tagged with physical addresses.  There is no need for a whole
cache flush during task switching for that reason, and despite the
explicit cache flushes in flush_all_zero_pkmaps() and kunmap_atomic(),
some highmem pages that were mapped in user space end up still cached
even when they become unmapped.

So, we do have to perform cache maintenance on those unmapped highmem
pages in the context of DMA when using a VIPT cache.  Unfortunately,
it is not possible to perform that cache maintenance using physical
addresses as all the L1 cache maintenance coprocessor functions accept
virtual addresses only.  Therefore we have no choice but to set up a
temporary virtual mapping for that purpose.

And of course the explicit cache flushing when unmapping a highmem page
on a system with a VIPT cache now can go, which should increase
performance.

While at it, because the code in __flush_dcache_page() has to be modified
anyway, let's also make sure the mapped highmem pages are pinned with
kmap_high_get() for the duration of the cache maintenance operation.
Because kunmap() does unmap highmem pages lazily, it was reported by
Gary King <GKing@nvidia.com> that those pages ended up being unmapped
during cache maintenance on SMP causing segmentation faults.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-04-14 11:11:27 +01:00