GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
11 years agoMerge tag 'sunxi-cleanup-for-3.10' of git://github.com/mripard/linux into next/cleanup
Olof Johansson [Thu, 11 Apr 2013 10:39:00 +0000 (03:39 -0700)]
Merge tag 'sunxi-cleanup-for-3.10' of git://github.com/mripard/linux into next/cleanup

From Maxime Ripard:
Cleanups for Allwinner sunXi architecture:
  - Remove sunxi.dtsi
  - Switch to clocksource/irqchip device tree handlers
  - Cleanup the watchdog code

* tag 'sunxi-cleanup-for-3.10' of git://github.com/mripard/linux:
  ARM: sunxi: Rework the restart code
  irqchip: sunxi: Rename sunxi to sun4i
  irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
  clocksource: sunxi: Rename sunxi to sun4i
  clocksource: sunxi: make use of CLKSRC_OF
  clocksource: sunxi: Cleanup the timer code
  clocksource: make CLOCKSOURCE_OF_DECLARE type safe

Signed-off-by: Olof Johansson <olof@lixom.net>
Add/change conflict in drivers/clocksource/Makefile resolved.

11 years agoMerge branch 'depends/clk-for-3.10' into next/cleanup
Olof Johansson [Thu, 11 Apr 2013 10:38:03 +0000 (03:38 -0700)]
Merge branch 'depends/clk-for-3.10' into next/cleanup

Bringin in clk subsystem dependencies needed by sunxi.

* depends/clk-for-3.10: (26 commits)
  clk: sunxi: drop an unnecesary kmalloc
  clk: sunxi: drop CLK_IGNORE_UNUSED
  clk: sunxi: Add support for AXI, AHB, APB0 and APB1 gates
  clk: divider: Introduce CLK_DIVIDER_ALLOW_ZERO flag
  clk: mvebu: Use common of_clk_init() function
  clk: fix clk_mux::flags kerneldoc
  clk: allow reentrant calls into the clk framework
  clk: abstract locking out into helper functions
  clk: zynq: Add missing zynq clk header
  clk: sunxi: rename compatible strings
  arm: sunxi: Add useful information about sunxi clocks
  clk: arm: sunxi: Add a new clock driver for sunxi SOCs
  clk: ux500: Fix prcmu clocks registration
  ARM: imx: adapt clk_busy_mux to new clk_mux struct
  clk: Add composite clock type
  clk: add table lookup to mux
  clk: Fix incorrect return type in clk.c
  clk: prima2: fix return value check in sirfsoc_of_clk_init()
  clk:SPEAr1340: Correct parent clock configuration
  documentation: clk: fix couple of misspelling
  ...

11 years agoMerge tag 'imx-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Olof Johansson [Thu, 11 Apr 2013 10:06:23 +0000 (03:06 -0700)]
Merge tag 'imx-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/cleanup

From Shawn Guo:
The imx cleanup for 3.10:

* Clean up a couple of unneeded function declarations
* Remove imx specific cpufreq driver as generic cpufreq-cpu0 works well
  as the replacement
* Remove platform ahci support
* Clean up unused ARCH/MACH Kconfig symbols
* Remove a couple of unused files

* tag 'imx-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: i.MX: remove unused ARCH_* configs
  ARM i.MX53: remove platform ahci support
  ARM: imx: remove mx6q.h
  ARM: imx: remove Makefile.boot
  ARM: imx: clk-imx27: Do not register peripheral clock for SSI
  ARM: imx: avic: Move avic_saved_mask_reg under CONFIG_PM
  ARM: imx: Remove cpufreq driver
  ARM: imx: remove pl310_get_save_ptr() declaration
  ARM: imx: remove duplicated function declaration

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoMerge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 into next/cleanup
Arnd Bergmann [Tue, 9 Apr 2013 13:37:28 +0000 (15:37 +0200)]
Merge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 into next/cleanup

From Nicolas Ferre <nicolas.ferre@atmel.com>:

Trivial typos and some macros removal & modification

* tag 'at91-cleanup' of git://github.com/at91linux/linux-at91:
  ARM: at91: remove trailing semicolon from macros
  ARM: at91/setup: fix trivial typos
  ARM: at91: remove unused dbgu_readl() macro

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'cleanup-samsung-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 9 Apr 2013 13:31:57 +0000 (15:31 +0200)]
Merge tag 'cleanup-samsung-for-v3.10' of git://git./linux/kernel/git/kgene/linux-samsung into next/cleanup

From Kukjin Kim <kgene.kim@samsung.com>:

cleanup unused codes for samsung

* tag 'cleanup-samsung-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
  ARM: EXYNOS: change the name of USB ohci header
  ARM: SAMSUNG: Remove unnecessary code for dma
  ARM: S3C24XX: Remove unused GPIO drive strength register definitions
  ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
  ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
  ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
  ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
  ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
  ARM: S3C64XX: remove obsolete Makefile line
  ARM: S3C24XX: remove unneeded "config SMDK2440_CPU2442"
  ARM: SAMSUNG: Remove useless Samsung GPIO related CONFIG
  ARM: SAMSUNG: remove "config S3C_BOOT_WATCHDOG"
  ARM: EXYNOS: change HAVE_SAMSUNG_KEYPAD to KEYBOARD_SAMSUNG
  ARM: EXYNOS: remove duplicated include from common.c
  ARM: EXYNOS: drop "select HAVE_SCHED_CLOCK"
  ARM: S3C24XX: drop "select MACH_NEO1973"
  ARM: S3C24XX: drop "select MACH_N35"

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'mxs-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Arnd Bergmann [Tue, 9 Apr 2013 13:29:52 +0000 (15:29 +0200)]
Merge tag 'mxs-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/cleanup

From Shawn Guo <shawn.guo@linaro.org>:

The mxs cleanup for 3.10:

* Clean up timer code and move it into drivers/clocksource
* Clean up icoll code and move it into drivers/irqchip
* Clean up clock code to not include <mach/*> headers
* Clean up rtc-stmp3xxx, mxs-lradc and mxs-saif to not include <mach/*>
  headers
* Clean up mach-mxs code to get it prepared for multiplatform support

* tag 'mxs-cleanup-3.10' of git://git.linaro.org/people/shawnguo/linux-2.6: (26 commits)
  clocksource: mxs_timer: Add semicolon at end of line
  ARM: mxs: remove unused headers
  ARM: mxs: merge imx23 and imx28 into one machine_desc
  ARM: mxs: remove common.h
  ARM: mxs: move mxs_get_ocotp() into mach-mxs.c
  ARM: mxs: remove mm.c
  ARM: mxs: use debug_ll_io_init for low-level debug
  ARM: mxs: get ocotp base address from device tree
  ARM: mxs: remove system.c
  ARM: mxs: get reset address from device tree
  ARM: mxs: remove empty hardware.h
  ASoC: mxs-saif: remove mach header inclusion
  iio: mxs-lradc: remove unneeded mach header inclusion
  rtc: stmp3xxx: use stmp_reset_block() instead
  clk: mxs: remove the use of mach level IO accessor
  clk: mxs: get base address from device tree
  ARM: mxs: remove unneeded mach-types.h inclusion
  ARM: mxs: move icoll driver into drivers/irqchip
  ARM: mxs: call stmp_reset_block() in icoll
  ARM: mxs: get icoll base address from device tree
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'v3.9-rc5' into next/cleanup
Arnd Bergmann [Tue, 9 Apr 2013 13:29:20 +0000 (15:29 +0200)]
Merge tag 'v3.9-rc5' into next/cleanup

This is a dependency for the mxs/cleanup branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'tegra-for-3.10-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 9 Apr 2013 13:27:52 +0000 (15:27 +0200)]
Merge tag 'tegra-for-3.10-cleanup' of git://git./linux/kernel/git/swarren/linux-tegra into next/cleanup

From Stephen Warren <swarren@wwwdotorg.org>:

ARM: tegra: cleanup

This branch includes various cleanup of the core Tegra support.

* Unification of the separate board-dt-tegra*.c files into a single
  tegra.c, now that everything is DT-driven and basically identical.
* Use of_clk_get() in the Tegra clocksource driver so that clocks are
  described in DT rather than hard-coding clock names.
* Some cleanup of the PMC-related code, with the aim that the PMC
  "driver" contains more of the code that touches PMC registers, rather
  than spreading PMC register accesses through other files.
* Conversion of the "PMC" driver to acquire resources describe in device
  tree rather than hard-coding them.
* Use of common code for the CPU sleep TLB invalidation.

This branch is based on the previous fixes pull request.

* tag 'tegra-for-3.10-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  ARM: tegra: use setup_mm_for_reboot rather than explicit pgd switch
  ARM: tegra: replace the CPU power on function with PMC call
  ARM: tegra: pmc: add power on function for secondary CPUs
  ARM: tegra: pmc: convert PMC driver to support DT only
  ARM: tegra: fix the PMC compatible string in DT
  ARM: tegra: pmc: add specific compatible DT string for Tegra30 and Tegra114
  ARM: tegra: refactor tegra{20,30}_boot_secondary
  clocksource: tegra: move to of_clk_get
  ARM: tegra: Unify Device tree board files
  ARM: tegra: Rename board-dt-tegra20.c to tegra.c
  ARM: tegra: Unify tegra{20,30,114}_init_early()

Conflicts:
drivers/clocksource/tegra20_timer.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge branch 'tegra/fixes' into next/cleanup
Arnd Bergmann [Tue, 9 Apr 2013 13:26:51 +0000 (15:26 +0200)]
Merge branch 'tegra/fixes' into next/cleanup

This is a dependency for tegra/cleanups

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoMerge tag 'omap-for-v3.10/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Tue, 9 Apr 2013 13:14:19 +0000 (15:14 +0200)]
Merge tag 'omap-for-v3.10/fixes-pm-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren <tony@atomide.com>:

Non-critical PM fix via Kevin Hilman <khilman@linaro.org>:

OMAP PM fixes for v3.10

Note that this has a dependency to omap-for-v3.10/cleanup-v2-signed.

* tag 'omap-for-v3.10/fixes-pm-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method

Signed-off-by: Arnd Bergmann <arnd@arndb.de<
11 years agoARM: i.MX: remove unused ARCH_* configs
Paul Bolle [Tue, 9 Apr 2013 06:58:23 +0000 (08:58 +0200)]
ARM: i.MX: remove unused ARCH_* configs

This removes the unused Kconfig options ARCH_MX5, ARCH_MX51,
ARCH_MX53 and MACH_MX21.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM i.MX53: remove platform ahci support
Sascha Hauer [Tue, 9 Apr 2013 06:58:22 +0000 (08:58 +0200)]
ARM i.MX53: remove platform ahci support

The i.MX53 ahci platform support is unused in mainline. To demotivate
people using it just remove it from the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: sunxi: Rework the restart code
Maxime Ripard [Mon, 11 Mar 2013 19:21:11 +0000 (20:21 +0100)]
ARM: sunxi: Rework the restart code

The Allwinner sun6i (A31) has a slightly different watchdog, that
doesn't allow to use the already existing restart code.

Rework a bit the restart code to allow to plug in more easily different
restart handlers depending on the device tree.

In the past, we were also meaning sunxi as a generic name covering all
Allwinner SoCs. This won't be true anymore with the A31 (sun6i) that
differs pretty much from sun4i and sun5i, and we will end up having
sunxi, for sun4i and sun5i, and sun6i, which is neither consistent nor
convenient. So, while we're at it, also change sunxi to sun4i.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoirqchip: sunxi: Rename sunxi to sun4i
Maxime Ripard [Sun, 24 Mar 2013 09:10:04 +0000 (10:10 +0100)]
irqchip: sunxi: Rename sunxi to sun4i

During the introduction of the Allwinner SoC platforms, sunxi was
initially meant as a generic name for all the variants of the Allwinner
SoC.

It was ok at the time of the support of only the A10 and A13 that
looks pretty much the same, but it's beginning to be troublesome with
the future addition of the Allwinner A31 (sun6i) that is quite
different, and would introduce some weird logic, where sunxi would
actually mean in some case sun4i and sun5i but without sun6i...

Moreover, it makes the compatible strings naming scheme not consistent
with other architectures, where usually for this kind of compability, we
just use the oldest SoC name that has this IP, so let's do just this.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoirqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
Maxime Ripard [Sun, 10 Mar 2013 14:54:46 +0000 (15:54 +0100)]
irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro

This allows to remove some boilerplate code. At the same time, call the
set_handle_irq function in the initialization function of the irqchip,
so that we can remove it from the machine declaration.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoclocksource: sunxi: Rename sunxi to sun4i
Maxime Ripard [Sun, 24 Mar 2013 10:49:25 +0000 (11:49 +0100)]
clocksource: sunxi: Rename sunxi to sun4i

During the introduction of the Allwinner SoC platforms, sunxi was
initially meant as a generic name for all the variants of the Allwinner
SoC.

It was ok at the time of the support of only the A10 and A13 that
looks pretty much the same, but it's beginning to be troublesome with
the future addition of the Allwinner A31 (sun6i) that is quite
different, and would introduce some weird logic, where sunxi would
actually mean in some case sun4i and sun5i but without sun6i...

Moreover, it makes the compatible strings naming scheme not consistent
with other architectures, where usually for this kind of compability, we
just use the oldest SoC name that has this IP, so let's do just this.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoclocksource: sunxi: make use of CLKSRC_OF
Maxime Ripard [Sat, 23 Mar 2013 23:01:48 +0000 (00:01 +0100)]
clocksource: sunxi: make use of CLKSRC_OF

Using CLKSRC_OF allows to remove the SoC specific sunxi_timer.h header,
and instead of using a custom init function in the machine definition
use the standard clocksource_of_init function.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoclocksource: sunxi: Cleanup the timer code
Maxime Ripard [Sun, 10 Mar 2013 16:03:46 +0000 (17:03 +0100)]
clocksource: sunxi: Cleanup the timer code

The timer code was not exact to some aspects, since most of this code
was written wihout any datasheet. Make the needed corrections to match
the datasheet.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
11 years agoMerge remote-tracking branch 'clk/clk-for-3.10' into sunxi/core-for-3.10
Maxime Ripard [Mon, 8 Apr 2013 19:39:22 +0000 (21:39 +0200)]
Merge remote-tracking branch 'clk/clk-for-3.10' into sunxi/core-for-3.10

11 years agoMerge remote-tracking branch 'arm-soc/clksrc/cleanup' into sunxi/core-for-3.10
Maxime Ripard [Mon, 8 Apr 2013 19:36:54 +0000 (21:36 +0200)]
Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into sunxi/core-for-3.10

11 years agoMerge tag 'omap-pm-v3.10/fixes/pm' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Mon, 8 Apr 2013 16:58:00 +0000 (09:58 -0700)]
Merge tag 'omap-pm-v3.10/fixes/pm' of git://git./linux/kernel/git/khilman/linux-omap-pm into omap-for-v3.10/fixes-pm

OMAP PM fixes for v3.10

11 years agoMerge tag 'omap-for-v3.10/cleanup-v2-signed' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Mon, 8 Apr 2013 16:03:08 +0000 (18:03 +0200)]
Merge tag 'omap-for-v3.10/cleanup-v2-signed' of git://git./linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren <tony@atomide.com>:

Clean up related changes for v3.10 merge window.
Mostly clock and PM related with removal of now unused
DMA channel definitions. The clock change to use SoC
specific lists will make it a little bit easier to
add support for new SoCs variants without having to patch
all over the place.

* tag 'omap-for-v3.10/cleanup-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build
  ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU
  ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now
  ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
  ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
  ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path
  ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
  ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
  ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
  ARM: OMAP2+: Remove unused DMA channel definitions
  ARM: OMAP1: Remove unused DMA channel definitions
  ARM: OMAP2+: clock data: Remove CK_* flags

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARM: at91: remove trailing semicolon from macros
Johan Hovold [Sun, 7 Apr 2013 14:49:59 +0000 (16:49 +0200)]
ARM: at91: remove trailing semicolon from macros

Remove trailing semicolon from register-access macros.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: at91/setup: fix trivial typos
Johan Hovold [Sun, 7 Apr 2013 14:49:58 +0000 (16:49 +0200)]
ARM: at91/setup: fix trivial typos

Fix a few trivial typos in panic, warning and debug messages.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
Paul Bolle [Mon, 8 Apr 2013 15:32:38 +0000 (00:32 +0900)]
ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"

The only user of Kconfig symbol EXYNOS_DEV_DRM was removed in commit
0a9d5ac307ae ("ARM: EXYNOS: removing exynos-drm device registration
from non-dt platforms"). It is safe to remove this symbol too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: EXYNOS: change the name of USB ohci header
Jingoo Han [Tue, 12 Feb 2013 23:29:15 +0000 (15:29 -0800)]
ARM: EXYNOS: change the name of USB ohci header

This patch changes the name of USB ohci header from 'usb-exynos.h'
to 'usb-ohci-exynos.h'. This is because this header file has
the platdata for only EXYNOS OHCI.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: SAMSUNG: Remove unnecessary code for dma
Padmavathi Venna [Mon, 8 Apr 2013 12:42:10 +0000 (21:42 +0900)]
ARM: SAMSUNG: Remove unnecessary code for dma

This patch removes the usage of DMACH_DT_PROP and dt_dmach_prop
from dma code as the new generic dma dt binding support has been
added.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: Remove unused GPIO drive strength register definitions
Sylwester Nawrocki [Mon, 8 Apr 2013 12:37:07 +0000 (21:37 +0900)]
ARM: S3C24XX: Remove unused GPIO drive strength register definitions

There is currently no users of these definitions so remove them.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
Santosh Shilimkar [Fri, 8 Feb 2013 17:20:58 +0000 (22:50 +0530)]
ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method

While waking up CPU from off state using clock domain force wakeup, restore
the CPU power state to ON state before putting CPU clock domain under
hardware control. Otherwise CPU wakeup might fail. The change is recommended
for all OMAP4+ devices though the PRCM weakness was observed on OMAP5
devices first.

As a result of weakness, lock-up is observed inside the hardware state
machine of local CPU PRCM and results are UN-predictable as per designers.
In software testing, we have seen hard-locks most of the time where system
gets frozen. With power domain state restored, system behaves correctly.

So update the code accordingly.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
11 years agoclk: sunxi: drop an unnecesary kmalloc
Emilio López [Wed, 27 Mar 2013 21:20:43 +0000 (18:20 -0300)]
clk: sunxi: drop an unnecesary kmalloc

clk_register will copy this information, so we can just use a normal
array and do one less dynamic allocation.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agoclk: sunxi: drop CLK_IGNORE_UNUSED
Emilio López [Wed, 27 Mar 2013 21:20:42 +0000 (18:20 -0300)]
clk: sunxi: drop CLK_IGNORE_UNUSED

This flag was in place to prevent important clocks from getting gated
while they had no users. Now that the UART driver supports clocks
properly, we can drop this.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agoclk: sunxi: Add support for AXI, AHB, APB0 and APB1 gates
Emilio López [Wed, 27 Mar 2013 21:20:37 +0000 (18:20 -0300)]
clk: sunxi: Add support for AXI, AHB, APB0 and APB1 gates

This patchset adds DT support for all the AXI, AHB, APB0 and APB1
gates present on sunxi SoCs.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agoARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
Alexander Shiyan [Thu, 4 Apr 2013 01:04:00 +0000 (10:04 +0900)]
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412

S3C2412 boards are already under "if CPU_S3C2412" condition, so
additional dependencies on this symbol can be removed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
Alexander Shiyan [Thu, 4 Apr 2013 01:03:57 +0000 (10:03 +0900)]
ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410

S3C2410 boards are already under "if CPU_S3C2410" condition, so
additional dependencies on this symbol can be removed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
Alexander Shiyan [Thu, 4 Apr 2013 01:03:53 +0000 (10:03 +0900)]
ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards

Board options are already under "if ARCH_S3C24XX" condition, so
additional dependencies on this symbol can be removed.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
Paul Bolle [Wed, 3 Apr 2013 23:48:24 +0000 (08:48 +0900)]
ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"

s3c_rtc_setname() tests for CONFIG_SAMSUNG_DEV_RTC or
CONFIG_PLAT_S3C24XX. But of these two macros only CONFIG_PLAT_S3C24XX
actually exists. Now we can see that s3c_device_rtc is only defined if
either CONFIG_PLAT_S3C24XX or CONFIG_S3C_DEV_RTC are defined. So,
apparently, it was intended to use CONFIG_S3C_DEV_RTC here.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
Paul Bolle [Wed, 3 Apr 2013 23:48:17 +0000 (08:48 +0900)]
ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"

Commit ebc433c2890f ("ARM: S5P64X0: Add HSMMC setup for host
Controller") added the Kconfig symbol S5P64X0_SETUP_SDHCI_GPIO.
By accident it also used a macro CONFIG_S5P64X0_SETUP_SDHCI.
Fix that typo.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoARM: S3C64XX: remove obsolete Makefile line
Paul Bolle [Wed, 3 Apr 2013 23:46:12 +0000 (08:46 +0900)]
ARM: S3C64XX: remove obsolete Makefile line

Commit a07613a54d70 ("Merge branch 'samsung/dt' into samsung/cleanup")
added this line to arch/arm/mach-s3c64xx/Makefile:
    obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o

But at that time CONFIG_S3C64XX_DEV_SPI wasn't a valid Kconfig macro
anymore and arch/arm/mach-s3c64xx/dev-spi.c was already removed. So we
can remove this line.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
11 years agoclk: divider: Introduce CLK_DIVIDER_ALLOW_ZERO flag
Soren Brinkmann [Tue, 2 Apr 2013 22:36:56 +0000 (15:36 -0700)]
clk: divider: Introduce CLK_DIVIDER_ALLOW_ZERO flag

Dividers which have CLK_DIVIDER_ONE_BASED set have a redundant state,
being a divider value of zero. Some hardware implementations allow a
zero divider which simply doesn't alter the frequency. I.e. it acts like
a divide by one or bypassing the divider.
This flag is used to handle such HW in the clk-divider model.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agoclk: mvebu: Use common of_clk_init() function
Jean-Francois Moine [Tue, 2 Apr 2013 11:02:36 +0000 (13:02 +0200)]
clk: mvebu: Use common of_clk_init() function

The use common of_clk_init() function simplifies the clock initialization
and adds handling of the DT "fixed-clock".

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: fixed $SUBJECT to reflect correct file path]

11 years agoARM: at91: remove unused dbgu_readl() macro
Nicolas Ferre [Wed, 3 Apr 2013 09:22:46 +0000 (11:22 +0200)]
ARM: at91: remove unused dbgu_readl() macro

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
11 years agoclocksource: mxs_timer: Add semicolon at end of line
Fabio Estevam [Tue, 2 Apr 2013 16:30:32 +0000 (13:30 -0300)]
clocksource: mxs_timer: Add semicolon at end of line

Fix the following build error:

drivers/clocksource/mxs_timer.c:304:1: error: expected ',' or ';' at end of input

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoclk: fix clk_mux::flags kerneldoc
James Hogan [Mon, 25 Mar 2013 14:35:07 +0000 (14:35 +0000)]
clk: fix clk_mux::flags kerneldoc

The kerneldoc comment for struct clk_mux documented the non-existent
num_clks instead of flags. Correct this.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agoMerge branch 'gic/cleanup' into next/cleanup
Olof Johansson [Tue, 2 Apr 2013 22:10:50 +0000 (15:10 -0700)]
Merge branch 'gic/cleanup' into next/cleanup

* gic/cleanup:
  irqchip: vic: add include of linux/irq.h

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoirqchip: vic: add include of linux/irq.h
Olof Johansson [Tue, 2 Apr 2013 22:07:37 +0000 (15:07 -0700)]
irqchip: vic: add include of linux/irq.h

With the include of <asm/mach/irq.h> removed, the implicit include of
linux/irq.h also disappeared. Add it back.

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoMerge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 into next/cleanup
Olof Johansson [Tue, 2 Apr 2013 18:28:43 +0000 (11:28 -0700)]
Merge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 into next/cleanup

Tiny one-line typo patch.

* tag 'at91-cleanup' of git://github.com/at91linux/linux-at91:
  ARM: at91: Fix typo in restart code panic message

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: irq: Call irqchip_init if no init_irq function is specified
Maxime Ripard [Thu, 28 Mar 2013 20:46:44 +0000 (21:46 +0100)]
ARM: irq: Call irqchip_init if no init_irq function is specified

More and more sub-architectures are using only the irqchip_init
function. Make the core code call this function if no init_irq field is
provided in the machine description to remove some boilerplate code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoMerge branch 'gic' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux...
Olof Johansson [Tue, 2 Apr 2013 17:59:15 +0000 (10:59 -0700)]
Merge branch 'gic' of git://git./linux/kernel/git/cmarinas/linux-aarch64 into next/cleanup

* 'gic' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
  irqchip: gic: Call handle_bad_irq() directly
  arm: Move chained_irq_(enter|exit) to a generic file
  arm: Move the set_handle_irq and handle_arch_irq declarations to asm/irq.h
  + Linux 3.9-rc3

Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoclk: allow reentrant calls into the clk framework
Mike Turquette [Thu, 28 Mar 2013 20:59:02 +0000 (13:59 -0700)]
clk: allow reentrant calls into the clk framework

Reentrancy into the clock framework is necessary for clock operations
that result in nested calls to the clk api.  A common example is a clock
that is prepared via an i2c transaction, such as a clock inside of a
discrete audio chip or a power management IC.  The i2c subsystem itself
will use the clk api resulting in a deadlock:

clk_prepare(audio_clk)
i2c_transfer(..)
clk_prepare(i2c_controller_clk)

The ability to reenter the clock framework prevents this deadlock.

Other use cases exist such as allowing .set_rate callbacks to call
clk_set_parent to achieve the best rate, or to save power in certain
configurations.  Yet another example is performing pinctrl operations
from a clk_ops callback.  Calls into the pinctrl subsystem may call
clk_{un}prepare on an unrelated clock.  Allowing for nested calls to
reenter the clock framework enables both of these use cases.

Reentrancy is implemented by two global pointers that track the owner
currently holding a global lock.  One pointer tracks the owner during
sleepable, mutex-protected operations and the other one tracks the owner
during non-interruptible, spinlock-protected operations.

When the clk framework is entered we try to hold the global lock.  If it
is held we compare the current task against the current owner; a match
implies a nested call and we reenter.  If the values do not match then
we block on the lock until it is released.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Cc: David Brown <davidb@codeaurora.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
11 years agoclk: abstract locking out into helper functions
Mike Turquette [Thu, 28 Mar 2013 20:59:01 +0000 (13:59 -0700)]
clk: abstract locking out into helper functions

Create locking helpers for the global mutex and global spinlock.  The
definitions of these helpers will be expanded upon in the next patch
which introduces reentrancy into the locking scheme.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Cc: David Brown <davidb@codeaurora.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
11 years agoirqchip: irq-gic: Fix checkpatch errors
Sachin Kamat [Wed, 13 Mar 2013 09:35:15 +0000 (15:05 +0530)]
irqchip: irq-gic: Fix checkpatch errors

Fixes the following errors:
ERROR: do not initialise statics to 0 or NULL
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: imx: remove mx6q.h
Shawn Guo [Tue, 2 Apr 2013 14:06:01 +0000 (22:06 +0800)]
ARM: imx: remove mx6q.h

Those stuff defined in mx6q.h is used nowhere now.  Remove the header.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: remove Makefile.boot
Shawn Guo [Tue, 2 Apr 2013 13:51:27 +0000 (21:51 +0800)]
ARM: imx: remove Makefile.boot

Since we have converted IMX to multiplatform build, Makefile.boot is not
used anyway.  Remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: clk-imx27: Do not register peripheral clock for SSI
Fabio Estevam [Tue, 29 Jan 2013 12:17:35 +0000 (10:17 -0200)]
ARM: imx: clk-imx27: Do not register peripheral clock for SSI

imx ssi block has two types of clocks:

- ipg: bus clock, the clock needed for accessing registers.
- per: peripheral clock, the clock needed for generating the bit rate.

Currently ssi driver only supports slave mode and thus need only to handle
the ipg clock, because the peripheral clock comes from the master codec.

Only register the ipg clock and do not register the peripheral clock for ssi

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: avic: Move avic_saved_mask_reg under CONFIG_PM
Fabio Estevam [Tue, 5 Feb 2013 17:36:16 +0000 (15:36 -0200)]
ARM: imx: avic: Move avic_saved_mask_reg under CONFIG_PM

When building a kernel with CONFIG_PM undefined, the following warning happens:

arch/arm/mach-imx/avic.c:57:12: warning: 'avic_saved_mask_reg' defined but not used [-Wunused-variable]

Move avic_saved_mask_reg definition inside the '#ifdef CONFIG_PM' block to
avoid the warning.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove unused headers
Shawn Guo [Fri, 29 Mar 2013 05:53:11 +0000 (13:53 +0800)]
ARM: mxs: remove unused headers

Most of the stuff in the headers are used nowhere now.  Move a few
things that are useful for mach-mxs.c into there and remove the headers.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: merge imx23 and imx28 into one machine_desc
Shawn Guo [Fri, 29 Mar 2013 06:04:07 +0000 (14:04 +0800)]
ARM: mxs: merge imx23 and imx28 into one machine_desc

Most of the function hooks are same between imx23 and imx28
machine_desc, so merge them into one.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove common.h
Shawn Guo [Fri, 29 Mar 2013 05:36:05 +0000 (13:36 +0800)]
ARM: mxs: remove common.h

All three remaining functions declared in common.h are implemented by
clock driver.  Create header include/linux/clk/mxs.h to contain them
and remove common.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: move mxs_get_ocotp() into mach-mxs.c
Shawn Guo [Fri, 29 Mar 2013 05:27:55 +0000 (13:27 +0800)]
ARM: mxs: move mxs_get_ocotp() into mach-mxs.c

All the users of mxs_get_ocotp() are in mach-mxs.c.  Move the function
into mach-mxs.c, make it a static function, and then remove ocotp.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove mm.c
Shawn Guo [Fri, 29 Mar 2013 05:15:53 +0000 (13:15 +0800)]
ARM: mxs: remove mm.c

The static mapping is used nowhere now.  Hence mm.c can be removed
completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: use debug_ll_io_init for low-level debug
Shawn Guo [Fri, 29 Mar 2013 05:07:34 +0000 (13:07 +0800)]
ARM: mxs: use debug_ll_io_init for low-level debug

The only user of the static mapping done in mx23_map_io and mx28_map_io
is low-level debug now.  Use debug_ll_io_init() instead, so that the
static mapping is used nowhere and can be removed completely later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: get ocotp base address from device tree
Shawn Guo [Fri, 29 Mar 2013 01:59:28 +0000 (09:59 +0800)]
ARM: mxs: get ocotp base address from device tree

Instead of using the static definitions, get ocotp base address from
device tree with mapping.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove system.c
Shawn Guo [Fri, 29 Mar 2013 01:45:31 +0000 (09:45 +0800)]
ARM: mxs: remove system.c

There is no user of function mxs_reset_block() now.  Let's move
mxs_restart() into mach-mxs.c as a static function and remove system.c
completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: get reset address from device tree
Shawn Guo [Fri, 29 Mar 2013 01:33:09 +0000 (09:33 +0800)]
ARM: mxs: get reset address from device tree

Instead of using static address definition, get reset address from
device tree with mapping, so that core_initcall mxs_arch_reset_init()
can be killed.

The "rtc" clock code in mxs_arch_reset_init() seems to be zombie, since
there is no clk lookup defined in clock driver at all.  Remove it
together.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove empty hardware.h
Shawn Guo [Thu, 28 Mar 2013 15:30:57 +0000 (23:30 +0800)]
ARM: mxs: remove empty hardware.h

The hardware.h is an empty header and used nowhere now.  Remmove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoASoC: mxs-saif: remove mach header inclusion
Shawn Guo [Thu, 28 Mar 2013 15:21:16 +0000 (23:21 +0800)]
ASoC: mxs-saif: remove mach header inclusion

The header <mach/hardware.h> is not needed at all, and <mach/mxs.h> is
needed only for macros MXS_SET_ADDR and MXS_CLR_ADDR.  Define the macros
and remove the mach header inclusions.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoiio: mxs-lradc: remove unneeded mach header inclusion
Shawn Guo [Thu, 28 Mar 2013 15:18:33 +0000 (23:18 +0800)]
iio: mxs-lradc: remove unneeded mach header inclusion

Headers <mach/mxs.h> and <mach/common.h> are not used in the driver
at all.  Removed the inclusions.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
11 years agortc: stmp3xxx: use stmp_reset_block() instead
Shawn Guo [Thu, 28 Mar 2013 15:13:14 +0000 (23:13 +0800)]
rtc: stmp3xxx: use stmp_reset_block() instead

The function stmp_reset_block() provides the exactly same functionality
as mxs_reset_block().  So use stmp_reset_block() instead, so that
<mach/common.h> inclusion can be removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: rtc-linux@googlegroups.com
11 years agoclk: mxs: remove the use of mach level IO accessor
Shawn Guo [Tue, 26 Mar 2013 13:22:55 +0000 (21:22 +0800)]
clk: mxs: remove the use of mach level IO accessor

It removes the use of mach level IO accessor __mxs_setl/clrl, and hence
removes mach header inclusion from clock driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
11 years agoclk: mxs: get base address from device tree
Shawn Guo [Tue, 26 Mar 2013 13:11:02 +0000 (21:11 +0800)]
clk: mxs: get base address from device tree

Instead of using the static definitions, get clkctrl and digctl base
addresses with mapping from device tree.

Use macro on variable is not nice, but it's done here to save huge
pointless diff stat.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
11 years agoARM: mxs: remove unneeded mach-types.h inclusion
Shawn Guo [Mon, 25 Mar 2013 15:07:10 +0000 (23:07 +0800)]
ARM: mxs: remove unneeded mach-types.h inclusion

Remove the unneeded mach-types.h inclusion from mxs.h, which is a
leftover from commit 845da6b (ARM: mxs: detect SoC by checking CHIPID
register).

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: move icoll driver into drivers/irqchip
Shawn Guo [Mon, 25 Mar 2013 13:34:51 +0000 (21:34 +0800)]
ARM: mxs: move icoll driver into drivers/irqchip

Move icoll.c into drivers/irqchip as irq-mxs.c, and along with the
renaming, change the driver to use IRQCHIP_DECLARE.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: call stmp_reset_block() in icoll
Shawn Guo [Mon, 25 Mar 2013 13:20:05 +0000 (21:20 +0800)]
ARM: mxs: call stmp_reset_block() in icoll

Call stmp_reset_block() rather than mxs_reset_block(), so that
<mach/common.h> inclusion can be removed from icoll driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: get icoll base address from device tree
Shawn Guo [Mon, 25 Mar 2013 13:13:22 +0000 (21:13 +0800)]
ARM: mxs: get icoll base address from device tree

Rather than using the static definition, it gets icoll base address
with mapping from device tree.

As the result, <mach/mxs.h> inclusion can be removed from the driver
now.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: move timer driver into drivers/clocksource
Shawn Guo [Mon, 25 Mar 2013 12:16:52 +0000 (20:16 +0800)]
ARM: mxs: move timer driver into drivers/clocksource

Move mxs timer driver into drivers/clocksource as mxs_timer.c.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: select STMP_DEVICE and use it for timer code
Shawn Guo [Mon, 25 Mar 2013 12:04:34 +0000 (20:04 +0800)]
ARM: mxs: select STMP_DEVICE and use it for timer code

Select STMP_DEVICE and in timer code replace mxs_reset_block() with
stmp_reset_block(), use STMP_OFFSET_REG_SET/CLR to replace
__mxs_setl/clrl.

As the result, <mach/mxs.h> and <mach/common.h> includsion can be
removed from timer.c now.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: remove cpu_is_mx23() call from timer code
Shawn Guo [Mon, 25 Mar 2013 11:41:39 +0000 (19:41 +0800)]
ARM: mxs: remove cpu_is_mx23() call from timer code

Remove cpu_is_mx23() call from timer code by using
of_device_is_compatible() instead.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: get timrot base address from device tree
Shawn Guo [Mon, 25 Mar 2013 06:57:41 +0000 (14:57 +0800)]
ARM: mxs: get timrot base address from device tree

Instead of using static defines, it gets timrot base address with
mapping from device tree.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: look up timrot clock from device tree
Shawn Guo [Mon, 25 Mar 2013 14:57:14 +0000 (22:57 +0800)]
ARM: mxs: look up timrot clock from device tree

Change call clk_get_sys() to of_clk_get() to look up timrot clock from
device tree, so that the clk_register_clkdev() call for timrot can be
saved in clock driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: mxs: use CLKSRC_OF helper to initialize timer
Shawn Guo [Mon, 25 Mar 2013 06:53:08 +0000 (14:53 +0800)]
ARM: mxs: use CLKSRC_OF helper to initialize timer

Select CLKSRC_OF and use clocksource_of_init() to initialize timer, so
that the call to mxs_timer_init() in clock driver can be removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoMerge remote-tracking branch 'arm-soc/clksrc/cleanup' into mxs/cleanup
Shawn Guo [Mon, 1 Apr 2013 08:29:56 +0000 (16:29 +0800)]
Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into mxs/cleanup

11 years agoARM: imx: Remove cpufreq driver
Markus Pargmann [Wed, 27 Mar 2013 13:01:34 +0000 (14:01 +0100)]
ARM: imx: Remove cpufreq driver

The old cpufreq driver is not necessary anymore with DT and
cpufreq-cpu0.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: remove pl310_get_save_ptr() declaration
Shawn Guo [Wed, 13 Mar 2013 05:29:35 +0000 (13:29 +0800)]
ARM: imx: remove pl310_get_save_ptr() declaration

Commit a1f1c7e (arm/imx6q: add suspend/resume support) added
declaration for a non-existing function pl310_get_save_ptr() by
mistake.  Remove it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: imx: remove duplicated function declaration
Shawn Guo [Wed, 13 Mar 2013 05:25:43 +0000 (13:25 +0800)]
ARM: imx: remove duplicated function declaration

Commit 13eed98 (arm/imx6q: add device tree machine support) added
duplicated function declaration for imx_enable_cpu() and
imx_set_cpu_jump().  Remove them.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoLinux 3.9-rc5
Linus Torvalds [Sun, 31 Mar 2013 22:12:43 +0000 (15:12 -0700)]
Linux 3.9-rc5

11 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 31 Mar 2013 18:41:47 +0000 (11:41 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "Two fixes for slave-dmaengine.

  The first one is for making slave_id value correct for dw_dmac and
  the other one fixes the endieness in DT parsing"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dw_dmac: adjust slave_id accordingly to request line base
  dmaengine: dw_dma: fix endianess for DT xlate function

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "For a some fixes for Kernel 3.9:
   - subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
   - compilation fix for arm multiarch preventing IR_RX51 to be selected
   - regression fix at bttv crop logic
   - s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] [REGRESSION] bt8xx: Fix too large height in cropcap
  [media] fix compilation with both V4L2 and I2C as 'm'
  [media] m5mols: Fix bug in stream on handler
  [media] s5p-fimc: Do not attempt to disable not enabled media pipeline
  [media] s5p-mfc: Fix encoder control 15 issue
  [media] s5p-mfc: Fix frame skip bug
  [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
  [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
  [media] fimc-lite: Fix the variable type to avoid possible crash
  [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
  [media] ir: IR_RX51 only works on OMAP2

11 years agoMerge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 31 Mar 2013 18:38:59 +0000 (11:38 -0700)]
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Alright, this time from 10K up in the air.

  Collection of fixes that have been queued up since the merge window
  opened, hence postponed until later in the cycle.  The pull request
  contains:

   - A bunch of fixes for the xen blk front/back driver.

   - A round of fixes for the new IBM RamSan driver, fixing various
     nasty issues.

   - Fixes for multiple drives from Wei Yongjun, bad handling of return
     values and wrong pointer math.

   - A fix for loop properly killing partitions when being detached."

* tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits)
  mg_disk: fix error return code in mg_probe()
  rsxx: remove unused variable
  rsxx: enable error return of rsxx_eeh_save_issued_dmas()
  block: removes dynamic allocation on stack
  Block: blk-flush: Fixed indent code style
  cciss: fix invalid use of sizeof in cciss_find_cfgtables()
  loop: cleanup partitions when detaching loop device
  loop: fix error return code in loop_add()
  mtip32xx: fix error return code in mtip_pci_probe()
  xen-blkfront: remove frame list from blk_shadow
  xen-blkfront: pre-allocate pages for requests
  xen-blkback: don't store dev_bus_addr
  xen-blkfront: switch from llist to list
  xen-blkback: fix foreach_grant_safe to handle empty lists
  xen-blkfront: replace kmalloc and then memcpy with kmemdup
  xen-blkback: fix dispatch_rw_block_io() error path
  rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas()
  Adding in EEH support to the IBM FlashSystem 70/80 device driver
  block: IBM RamSan 70/80 error message bug fix.
  block: IBM RamSan 70/80 branding changes.
  ...

11 years agoRevert "lockdep: check that no locks held at freeze time"
Paul Walmsley [Sun, 31 Mar 2013 00:04:40 +0000 (00:04 +0000)]
Revert "lockdep: check that no locks held at freeze time"

This reverts commit 6aa9707099c4b25700940eb3d016f16c4434360d.

Commit 6aa9707099c4 ("lockdep: check that no locks held at freeze time")
causes problems with NFS root filesystems.  The failures were noticed on
OMAP2 and 3 boards during kernel init:

  [ BUG: swapper/0/1 still has locks held! ]
  3.9.0-rc3-00344-ga937536 #1 Not tainted
  -------------------------------------
  1 lock held by swapper/0/1:
   #0:  (&type->s_umount_key#13/1){+.+.+.}, at: [<c011e84c>] sget+0x248/0x574

  stack backtrace:
    rpc_wait_bit_killable
    __wait_on_bit
    out_of_line_wait_on_bit
    __rpc_execute
    rpc_run_task
    rpc_call_sync
    nfs_proc_get_root
    nfs_get_root
    nfs_fs_mount_common
    nfs_try_mount
    nfs_fs_mount
    mount_fs
    vfs_kern_mount
    do_mount
    sys_mount
    do_mount_root
    mount_root
    prepare_namespace
    kernel_init_freeable
    kernel_init

Although the rootfs mounts, the system is unstable.  Here's a transcript
from a PM test:

  http://www.pwsan.com/omap/testlogs/test_v3.9-rc3/20130317194234/pm/37xxevm/37xxevm_log.txt

Here's what the test log should look like:

  http://www.pwsan.com/omap/testlogs/test_v3.8/20130218214403/pm/37xxevm/37xxevm_log.txt

Mailing list discussion is here:

  http://lkml.org/lkml/2013/3/4/221

Deal with this for v3.9 by reverting the problem commit, until folks can
figure out the right long-term course of action.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: <maciej.rutecki@gmail.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ben Chan <benchan@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 30 Mar 2013 20:13:05 +0000 (13:13 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "This includes the bug-fix for a >= v3.8-rc1 regression specific to
  iscsi-target persistent reservation conflict handling (CC'ed to
  stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
  so that in-flight qemu vhost-scsi-pci device code can detect the
  proper vhost feature bits.

  Also, there are two more tcm_vhost patches still being discussed by
  MST and Asias for v3.9 that will be required for the in-flight qemu
  vhost-scsi-pci device patch to function properly, and that should
  (hopefully) be the last target fixes for this round."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
  tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit

11 years agodw_dmac: adjust slave_id accordingly to request line base
Andy Shevchenko [Wed, 20 Feb 2013 11:52:17 +0000 (13:52 +0200)]
dw_dmac: adjust slave_id accordingly to request line base

On some hardware configurations we have got the request line with the offset.
The patch introduces convert_slave_id() helper for that cases. The request line
base is came from the driver data provided by the platform_device_id table.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agodmaengine: dw_dma: fix endianess for DT xlate function
Arnd Bergmann [Sun, 3 Mar 2013 20:51:28 +0000 (20:51 +0000)]
dmaengine: dw_dma: fix endianess for DT xlate function

As reported by Wu Fengguang's build robot tracking sparse warnings, the
dma_spec arguments in the dw_dma_xlate are already byte swapped on
little-endian platforms and must not get swapped again. This code is
currently not used anywhere, but will be used in Linux 3.10 when the
ARM SPEAr platform starts using the generic DMA DT binding.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
11 years agoPNP: List Rafael Wysocki as a maintainer
Rafael J. Wysocki [Fri, 29 Mar 2013 21:59:53 +0000 (22:59 +0100)]
PNP: List Rafael Wysocki as a maintainer

The Adam Belay's e-mail address in MAINTAINERS under PNP SUPPORT
is not valid any more and I started to maintain that code in the
meantime as a matter of fact, so list myself as a maintainer of it
along with Bjorn and remove the Adam's entry from it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 29 Mar 2013 18:47:43 +0000 (11:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

Pull ceph fix from Sage Weil:
 "This fixes a regression introduced during the last merge window when
  mapping non-existent images."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: don't zero-fill non-image object requests

11 years agorbd: don't zero-fill non-image object requests
Alex Elder [Wed, 27 Mar 2013 14:16:30 +0000 (09:16 -0500)]
rbd: don't zero-fill non-image object requests

A result of ENOENT from a read request for an object that's part of
an rbd image indicates that there is a hole in that portion of the
image.  Similarly, a short read for such an object indicates that
the remainder of the read should be interpreted a full read with
zeros filling out the end of the request.

This behavior is not correct for objects that are not backing rbd
image data.  Currently rbd_img_obj_request_callback() assumes it
should be done for all objects.

Change rbd_img_obj_request_callback() so it only does this zeroing
for image objects.  Encapsulate that special handling in its own
function.  Add an assertion that the image object request is a bio
request, since we assume that (and we currently don't support any
other types).

This resolves a problem identified here:
    http://tracker.ceph.com/issues/4559

The regression was introduced by bf0d5f503dc11d6314c0503591d258d60ee9c944.

Reported-by: Dan van der Ster <dan@vanderster.com>
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Fri, 29 Mar 2013 18:13:25 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We've had a busy two weeks of bug fixing.  The biggest patches in here
  are some long standing early-enospc problems (Josef) and a very old
  race where compression and mmap combine forces to lose writes (me).
  I'm fairly sure the mmap bug goes all the way back to the introduction
  of the compression code, which is proof that fsx doesn't trigger every
  possible mmap corner after all.

  I'm sure you'll notice one of these is from this morning, it's a small
  and isolated use-after-free fix in our scrub error reporting.  I
  double checked it here."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: don't drop path when printing out tree errors in scrub
  Btrfs: fix wrong return value of btrfs_lookup_csum()
  Btrfs: fix wrong reservation of csums
  Btrfs: fix double free in the btrfs_qgroup_account_ref()
  Btrfs: limit the global reserve to 512mb
  Btrfs: hold the ordered operations mutex when waiting on ordered extents
  Btrfs: fix space accounting for unlink and rename
  Btrfs: fix space leak when we fail to reserve metadata space
  Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes
  Btrfs: fix race between mmap writes and compression
  Btrfs: fix memory leak in btrfs_create_tree()
  Btrfs: fix locking on ROOT_REPLACE operations in tree mod log
  Btrfs: fix missing qgroup reservation before fallocating
  Btrfs: handle a bogus chunk tree nicely
  Btrfs: update to use fs_state bit

11 years agoia64 idle: delete stale (*idle)() function pointer
Len Brown [Fri, 29 Mar 2013 18:02:30 +0000 (11:02 -0700)]
ia64 idle: delete stale (*idle)() function pointer

Commit 3e7fc708eb41 ("ia64 idle: delete pm_idle") in 3.9-rc1 didn't
finish the job, leaving an un-initialized reference to (*idle)().

[ Haven't seen a crash from this - but seems like we are just being
  lucky that "idle" is zero so it does get initialized before we jump to
  randomland  - Len ]

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Fri, 29 Mar 2013 18:00:43 +0000 (11:00 -0700)]
Merge branch 'for-curr' of git://git./linux/kernel/git/vgupta/arc

Pull arc architecture fixes from Vineet Gupta:
 "This includes fix for a serious bug in DMA mapping API, make
  allyesconfig wreckage, removal of bogus email-list placeholder in
  MAINTAINERS, a typo in ptrace helper code and last remaining changes
  for syscall ABI v3 which we are finally starting to transition-to
  internally.

  The request is late than I intended to - but I was held up with
  debugging a timer link list corruption, for which a proposed fix to
  generic timer code was sent out to lkml/tglx earlier today."

* 'for-curr' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: Fix the typo in event identifier flags used by ptrace
  arc: fix dma_address assignment during dma_map_sg()
  ARC: Remove SET_PERSONALITY (tracks cross-arch change)
  ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI
  ARC: ABIv3: Print the correct ABI ver
  ARC: make allyesconfig build breakages
  ARC: MAINTAINERS update for ARC

11 years agoARM: tegra: powergate: Don't error out if new state == old state
Thierry Reding [Thu, 28 Mar 2013 20:35:04 +0000 (21:35 +0100)]
ARM: tegra: powergate: Don't error out if new state == old state

Don't treat it as an error if a partition is already in the same power
state when a user wants to power it on or off. This allows code to
proceed if no state change is required.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoARM: tegra: Export tegra_powergate_sequence_power_up()
Thierry Reding [Thu, 28 Mar 2013 20:35:03 +0000 (21:35 +0100)]
ARM: tegra: Export tegra_powergate_sequence_power_up()

This function can be used by drivers to enable power to the hardware
blocks that they drive. Most of the drivers can be built as a module
and therefore require this function to be exported.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>