dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

21047 Commits

Author SHA1 Message Date
Shawn Guo d41789b266 ASoC: mx27vis: retrieve gpio numbers from platform_data
Rather than including mach/iomux-mx27.h to define gpio numbers and set
up the pins, the patch moves all these into machine code and has the
gpio numbers passed to driver via platform_data.  As the result, we
can remove the mach/iomux-mx27.h inclusion from driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-17 07:35:08 -04:00
Stephen Warren 03f6743375 ASoC: tegra: move platform data header
Move the Tegra+WM8903 ASoC platform data header out of
arch/arm/mach-tegra, as a pre-requisite of single zImage.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-06 06:29:33 +08:00
Mark Brown 75d8f2931a Merge branch 'asoc-omap' into for-3.7 2012-09-05 20:05:11 +08:00
Mark Brown fc600432cd Linux 3.6-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQQkiRAAoJEHm+PkMAQRiGk64H/Rp67mBWom2xMmU8gul3gr7d
 MFq7dQOShoHZVyuCtKFNF+RTFkHDT2mw0ZkdszHdMkPEznIVRNklieN6GayOwj7C
 XcRb50z/C0CTvEskLOzWsaC+Rok6doOi5VCgkkZ+6N4CvWQNEqWLfWW5H6wZ7juo
 ME1xx/59GDm/4TYMUXzPI9UygptGGXvH/18n/z47FQpvL5EbAECTVt1nPX1uvn/S
 ZzdSLG8MrbK+IX+62JZqRG5M6TUC2b8ggog2cFfP20JNK0TwU9dMQPtbk2Y+LZRg
 JiUqyRUOuQJFbCgE+b1JuleJHAlsAgqIs7tkY9VfdFYfh+NQcaccWjDjdeB7Hjo=
 =Ooia
 -----END PGP SIGNATURE-----

Merge tag 'v3.6-rc4' into asoc-omap

Linux 3.6-rc4
2012-09-05 13:04:34 +08:00
Hebbar, Gururaja 896f66b7de ASoC/ARM: Davinci: McASP: split asp header into platform and audio specific
Davinci McASP header & driver are shared by few OMAP platforms (like
TI81xx, AM335x). Splitting asp header into Davinci platform specific
header and Audio specific header helps to share them across platforms.

Audio specific defines is moved to to common
<linux/platform_data/davinci_asp.h> so that the header can be
accessed by all related platforms.

While here, correct the header usage (remove multiple header
re-definitions and unused headers) and remove platform names from
structures comments and enum. Also some some coding style errors.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Acked-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-27 11:12:09 -07:00
Hebbar, Gururaja bdd732786d ARM: Davinci: Remove references to davinci pcm
Since davinci-pcm is no more a platform_driver but helper to register
"platform" pcm driver, remove  davinci-pcm device registration

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-27 11:12:08 -07:00
Linus Torvalds 9acb172543 arm-soc fixes for v3.6-rc3
Bug fixes for various ARM platforms. About half of these are
 for OMAP and submitted before but did not make it into v3.6-rc2.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAUDZNL2CrR//JCVInAQLiug//es7PA1uorV7WYCwPuwoFDSrZtO5p57qr
 kyBjH/PrF38vu+DrcMkzGfcdjazrnrm4UuGoeBH4HAC/yaYZ1VVkP5+CjAwg0RgT
 lorjbAHLLrCD99AD+chLWdc9v3TbQ8Y5FdwReeJmTwdz04XHpC4Swcixosth6qpu
 wcSOVKDe/3cHTvK3DFfI4NjdrYFwXmXOE0sXii0fyot8W/57KNciogWPU2lBccir
 APV8pGCrj1liGIbQzIZuVF62P0+GtFR/jyC4VAM90rX1qB76F7hjJYk/72fiR7AM
 zXvLH8m2O1BuKIsMKe+YQNesNgGdaQwSR2Rk18tcrIeCdixzM7taYl8tp3ULLJfN
 faIXqlMUgbKe6YtVZNIQBqIMkGGYR4UaoHxzYndc7KaWIcmMkDcvLJxkIsqI7tcS
 nuwAjjv5UR2BSIkrQVVKkTbCtXoEjcClbOhutoS98YeIwcMC4WbI/JwPrVw3rqWh
 OSDIhimQojHShLW03BPr0Cw4nwB7RBcbsSWfKTjyJS4bNnW244p8ubnvAjMu0sVD
 JW84U9KR4c/pwJPVQ6VM9/PQ3HzEjtwIilRoPtc9hACiwgqhv1Q7BigMnokWH0we
 DL3xpnQrWRI8BlMXHi1sMq98zzCbtDAAoZsGH6bLlpetPIBiXe1tWvUnBRg2ybDC
 QjeH5esgNPY=
 =Tupl
 -----END PGP SIGNATURE-----

Merge tag 'fixes-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc fixes from Arnd Bergmann:
 "Bug fixes for various ARM platforms.  About half of these are for OMAP
  and submitted before but did not make it into v3.6-rc2."

