Commit Graph

362350 Commits

Author SHA1 Message Date
Olof Johansson c3e0c873d0 This is the 2nd part of ARM timer clean-ups for 3.10. This series has
the following changes:
 
 - Add sched_clock selection logic to select the highest frequency clock
 - Use full 64-bit arch timer counter for sched_clock
 - Convert arch timer, sp804 and integrator-cp timers to CLKSRC_OF and
 adapt all users to use clocksource_of_init
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRZx0aAAoJEMhvYp4jgsXiB7MH/AutBUa40yuzTA1RzaDxYTX7
 m1NrjmsTI8pFLX6VTvtwNXdT1AJ0JbzPxu35E1Y8xsu8tnx/RjG/hhqq8R2rXd5t
 oqilT46SPBZpKBSrPSuEQde5v8XlKT5kEcUlg47bHGB1JrI9Ip14okRcg5aCJJzu
 Pb25NqxTWS+vFTNV7C+UzuJ72lJ24FHQXK4AbZqaWcaokGCRLP1QE1s83jY7mpX7
 zd5xWMPygKR8oYNPVhxoD1ajUo5cqVHtcXFRnWy1o/T/8ZPqCuSOsyJokScPHzwa
 vUwoAn2OQSFLJZgITu8+9JSlLxW40BdMHaJ+jTlOXMGDq6RHZY1FHAy8PTf43wU=
 =QjNu
 -----END PGP SIGNATURE-----

Merge tag 'clksrc-cleanup-for-3.10-part2' of git://sources.calxeda.com/kernel/linux into late/clksrc

This is the 2nd part of ARM timer clean-ups for 3.10. This series has
the following changes:

- Add sched_clock selection logic to select the highest frequency clock
- Use full 64-bit arch timer counter for sched_clock
- Convert arch timer, sp804 and integrator-cp timers to CLKSRC_OF and
adapt all users to use clocksource_of_init

* tag 'clksrc-cleanup-for-3.10-part2' of git://sources.calxeda.com/kernel/linux:
  devtree: add binding documentation for sp804
  ARM: integrator-cp: convert use CLKSRC_OF for timer init
  ARM: versatile: use OF init for sp804 timer
  ARM: versatile: add versatile dtbs to dtbs target
  ARM: vexpress: remove extra timer-sp control register clearing
  ARM: dts: vexpress: disable CA9 core tile sp804 timer
  ARM: vexpress: remove sp804 OF init
  ARM: highbank: use OF init for sp804 timer
  ARM: timer-sp: convert to use CLKSRC_OF init
  OF: add empty of_device_is_available for !OF
  ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
  ARM: make machine_desc->init_time default to clocksource_of_init
  ARM: arch_timer: use full 64-bit counter for sched_clock
  ARM: make sched_clock just call a function pointer
  ARM: sched_clock: allow changing to higher frequency counter

Signed-off-by: Olof Johansson <olof@lixom.net>

This has a nasty set of conflicts with the exynos MCT code, which was
moved in a separate branch, and then fixed up when merged in, but still
conflicts a bit here. It should have been sorted out by this merge though.
2013-04-17 10:10:01 -07:00
Haojian Zhuang 69a517b247 devtree: add binding documentation for sp804
The sp804 binding is already in use by several platforms. This adds missing
documentation for the binding and also extends the binding to handle some
additional possible interrupt configurations.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:22 -05:00
Rob Herring 870e2928cf ARM: integrator-cp: convert use CLKSRC_OF for timer init
Move the integrator-cp timer init to timer-sp.c and use CLKSRC_OF. There is
no reason to use the aliases, so drop them from the init code.

The integrator-cp timers are mistakenly called sp804 timers in the dts, but
in fact they are not sp804 dual timers, but single timers with the same
programming model. Fix the dts to reflect this.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-11 15:11:21 -05:00
Rob Herring 818270d573 ARM: versatile: use OF init for sp804 timer
Enable DT based init for the sp804 timers on versatile DT platform.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:21 -05:00
Rob Herring cc8e9ad884 ARM: versatile: add versatile dtbs to dtbs target
Add the versatile platform dtbs to the dtbs make rule.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:20 -05:00
Rob Herring b2a93b1d6b ARM: vexpress: remove extra timer-sp control register clearing
The timer-sp initialization code clears the control register before
initializing the timers, so every platform doing this is redundant.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:19 -05:00
Rob Herring 34c2e5feeb ARM: dts: vexpress: disable CA9 core tile sp804 timer
The motherboard sp804 timer is used, but core tile sp804 timer is not.
According to Russell King, the clock configuration is undocumented and
defaults to 32kHz which is not desireable. So mark core tile sp804 timer
as disabled.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:19 -05:00
Rob Herring dabfd8fb84 ARM: vexpress: remove sp804 OF init
Remove the vexpress specific setup for the sp804 timer now that
clocksource_of_init will do it.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
2013-04-11 15:11:18 -05:00
Rob Herring 5993b3ee98 ARM: highbank: use OF init for sp804 timer
Remove the highbank specific setup for the sp804 timer now that
clocksource_of_init will do it.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:17 -05:00
Rob Herring 7a0eca7121 ARM: timer-sp: convert to use CLKSRC_OF init
This adds CLKSRC_OF based init for sp804 timer. The clock initialization is
refactored to support retrieving the clock(s) from the DT.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:17 -05:00
Rob Herring d71956960c OF: add empty of_device_is_available for !OF
Add an empty version of of_device_is_available.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:16 -05:00
Rob Herring 0583fe478a ARM: convert arm/arm64 arch timer to use CLKSRC_OF init
This converts arm and arm64 to use CLKSRC_OF DT based initialization for
the arch timer. A new function arch_timer_arch_init is added to allow for
arch specific setup.

