Commit graph

362187 commits

Author SHA1 Message Date
Olof Johansson
b9d5868e34 Cleanups for Allwinner sunXi architecture:
- Remove sunxi.dtsi
   - Switch to clocksource/irqchip device tree handlers
   - Cleanup the watchdog code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRZDauAAoJEBx+YmzsjxAgu8IP/3V/W2NsFOwQTz7+nVxw19zu
 cGyCqqTTXed0ku0lmA4mP9x234eSwCplkzyFhnNU2hOdNaObZql8Mibkp3FBIcVn
 eSq6lbCNpu0VPTjmTqaHYueYFrxmM3DeVQgiZ6m3bDdloTinfndjPKyFK1b8k6ti
 OluYF25TaW8OFBJDUhXMxRiEbCLls38Z83aFpL/6k3krf/Royn75ey8uq066jyRL
 d26tL2Rh0vJWojR+RUFdu6+y3CzLdOl5vUwJ/29SaarBDDxWKMIbUY4ezwmxXq2N
 eCqGsxwtM6VuhYps5b//T+FdKTZbB/3U2ybH4xCU2RYDXZPigeVFT7unE0npYRry
 LIern3PAKv3jOJ6kwKyEYCX1++6Yt6kyoWNKLk2FYik92KB9Pdw9yCCcpm5F/C9N
 DetA4GPY/4009bNkKJrlA4Iks+TzrYp+z/qg0OxvDLYaLbknecjYutNL7on9wKrV
 f5eUlVoRvecHHuf/S+V+DMId4CQrH1RP+jsDKDD6Z8hLpFQ6bnFv2QgSaVwC0f+8
 dRMbN9GAReibMAR3BiYodQZnb5x9yF9sBYnRY+ZVgkS7VvsRFi6C9F7cZYQnIia1
 j1x8AlFxEvNsSv1bKg5bFaWT3EpO1X2zmT30wPYuGO2XL/UVsz23Einw6jSHiJDi
 M77vFMzmH30YQ2GLNbKn
 =227f
 -----END PGP SIGNATURE-----

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.
2013-04-11 03:39:00 -07:00
Olof Johansson
83c15f4c05 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
  ...