* tag 'fixes-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
  ARM: ux500: don't select LEDS_GPIO for snowball
  ARM: imx: build i.MX6 functions only when needed
  ARM: imx: select CPU_FREQ_TABLE when needed
  ARM: imx: fix ksz9021rn_phy_fixup
  ARM: imx: build pm-imx5 code only when PM is enabled
  ARM: omap: allow building omap44xx without SMP
  ARM: dts: imx51-babbage: fix esdhc cd/wp properties
  ARM: imx6: spin the cpu until hardware takes it down
  ARM: ux500: Ensure probing of Audio devices when Device Tree is enabled
  ARM: ux500: Fix merge error, no matching driver name for 'snd_soc_u8500'
  ARM i.MX6q: Add virtual 1/3.5 dividers in the LDB clock path
  ARM: Kirkwood: fix Makefile.boot
  ARM: Kirkwood: Fix iconnect leds
  ARM: Orion: Set eth packet size csum offload limit
  ARM: mv78xx0: fix win_cfg_base prototype
  ARM: OMAP: dmtimers: Fix locking issue in omap_dm_timer_request*()
  ARM: mmp: fix potential NULL dereference
  ARM: OMAP4: Register the OPP table only for 4430 device
  cpufreq: OMAP: Handle missing frequency table on SMP systems
  ARM: OMAP4: sleep: Save the complete used register stack frame
  ...
2012-08-25 17:33:33 -07:00
Arnd Bergmann 57f0b20141 Merge branch 'randconfig/mach' into fixes
Small platform specific bug fixes for problems found in randconfig builds.

* randconfig/mach:
  ARM: ux500: don't select LEDS_GPIO for snowball
  ARM: imx: build i.MX6 functions only when needed
  ARM: imx: select CPU_FREQ_TABLE when needed
  ARM: imx: fix ksz9021rn_phy_fixup
  ARM: imx: build pm-imx5 code only when PM is enabled
  ARM: omap: allow building omap44xx without SMP

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-23 17:30:54 +02:00
Arnd Bergmann db43b18468 ARM: ux500: don't select LEDS_GPIO for snowball
Using 'select' in Kconfig is hard, a platform cannot just
enable a driver without also making sure that its subsystem
is there. Also, there is no actual code dependency between
the platform and the gpio leds driver.

Without this patch, building without LEDS_CLASS esults in:

drivers/built-in.o: In function `create_gpio_led.part.2':
governor_userspace.c:(.devinit.text+0x5a58): undefined reference to `led_classdev_register'
drivers/built-in.o: In function `gpio_led_remove':
governor_userspace.c:(.devexit.text+0x6b8): undefined reference to `led_classdev_unregister'

This reverts 8733f53c6 "ARM: ux500: Kconfig: Compile in leds-gpio
support for Snowball" that introduced the regression and did not
provide a helpful explanation.

In order to leave the GPIO LED code still present in normal
builds, this also enables the symbol in u8500_defconfig, in addition
to the other LED drivers that are already selected there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
2012-08-23 17:27:45 +02:00
Arnd Bergmann 1fc593feaf ARM: imx: build i.MX6 functions only when needed
The head-v7.S contains a call to the generic cpu_suspend function,
which is only available when selected by the i.MX6 code. As
pointed out by Shawn Guo, i.MX5 does not actually use any
functions defined in head-v7.S. It is also needed only for
the i.MX6 power management code and for the SMP code, so
we can restrict building this file to situations in which
at least one of those two is present.

Finally, other platforms with a similar file call it headsmp.S,
so we can rename it to the same for consistency.

Without this patch, building imx5 standalone results in:

arch/arm/mach-imx/built-in.o: In function `v7_cpu_resume':
arch/arm/mach-imx/head-v7.S:104: undefined reference to `cpu_resume'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Eric Miao <eric.miao@linaro.org>
Cc: stable@vger.kernel.org
2012-08-23 17:26:53 +02:00
Arnd Bergmann f637c4c940 ARM: imx: select CPU_FREQ_TABLE when needed
The i.MX cpufreq implementation uses the CPU_FREQ_TABLE helpers,
so it needs to select that code to be built. This problem has
apparently existed since the i.MX cpufreq code was first merged
in v2.6.37.

Building IMX without CPU_FREQ_TABLE results in:

arch/arm/plat-mxc/built-in.o: In function `mxc_cpufreq_exit':
arch/arm/plat-mxc/cpufreq.c:173: undefined reference to `cpufreq_frequency_table_put_attr'
arch/arm/plat-mxc/built-in.o: In function `mxc_set_target':
arch/arm/plat-mxc/cpufreq.c:84: undefined reference to `cpufreq_frequency_table_target'
arch/arm/plat-mxc/built-in.o: In function `mxc_verify_speed':
arch/arm/plat-mxc/cpufreq.c:65: undefined reference to `cpufreq_frequency_table_verify'
arch/arm/plat-mxc/built-in.o: In function `mxc_cpufreq_init':
arch/arm/plat-mxc/cpufreq.c:154: undefined reference to `cpufreq_frequency_table_cpuinfo'
arch/arm/plat-mxc/cpufreq.c:162: undefined reference to `cpufreq_frequency_table_get_attr'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Yong Shen <yong.shen@linaro.org>
Cc: stable@vger.kernel.org
2012-08-23 17:16:43 +02:00
Arnd Bergmann 9f9ba0fdec ARM: imx: fix ksz9021rn_phy_fixup
The ksz9021rn_phy_fixup and mx6q_sabrelite functions try to
set up an ethernet phy if they can. They do check whether
phylib is enabled, but unfortunately the functions can only
be called from platform code if phylib is builtin, not
if it is a module

Without this patch, building with a modular phylib results in:

arch/arm/mach-imx/mach-imx6q.c: In function 'imx6q_sabrelite_init':
arch/arm/mach-imx/mach-imx6q.c:120:5: error: 'ksz9021rn_phy_fixup' undeclared (first use in this function)
arch/arm/mach-imx/mach-imx6q.c:120:5: note: each undeclared identifier is reported only once for each function it appears in

The bug was originally reported by Artem Bityutskiy but only
partially fixed in ef441806 "ARM: imx6q: register phy fixup only when
CONFIG_PHYLIB is enabled".

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-23 17:16:43 +02:00
Arnd Bergmann a28eecef8a ARM: imx: build pm-imx5 code only when PM is enabled
This moves the imx5 pm code out of the list of unconditionally
compiled files for imx5, mirroring what we already do for imx6
and how it was done before the code was move from mach-mx5 to
mach-imx in v3.3.

Without this patch, building with CONFIG_PM disabled results in:

arch/arm/mach-imx/pm-imx5.c:202:116: error: redefinition of 'imx51_pm_init'
arch/arm/mach-imx/include/mach-imx/common.h:154:91: note: previous definition of 'imx51_pm_init' was here
arch/arm/mach-imx/pm-imx5.c:209:116: error: redefinition of 'imx53_pm_init'
arch/arm/mach-imx/include/mach-imx/common.h:155:91: note: previous definition of 'imx53_pm_init' was here

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable@vger.kernel.org
2012-08-23 17:16:42 +02:00
Arnd Bergmann c7a9b09b1a ARM: omap: allow building omap44xx without SMP
The new omap4 cpuidle implementation currently requires
ARCH_NEEDS_CPU_IDLE_COUPLED, which only works on SMP.

This patch makes it possible to build a non-SMP kernel
for that platform. This is not normally desired for
end-users but can be useful for testing.

Without this patch, building rand-0y2jSKT results in:

drivers/cpuidle/coupled.c: In function 'cpuidle_coupled_poke':
drivers/cpuidle/coupled.c:317:3: error: implicit declaration of function '__smp_call_function_single' [-Werror=implicit-function-declaration]

It's not clear if this patch is the best solution for
the problem at hand. I have made sure that we can now
build the kernel in all configurations, but that does
not mean it will actually work on an OMAP44xx.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
2012-08-23 17:16:42 +02:00
Arnd Bergmann 5f870baa18 Here are two audio fixes for the ux500 found by Lee Jones.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQMmlIAAoJEEEQszewGV1zxkkQAMwY0oircGjrY8eHC2+4MVNQ
 7aOdLRuHsv9H4Y4hMwNyvNOeAbhDTLg6Xe4XWCKe48d9OvEImDPOca4az9X3xl1T
 /5lVjpo6KP2OF2gUVRW51vNkc6qJOCSE/5CDZBZUgZmqNtrv7PRRWcKrX2q3gLZb
 CEHcHBIRhB00iu8VEmXG2J4hJ3+IEl+efJ/EeSHFFSsaXOU/5tZ+/8fY93hmjXzO
 0GwGIGtVpYsrQ6smL7FUygzOIGrCz59zaWAx6nezR6uq7nWBCWC7ivyzab+zn/9P
 iNo9LneJXiSPsS9ZmVkSPmPABk+VKo9sKAblFBXplN7COV6s0Mc/CfJsnyjUeg+u
 AW3rLdK/pGuphLamLu/a2Ci+XRwUWftokYDwXvroBD3gz7BFv7B/h8J8PwNRMjsp
 MsaSRmzvUiG8H+AltBQ9BTTtp9h2TdeZenrMKIrSTvnDKbNnQUA2+9NZjgSk5e6I
 64X0lDUbOErmPdXriVCbG7ti+R+Z3UAe/836jAT6GH9PhY1ZSIchmSq4njZr2aWO
 GUX1amJ5Nm6PCDQOh9tQOAzVJ0TWhImFAjJt+p8HrZ8VOXr9Id0zcyhEu8kJuqxk
 NXDNusMB2nJaDQBpvhfO2gTXf8Gefsc8FeYvSAYe1tbnc78xBnDrMCNNmuWX4GUd
 2Flda7J1djxaxU+I3Tq0
 =/h+C
 -----END PGP SIGNATURE-----

Merge tag 'ux500-fixes-v3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes

From Linus Walleij <linus.walleij@linaro.org>:
Here are two audio fixes for the ux500 found by Lee Jones.

* tag 'ux500-fixes-v3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: Ensure probing of Audio devices when Device Tree is enabled
  ARM: ux500: Fix merge error, no matching driver name for 'snd_soc_u8500'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-23 17:06:15 +02:00
Arnd Bergmann 8917da43cc Merge branch 'v3.6-samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
From Kukjin Kim <kgene.kim@samsung.com>:

For HDMI, already HDMI support for EXYNOS in mainline kernel is broken
because its configuration moved to platform data but regarding platform
data didn't support yet. And others are for fix warnings.

* 'v3.6-samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Set HDMI platform data in Origen board
  ARM: EXYNOS: Set HDMI platform data in SMDKV310
  ARM: SAMSUNG: Add API to set platform data for s5p-tv driver
  ARM: SAMSUNG: Set HDMI platform data for Exynos4x12 SoCs
  ARM: Samsung: Make uart_save static in pm.c file
  ARM: S3C24XX: Fix s3c2410_dma_enqueue parameters
  ARM: S3C24XX: Add missing DMACH_DT_PROP

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-23 17:03:49 +02:00
Arnd Bergmann 1e72fe1fca Merge branch 'imx/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes
* 'imx/fixes-for-3.6' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: dts: imx51-babbage: fix esdhc cd/wp properties
  ARM: imx6: spin the cpu until hardware takes it down
  ARM i.MX6q: Add virtual 1/3.5 dividers in the LDB clock path

Also updates to Linux 3.6-rc2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-23 17:02:42 +02:00
Mark Brown 7ccf6124fa Merge branch 'asoc-omap' into for-3.7 2012-08-23 15:41:24 +01:00
Peter Ujfalusi eda21d37eb ARM: OMAP2+: twl-common: Fix compile time error when omap-twl4030 audio is not enabled
Fixes:
CC      arch/arm/mach-omap2/twl-common.o arch/arm/mach-omap2/twl-common.c:562: error: conflicting types for ‘omap_twl4030_audio_init’
arch/arm/mach-omap2/twl-common.h:62: error: previous declaration of ‘omap_twl4030_audio_init’ was here
make[1]: *** [arch/arm/mach-omap2/twl-common.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

When building the kernel with !SND_OMAP_SOC_OMAP_TWL4030

Reported-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-23 15:39:25 +01:00
Shawn Guo a46d2619d7 ARM: dts: imx51-babbage: fix esdhc cd/wp properties
The binding doc and dts use properties "fsl,{cd,wp}-internal" while
esdhc driver uses "fsl,{cd,wp}-controller".  Fix binding doc and dts
to get them match driver code.

Reported-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: <stable@vger.kernel.org>
Acked-by: Chris Ball <cjb@laptop.org>
2012-08-23 21:10:23 +08:00
Shawn Guo c944b0b935 ARM: imx6: spin the cpu until hardware takes it down
Though commit 602bf40 (ARM: imx6: exit coherency when shutting down
a cpu) improves the stability of imx6q cpu hotplug a lot, there are
still hangs seen with a more stressful hotplug testing.

It's expected that once imx_enable_cpu(cpu, false) is called, the cpu
will be taken down by hardware immediately, and the code after that
will not get any chance to execute.  However, this is not always the
case from the testing.  The cpu could possibly be alive for a few
cycles before hardware actually takes it down.  So rather than letting
cpu execute some code that could cause a hang in these cycles, let's
make the cpu spin there and wait for hardware to take it down.

Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-08-23 21:10:22 +08:00
Mark Brown 2bbf6078dc Merge branch 'asoc-omap' into for-3.7 2012-08-22 20:19:01 +01:00
Peter Ujfalusi e586e955aa ARM: OMAP2+: McBSP: Do not create legacy devices when booting with DT data
Only create the devices in a legacy way if we do not have the DT data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:13 +01:00
Peter Ujfalusi 8fef6263ea ARM/ASoC: omap-mcbsp: Remove CLKR/FSR mux configuration code
Remove the feature to configure the CLKR/FSR mux on McBSP port with 6pin
configuration.
When moving to devicetree these callback can no longer be used in a clean
way anymore.
If a board require to change the 6pin port to work in 4pin setup it needs
to set up the mux in the board file.
For OMAP2/3:
u32 devconf0;

/* McBSP1 CLKR/FSR signal to be connected to CLKX/FSX pin */
devconf0 = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
devconf0 |=  OMAP2_MCBSP1_CLKR_MASK | OMAP2_MCBSP1_FSR_MASK;
omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);

For OMAP4:
u32 mcbsp_pad;

/* McBSP4 CLKR/FSR signal to be connected to CLKX/FSX pin */
mcbsp_pad = omap4_ctrl_pad_readl(OMAP2_CONTROL_DEVCONF0);
mcbsp_pad |=  ((1 << 31) | (1 << 30));
omap4_ctrl_pad_writel(mcbsp_pad, OMAP2_CONTROL_DEVCONF0);

In case when the kernel is booted with DT blob the pinctrl-single will be
provided as soon as it is enabled on the platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:05 +01:00
Peter Ujfalusi 6253bac804 ARM: OMAP: board-am3517evm: Configure McBSP1 CLKR/FSR signal source
am3517evm board uses McBSP1 for audio with 4pin configuration.
The CLKR/FSR signals need to be connected to CLKX/FSX pin of the SoC in
this case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:17:00 +01:00
Peter Ujfalusi cafebc4a66 ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430
On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
the FIFO for the audio stack.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:16:59 +01:00
Peter Ujfalusi f199131a8f ARM/ASoC: omap-mcbsp: Move OMAP2+ clock parenting code to ASoC driver
Move the McBSP CLKS re-parenting code to ASoC driver from
arch/arm/mach-omap2.
The call fort the re-parenting has been already limited to OMAP2+ SoC in
the ASoC driver. There is no longer need to have callback function for it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22 20:16:55 +01:00
Linus Torvalds 6dab7ede93 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "The largest thing in this set of changes is bringing back some of the
  ARMv3 code to fix a compile problem noticed on RiscPC, which we still
  support, even though we only support ARMv4 there.

  (The reason is that the system bus doesn't support ARMv4 half-word
  accesses, so we need the ARMv3 library code for this platform.)

  The rest are all quite minor fixes."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7490/1: Drop duplicate select for GENERIC_IRQ_PROBE
  ARM: Bring back ARMv3 IO and user access code
  ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems
  ARM: 7488/1: mm: use 5 bits for swapfile type encoding
  ARM: 7487/1: mm: avoid setting nG bit for user mappings that aren't present
  ARM: 7486/1: sched_clock: update epoch_cyc on resume
  ARM: 7484/1: Don't enable GENERIC_LOCKBREAK with ticket spinlocks
  ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is enabled
  ARM: 7482/1: topology: fix section mismatch warning for init_cpu_topology
2012-08-18 16:20:05 -07:00
Mark Brown 6bf6d1af86 Merge remote-tracking branch 'asoc/topic/blackfin' into for-3.7 2012-08-17 23:26:44 +01:00
Lee Jones 46a8b9837d ARM: ux500: Ensure probing of Audio devices when Device Tree is enabled
Previous attempts to add platform probing of the Audio related devices
only call from non-DT initialisation functions. This patch extends that
functionality to the Device Tree related ones too.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-17 11:21:30 +02:00
Lee Jones 97f50c6c41 ARM: ux500: Fix merge error, no matching driver name for 'snd_soc_u8500'
The platform attempts to register platform device 'snd_soc_u8500'
which doesn't actually exist. Here we change the reference to the
correct one 'snd_soc_mop500'.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-17 11:21:30 +02:00
Philipp Zabel 16339464c5 ARM i.MX6q: Add virtual 1/3.5 dividers in the LDB clock path
The ldb_di[01]_podf is implemented as a clk-divider that
divides by 1 or 2. In reality, the ldb_di[01]_ipu_div
dividers divide by either 3.5 or 7. Adding a fixed factor
of 1/3.5 fixes their children's clock rates.

This should probably be converted to rate table based dividers,
once available.

Cc: <stable@vger.kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2012-08-17 10:31:43 +08:00
Arnd Bergmann 8a211d362c Merge branch 'fixes' of git://github.com/hzhuang1/linux into fixes
* 'fixes' of git://github.com/hzhuang1/linux:
  ARM: mmp: fix potential NULL dereference
2012-08-16 10:10:15 +02:00
Arnd Bergmann 0a224c514f Merge branch 'fixes-for-v3.6' of git://git.infradead.org/users/jcooper/linux into fixes
From Jason Cooper <jason@lakedaemon.net>:

Small fixes for the orion platforms including kirkwood.

* 'fixes-for-v3.6' of git://git.infradead.org/users/jcooper/linux:
  ARM: Kirkwood: fix Makefile.boot
  ARM: Kirkwood: Fix iconnect leds
  ARM: Orion: Set eth packet size csum offload limit

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-15 18:18:29 +02:00
Peter Ujfalusi ac51c90f10 ARM: OMAP3: Switch to use the unified audio driver (omap-twl4030) for selected boards
These boards have similar audio setup and they can all use the same driver
for audio support if it is enabled in the kernel config.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-15 17:10:00 +01:00
Peter Ujfalusi 552d9dc316 ARM: OMAP: twl-common: Add helper function to register the omap-twl4030 audio driver
Since several OMAP3 based boards will be using the unified simple audio
driver it is better to not have duplicated code in the board files for this
purpose.
Board files can call omap_twl4030_audio_init(); to set up the needed device
for the audio support.

For example:
omap_twl4030_audio_init("omap3beagle", 26000000);

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-15 17:10:00 +01:00
Arnaud Patard (Rtp) b74ffd85e3 ARM: Kirkwood: fix Makefile.boot
While building the dtbs target, one is getting:

make dtbs
make[1]: *** No rule to make target `arch/arm/boot/kirkwood-qnap-ts219.dtb', needed by `arch/arm/boot/dtbs'.  Stop.
make: *** [dtbs] Error 2