This has a side effect of enabling sched_clock on omap5 and exynos5. There
should not be any reason not to use the arch timers for sched_clock.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2013-04-11 15:11:15 -05:00
Arnd Bergmann f414f13f2f ARM: make machine_desc->init_time default to clocksource_of_init
Originally from a default machine descriptor patch from Arnd, pull out
just the default call to clocksource_of_init part. This is needed so that
platforms can simply remove .init_time calls as they are converted to use
clocksource_of_init.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:14 -05:00
Rob Herring 023796b9be ARM: arch_timer: use full 64-bit counter for sched_clock
Only 32-bits of the arch timer were being used and wrapping was needlessly
being done in s/w. By using the full counter (56-64 bits), we don't need
to deal with wrapping and can simplify the implementation when using
arch timer.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-11 15:11:14 -05:00
Rob Herring 7e48c0b9d9 ARM: make sched_clock just call a function pointer
This converts sched_clock to simply a call to a function pointer in order
to allow overriding it. This will allow for use with 64-bit counters where
overflow handling is not needed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-10 18:27:12 -05:00
Rob Herring c115739da8 ARM: sched_clock: allow changing to higher frequency counter
Allow multiple calls to setup_sched_clock and switch to the new counter
if it is higher frequency.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-04-10 18:27:11 -05:00
Arnd Bergmann 228e3023eb add support exynos mct device tree and move into drivers/clocksource
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRYugaAAoJEA0Cl+kVi2xqvi0QAKyF/UbDR6aOSIOoCzgm1iUC
 +F9WvvCLyJdy0y09IKEbwM+aZyzsfC7vO/9wp58ROv1AhD9f1/yk1H+O8NRS668v
 jt8RZlrL30ea0HkRjHRgTCS2sObCXG2pGOduX9i5XKCC4EnM9P/qNe4uJjziY8K8
 FmAanWpJahe0E9szLnWDuF7hhsRkTpjrLWtYYmc1H4LXydoZnxEgGM3xjbqL+m4/
 BPwlCrPtu/WsZzM7Tdx6fVIC2wryrwoH5e1EL3fI2IrWhreOtVWYzoTwUoSy7Xbz
 ERjQoCt3yNVmPO1TwfS9nR/bc0+j8gsFuJRzN42PsP09JFQPVt8Q1o1cpIIHWgvZ
 /pkJAsaBfbQgPOLNof5uHasPVSZYe38TIey782hYA0pmT1RCt46FuJ6zM9M0483q
 4vysYCU/Vc3GOtAQOpsCNbsEMthRzjtjsJoZ5owDsCaiV+eNWC3VrWI2Wm1EO7Mn
 FUthkBY58jPM/9BdFC67ZwBPtSSUhAeZpcUXkcaNj8pgw8Rvfcip/09Vy0Uh0Ef8
 A5dYZec8CNyZKECspzUTlgwyK7xiWD0r3uyr4/a413qb1pr9zdOFlZeespT9bgfI
 uD+tMPpJ+R9fK9BSbRw9FMx1Pe395vZRUmu9WepvQDwQDvoYSi/SVKBMYtn27Bsm
 CD/r/wUs1ktL2rPNcXVz
 =Os9U
 -----END PGP SIGNATURE-----

Merge tag 'mct-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers

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

add support exynos mct device tree and move into drivers/clocksource

* tag 'mct-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  clocksource: mct: Add terminating entry for exynos_mct_ids table
  clocksource: mct: Add missing semicolons in exynos_mct.c
  ARM: EXYNOS: move mct driver to drivers/clocksource
  ARM: EXYNOS: remove static io-remapping of mct registers for Exynos5
  ARM: dts: add mct device tree node for all supported Exynos SoC's
  ARM: EXYNOS: allow dt based discovery of mct controller using clocksource_of_init
  ARM: EXYNOS: add device tree support for MCT controller driver
  ARM: EXYNOS: prepare an array of MCT interrupt numbers and use it
  ARM: EXYNOS: add a register base address variable in mct controller driver

Conflicts:
	drivers/clocksource/Makefile
	drivers/clocksource/exynos_mct.c