2013-04-11 03:38:03 -07:00
Olof Johansson
d6e911b599 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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRZBpzAAoJEFBXWFqHsHzOfyAH/RdvhORI0rNhBAOrSxleWlMy
 AMP9x6G5tXNK/fgtxopvCiS4VXw5MB01uqJWMVM9+hx6676oCXWc/L3I6iT5l87B
 qPY/e9LyGJa5aOYczPuUT2sG+Ga8989GhOksA+L6kWHZ2df0BIB9rBRZnoPezEAx
 u2ATdioyzfj2rAnDNFOxsw6oai265mowt/f8J/7EQfxgkAMcKov7/BpVac0po55R
 tv+Hr3T7OBg3p/h5PYi5iAehVCToCKOD31QpnlhS+dmKS52w7tEO6T75INt7HzC8
 CJT0zi5jJ3/tDJsdYJ1SS4MHK4U43y0oV7cw7sO7TzNreyOB6bzTWDqhdJY2oMM=
 =N7xl
 -----END PGP SIGNATURE-----

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>
2013-04-11 03:06:33 -07:00
Arnd Bergmann
3da2541645 Trivial typos and some macros removal & modification
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRY84IAAoJEAf03oE53VmQNaAIAJ8WTPV9cxGPO+h55QiRL2WZ
 9MMBpOV0f06s0cKIoE/lKrpKfOQcBYW74C9koERs7CrBWnAKGePairAgfpNduTrC
 uYgF29kfeapMgr3CbKzacWZs8KRF+1DguACZ177mAOBUtNORzUGnBM80SAL26s8w
 7BLUjQVNu2q8ELA30KFqxPHvFWTCsXMFdHjKGJH4n4n8sxMIvtCCXIq26oDvX+G8
 yLZ2lD1bC5byI35uPPF9mBsjXPwh5BYguPAETkbawuE4K2d1T8Y2w/GgRobJ/2DZ
 WzsednDcuxkk2AfmxVDdtqnOCO3v84BhqlnRcBBNW5neE/779wzop9olk8gcshc=
 =sFrg
 -----END PGP SIGNATURE-----

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>
2013-04-09 15:37:28 +02:00
Arnd Bergmann
4909e13cd9 cleanup unused codes for samsung
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRYuOXAAoJEA0Cl+kVi2xq75EP/0DkQ2vJP6pESS2V7vq57/0K
 lnbeXxdZGwQAYuNNdtYXTT30yCr8AJ5AtD7tdyXMu33BCj0EJIBswX/jBVRNwZ0M
 RXdUoLaldyccoc7COav/pptKViEteNmYFkMN6++Bx24clsugZ+upJv95HGeCnO6P
 zW5KpsJdNNvJCoqfQxsoQEFAHOR9qS9Wve+hZaoSTJtDyQw2H87XxDo2M0bxeu0W
 Zpo9fnwOitMPAkiUV8Q0oHDdoDrL0wmH1OsXaKihc7KCCgT0+3aDkpMKxMV7AfaB
 w8TxPIZym2ko4cY/6SeLQEZ/GCCgcCxBRyMvZ0SzWnU5zSSoB+yZMzVbYxwslSdE
 21tfGJVyo/E2a0CzcLHSCKHXtShswYNWREfRgozp6q5/Ys6j7fqXi34Hoo2iAtIK
 KNBTinZDBAco3TjOCimnluJ5CEHP6Hvd8uqXfqDM525TZWeGTDBKykj0l7ECYwdb
 zB/blf8BHwJV4UgvTPJG1RXsyVJWDXyKzQ9+uJJG7zDiFsjeaQqPhcedxJOdkLlM
 fSjm+PcS/buhkIyob7tjBO/VYs4uQuwVEI+PbM8ITRMprMUJ78KNsVHaEjjqJlGq
 xIusneCGUs6dwQr/fY8FIboV/1QVNi2ioL+F83NILdSBucY8iXtN+OzHg1nTbuEZ
 WJto47UQVuWe/QfFlr/C
 =Imcz
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-samsung-for-v3.10' of git://git.kernel.org/pub/scm/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>
2013-04-09 15:31:57 +02:00
Arnd Bergmann
92202876a3 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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRYnwxAAoJEFBXWFqHsHzOs34H/iSLBv6I+f6oPubu52kJz6fP
 ctZPm6ZJPUKIiyVLLcmMf9kMr3h0wWH3XOBDzPdSj0Wtyb+rbpb/qa0jOg2EwZOs
 2g+7LpehX2BgqKzdBPQEBC94NuU81F0X7SDZe0YechEWZY1VBGjaDnPso+Ugs23A
 7hpjRHAOjd8gnJvkqU/uLKkbJiRX/pvXDcxkRhu15HsA9v6m18Elpq4FNw1QccLd
 06o2M8aVvSL4IYy4Eh8lheUZrPNuyapG3TTjzhbYlPZtvXijFEFWniAQWyq5eGdg
 3aiVbv3lCWYyJzFhmv9n6WYGqHthpnxej9ZMsREa1OVjmViDzSTda6vlhJvBOHQ=
 =neCB
 -----END PGP SIGNATURE-----

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>
2013-04-09 15:29:52 +02:00
Arnd Bergmann
44c0d23775 Linux 3.9-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRWLTrAAoJEHm+PkMAQRiGe8oH/iMy48mecVWvxVZn74Tx3Cef
 xmW/PnAIj28EhSPqK49N/Ow6AfQToFKf7AP0ge20KAf5teTq95AY+tH74DAANt8F
 BjKXXTZiR5xwBvRkq7CR5wDcCvEcBAAz8fgTEd6SEDB2d2VXFf5eKdKUqt1avTCh
 Z6Hup5kuwX+ddtwY2DCBXtp2n6fL0Rm5yLzY1A3OOBye1E7VyLTF7M5BR603Q44P
 4kRLxn8+R7jy3hTuZIhAeoS8TKUoBwVk7DmKxEzrhTHZVOmvwE9lEHybRnIyOpd/
 k1JnbRbiPsLsCVFOn10SQkGDAIk00lro3tuWP2C1ljERiD/OOh5Ui9nXYAhMkbI=
 =q15K
 -----END PGP SIGNATURE-----

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>
2013-04-09 15:29:43 +02:00
Arnd Bergmann
8024206dbf 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRXvqoAAoJEMzrak5tbycx4C0P/R6urrFPiYsPgith5+dpP6zv
 duAIAt0+chtEjva0veewQsBneRtTVNU115FQ/QZaMjSszAuIjC7nRa2iBa88FX1+
 pzQYmRUrIupjeQ1WxxKYOILDXrMJNejbgoLu7kcHzWDEGsJmnwNh8kmiklvIJpa8
 UDpz7RWhr6aWzrmiwj1cPF1/NJBl1nbx/TZCUo1u8yq46C9oVUi3DCdAnDVEsAzA
 vJaNSVWxeBOytd0jlLOiDAYtlrCtysCt/x7YjnN+9x7r99pzXHd0FOPOkKWBrOAN
 TOk+bhyXMFkucEk229A8xRYxhRynYecqYl48kF6Wt7HssrUJptk4qXZTZeDIyvZS
 33YCRDjCJSrCkHjgDIVddtiz4+iZs6D7f/p9lZ+ikLfTyNXf0a+Wo5zRRyrrYJ2J
 Is4ZW0U3lvF4XmbNQRW3RhIGINSRhEY4POqygjO5h4fw7uAESAV3Pd3z/e59tMQi
 Dh3A1f+yIXDwYQmyN/nFVTjFcFPlCD6BW9G/u+R/5YkPSmGqw8cUUw4BlO244wHL
 NVF7VQBjtkELYPPsHnp6Pp+aJ0uxmmGcSNM56RHZERiMZlz1lv5CwT6b/6PqFEu6
 IpXsAhV5SRvX+6Ky5mtb8A6JdNA6EuwVol3nmaNqFlbqHcR1HHyAsgCiTDkwkGYE
 Ggk40fKiWRcras9gRJI+
 =3GM9
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.10-cleanup' of git://git.kernel.org/pub/scm/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>
2013-04-09 15:27:52 +02:00
Arnd Bergmann
5be8f63688 Merge branch 'tegra/fixes' into next/cleanup
This is a dependency for tegra/cleanups

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 15:26:51 +02:00
Arnd Bergmann
f199ab1aab 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRYvfIAAoJEBvUPslcq6VzqJ4QAOIK3KFoxO+Of0f86Y5P598q
 tp91sQbXPzMW7MzawJ/YR0K9bX25vam5k6wuh8VnF6xQBfeF0jKBEKE5ksZbratM
 jrA2Xz52iHtNaCPE44AdbyRLZSV8wl60cpOIAF5ymLZuGQ2ZJYgJvLQqY7wffMTd
 T/S6EfJxz7r2cvlHeSJsDkVmovime7Zw0rj6AO2G4F62djQvL+BvOTkpva4aFH/e
 sH43RTnqA3qxlXYfoxFHam2kgTr6A2N44hoddS5MV3IuSannsz9Jiuj2kBxyWmh0
 /UHyonHRPDMQmWrYKEZnTkV05pLCZhC3KM/84y+im/jND2Q+zkamrKyaOPo2ZORt
 sP5ZksBJyr4S/FmSdXCjtmbfrwhAcwC2btt+Vp8747O7ccnipWe5QA54rMuLbaiq
 Kw7qYwrPPgmyX2umlCsYH5LeaZW+sK19cAAQcXVUf87z+LmCPD7HbN2oXDY9sR7c
 zNPjY0GJLG2IKyLfIAFwpzE32I2Ld1KAj2owtE2qU4E/94Me3f+SBnFq38cpZyDd
 WnvXh1OY5K++7VkBKAIcyEJ007BzK0plJYCifVAkPkoPFS1Y1SxKtYfTbdeV56hj
 8JuxRu45gOc/pn3VPuRyNOT6BRhEZtI5NP13Bq1koBlz29mGCCb+E33rbp331nhm
 GPokhwSA2USvDP8hgf1B
 =qEVL
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/fixes-pm-signed' of git://git.kernel.org/pub/scm/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<
2013-04-09 15:14:19 +02:00
Paul Bolle
3442a7b51d 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>
2013-04-09 21:07:36 +08:00
Sascha Hauer
e27da53bae 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>
2013-04-09 21:07:20 +08:00
Maxime Ripard
bc34b5f27c 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>
2013-04-08 21:43:08 +02:00
Maxime Ripard
d7fbc6ca35 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>
2013-04-08 21:42:46 +02:00
Maxime Ripard
f1dc6c4f77 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>
2013-04-08 21:42:27 +02:00
Maxime Ripard
119fd635e3 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>
2013-04-08 21:42:11 +02:00
Maxime Ripard
ea71d9a600 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>
2013-04-08 21:41:54 +02:00
Maxime Ripard
049817319a 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>
2013-04-08 21:41:37 +02:00
Maxime Ripard
7c91d302ff Merge remote-tracking branch 'clk/clk-for-3.10' into sunxi/core-for-3.10 2013-04-08 21:39:22 +02:00
Maxime Ripard
0b824f8dad Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into sunxi/core-for-3.10 2013-04-08 21:36:54 +02:00
Tony Lindgren
5e7deed712 OMAP PM fixes for v3.10
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRX2NLAAoJEFk3GJrT+8ZlMUYP/2v5Xq2Xk5Mo9LQPPVVZi4gh
 JuWNRufL16h2GeBFDKcSqtynJhR70Zj7tARe3pDV7y+E8z0214pYcOma8J/PIB76
 KuOoWWbXpZkYoCOutxW+UDDwSP7opHYPFI/bDWeq2+613VESnQinZClG64RjNq4q
 VE/7TeZ7OIFngI26cK0oUQjFGzXhp9r+Qw/qjEJdje0ggg8sjWJUsvyxI1hI/x02
 LmgDjKRafTUByF4jpzPTjbR1KvVoqQXuWrgYZWuunWo3g9YsPkQY07jL1GpCZKDp
 vy/9l09NQ31/pMec6iGP7OR7r3RktAut6ro2A7t/EbpFmRvJ5OuhjvPubEDDTU+v
 BFOUy9jeTH4m8o+sNdVK9/A3lmcrGfdO7bvkhvcJV7DUbY0URqozu64btM5rdC9C
 pzuZun13owY21w6QMsABVjStOGaZ3Wsl8I1XLxJmejjTIbFVfiNn4c4N6fyZL8Wq
 R7bQnLCw9SXHhE4drn8j4SqfjP8Gzh102DZhu6zXHYyGY4XA8SicgVTl9vCTcKPo
 xy/yvGX+cMs54O5hcV4El1CwzuDui34q8c/k191egGlHtoBtIV6Ki+PhLczzHJ8N
 JPG6VhHL7Xy66akK2GznqOyWVXKo+TKaSyZAGb3YH+9sYJSpcrK5/YbWRd3RpINW
 q1xCCjclY1xh+Bj1m5ej
 =siIQ
 -----END PGP SIGNATURE-----