The reason is that there's no kirkwood-qnap-ts219.dts file. Update Makefile.boot
to reflect the dts files present.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-08-15 13:58:52 +00:00
Arnaud Patard (Rtp) 03810a2030 ARM: Kirkwood: Fix iconnect leds
While converting, a led has been missed leading to wrong power blue led
definition. Add it back and fix the gpio used on the power blue led.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-08-15 13:58:51 +00:00
Arnaud Patard (Rtp) 58569aee5a ARM: Orion: Set eth packet size csum offload limit
The mv643xx ethernet controller limits the packet size for the TX
checksum offloading. This patch sets this limits for Kirkwood and
Dove which have smaller limits that the default.

As a side note, this patch is an updated version of a patch sent some years
ago: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017320.html
which seems to have been lost.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Cc: <stable@vger.kernel.org>
2012-08-15 13:58:09 +00:00
Arnd Bergmann c6041d4add Omap fixes for issues noted during the merge window, mostly
PM related.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQKg1zAAoJEBvUPslcq6VzMC4P/1cFNyARm87TI43+oV+u4/mw
 cGkte7AC6Uqv8wn3EJBQMXKP5PWJ5Wp4qylQPVcOrDzJjFaeHvnJiQp7efPQhOdr
 aBw7NAr0OdbJsLD1ZIwFTKRH1qKJh5LmprvoRVuoeRmTeIEKvuvHps04vm4jQyZj
 Qrox8WuQvkWwq6/AbWmn2M1c/NhBt+lyl1vAaUD28nKvo8PpQI1R1r1JwxweFXqD
 EqCoRGUmOQzG8KhKWsH+YpPH7efoD4WJfPGJXyHgqcLFp+R3JkqruaCjssUdFW83
 U/tQQXW/h7br8EhIgN8X6Z3cLCoS1ZEIR6C+6Nwt5r+NyCshFgRcCCas4uQFzecj
 gVKR5ke+9yWumakMGKIcOxj15nw++zaHpswhVjOed/6hmg29xjgqWKo/l0dYogBY
 OH0MDwws5fZdcNsXllPUcJx9vw5586oVDBDBEzHN3AVS8rHfbPCC1bVwj+v89Vb3
 zkL8bO4YO1tnXiyfRb4aL7tVWPddPmnrI21Ylvms38tQSkCbQJU+zHfx7jDAIT8I
 4SU9Ox6oFQ3Rqp0nQjaEbFT9FBU0zU8Jv8E3LJybyKlt1fc8Phj5xyfs22cGh3VP
 18b5BvJo+UmddCQOMLKZVfnx50p73KE3wWH0mYtIG1gqey/56u/9LwNsbBoE6MGF
 dnDJBzYL3S1K5zrgwSk5
 =wnJX
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Omap fixes for issues noted during the merge window, mostly
PM related.