[arnd: adapt to CLOCKSOURCE_OF_DECLARE interface change]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 22:18:24 +02:00
Arnd Bergmann 894b7382cf s3c24xx irq cleanup and move into drivers/irqchip
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRYueLAAoJEA0Cl+kVi2xqRggP/1dM6P8T68AB8iJC1DQuE3B7
 d6Edy+mRRU1lFvJ0QCn/QxzWl7r3pYr47yvMcKpnlFpyaqOMtqVGzff5rCts6Hsu
 9km3UA42W7dO9/NLdSOg8GKZPV/3pFTjEnNNdux17pgihBv4ZciIGiivek5kVXCR
 mDh7lMAA6GJuEHxoaUumUp0v+dVfquQcRra8ZxV9rHpHzfy48YFJO7wPlTd2b0EY
 fFMq/cJxHre2+jEuLZiuEvuRgBKpXG1oc7BeU5Gt3moCTdD+HRODEgSZJaTUmAtK
 /jKKUCjvJaDEuL5Xr4Votby0bNniEq4XGGkIAH9iNC47S8tzsiyKNhl5y1H1lFcv
 JOZvVFQ0aT4XY+vX8wXwNfafsecF4n4lUky6xUORDH8NBMsuUw9PCQmGLpZY/IqR
 j/XhO2KLkb7HaIHNj2DsMwslQiTj9dxSH8C+zBQbVoIb/3XipQooUx9FdLDA99a/
 Ni9U6xAF9L4B48rIamB0Af10Ig5sKCE1dFS15yJy2KTesABUyxbbbEVyi0sl1Ugt
 zEWpcISUdKbA0GDivN/hsBsfFBkwG4F/Su6iF62NSxWlXj9kSOpTdjluM0haUlfG
 nbYU5lyF8dVUFLaWBdRF6tYW9EollgmXJBDdaIeS6qVoqWOy0Cjz+VS4eOvAm0ew
 Hi2tJDHMW41K3jBVxJV6
 =Sitv
 -----END PGP SIGNATURE-----

Merge tag 'irq-s3c24xx-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers

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

s3c24xx irq cleanup and move into drivers/irqchip

* tag 'irq-s3c24xx-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  irqchip: s3c24xx: add devicetree support
  irqchip: s3c24xx: make interrupt handling independent of irq_domain structure
  irqchip: s3c24xx: globally keep track of the created intc instances
  irqchip: s3c24xx: add irq_set_type callback for basic interrupt types
  irqchip: s3c24xx: fix irqlist of second s3c2416 controller
  irqchip: s3c24xx: fix comments on some camera interrupts
  ARM: S3C24XX: move irq driver to drivers/irqchip
  ARM: S3C24XX: add handle_irq function
  ARM: S3C24XX: make s3c24xx_init_intc static
  ARM: S3C24XX: move s3c24xx_init_irq to s3c2410_init_irq
  ARM: S3C24XX: fix irq parent check
  ARM: S3C24XX: fix redundant checks in the irq mapping function

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 22:05:50 +02:00
Arnd Bergmann ab9838e145 ux500 pinctrl updates for the ARM SoC tree.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRYr70AAoJEEEQszewGV1zao0QAKcc2fRKWxqqbmySdIrPHNZV
 kuAVFLcws87WiREWMvjopDj/j8mhtOaPyUs2XRBzj47+dPu6isyUPxvObNDaw+BU
 f+6fjEJMDQlhiuw1BQ0tXZN9Kv3LP1VWR0DIekxwL/u5arqt1uRcSvbZ4LKhiKRh
 8VyKnfvmmiF90D5A4JpSAi7uctcIzWqjGxqdUjZJqNf4x6KesEiQyIy5ZvBKhfmx
 XfSWCWGW18pwK/bX2NtK6r91HIMNDd8cQDiOk6P9fjdwUhKrkIKiFb++ofnqBZAy
 89hHWLbDAq4nyTZyUKYYhidTvtBo8DqsW+vopkNFgXnoic/Nt9YkTaXD3ZSGqSWP
 A9xWcjX+tBZ+gHfFUjKu6DjPLc1LxQTmmfjrizygAltJhF3ZP2EO8dvzMUbk09Kj
 OZxLkktv46fRuWFd7E/AlX1e5xlybNxXn0tTY46KjmzYFCC9d4Ze3IsXS0EeTzAC
 aF5VewLsLAwY98wzq7MJoLRhMB9pu8JB+K/4UXDHNsiw2vVDs9Ey64bHPXmjUCYN
 JVRfoPxJSyVdD9ZgFh1YMsgrZSHmY0czBvjV6lLfqYhwDA9DPk4vh/d9oGlIfKzL
 VW8cnzmQ0GczgUEVCuALRnI1XuHrEFbHiLp+8zrmYnH+c0hxSseNxut0Fo4ohZpF
 GAFVpCW6zvevjVVdtWE0
 =OInU
 -----END PGP SIGNATURE-----

Merge tag 'ux500-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers

From Linus Walleij <linus.walleij@linaro.org>:

ux500 pinctrl updates for the ARM SoC tree.