Merge tag 'omap-pm-v3.10/fixes/pm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-v3.10/fixes-pm

OMAP PM fixes for v3.10
2013-04-08 09:58:00 -07:00
Arnd Bergmann
6fa6183aef 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWwuDAAoJEBvUPslcq6VzUUgQANZUZrZnnedveCcekALSNfIH
 62Q8rDIyTCgcQQjAazy1XsDyJ6j1PGXkHUwdWpcAfvHkqbZ4S0lmpys8TyJUtg/x
 nSubA8AQ9aIXl9S2ttBJAgjiJm4xzbJXVlY8NIF0mBVgz9cDxYqnLEjNJ8qK3ubU
 SI7ZSLE0RroX5MDJZn4AL22sHk1frIctIRDPWWm/RZPE4VF1XeN03Ry5JgAyrrvB
 +gzExlgbJkJgDPfVOf4wrD/to3MIyGcKIZn/04JWkSf1dtNv4HEj3KVkUhE9LC/r
 iy1gwZmAzofY50/ZCFKVfggvC/M1HGiatE3gCSNJ/A0IVW22JhKcxVIRumTvET9p
 VRyV95ydqSSrjlvgTTpd/VGeS/wfSENSrA+fUEgt3MYad62SV50/qRcZ/26HVMfI
 u+i8I42axBQdkPky9HBIYuLpFwoTq1LBmcSIykusfa9kzy2NysWOuUvEY9/TbWfu
 NaEM5e1ISoxTd/AW5u7v6SPMHGe0lIxR6rLQefd874pQjCSAHzIpqqhw+Qo3otZd
 ugt+PUDmNn0SU1LqRozzpY/wwD08hZVS37M0eZIeCxfrh4pkYdr+Mh5zX5RnSFtn
 BTxOLfNKIJvO1tu3ednxsFfZJ870Gd8Z2lVzE8Sm6KNLJBbIeRv/m/aj0MxJmyRl
 tukO7QAHKTdd3a5jcisD
 =9WNV
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/cleanup-v2-signed' of git://git.kernel.org/pub/scm/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>
2013-04-08 18:03:08 +02:00
Johan Hovold
3aa630b3e6 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>
2013-04-08 17:47:44 +02:00
Johan Hovold
95f287e5a1 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>
2013-04-08 17:42:20 +02:00
Paul Bolle
fe72e27368 ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
The only user of Kconfig symbol EXYNOS_DEV_DRM was removed in commit
0a9d5ac307 ("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>
2013-04-09 00:32:38 +09:00
Jingoo Han
b82718565c 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>
2013-04-08 21:54:16 +09:00
Padmavathi Venna
ba7a9a784f 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>
2013-04-08 21:42:10 +09:00
Sylwester Nawrocki
ca48384879 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>
2013-04-08 21:37:07 +09:00
Santosh Shilimkar
b7806dc7cb 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>
2013-04-05 14:19:25 -07:00
Emilio López
918d7f6f68 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>
2013-04-04 13:53:02 -07:00
Emilio López
5a4fe9b55d 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>
2013-04-04 13:52:50 -07:00
Emilio López
13569a709a 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>
2013-04-04 13:51:35 -07:00
Alexander Shiyan
a4e4d22c6f 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>
2013-04-04 10:04:00 +09:00
Alexander Shiyan
fb278af74b 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>
2013-04-04 10:03:57 +09:00
Alexander Shiyan
1c13786d81 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>
2013-04-04 10:03:53 +09:00
Paul Bolle
05b7a96431 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>
2013-04-04 08:48:24 +09:00
Paul Bolle
2294450d9c ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
Commit ebc433c289 ("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>
2013-04-04 08:48:17 +09:00
Paul Bolle
ed7966b886 ARM: S3C64XX: remove obsolete Makefile line
Commit a07613a54d ("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>
2013-04-04 08:46:12 +09:00
Soren Brinkmann
056b205316 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>
2013-04-03 12:56:30 -07:00
Jean-Francois Moine
f640c0fad6 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]
2013-04-03 12:55:31 -07:00
Nicolas Ferre
42e73f1fc1 ARM: at91: remove unused dbgu_readl() macro
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2013-04-03 11:23:05 +02:00
Fabio Estevam
e933a1a12a 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>
2013-04-03 10:30:08 +08:00
James Hogan
3566d40c1a 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>
2013-04-02 16:50:26 -07:00
Olof Johansson
321ae6fa03 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>
2013-04-02 15:10:57 -07:00
Olof Johansson
bc895b5987 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>
2013-04-02 15:09:47 -07:00
Olof Johansson
3fce7fd102 Tiny one-line typo patch.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRVVSsAAoJEAf03oE53VmQYkMH/1m8vFoZcRPXZYuyZ3mgIvQf
 /okZE5DF8Vx+iRbeZsQwfo1GcIW0u9G2lVmgw7sLjguPAYsxDwd+gff492eFO2MD
 yDWTdu0w2N0SZEiDbQfzWbRuj5ExWhMUH/EcaNPUObQ5a3b+gjQ0G/ZZrJI3BkGE
 p2rlR78PiDL1K/zsSzMPaMHpR1s52hNpFBlrruG8YwO2DDW0EbssMcnIxE5ElaRD
 Hey910SgUz31SQt4EoM1AfJFvyet+XneJ0gdxyt2ZcRWPHtyaXjNaps+khdLpFvb
 2oyOo2GoU/MRy0xe2WLt263CsgzhRziC4FpmUMJmFB4Pk32xgYuU5sbtvEUMF1Q=
 =fhCW
 -----END PGP SIGNATURE-----

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>
2013-04-02 11:28:48 -07:00
Maxime Ripard
ebafed7ab9 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>
2013-04-02 11:05:40 -07:00
Olof Johansson
c2573077df Merge branch 'gic' of git://git.kernel.org/pub/scm/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>
2013-04-02 10:59:28 -07:00
Mike Turquette
533ddeb1e8 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>
2013-04-02 10:23:41 -07:00
Mike Turquette
eab89f690e 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>
2013-04-02 10:23:08 -07:00