* tag 'omap-fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: dmtimers: Fix locking issue in omap_dm_timer_request*()
  ARM: OMAP4: Register the OPP table only for 4430 device
  cpufreq: OMAP: Handle missing frequency table on SMP systems
  ARM: OMAP4: sleep: Save the complete used register stack frame
  ARM: OMAP2+: cpu: Add am33xx device under cpu_class_is_omap2
  omap: Fix multi.h when only ARCH_OMAP3 and SOC_AM33XX are selected
  ARM: OMAP2+: Fix dmtimer set source clock failure
  Revert "ARM: OMAP3: PM: call pre/post transition per powerdomain"
  ARM: OMAP3: TWL4030: ensure sys_nirq1 is mux'd and wakeup enabled
  omap2: mux: remove comment for nonexistent member
  OMAP: remove unused parameter arch_id from uncompress.h
  arm/dts: Mark vcxio, v2v1 and v1v8 regulators as always on
  OMAP2+: Fix random config build break with !ARM_CPU_SUSPEND
  arm/dts: Fix am33xx wdt node
  ARM: OMAP3: igep0020: set GPIO mode for mux mcspi1_cs2 pin
  Revert "ARM: OMAP3530evm: set pendown_state and debounce time for ads7846"

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-08-15 14:31:25 +02:00
Stephen Boyd 89868730a7 ARM: 7490/1: Drop duplicate select for GENERIC_IRQ_PROBE
Seems that Thomas' and my patches collided during the last merge
window.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-15 10:46:51 +01:00
Arnd Bergmann e18287d301 ARM: mv78xx0: fix win_cfg_base prototype
Patch b6d1c33a31 "ARM: Orion: Consolidate the address map setup" tried
to merge the address map for the four orion platforms, but apparently
got it wrong for mv78xx0. Admittedly I don't understand what this
code actually does, but it's clear that the current version is
wrong.