* tag 'ux500-pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: 8500: add ab8500-musb pinctrl support
  ARM: ux500: remove redundant DB8500_PIN_SLEEP definition
  ARM: ux500: Add Snowball pin configuration for user LED
  ARM: ux500: u8500: fix pinctrl IDLE state definition for SPI2

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 17:57:39 +02:00
Arnd Bergmann 2b07910131 ARM: tegra: clock driver development
This branch contains most fixes and enhancements to the Tegra common
 clock driver. The main new feature is a driver for Tegra114, which
 coupled with later device tree changes enables many devices on that
 chip, such as MMC, I2C, etc.
 
 This branch depends on a patch in:
 
 git://git.linaro.org/people/mturquette/linux.git clk-for-3.10
 
 Mike has stated that this branch is stable, and is aware of this
 dependency and merge.
 
 Mike's branch is based on v3.9-rc3, which includes a USB change which
 causes problems on Tegra. That problem was fixed in v3.9-rc4. Hence,
 this branch pulls in v3.9-rc4 to ensure bisectability as much as
 possible.
 
 This branch is based on v3.9-rc4, followed by a merge of previous Tegra
 "soc" pull request, followed by a merge of clk-for-3.10.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRXv21AAoJEMzrak5tbycxRAsQAK0U+y5RWQJVR1wQYAuw2AhP
 wX/5BcpDWhH4HrFKUGp0NrVvASHv706bbvnbSsUFeKtMGqRFaiOW756B80R0mnIG
 xjILt64A7kXCMRJeUoXhdJtXQfzNbgGqKUsBJknVHHBw72OhYBXop5ihMWqI9Kk6
 yEsr+/CB9VlV7ZbiLaAXelKuh7oSdaG8ada6qFeRCJhpVVdrFP4aGYkt0iipOBAU
 GBnoISkmp/ocExXlC2n5nIEE0rukJ+KyPwR1bY4+Yj2ZFXL24Nczh8cEZFrV2yz8
 Sa+/6qrowGTw/wPUK+R8+vCvfzKdCYG6rrnyWwwb9UbsP6LAcYz/WB+q0puPZeuZ
 2T82osvbFxjGMYWnR2Uc4CRTid1ophxGWRh810fg1UGMIK4HRMmCxrV6D5Af3FPz
 rXNEf3CCd4iKJQBBYXZAR1TNn5vSX/USeqXvb0810qwe2jwJsiZP5FhZH5Ogfvod
 W825UpmS1zmEz4MI65/CE3fxZ8SsM9Khdp4tl25YfTJ5RMjShzRdsl4BATa8nXpr
 nDfBb8pE2s6hyUWXbnNHw+k4jmQMreEHp+guE6LWYmqBcVlrJpq5joIHqwRl4dyD
 iri9unSvbOAN+fJMXti0uW8zruitfbZgfzwRwwFy1TP0DPQBWVWwN7AABFlItD6M
 pWI9Uf3VL5wAHZmWe6Gq
 =Hasc
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.10-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/drivers

From Stephen Warren <swarren@wwwdotorg.org>:

ARM: tegra: clock driver development

This branch contains most fixes and enhancements to the Tegra common
clock driver. The main new feature is a driver for Tegra114, which
coupled with later device tree changes enables many devices on that
chip, such as MMC, I2C, etc.

This branch depends on a patch in:

git://git.linaro.org/people/mturquette/linux.git clk-for-3.10

Mike has stated that this branch is stable, and is aware of this
dependency and merge.

Mike's branch is based on v3.9-rc3, which includes a USB change which
causes problems on Tegra. That problem was fixed in v3.9-rc4. Hence,
this branch pulls in v3.9-rc4 to ensure bisectability as much as
possible.

This branch is based on v3.9-rc4, followed by a merge of previous Tegra
"soc" pull request, followed by a merge of clk-for-3.10.

* tag 'tegra-for-3.10-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  clk: tegra: fix enum tegra114_clk to match binding
  clk: tegra: Remove forced clk_enable of uartd
  ARM: dt: Add references to tegra_car clocks
  clk: tegra: devicetree match for nvidia,tegra114-car
  clk: tegra: Implement clocks for Tegra114
  ARM: tegra: Define Tegra114 CAR binding
  clk: tegra: Workaround for Tegra114 MSENC problem
  clk: tegra: Add flags to tegra_clk_periph()
  clk: tegra: Add new fields and PLL types for Tegra114
  clk: tegra: move from a lock bit idx to a lock mask
  clk: tegra: Add PLL post divider table
  clk: tegra: introduce TEGRA_PLL_HAS_LOCK_ENABLE
  clk: tegra: Add TEGRA_PLL_BYPASS flag
  clk: tegra: Refactor PLL programming code
  clk: tegra: provide dummy cpu car ops
  clk: tegra: defer application of init table
  clk: tegra: Fix cdev1 and cdev2 IDs
  clk: tegra: Make gr2d and gr3d clocks children of pll_c
  clk: tegra: Export peripheral reset functions
  clk: tegra: Fix periph_clk_to_bit macro

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 17:10:31 +02:00
Arnd Bergmann 5790c58b13 Merge branch 'depends/clk' into next/drivers
This is a snapshot of the stable clk branch at

git://git.linaro.org/people/mturquette/linux.git clk-for-3.10

which is a dependency for the tegra clock changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-09 17:09:35 +02:00
Arnd Bergmann 1194b152cd Merge branch 'tegra/soc' into next/drivers
This is a dependency for the tegra/clk branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Conflicts:
	drivers/clocksource/tegra20_timer.c
2013-04-09 17:07:36 +02:00
Arnd Bergmann 86feb64f5b GPMC updates from Jon Hunter <jon-hunter@ti.com>:
Adds GPMC (General Purpose Memory Controller) DT support for
 NOR flash and Ethernet and includes various GPMC cleans-up
 and fixes.
 
 This series is dependent on commit 7185684 (ARM: OMAP: use
 consistent error checking) from RMK's clean-up branch and commit
 31d9adc (ARM: OMAP2+: Fix broken gpmc support).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRXcsJAAoJEBvUPslcq6VzwKYQANHrnD6R0sv5kTcxT6wqIOv/
 GXaN5aOI7xvplSwORTUuw4wGt9M0kTf/nDKcu+THSYzVsrIXD/zIXoOzH0q8FBPG
 2qmVYJah5LiKCT0M53/DityXD4teCOfK/Ld3w6JqepbAH63ZrNyFI1Zo+JcEvJEW
 qVM16UzEU9k4dk6ENq3PV1HYGnk/cvreG0TkRFnIYHR/+JsUNiderx4ucYYO7oNT
 3Ft4LYMx2p6pOO1K1FqqikN8m+C1Z2Q+1uouo/b9Yvi3phFW+f2e32NEKdtXMQjV
 Eqbz9q0O0mWx9tBq2C+y4nlI+QwjoEcZ5WsU9PNAwyUqu+dZiac28uJo6eIdmlOr
 sw1zwni5XdxnnnjAjG9o9WZAJPpRv6sMLpEaVu2rm4tRi27l1oh6OTfmHsyEv+CR
 mp6cXi9HaDw0ErBxE6kkDiBUkyK0ayyx+v58NJUT363Mc48felKi1ZMoyFLPtbBb
 BnQ91uEp2Kjkx1ebVvKO+8AsrNF6e6rTSVUHfPCef6zJH/v/+6XXxLerQGD5jNDB
 HWFsIwQj+76hOpp4rpUU46HFKgHWyp4qvFBx0y/U2txv8ruD26XemowUhch/ONK6
 3niZzOcXhesjM41bZRmUhzSuW685ZHKN0lBO5U4i+IEL0YHEnpkYbp34hHLzp1ll
 4PaIxx6CZz1QV+IIO91z
 =sfId
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

GPMC updates from Jon Hunter <jon-hunter@ti.com>:

Adds GPMC (General Purpose Memory Controller) DT support for
NOR flash and Ethernet and includes various GPMC cleans-up
and fixes.

This series is dependent on commit 7185684 (ARM: OMAP: use
consistent error checking) from RMK's clean-up branch and commit
31d9adc (ARM: OMAP2+: Fix broken gpmc support).

* tag 'omap-for-v3.10/gpmc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (29 commits)
  ARM: OMAP2+: Add GPMC DT support for Ethernet child nodes
  ARM: OMAP2+: rename gpmc_probe_nor_child() to gpmc_probe_generic_child()
  ARM: OMAP2+: return -ENODEV if GPMC child device creation fails
  ARM: OMAP2+: Allow GPMC probe to complete even if CS mapping fails
  ARM: OMAP2+: Remove unnecesssary GPMC definitions and variable
  ARM: OMAP2+: Detect incorrectly aligned GPMC base address
  ARM: OMAP2+: Convert ONENAND to retrieve GPMC settings from DT
  ARM: OMAP2+: Convert NAND to retrieve GPMC settings from DT
  ARM: OMAP2+: Add device-tree support for NOR flash
  ARM: OMAP2+: Add additional GPMC timing parameters
  ARM: OMAP2+: Add function to read GPMC settings from device-tree
  ARM: OMAP2+: Don't configure of chip-select options in gpmc_cs_configure()
  ARM: OMAP2+: Convert TUSB to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert SMC91x to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert NAND to use gpmc_cs_program_settings()
  ARM: OMAP2+: Convert ONENAND to use gpmc_cs_program_settings()
  ARM: OMAP2+: Add function for configuring GPMC settings
  ARM: OMAP2+: Add structure for storing GPMC settings
  ARM: OMAP2+: Add variable to store number of GPMC waitpins
  ARM: OMAP2+: Simplify code configuring ONENAND devices
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 19:40:57 +02:00
Arnd Bergmann dc2d3db813 Clean-up for omap2+ timers from Jon Hunter <jon-hunter@ti.com>:
This series consists mainly of clean-ups for clockevents and
 clocksource timers on OMAP2+ devices. The most significant change
 in functionality comes from the 5th patch which is changing the
 selection of the clocksource timer for OMAP3 and AM335x devices
 when gptimers are used for clocksource.
 
 Note that this series depends on 7185684 (ARM: OMAP: use
 consistent error checking) in RMK's tree and 960cba6 (ARM:
 OMAP5: timer: Update the clocksource name as per clock data)
 in omap-for-v3.10/fixes-non-critical. So this branch is based
 on a merge of 7185684 and omap-for-v3.10/fixes-non-critical
 to avoid non-trivial merge conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRXGvCAAoJEBvUPslcq6VzKRQQAIedi+lXSAQk/0t2wythB+Es
 94oGmo5g2In+A7FE3gt7IOkSn/k334AwgizcCVRJewvJYii+8vvttVzBqlnyxGAG
 VVu0lJ5rwpCd8R4bmcl+dg5jnKreC3doE51D9M0NtU+GW4gln5m3dCq22cbz3sET
 GzGPSBJeWpHin2xHmIGR9210KdY8LT2yP6nIcwFLK6EiQNS/XFj1akaehgnnGjMB
 9qqi06iRpBszJTEHXfEUfD6UMA4Tml7HQUuqjEt+oMod+Ucu98XhgfpCJr+WN67g
 xHxoR8bitVVhReU6WmWNLuSl3CX/fBG81RTxagA7SSVCg93NEd0lPX1K+U8jy5hR
 V+/wcgb0t0W0us+yuBwPvmlJ+E2t64NjUBXr7rDEwQGk/QSmd3kzQlSpLwnamDx4
 hqnpXPpt5tbCUl6Ubqn4hLnsqz2VJAFw6QWZl+UhkvQMd0RNOg3faJSxjUdzo5n9
 2IKx0ZWAXXNIKKp8eBh7w3z4qlWiK0Xfsq/GuSfHx49ybFRGkX38FI34I9eUYbH8
 14vAfQkb0Tv+X0U3O03rNY6cpOz7nXG3FACBxOp+upYQKN+rFfM3DP+jPrWaLeJg
 KFfJT1kVEuOi09X2jAFmuj7E2pFamGujFqm7eZ7Vj9NT0NXGI5s87nlpobrOXL2V
 blRJmn0JBqFE+R6udU5+
 =5kiA
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/timer-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