Without this patch, building mv78xx0_defconfig results in:

arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: initialization from incompatible pointer type [enabled by default]
arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: (near initialization for 'addr_map_cfg.win_cfg_base') [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Cc: Michael Walle <michael@walle.cc>
Cc: Nicolas Pitre <nico@linaro.org>
2012-08-13 21:11:28 +02:00
Timo Kokkonen c5491d1ae1 ARM: OMAP: dmtimers: Fix locking issue in omap_dm_timer_request*()
Calling omap_dm_timer_prepare while the spinlock is held is not
allowed as sleeping functions are called later on during the
preparation (namely within clk_get()).

dm_timer_lock is only required for protecting the
omap_timer_list. After the timer is marked as reserved, the lock is no
longer needed and should be freed.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-13 06:23:16 -07:00
Russell King 080fc66fb5 ARM: Bring back ARMv3 IO and user access code
This partially reverts 357c9c1f07
(ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs).

Although we only support StrongARM on the RiscPC, we need to keep the
ARMv3 user access code for this platform because the bus does not
understand half-word load/stores.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-13 11:44:13 +01:00
Linus Torvalds 21d2f8dc91 gpio fixes for v3.6-rc1
- Fix a resource leak in the SCH driver
 - Fix the register address calculation in the MSIC driver
 - Fix the PXA driver's devicetree functions
 - Delete redundant shadow variable leftovers in the MXC driver
 - Specify the GPIO base for the device tree probe in the MXC driver
 - Add a modalias for the i.MX driver
 - Fix off-by-one bug in the Samsung driver
 - Fix erroneous errorpath in the Langwell driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQJKytAAoJEEEQszewGV1zvKoQAMb3n+VEQKWt5OOsvPAN2w+r
 /qcCU8hfB8CRFNK5/v1an56V8mqdfnn32MNcw8BszE/HxDnlVIdvc/czHnhHO5em
 PipfAWCUw33WBr460bUkv7Oie92Q6JrVVRg5xn8s5+tI8SBlXQZ66qzXfb9yDaof
 GMulHVpwC3XCeUrEh6ce6o0UisvYrhF+iME4zubto88bWlAx9Te0r7TnRmFzIS2a
 Jh2uuNDKlu0EKo3wTnkxeU7YK0A6qEW2RzAd5MR8okToiNqdnp9hobRGcnLyUZ2q
 WbRlN2N6SJutKl5/ceP0XlnNUocQIUhd7lkoN/jw4Fliej0CwlRzFiILEmL3H+Rr
 IIunZQjDo1v/I+2wuQyWx9iyK3YMzJHD7bcP0/jCeShI3Tl8zUHBZ9xOlJqtGAn4
 utNjRFoOjsQO+GggPzaVgEqMJNEKXV5kzfEpdlh7U1nqlEYjCRVlikKJEfUhzYE4
 C8fs2u4wE5Y2kGwxO4kuvB/XssE+yR4db1I1iucIBJLnyMt99TR2cKXc1iteSd/s
 zPeJgKEahbwPoIYDqw6U962f0QlSyGfCu7TypEKALmCROwNACkUfvRluCLLV+KV7
 VLzaAAcByqb2jtHMOXm796VGXrMt2hvqW4ZBfAXSlf6uIcVsW/2wJFI3Lj81Ziap
 65MsR+sChlY32QDxBAoO
 =WsZj
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull gpio fixes from Linus Walleij:
 - Fix a resource leak in the SCH driver
 - Fix the register address calculation in the MSIC driver
 - Fix the PXA driver's devicetree functions
 - Delete redundant shadow variable leftovers in the MXC driver
 - Specify the GPIO base for the device tree probe in the MXC driver
 - Add a modalias for the i.MX driver
 - Fix off-by-one bug in the Samsung driver
 - Fix erroneous errorpath in the Langwell driver

* tag 'gpio-fixes-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  drivers/gpio/gpio-langwell.c: fix error return code
  gpio: samsung: Fix off-by-one bug in gpio addresses
  ARM: dts: imx: add alias for gpio
  gpio/mxc: specify gpio base for device tree probe
  gpio/mxc: remove redundant shadow variables initialization
  GPIO: gpio-pxa: fix devicetree functions
  gpio: msic: Fix calculating register address in msic_gpio_to_oreg()
  gpio-sch: Fix leak of resource
2012-08-12 21:45:33 +03:00
Linus Torvalds 88de3d0d71 arm-soc: bug fixes for v3.6-rc2
These are a bunch of bug fixes that came in after the merge window and
 one update for the MAINTAINERS file. The largest part of the fixes
 are patches that address bugs found by building all the ARM defconfig
 files. There are a lot more warnings that we have patches for, but
 the others are either still under discussion or are harmless and
 do not cause actual problems besides making the build slightly noisy.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAUCVTDGCrR//JCVInAQI9sg//cLUFER/nOXKWgbsaopP3+XeeShPvLitR
 RP+IMy90hHfiaat9PKRhY5tA74uPbD4Eywc/kUcMtAE/9cu1ATdfickbpk2fCGcm
 73cuGegj51RgrUh5Yj03viIKWOESjVFdBVQnAmoguy6R+H98qQ0tj/hDYfAwbt01
 87GW11WW+l3uNHqMza16I7PLz0vx8NO8MLLPMeCzvHBSOC/FN/vxX/bS2DWkgv2d
 u3TG+nYW73F6GQ4dKpGNa7oAHfY8WgOafHtkwCbKrd0CbILm78wP8c10FGz03bgE
 3oPxwy7bw1LVBZR7fQZGzu3J4yQP7bfZQrYtYi/WiriRi2bA6CX3BlMFu9Hxewoh
 hXKo9VwwUlj6yWKJ191sakUilz+JKIDDnkesMu6deTY4XqUyuBm31QAX/yqnZ0Hv
 B8wnD36zOnH2Ymyos2p9NF1K1GxgJfjAb2wQzeu8+5pKE+Aj+xhajmqcSDVmO78T
 3k2SUtBpRFjfa1BE0hUjLL68abX3wx72Nlk8NT7VTpqqGlN6cv3DDDHw0SU+vD5g
 onaT/VR/px7HzJTRhVTwsAZzjSynH8v15Y0vjUfALGIApqTKqeL87vWGxY4fC6Iu
 sKANgSWOtx7xqMepmEyMBNN/yblBGn+nFMA00K6xd9cw1Kmmp4g7qppXumt4l5FI
 q174LxG/tiI=
 =TmsX
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc bug fixes from Arnd Bergmann:
 "These are a bunch of bug fixes that came in after the merge window and
  one update for the MAINTAINERS file.

  The largest part of the fixes are patches that address bugs found by
  building all the ARM defconfig files.  There are a lot more warnings
  that we have patches for, but the others are either still under
  discussion or are harmless and do not cause actual problems besides
  making the build slightly noisy."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (30 commits)
  ARM: davinci: remove broken ntosd2_init_i2c
  ARM: s3c24xx: enable CONFIG_BUG for tct_hammer
  omap-rng: fix use of SIMPLE_DEV_PM_OPS
  spi/s3c64xx: improve error handling
  mtd/omap2: fix dmaengine_slave_config error handling
  gpio: em: do not discard em_gio_irq_domain_cleanup
  ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
  ARM: imx: gpmi-nand depends on mxs-dma
  ARM: integrator: include <linux/export.h>
  ARM: s3c24xx: use new PWM driver
  ARM: sa1100: include linux/io.h in hackkit leds code
  Input: eeti_ts: pass gpio value instead of IRQ
  ARM: pxa: remove irq_to_gpio from ezx-pcap driver
  ARM: tegra: more regulator fixes for Harmony
  usb/ohci-omap: remove unused variable
  mfd/asic3: fix asic3_mfd_probe return value
  ARM: kirkwood: fix typo in Makefile.boot
  i.MX27: Fix emma-prp and csi clocks.
  ARM: integrator: use clk_prepare_enable() for timer
  MAINTAINERS: update entry for Linus Walleij
  ...
2012-08-12 21:31:44 +03:00
Will Deacon 730a8128cd ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems
Commit 5a783cbc48 ("ARM: 7478/1: errata: extend workaround for erratum
 #720789") added workarounds for erratum #720789 to the range TLB
invalidation functions with the observation that the erratum only
affects SMP platforms. However, when running an SMP_ON_UP kernel on a
uniprocessor platform we must take care to preserve the ASID as the
workaround is not required.

This patch ensures that we don't set the ASID to 0 when flushing the TLB
on such a system, preserving the original behaviour with the workaround
disabled.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-11 09:16:00 +01:00
Will Deacon f5f2025ef3 ARM: 7488/1: mm: use 5 bits for swapfile type encoding
Page migration encodes the pfn in the offset field of a swp_entry_t.
For LPAE, we support physical addresses of up to 36 bits (due to
sparsemem limitations with the size of page flags), requiring 24 bits
to represent a pfn. A further 3 bits are used to encode a swp_entry into
a pte, leaving 5 bits for the type field. Furthermore, the core code
defines MAX_SWAPFILES_SHIFT as 5, so the additional type bit does not
get used.

This patch reduces the width of the type field to 5 bits, allowing us
to create up to 31 swapfiles of 64GB each.

Cc: <stable@vger.kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-11 09:15:59 +01:00
Will Deacon 47f1204329 ARM: 7487/1: mm: avoid setting nG bit for user mappings that aren't present
Swap entries are encoding in ptes such that !pte_present(pte) and
pte_file(pte). The remaining bits of the descriptor are used to identify
the swapfile and offset within it to the swap entry.

When writing such a pte for a user virtual address, set_pte_at
unconditionally sets the nG bit, which (in the case of LPAE) will
corrupt the swapfile offset and lead to a BUG:

[  140.494067] swap_free: Unused swap offset entry 000763b4
[  140.509989] BUG: Bad page map in process rs:main Q:Reg  pte:0ec76800 pmd:8f92e003

This patch fixes the problem by only setting the nG bit for user
mappings that are actually present.

Cc: <stable@vger.kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-11 09:15:59 +01:00
Colin Cross 237ec6f2e5 ARM: 7486/1: sched_clock: update epoch_cyc on resume
Many clocks that are used to provide sched_clock will reset during
suspend.  If read_sched_clock returns 0 after suspend, sched_clock will
appear to jump forward.  This patch resets cd.epoch_cyc to the current
value of read_sched_clock during resume, which causes sched_clock() just
after suspend to return the same value as sched_clock() just before
suspend.

In addition, during the window where epoch_ns has been updated before
suspend, but epoch_cyc has not been updated after suspend, it is unknown
whether the clock has reset or not, and sched_clock() could return a
bogus value.  Add a suspended flag, and return the pre-suspend epoch_ns
value during this period.

The new behavior is triggered by calling setup_sched_clock_needs_suspend
instead of setup_sched_clock.

Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-08-11 09:15:58 +01:00