Clean-up for omap2+ timers from Jon Hunter <jon-hunter@ti.com>:

This series consists mainly of clean-ups for clockevents and
clocksource timers on OMAP2+ devices. The most significant change
in functionality comes from the 5th patch which is changing the
selection of the clocksource timer for OMAP3 and AM335x devices
when gptimers are used for clocksource.

Note that this series depends on 7185684 (ARM: OMAP: use
consistent error checking) in RMK's tree and 960cba6 (ARM:
OMAP5: timer: Update the clocksource name as per clock data)
in omap-for-v3.10/fixes-non-critical. So this branch is based
on a merge of 7185684 and omap-for-v3.10/fixes-non-critical
to avoid non-trivial merge conflicts.

* tag 'omap-for-v3.10/timer-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: Fix sparse warning in system timers
  ARM: OMAP2+: Store ID of system timers in timer structure
  ARM: OMAP3: Update clocksource timer selection
  ARM: OMAP2+: Simplify system timers definitions
  ARM: OMAP2+: Simplify system timer clock definitions
  ARM: OMAP2+: Remove hard-coded test on timer ID
  ARM: OMAP2+: Display correct system timer name
  ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
  ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
  ARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass
  ARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk
  ARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 19:30:48 +02:00
Arnd Bergmann 8355ae69af EHCI platform data related changes for v3.10 merge window.
These are needed for the USB PHY support, and are based on
 commit 1f0972f5 from Felipe Balbi's tree as agreed on the
 mailing lists.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWxNHAAoJEBvUPslcq6VzFVEP/2Lr3RULnqiQbGx03SGySeXB
 bS/CuVYjiWEK7bJC4glx2BzQYF612N0cx60TYtrErbiU99pyFmhHNp9VWBjgmHBl
 GGuLWcwUgp4skzgk18SFDqSC/80VP/eGnuD3UBPfNRSL43qvutHg32OPrunvEVRQ
 ojRZ8o8Dw9Tn2lcfev0dXu7/nYKrlREKGfU0nMrUBbBMKfwc9o4t1y4KdFIq9agx
 FBJ8LsKKIQh5UsmE6jOApobVkiuUfSVqHS5x3SYdiPvX5FMP3TX5xTIGBeeXWgsx
 /fp46X0h3PXNrruF/+KO8FlZ00EZBsZ8/FCKYyiTjHI/bHE9SLh/3Udi3MvUyI2S
 xUN9G5vZFIzD9c7MIWVriml8luN1PsTK2R+FVJ0bXKXQixPylVrQRHIFKj2nby7m
 gHog6KNBvWNKW7MGPOq3YG3bhBCNCj1pC/IHpChB9cBRcPNTdwXVRB6sZ+KkHlYK
 N0myjweYLwxk/spm2IzmAFHje0T0039KD/ouGnnt3HO6a1V1TZfZBbn6ZUJqAZ/+
 bHwEimvc1lU8FscvFqEHwd2IT6yQTfq2l6W8Su4oxpwiWkNiwbqwpbOGdYnMUmgI
 YcNlGtw4ivjbCqu+O/8o1I/YUnv3z7NtCvjZGAUUccjbadJ3744b7BNWqmwOdflD
 eARubcN0jNnnBO5wyaPi
 =TU3y
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.10/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers

From Tony Lindgren <tony@atomide.com>:

EHCI platform data related changes for v3.10 merge window.
These are needed for the USB PHY support, and are based on
commit 1f0972f5 from Felipe Balbi's tree as agreed on the
mailing lists.

* tag 'omap-for-v3.10/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits)
  ARM: dts: omap3-beagle: Add USB Host support
  ARM: dts: OMAP3: Add HS USB Host IP nodes
  ARM: dts: OMAP4: Add HS USB Host IP nodes
  ARM: OMAP: zoom: Adapt to ehci-omap changes
  ARM: OMAP3: overo: Adapt to ehci-omap changes
  ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
  ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
  ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
  ARM: OMAP3: omap3evm: Adapt to ehci-omap changes
  ARM: OMAP3: igep0020: Adapt to ehci-omap changes
  ARM: OMAP: devkit8000: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t35: Adapt to ehci-omap changes
  ARM: OMAP: AM3517evm: Adapt to ehci-omap changes
  ARM: OMAP: AM3517crane: Adapt to ehci-omap changes
  ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
  ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
  ARM: OMAP3: Beagle: Adapt to ehci-omap changes
  ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
  ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 19:06:51 +02:00
Arnd Bergmann 6b5606e083 Merge branch 'zynq/clksrc/cleanup' of git://git.xilinx.com/linux-xlnx into next/drivers
From Michal Simek <michal.simek@xilinx.com>:

* 'zynq/clksrc/cleanup' of git://git.xilinx.com/linux-xlnx:
  arm: zynq: Move timer to generic location
  arm: zynq: Do not use xilinx specific function names
  arm: zynq: Move timer to clocksource interface
  arm: zynq: Use standard timer binding

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 18:34:19 +02:00
Arnd Bergmann e9069cf8b7 arm: vt8500: Add pinctrl driver for arch-vt8500
This series adds support for the pinctrl/gpio module on all arch-vt8500
 supported SoCs.
 
 As part of the review process, some tidy up is also done to
 drivers/of/base.c to remove some code that is being constantly duplicated.
 
 Also, a patch for the bcm2835 pinctrl driver is included to take advantage
 of the new of/base.c code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRXQtJAAoJEAKiPfwuf9N/a/8H/3qun+1PnkDIGmC0amZDDrXD
 tF8pruxccwOjh4Wug+UUzAwsBgej4NB193/ljFc35em9yFlZAcXBo0tLUd1gTxSd
 nOkNWjYtFCK3hdmsE29Le9bRkCxn7g07uEkOKWSw79aYWrTRy63FDnr0p45YZvih
 C4+ry92c50SJoW5kp+L6lS0aQjeBGXRCRcvuRBdwGPLYQXX/gEJfJrvU40ZrPByr
 KJqhNOPoNS99OaVMPWDP4HCjCd/XVHBqd8Qz6M2uEIo2EBS0DnOt5IGoaRfTvEXM
 Qx/y769v8/ndcdLAXFdPo+1ZgrrCXm7SozJhwAtMm3ruCxIN8u9LB6ZjMV2uaBo=
 =+Y/Z
 -----END PGP SIGNATURE-----

Merge tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt into next/drivers

From Tony Prisk <linux@prisktech.co.nz>:

arm: vt8500: Add pinctrl driver for arch-vt8500

This series adds support for the pinctrl/gpio module on all arch-vt8500
supported SoCs.

As part of the review process, some tidy up is also done to
drivers/of/base.c to remove some code that is being constantly duplicated.

Also, a patch for the bcm2835 pinctrl driver is included to take advantage
of the new of/base.c code.

* tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt: (606 commits)
  pinctrl: bcm2835: make use of of_property_read_u32_index()
  gpio: vt8500: Remove arch-vt8500 gpio driver
  arm: vt8500: Remove gpio devicetree nodes
  arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver
  pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500
  arm: vt8500: Increase available GPIOs on arch-vt8500
  of: Remove duplicated code for validating property and value
  of: Add support for reading a u32 from a multi-value property.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 18:26:15 +02:00
Arnd Bergmann 4680ebc2c9 Update for Renesas INTC External IRQ pin driver for v3.10
This adds support for shared interrupt lines to the
 Renesas INTC External IRQ pin driver which has already
 been queued up for v3.10 (tag renesas-intc-external-irq-for-v3.10).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRVTadAAoJENfPZGlqN0++mlQP/2tH/AimAHzPdYBpJWHneglu
 da5dpoqKNHtrPzrJMMJQ5VT5lupjpnX1XhNpbs5Y/GG5lA0PMJtWgQknroxEoIp+
 jxYHyzMRYvJitghvwbODQzbVCbcdtLVZFHVDKaBonImEX98Kun6k/61g7L74Xdnq
 AyAIDKFso6sSjfnkJuKljhKQbK9n0L0Bl1L5WUQeWaKt2lF6rHsAGHqXrRvcvSN9
 /V9HPCIQD+4+Efe7VYa/cz8BDsphVp1LQY4AJ9F+fjhELu6izJ7Y//MpXZSxD6/q
 dL/T0+fXuCrW8kwylKMyJOFAo6kMWhpOhBmHg9dvBvD5UVKvkJU1tQqpTSiT1hqm
 PPgmpoVCLE1p5d4rml1U4C//tj56IxDPVbr2ld3DnqykSMFqlbin64JBcl5/2tkp
 SRQA37Qu7oypnNYVqMrCK6KWbhJNGrrsomJqukiJda6PO+8pb6hR3az9cTk4n4+D
 H6Gbvb6Qf3jj0TLOjwsZ5q4yAB2xQ1sImP3QHKxi7aj0/1jvNwut4Qw2ucxKnujq
 EHK2rwXNzEZJ3pkcc/5hnLoPI4nCirBXMkkb0ZgrjeaPUSIISjcqOZDPyRFU1JJQ
 qLAYlq9fUJd6ZgMIV2G83/3cMqAaiVT+G/zIvM+BXMb0ExmW/OUYoR2D2txNBdzs
 CcdH0m+50ipkNLqndiin
 =nYUV
 -----END PGP SIGNATURE-----

Merge tag 'renesas-intc-external-irq2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

From Simon Horman <horms+renesas@verge.net.au>:

Update for Renesas INTC External IRQ pin driver for v3.10

This adds support for shared interrupt lines to the
Renesas INTC External IRQ pin driver which has already
been queued up for v3.10 (tag renesas-intc-external-irq-for-v3.10).

* tag 'renesas-intc-external-irq2-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  irqchip: intc-irqpin: Add support for shared interrupt lines

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-04-08 17:52:35 +02:00
Wei Yongjun 38be85de69 ARM: tegra: pm: remove duplicated include from pm.c
Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-05 09:40:17 -06:00
Stephen Warren 964ea47572 clk: tegra: fix enum tegra114_clk to match binding
A gap exists in the binding's clock ID definitions. Fix the clock driver
to be consistent. This allows pclk to be looked up through device tree
and prevents:

ERROR: could not get clock /pmc:pclk(0)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:17:14 -06:00
Peter De Schrijver c604283f52 clk: tegra: Remove forced clk_enable of uartd
The UART driver enables the console uart clock, so we don't need to do that
anymore in this file.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:17:14 -06:00
Peter De Schrijver 672d889c0a ARM: dt: Add references to tegra_car clocks
Add references to tegra_car clocks for the basic device nodes. Also remove
the clock-frequency property of the serial node as the UART driver can now
use the clock framework to obtain the frequency.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:17:13 -06:00
Peter De Schrijver 27aa99dc0e clk: tegra: devicetree match for nvidia,tegra114-car
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:17:13 -06:00
Peter De Schrijver 2cb5efefd6 clk: tegra: Implement clocks for Tegra114
Implement clocks for Tegra114.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:17:12 -06:00
Peter De Schrijver 16d50f4da4 ARM: tegra: Define Tegra114 CAR binding
The device tree binding models Tegra114 CAR (Clock And Reset) as a single
monolithic clock provider.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 17:16:40 -06:00
Peter De Schrijver fdcccbd804 clk: tegra: Workaround for Tegra114 MSENC problem
Workaround a hardware bug in MSENC during clock enable.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:59 -06:00
Peter De Schrijver a26a029893 clk: tegra: Add flags to tegra_clk_periph()
We will need some tegra peripheral clocks with the CLK_IGNORE_UNUSED flag,
most notably mselect, which is a bridge between AXI and most peripherals.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:56 -06:00
Peter De Schrijver c1d1939c51 clk: tegra: Add new fields and PLL types for Tegra114
Tegra114 introduces new PLL types. This requires new clocktypes as well
as some new fields in the pll structure.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:52 -06:00
Peter De Schrijver 3e72771e21 clk: tegra: move from a lock bit idx to a lock mask
PLLC2 and PLLC3 on Tegra114 have separate phaselock and frequencylock bits.
So switch to a lock mask to be able to test both at the same time.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:49 -06:00
Peter De Schrijver 0b6525acd1 clk: tegra: Add PLL post divider table
Some PLLs in Tegra114 don't use a power of 2 mapping for the post divider.
Introduce a table based approach and switch PLLU to it.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:45 -06:00
Peter De Schrijver 7ba28813b4 clk: tegra: introduce TEGRA_PLL_HAS_LOCK_ENABLE
Tegra114 PLLC2 and PLLC3 don't have a lock enable bit. The lock bits are
always functional.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:42 -06:00
Peter De Schrijver dd93587be8 clk: tegra: Add TEGRA_PLL_BYPASS flag
Not all PLLs in Tegra114 have a bypass bit. Adapt the common code to only use
this bit when available.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:38 -06:00
Peter De Schrijver dba4072a4a clk: tegra: Refactor PLL programming code
Refactor the PLL programming code to make it useable by the new PLL types
introduced by Tegra114.

The following changes were done:

* Split programming the PLL into updating m,n,p and updating cpcon
* Move locking from _update_pll_cpcon() to clk_pll_set_rate()
* Introduce _get_pll_mnp() helper
* Move check for identical m,n,p values to clk_pll_set_rate()
* struct tegra_clk_pll_freq_table will always contain the values as defined
  by the hardware.
* Simplify the arguments to clk_pll_wait_for_lock()
* Split _tegra_clk_register_pll()

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:33 -06:00
Peter De Schrijver 6a676fa0af clk: tegra: provide dummy cpu car ops
tegra_boot_secondary() relies on some of the car ops. This means having an
uninitialized tegra_cpu_car_ops will lead to an early boot panic.
Providing a dummy struct avoids this and makes adding Tegra114 clock support
in a bisectable way a lot easier.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:10:12 -06:00
Stephen Warren 441f199a37 clk: tegra: defer application of init table
The Tegra clock driver is initialized during the ARM machine descriptor's
.init_irq() hook. It can't be initialized earlier, since dynamic memory
usage is required. It can't be initialized later, since the .init_timer()
hook needs the clocks initialized. However, at this time, udelay()
doesn't work.

The Tegra clock initialization table may enable some PLLs. Enabling a PLL
may require usage of udelay(). Hence, this can't happen right when the
clock driver is initialized.

To solve this, separate the clock driver initialization from the clock
table processing, so they can execute at separate times.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:09:05 -06:00
Prashant Gaikwad 82ce742140 clk: tegra: Fix cdev1 and cdev2 IDs
Correct IDs for cdev1 and cdev2 are 94 and 93 respectively.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: split into separate driver and device-tree patches]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:08:46 -06:00
Thierry Reding ce910686f8 clk: tegra: Make gr2d and gr3d clocks children of pll_c
By default these clocks are children of pll_m, but in downstream kernels
they are reparented to pll_c. While at it, decrease their frequencies to
300 MHz because the defaults aren't in the specified range.

gr2d can reportedly run at much higher frequencies, but 300 MHz works
and is a more conservative default.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-By: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:08:34 -06:00
Thierry Reding 4dd59cdd35 clk: tegra: Export peripheral reset functions
The tegra_periph_reset_assert() and tegra_periph_reset_deassert()
functions can be used by drivers to reset peripherals. In order to allow
such drivers to be built as modules, export the functions.

Note that this restores the status quo as the functions were exported
before the move to the drivers/clk tree.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:08:31 -06:00
Yen Lin 5a88b0d10f clk: tegra: Fix periph_clk_to_bit macro
The parameter name should be "gate", not "periph".  This worked, however,
because it happens that everywhere periph_clk_to_bit is called, "gate" was
in the local scope.

Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:08:27 -06:00
Stephen Warren 43089433b0 Merge remote-tracking branch 'linaro_mturquette_linux/clk-for-3.10' into for-3.10/clk 2013-04-04 16:08:13 -06:00