OSDN Git Service

Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 May 2012 19:42:29 +0000 (12:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 26 May 2012 19:42:29 +0000 (12:42 -0700)
Pull arm-soc clock driver changes from Olof Johansson:
 "The new clock subsystem was merged in linux-3.4 without any users,
  this now moves the first three platforms over to it: imx, mxs and
  spear.

  The series also contains the changes for the clock subsystem itself,
  since Mike preferred to have it together with the platforms that
  require these changes, in order to avoid interdependencies and
  conflicts."

Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).

* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  SPEAr: Update defconfigs
  SPEAr: Add SMI NOR partition info in dts files
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock
  SPEAr: Add DT bindings for SPEAr's timer
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ...

16 files changed:
1  2 
MAINTAINERS
arch/arm/Kconfig
arch/arm/mach-dove/common.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/pcie.c
arch/arm/mach-orion5x/common.c
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
drivers/dma/imx-sdma.c
drivers/media/video/mx3_camera.c
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mtd/nand/orion_nand.c
drivers/net/ethernet/freescale/fec.c
drivers/net/ethernet/marvell/mv643xx_eth.c

diff --combined MAINTAINERS
@@@ -640,6 -640,13 +640,6 @@@ S:        Maintaine
  F:    drivers/amba/
  F:    include/linux/amba/bus.h
  
 -ARM/ADI ROADRUNNER MACHINE SUPPORT
 -M:    Lennert Buytenhek <kernel@wantstofly.org>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -F:    arch/arm/mach-ixp23xx/
 -F:    arch/arm/mach-ixp23xx/include/mach/
 -
  ARM/ADS SPHERE MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -739,10 -746,7 +739,10 @@@ M:       Barry Song <baohua.song@csr.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-prima2/
 -F:    drivers/dma/sirf-dma*
 +F:    drivers/dma/sirf-dma.c
 +F:    drivers/i2c/busses/i2c-sirf.c
 +F:    drivers/pinctrl/pinctrl-sirf.c
 +F:    drivers/spi/spi-sirf.c
  
  ARM/EBSA110 MACHINE SUPPORT
  M:    Russell King <linux@arm.linux.org.uk>
@@@ -855,11 -859,21 +855,11 @@@ M:      Dan Williams <dan.j.williams@intel.c
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  
 -ARM/INTEL IXP2000 ARM ARCHITECTURE
 -M:    Lennert Buytenhek <kernel@wantstofly.org>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -
  ARM/INTEL IXDP2850 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  
 -ARM/INTEL IXP23XX ARM ARCHITECTURE
 -M:    Lennert Buytenhek <kernel@wantstofly.org>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -
  ARM/INTEL IXP4XX ARM ARCHITECTURE
  M:    Imre Kaloz <kaloz@openwrt.org>
  M:    Krzysztof Halasa <khc@pm.waw.pl>
@@@ -894,12 -908,11 +894,12 @@@ ARM/MAGICIAN MACHINE SUPPOR
  M:    Philipp Zabel <philipp.zabel@gmail.com>
  S:    Maintained
  
 -ARM/Marvell Loki/Kirkwood/MV78xx0/Orion SOC support
 -M:    Lennert Buytenhek <kernel@wantstofly.org>
 -M:    Nicolas Pitre <nico@fluxnic.net>
 +ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
 +M:    Jason Cooper <jason@lakedaemon.net>
 +M:    Andrew Lunn <andrew@lunn.ch>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Odd Fixes
 +S:    Maintained
 +F:    arch/arm/mach-dove/
  F:    arch/arm/mach-kirkwood/
  F:    arch/arm/mach-mv78xx0/
  F:    arch/arm/mach-orion5x/
@@@ -1318,21 -1331,6 +1318,21 @@@ M:    Nicolas Ferre <nicolas.ferre@atmel.c
  S:    Supported
  F:    drivers/tty/serial/atmel_serial.c
  
 +ATMEL DMA DRIVER
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/dma/at_hdmac.c
 +F:    drivers/dma/at_hdmac_regs.h
 +F:    arch/arm/mach-at91/include/mach/at_hdmac.h
 +
 +ATMEL ISI DRIVER
 +M:    Josh Wu <josh.wu@atmel.com>
 +L:    linux-media@vger.kernel.org
 +S:    Supported
 +F:    drivers/media/video/atmel-isi.c
 +F:    include/media/atmel-isi.h
 +
  ATMEL LCDFB DRIVER
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    linux-fbdev@vger.kernel.org
@@@ -1350,22 -1348,10 +1350,22 @@@ M:   Nicolas Ferre <nicolas.ferre@atmel.c
  S:    Supported
  F:    drivers/spi/spi-atmel.*
  
 +ATMEL Timer Counter (TC) AND CLOCKSOURCE DRIVERS
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/misc/atmel_tclib.c
 +F:    drivers/clocksource/tcb_clksrc.c
 +
 +ATMEL TSADCC DRIVER
 +M:    Josh Wu <josh.wu@atmel.com>
 +L:    linux-input@vger.kernel.org
 +S:    Supported
 +F:    drivers/input/touchscreen/atmel_tsadcc.c
 +
  ATMEL USBA UDC DRIVER
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -W:    http://avr32linux.org/twiki/bin/view/Main/AtmelUsbDeviceDriver
  S:    Supported
  F:    drivers/usb/gadget/atmel_usba_udc.*
  
@@@ -1445,7 -1431,6 +1445,7 @@@ F:      include/linux/backlight.
  BATMAN ADVANCED
  M:    Marek Lindner <lindner_marek@yahoo.de>
  M:    Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
 +M:    Antonio Quartulli <ordex@autistici.org>
  L:    b.a.t.m.a.n@lists.open-mesh.org
  W:    http://www.open-mesh.org/
  S:    Maintained
@@@ -1613,7 -1598,6 +1613,7 @@@ F:      include/linux/bcma
  
  BROCADE BFA FC SCSI DRIVER
  M:    Jing Huang <huangj@brocade.com>
 +M:    Krishna C Gudipati <kgudipat@brocade.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bfa/
@@@ -1747,7 -1731,6 +1747,7 @@@ S:      Supporte
  F:    include/linux/capability.h
  F:    security/capability.c
  F:    security/commoncap.c 
 +F:    kernel/capability.c
  
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <arnd@arndb.de>
@@@ -1826,12 -1809,6 +1826,12 @@@ L:    linux-kernel@zh-kernel.org (moderate
  S:    Maintained
  F:    Documentation/zh_CN/
  
 +CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
 +M:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    drivers/usb/chipidea/
 +
  CISCO VIC ETHERNET NIC DRIVER
  M:    Christian Benvenuti <benve@cisco.com>
  M:    Roopa Prabhu <roprabhu@cisco.com>
@@@ -1905,6 -1882,16 +1905,16 @@@ F:    Documentation/filesystems/coda.tx
  F:    fs/coda/
  F:    include/linux/coda*.h
  
+ COMMON CLK FRAMEWORK
+ M:    Mike Turquette <mturquette@ti.com>
+ M:    Mike Turquette <mturquette@linaro.org>
+ L:    linux-arm-kernel@lists.infradead.org (same as CLK API & CLKDEV)
+ T:    git git://git.linaro.org/people/mturquette/linux.git
+ S:    Maintained
+ F:    drivers/clk/clk.c
+ F:    drivers/clk/clk-*
+ F:    include/linux/clk-pr*
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
  L:    linux-cifs@vger.kernel.org
@@@ -1991,9 -1978,7 +2001,9 @@@ S:      Maintaine
  F:    drivers/net/ethernet/ti/cpmac.c
  
  CPU FREQUENCY DRIVERS
 +M:    Rafael J. Wysocki <rjw@sisk.pl>
  L:    cpufreq@vger.kernel.org
 +L:    linux-pm@vger.kernel.org
  S:    Maintained
  F:    drivers/cpufreq/
  F:    include/linux/cpufreq.h
@@@ -2398,10 -2383,10 +2408,10 @@@ F:   drivers/gpu/drm
  F:    include/drm/
  
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
 -M:    Keith Packard <keithp@keithp.com>
 +M:    Daniel Vetter <daniel.vetter@ffwll.ch>
  L:    intel-gfx@lists.freedesktop.org (subscribers-only)
  L:    dri-devel@lists.freedesktop.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux.git
 +T:    git git://people.freedesktop.org/~danvet/drm-intel
  S:    Supported
  F:    drivers/gpu/drm/i915
  F:    include/drm/i915*
@@@ -2718,13 -2703,6 +2728,13 @@@ S:    Maintaine
  F:    Documentation/hwmon/f71805f
  F:    drivers/hwmon/f71805f.c
  
 +FC0011 TUNER DRIVER
 +M:    Michael Buesch <m@bues.ch>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/media/common/tuners/fc0011.h
 +F:    drivers/media/common/tuners/fc0011.c
 +
  FANOTIFY
  M:    Eric Paris <eparis@redhat.com>
  S:    Maintained
@@@ -2783,15 -2761,6 +2793,15 @@@ T:    git git://git.alsa-project.org/alsa-
  S:    Maintained
  F:    sound/firewire/
  
 +FIREWIRE SBP-2 TARGET
 +M:    Chris Boot <bootc@bootc.net>
 +L:    linux-scsi@vger.kernel.org
 +L:    target-devel@vger.kernel.org
 +L:    linux1394-devel@lists.sourceforge.net
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git master
 +S:    Maintained
 +F:    drivers/target/sbp/
 +
  FIREWIRE SUBSYSTEM
  M:    Stefan Richter <stefanr@s5r6.in-berlin.de>
  L:    linux1394-devel@lists.sourceforge.net
@@@ -2928,7 -2897,7 +2938,7 @@@ S:      Maintaine
  F:    arch/frv/
  
  FUJITSU LAPTOP EXTRAS
 -M:    Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
 +M:    Jonathan Woithe <jwoithe@just42.net>
  L:    platform-driver-x86@vger.kernel.org
  S:    Maintained
  F:    drivers/platform/x86/fujitsu-laptop.c
@@@ -3354,6 -3323,12 +3364,6 @@@ T:     git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    arch/ia64/
  
 -IBM MCA SCSI SUBSYSTEM DRIVER
 -M:    Michael Lang <langa2@kph.uni-mainz.de>
 -W:    http://www.uni-mainz.de/~langm000/linux.html
 -S:    Maintained
 -F:    drivers/scsi/ibmmca.c
 -
  IBM Power Linux RAID adapter
  M:    Brian King <brking@us.ibm.com>
  S:    Supported
@@@ -3416,7 -3391,6 +3426,7 @@@ IIO SUBSYSTEM AND DRIVER
  M:    Jonathan Cameron <jic23@cam.ac.uk>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 +F:    drivers/iio/
  F:    drivers/staging/iio/
  
  IKANOS/ADI EAGLE ADSL USB DRIVER
@@@ -3465,8 -3439,6 +3475,8 @@@ Q:      http://patchwork.kernel.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
  S:    Maintained
  F:    drivers/input/
 +F:    include/linux/input.h
 +F:    include/linux/input/
  
  INPUT MULTITOUCH (MT) PROTOCOL
  M:    Henrik Rydberg <rydberg@euromail.se>
@@@ -3554,6 -3526,12 +3564,6 @@@ M:     Deepak Saxena <dsaxena@plexity.net
  S:    Maintained
  F:    drivers/char/hw_random/ixp4xx-rng.c
  
 -INTEL IXP2000 ETHERNET DRIVER
 -M:    Lennert Buytenhek <kernel@wantstofly.org>
 -L:    netdev@vger.kernel.org
 -S:    Maintained
 -F:    drivers/net/ethernet/xscale/ixp2000/
 -
  INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/igbvf/ixgb/ixgbe/ixgbevf)
  M:    Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  M:    Jesse Brandeburg <jesse.brandeburg@intel.com>
@@@ -3638,14 -3616,6 +3648,14 @@@ S:    Supporte
  W:    http://wireless.kernel.org/en/users/Drivers/iwmc3200wifi
  F:    drivers/net/wireless/iwmc3200wifi/
  
 +INTEL MANAGEMENT ENGINE (mei)
 +M:    Tomas Winkler <tomas.winkler@intel.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +F:    include/linux/mei.h
 +F:    drivers/misc/mei/*
 +F:    Documentation/mei/*
 +
  IOC3 ETHERNET DRIVER
  M:    Ralf Baechle <ralf@linux-mips.org>
  L:    linux-mips@linux-mips.org
@@@ -3671,7 -3641,7 +3681,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/icplus/ipg.*
  
  IPATH DRIVER
 -M:    Mike Marciniszyn <infinipath@qlogic.com>
 +M:    Mike Marciniszyn <infinipath@intel.com>
  L:    linux-rdma@vger.kernel.org
  S:    Maintained
  F:    drivers/infiniband/hw/ipath/
@@@ -4074,7 -4044,6 +4084,7 @@@ F:      Documentation/scsi/53c700.tx
  F:    drivers/scsi/53c700*
  
  LED SUBSYSTEM
 +M:    Bryan Wu <bryan.wu@canonical.com>
  M:    Richard Purdie <rpurdie@rpsys.net>
  S:    Maintained
  F:    drivers/leds/
@@@ -4461,6 -4430,13 +4471,6 @@@ T:     git git://git.monstr.eu/linux-2.6-mi
  S:    Supported
  F:    arch/microblaze/
  
 -MICROCHANNEL ARCHITECTURE (MCA)
 -M:    James Bottomley <James.Bottomley@HansenPartnership.com>
 -S:    Maintained
 -F:    Documentation/mca.txt
 -F:    drivers/mca/
 -F:    include/linux/mca*
 -
  MICROTEK X6 SCANNER
  M:    Oliver Neukum <oliver@neukum.name>
  S:    Maintained
@@@ -5164,13 -5140,19 +5174,13 @@@ F:   Documentation/powerpc/eeh-pci-error-
  PCI SUBSYSTEM
  M:    Bjorn Helgaas <bhelgaas@google.com>
  L:    linux-pci@vger.kernel.org
 -Q:    http://patchwork.kernel.org/project/linux-pci/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci.git
 +Q:    http://patchwork.ozlabs.org/project/linux-pci/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/linux.git
  S:    Supported
  F:    Documentation/PCI/
  F:    drivers/pci/
  F:    include/linux/pci*
  
 -PCI HOTPLUG
 -M:    Bjorn Helgaas <bhelgaas@google.com>
 -L:    linux-pci@vger.kernel.org
 -S:    Supported
 -F:    drivers/pci/hotplug
 -
  PCMCIA SUBSYSTEM
  P:    Linux PCMCIA Team
  L:    linux-pcmcia@lists.infradead.org
@@@ -5233,7 -5215,7 +5243,7 @@@ S:      Maintaine
  F:    include/linux/personality.h
  
  PHONET PROTOCOL
 -M:    Remi Denis-Courmont <remi.denis-courmont@nokia.com>
 +M:    Remi Denis-Courmont <courmisch@gmail.com>
  S:    Supported
  F:    Documentation/networking/phonet.txt
  F:    include/linux/phonet.h
@@@ -5491,7 -5473,7 +5501,7 @@@ L:      rtc-linux@googlegroups.co
  S:    Maintained
  
  QIB DRIVER
 -M:    Mike Marciniszyn <infinipath@qlogic.com>
 +M:    Mike Marciniszyn <infinipath@intel.com>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
  F:    drivers/infiniband/hw/qib/
@@@ -5641,13 -5623,14 +5651,13 @@@ F:   net/rds
  READ-COPY UPDATE (RCU)
  M:    Dipankar Sarma <dipankar@in.ibm.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 -W:    http://www.rdrop.com/users/paulmck/rclock/
 +W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    Documentation/RCU/
 +X:    Documentation/RCU/torture.txt
  F:    include/linux/rcu*
 -F:    include/linux/srcu*
  F:    kernel/rcu*
 -F:    kernel/srcu*
  X:    kernel/rcutorture.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
@@@ -5993,7 -5976,7 +6003,7 @@@ SECURITY SUBSYSTE
  M:    James Morris <james.l.morris@oracle.com>
  L:    linux-security-module@vger.kernel.org (suggested Cc:)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
 -W:    http://security.wiki.kernel.org/
 +W:    http://kernsec.org/
  S:    Supported
  F:    security/
  
@@@ -6164,15 -6147,6 +6174,15 @@@ S:    Maintaine
  F:    include/linux/sl?b*.h
  F:    mm/sl?b.c
  
 +SLEEPABLE READ-COPY UPDATE (SRCU)
 +M:    Lai Jiangshan <laijs@cn.fujitsu.com>
 +M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +W:    http://www.rdrop.com/users/paulmck/RCU/
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
 +F:    include/linux/srcu*
 +F:    kernel/srcu*
 +
  SMC91x ETHERNET DRIVER
  M:    Nicolas Pitre <nico@fluxnic.net>
  S:    Odd Fixes
@@@ -6368,9 -6342,7 +6378,7 @@@ L:      spear-devel@list.st.co
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
- F:    arch/arm/mach-spear*/clock.c
- F:    arch/arm/plat-spear/clock.c
- F:    arch/arm/plat-spear/include/plat/clock.h
+ F:    drivers/clk/spear/
  
  SPI SUBSYSTEM
  M:    Grant Likely <grant.likely@secretlab.ca>
@@@ -6578,7 -6550,7 +6586,7 @@@ M:      Paul Mundt <lethal@linux-sh.org
  L:    linux-sh@vger.kernel.org
  W:    http://www.linux-sh.org
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git sh-latest
 +T:    git git://github.com/pmundt/linux-sh.git sh-latest
  S:    Supported
  F:    Documentation/sh/
  F:    arch/sh/
@@@ -6696,28 -6668,12 +6704,28 @@@ F:   drivers/misc/tifm
  F:    drivers/mmc/host/tifm_sd.c
  F:    include/linux/tifm.h
  
 +TI LM49xxx FAMILY ASoC CODEC DRIVERS
 +M:    M R Swami Reddy <mr.swami.reddy@ti.com>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    sound/soc/codecs/lm49453*
 +
  TI TWL4030 SERIES SOC CODEC DRIVER
  M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Maintained
  F:    sound/soc/codecs/twl4030*
  
 +TI WILINK WIRELESS DRIVERS
 +M:    Luciano Coelho <coelho@ti.com>
 +L:    linux-wireless@vger.kernel.org
 +W:    http://wireless.kernel.org/en/users/Drivers/wl12xx
 +W:    http://wireless.kernel.org/en/users/Drivers/wl1251
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
 +S:    Maintained
 +F:    drivers/net/wireless/ti/
 +F:    include/linux/wl12xx.h
 +
  TIPC NETWORK LAYER
  M:    Jon Maloy <jon.maloy@ericsson.com>
  M:    Allan Stephens <allan.stephens@windriver.com>
@@@ -6925,14 -6881,6 +6933,14 @@@ F:    Documentation/cdrom
  F:    drivers/cdrom/cdrom.c
  F:    include/linux/cdrom.h
  
 +UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
 +M:    Vinayak Holikatti <vinholikatti@gmail.com>
 +M:    Santosh Y <santoshsy@gmail.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    Documentation/scsi/ufs.txt
 +F:    drivers/scsi/ufs/
 +
  UNSORTED BLOCK IMAGES (UBI)
  M:    Artem Bityutskiy <dedekind1@gmail.com>
  W:    http://www.linux-mtd.infradead.org/
@@@ -7079,14 -7027,6 +7087,14 @@@ W:    http://pegasus2.sourceforge.net
  S:    Maintained
  F:    drivers/net/usb/pegasus.*
  
 +USB PHY LAYER
 +M:    Felipe Balbi <balbi@ti.com>
 +L:    linux-usb@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
 +S:    Maintained
 +F:    drivers/usb/phy/
 +F:    drivers/usb/otg/
 +
  USB PRINTER DRIVER (usblp)
  M:    Pete Zaitcev <zaitcev@redhat.com>
  L:    linux-usb@vger.kernel.org
@@@ -7200,7 -7140,7 +7208,7 @@@ F:      include/linux/usb/usbnet.
  
  USB VIDEO CLASS
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 -L:    linux-uvc-devel@lists.berlios.de (subscribers-only)
 +L:    linux-uvc-devel@lists.sourceforge.net (subscribers-only)
  L:    linux-media@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
  W:    http://www.ideasonboard.org/uvc/
@@@ -7370,18 -7310,6 +7378,18 @@@ S:    Maintaine
  F:    drivers/vlynq/vlynq.c
  F:    include/linux/vlynq.h
  
 +VME SUBSYSTEM
 +M:    Martyn Welch <martyn.welch@ge.com>
 +M:    Manohar Vanga <manohar.vanga@cern.ch>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +L:    devel@driverdev.osuosl.org
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
 +F:    Documentation/vme_api.txt
 +F:    drivers/staging/vme/
 +F:    drivers/vme/
 +F:    include/linux/vme*
 +
  VMWARE VMXNET3 ETHERNET DRIVER
  M:    Shreyas Bhatewara <sbhatewara@vmware.com>
  M:    "VMware, Inc." <pv-drivers@vmware.com>
@@@ -7502,6 -7430,23 +7510,6 @@@ M:     Miloslav Trmac <mitr@volny.cz
  S:    Maintained
  F:    drivers/input/misc/wistron_btns.c
  
 -WL1251 WIRELESS DRIVER
 -M:    Luciano Coelho <coelho@ti.com>
 -L:    linux-wireless@vger.kernel.org
 -W:    http://wireless.kernel.org/en/users/Drivers/wl1251
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
 -S:    Maintained
 -F:    drivers/net/wireless/wl1251/*
 -
 -WL1271 WIRELESS DRIVER
 -M:    Luciano Coelho <coelho@ti.com>
 -L:    linux-wireless@vger.kernel.org
 -W:    http://wireless.kernel.org/en/users/Drivers/wl12xx
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
 -S:    Maintained
 -F:    drivers/net/wireless/wl12xx/
 -F:    include/linux/wl12xx.h
 -
  WL3501 WIRELESS PCMCIA CARD DRIVER
  M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
  L:    linux-wireless@vger.kernel.org
@@@ -7623,7 -7568,7 +7631,7 @@@ XFS FILESYSTE
  P:    Silicon Graphics Inc
  M:    Ben Myers <bpm@sgi.com>
  M:    Alex Elder <elder@kernel.org>
 -M:    xfs-masters@oss.sgi.com
 +M:    xfs@oss.sgi.com
  L:    xfs@oss.sgi.com
  W:    http://oss.sgi.com/projects/xfs
  T:    git git://oss.sgi.com/xfs/xfs.git
diff --combined arch/arm/Kconfig
@@@ -1,13 -1,9 +1,13 @@@
  config ARM
        bool
        default y
 +      select ARCH_HAVE_CUSTOM_GPIO_H
        select HAVE_AOUT
        select HAVE_DMA_API_DEBUG
        select HAVE_IDE if PCI || ISA || PCMCIA
 +      select HAVE_DMA_ATTRS
 +      select HAVE_DMA_CONTIGUOUS if (CPU_V6 || CPU_V6K || CPU_V7)
 +      select CMA if (CPU_V6 || CPU_V6K || CPU_V7)
        select HAVE_MEMBLOCK
        select RTC_LIB
        select SYS_SUPPORTS_APM_EMULATION
@@@ -15,7 -11,6 +15,7 @@@
        select HAVE_OPROFILE if (HAVE_PERF_EVENTS)
        select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
        select HAVE_ARCH_KGDB
 +      select HAVE_ARCH_TRACEHOOK
        select HAVE_KPROBES if !XIP_KERNEL
        select HAVE_KRETPROBES if (HAVE_KPROBES)
        select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
        select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
        select HAVE_C_RECORDMCOUNT
        select HAVE_GENERIC_HARDIRQS
 +      select HARDIRQS_SW_RESEND
 +      select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
 +      select GENERIC_IRQ_PROBE
 +      select HARDIRQS_SW_RESEND
        select CPU_PM if (SUSPEND || CPU_IDLE)
        select GENERIC_PCI_IOMAP
 -      select HAVE_BPF_JIT if NET
 +      select HAVE_BPF_JIT
 +      select GENERIC_SMP_IDLE_THREAD
 +      select KTIME_SCALAR
 +      select GENERIC_CLOCKEVENTS_BROADCAST if SMP
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
  config ARM_HAS_SG_CHAIN
        bool
  
 -config HAVE_PWM
 +config NEED_SG_DMA_LENGTH
        bool
  
 -config MIGHT_HAVE_PCI
 +config ARM_DMA_USE_IOMMU
 +      select NEED_SG_DMA_LENGTH
 +      select ARM_HAS_SG_CHAIN
        bool
  
 -config SYS_SUPPORTS_APM_EMULATION
 -      bool
 -
 -config GENERIC_GPIO
 -      bool
 -
 -config ARCH_USES_GETTIMEOFFSET
 +config HAVE_PWM
        bool
 -      default n
  
 -config GENERIC_CLOCKEVENTS
 +config MIGHT_HAVE_PCI
        bool
  
 -config GENERIC_CLOCKEVENTS_BROADCAST
 +config SYS_SUPPORTS_APM_EMULATION
        bool
 -      depends on GENERIC_CLOCKEVENTS
 -      default y if SMP
  
 -config KTIME_SCALAR
 +config GENERIC_GPIO
        bool
 -      default y
  
  config HAVE_TCM
        bool
@@@ -105,6 -101,14 +105,6 @@@ config EIS
  config SBUS
        bool
  
 -config MCA
 -      bool
 -      help
 -        MicroChannel Architecture is found in some IBM PS/2 machines and
 -        laptops.  It is a bus system similar to PCI or ISA. See
 -        <file:Documentation/mca.txt> (and especially the web page given
 -        there) before attempting to build an MCA bus kernel.
 -
  config STACKTRACE_SUPPORT
        bool
        default y
@@@ -122,6 -126,14 +122,6 @@@ config TRACE_IRQFLAGS_SUPPOR
        bool
        default y
  
 -config HARDIRQS_SW_RESEND
 -      bool
 -      default y
 -
 -config GENERIC_IRQ_PROBE
 -      bool
 -      default y
 -
  config GENERIC_LOCKBREAK
        bool
        default y
@@@ -147,6 -159,9 +147,6 @@@ config ARCH_HAS_CPUFRE
          and that the relevant menu configurations are displayed for
          it.
  
 -config ARCH_HAS_CPU_IDLE_WAIT
 -       def_bool y
 -
  config GENERIC_HWEIGHT
        bool
        default y
@@@ -265,7 -280,6 +265,7 @@@ config ARCH_INTEGRATO
        select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select SPARSE_IRQ
 +      select MULTI_IRQ_HANDLER
        help
          Support for ARM's Integrator platform.
  
@@@ -326,8 -340,8 +326,8 @@@ config ARCH_AT9
        select IRQ_DOMAIN
        select NEED_MACH_IO_H if PCCARD
        help
 -        This enables support for systems based on the Atmel AT91RM9200,
 -        AT91SAM9 processors.
 +        This enables support for systems based on Atmel
 +        AT91RM9200 and AT91SAM9* processors.
  
  config ARCH_BCMRING
        bool "Broadcom BCMRING"
@@@ -359,12 -373,12 +359,12 @@@ config ARCH_HIGHBAN
          Support for the Calxeda Highbank SoC based boards.
  
  config ARCH_CLPS711X
 -      bool "Cirrus Logic CLPS711x/EP721x-based"
 +      bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select CPU_ARM720T
        select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
        help
 -        Support for Cirrus Logic 711x/721x based boards.
 +        Support for Cirrus Logic 711x/721x/731x based boards.
  
  config ARCH_CNS3XXX
        bool "Cavium Networks CNS3XXX family"
@@@ -393,8 -407,6 +393,8 @@@ config ARCH_PRIMA
        select CLKDEV_LOOKUP
        select GENERIC_IRQ_CHIP
        select MIGHT_HAVE_CACHE_L2X0
 +      select PINCTRL
 +      select PINCTRL_SIRF
        select USE_OF
        select ZONE_DMA
        help
@@@ -456,6 -468,7 +456,7 @@@ config ARCH_MX
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
        select CLKSRC_MMIO
+       select COMMON_CLK
        select HAVE_CLK_PREPARE
        select PINCTRL
        help
@@@ -517,6 -530,28 +518,6 @@@ config ARCH_IOP33
        help
          Support for Intel's IOP33X (XScale) family of processors.
  
 -config ARCH_IXP23XX
 -      bool "IXP23XX-based"
 -      depends on MMU
 -      select CPU_XSC3
 -      select PCI
 -      select ARCH_USES_GETTIMEOFFSET
 -      select NEED_MACH_IO_H
 -      select NEED_MACH_MEMORY_H
 -      help
 -        Support for Intel's IXP23xx (XScale) family of processors.
 -
 -config ARCH_IXP2000
 -      bool "IXP2400/2800-based"
 -      depends on MMU
 -      select CPU_XSCALE
 -      select PCI
 -      select ARCH_USES_GETTIMEOFFSET
 -      select NEED_MACH_IO_H
 -      select NEED_MACH_MEMORY_H
 -      help
 -        Support for Intel's IXP2400/2800 (XScale) family of processors.
 -
  config ARCH_IXP4XX
        bool "IXP4xx-based"
        depends on MMU
@@@ -564,7 -599,6 +565,7 @@@ config ARCH_LPC32X
        select USB_ARCH_HAS_OHCI
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
 +      select USE_OF
        help
          Support for the NXP LPC32XX family of processors
  
@@@ -600,7 -634,7 +601,7 @@@ config ARCH_MM
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
        select GPIO_PXA
 -      select TICK_ONESHOT
 +      select IRQ_DOMAIN
        select PLAT_PXA
        select SPARSE_IRQ
        select GENERIC_ALLOCATOR
@@@ -684,6 -718,7 +685,6 @@@ config ARCH_PX
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
        select GPIO_PXA
 -      select TICK_ONESHOT
        select PLAT_PXA
        select SPARSE_IRQ
        select AUTO_ZRELADDR
@@@ -750,6 -785,7 +751,6 @@@ config ARCH_SA110
        select CPU_FREQ
        select GENERIC_CLOCKEVENTS
        select CLKDEV_LOOKUP
 -      select TICK_ONESHOT
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_IDE
        select NEED_MACH_MEMORY_H
@@@ -912,7 -948,6 +913,7 @@@ config ARCH_NOMADI
        select CPU_ARM926T
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
 +      select PINCTRL
        select MIGHT_HAVE_CACHE_L2X0
        select ARCH_REQUIRE_GPIOLIB
        help
@@@ -947,6 -982,7 +948,7 @@@ config PLAT_SPEA
        select ARM_AMBA
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select COMMON_CLK
        select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
@@@ -1013,6 -1049,10 +1015,6 @@@ source "arch/arm/mach-iop13xx/Kconfig
  
  source "arch/arm/mach-ixp4xx/Kconfig"
  
 -source "arch/arm/mach-ixp2000/Kconfig"
 -
 -source "arch/arm/mach-ixp23xx/Kconfig"
 -
  source "arch/arm/mach-kirkwood/Kconfig"
  
  source "arch/arm/mach-ks8695/Kconfig"
@@@ -1051,6 -1091,7 +1053,6 @@@ source "arch/arm/mach-sa1100/Kconfig
  
  source "arch/arm/plat-samsung/Kconfig"
  source "arch/arm/plat-s3c24xx/Kconfig"
 -source "arch/arm/plat-s5p/Kconfig"
  
  source "arch/arm/plat-spear/Kconfig"
  
@@@ -1101,6 -1142,7 +1103,7 @@@ config PLAT_ORIO
        bool
        select CLKSRC_MMIO
        select GENERIC_IRQ_CHIP
+       select COMMON_CLK
  
  config PLAT_PXA
        bool
@@@ -1435,6 -1477,8 +1438,6 @@@ endmen
  
  menu "Kernel Features"
  
 -source "kernel/time/Kconfig"
 -
  config HAVE_SMP
        bool
        help
@@@ -1512,15 -1556,10 +1515,15 @@@ config HAVE_ARM_SC
        help
          This option enables support for the ARM system coherency unit
  
 +config ARM_ARCH_TIMER
 +      bool "Architected timer support"
 +      depends on CPU_V7
 +      help
 +        This option enables support for the ARM architected timer
 +
  config HAVE_ARM_TWD
        bool
        depends on SMP
 -      select TICK_ONESHOT
        help
          This options enables support for the ARM timer and watchdog unit
  
@@@ -1901,10 -1940,10 +1904,10 @@@ choic
        default ZBOOT_ROM_NONE
        help
          Include experimental SD/MMC loading code in the ROM-able zImage.
 -        With this enabled it is possible to write the the ROM-able zImage
 +        With this enabled it is possible to write the ROM-able zImage
          kernel image to an MMC or SD card and boot the kernel straight
          from the reset vector. At reset the processor Mask ROM will load
 -        the first part of the the ROM-able zImage which in turn loads the
 +        the first part of the ROM-able zImage which in turn loads the
          rest the kernel image to RAM.
  
  config ZBOOT_ROM_NONE
@@@ -2246,9 -2285,9 +2249,9 @@@ menu "Power management options
  source "kernel/power/Kconfig"
  
  config ARCH_SUSPEND_POSSIBLE
 -      depends on !ARCH_S5PC100
 +      depends on !ARCH_S5PC100 && !ARCH_TEGRA
        depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
 -              CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
 +              CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
        def_bool y
  
  config ARM_CPU_SUSPEND
@@@ -13,7 -13,7 +13,7 @@@
  #include <linux/init.h>
  #include <linux/platform_device.h>
  #include <linux/pci.h>
- #include <linux/clk.h>
+ #include <linux/clk-provider.h>
  #include <linux/ata_platform.h>
  #include <linux/gpio.h>
  #include <asm/page.h>
@@@ -68,6 -68,19 +68,19 @@@ void __init dove_map_io(void
  }
  
  /*****************************************************************************
+  * CLK tree
+  ****************************************************************************/
+ static struct clk *tclk;
+ static void __init clk_init(void)
+ {
+       tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
+                                      get_tclk());
+       orion_clkdev_init(tclk);
+ }
+ /*****************************************************************************
   * EHCI0
   ****************************************************************************/
  void __init dove_ehci0_init(void)
@@@ -89,8 -102,7 +102,7 @@@ void __init dove_ehci1_init(void
  void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data)
  {
        orion_ge00_init(eth_data,
-                       DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM,
-                       0, get_tclk());
+                       DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM, 0);
  }
  
  /*****************************************************************************
@@@ -116,7 -128,7 +128,7 @@@ void __init dove_sata_init(struct mv_sa
  void __init dove_uart0_init(void)
  {
        orion_uart0_init(DOVE_UART0_VIRT_BASE, DOVE_UART0_PHYS_BASE,
-                        IRQ_DOVE_UART_0, get_tclk());
+                        IRQ_DOVE_UART_0, tclk);
  }
  
  /*****************************************************************************
  void __init dove_uart1_init(void)
  {
        orion_uart1_init(DOVE_UART1_VIRT_BASE, DOVE_UART1_PHYS_BASE,
-                        IRQ_DOVE_UART_1, get_tclk());
+                        IRQ_DOVE_UART_1, tclk);
  }
  
  /*****************************************************************************
  void __init dove_uart2_init(void)
  {
        orion_uart2_init(DOVE_UART2_VIRT_BASE, DOVE_UART2_PHYS_BASE,
-                        IRQ_DOVE_UART_2, get_tclk());
+                        IRQ_DOVE_UART_2, tclk);
  }
  
  /*****************************************************************************
  void __init dove_uart3_init(void)
  {
        orion_uart3_init(DOVE_UART3_VIRT_BASE, DOVE_UART3_PHYS_BASE,
-                        IRQ_DOVE_UART_3, get_tclk());
+                        IRQ_DOVE_UART_3, tclk);
  }
  
  /*****************************************************************************
   ****************************************************************************/
  void __init dove_spi0_init(void)
  {
-       orion_spi_init(DOVE_SPI0_PHYS_BASE, get_tclk());
+       orion_spi_init(DOVE_SPI0_PHYS_BASE);
  }
  
  void __init dove_spi1_init(void)
  {
-       orion_spi_1_init(DOVE_SPI1_PHYS_BASE, get_tclk());
+       orion_spi_1_init(DOVE_SPI1_PHYS_BASE);
  }
  
  /*****************************************************************************
@@@ -181,7 -193,7 +193,7 @@@ static int get_tclk(void
        return 166666667;
  }
  
 -static void dove_timer_init(void)
 +static void __init dove_timer_init(void)
  {
        orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
                        IRQ_DOVE_BRIDGE, get_tclk());
@@@ -272,18 -284,17 +284,17 @@@ void __init dove_sdio1_init(void
  
  void __init dove_init(void)
  {
-       int tclk;
-       tclk = get_tclk();
        printk(KERN_INFO "Dove 88AP510 SoC, ");
-       printk(KERN_INFO "TCLK = %dMHz\n", (tclk + 499999) / 1000000);
+       printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
  
  #ifdef CONFIG_CACHE_TAUROS2
        tauros2_init();
  #endif
        dove_setup_cpu_mbus();
  
+       /* Setup root of clk tree */
+       clk_init();
        /* internal devices that every board has */
        dove_rtc_init();
        dove_xor0_init();
@@@ -34,6 -34,7 +34,7 @@@ config ARCH_MX5
  config SOC_IMX1
        bool
        select ARCH_MX1
+       select COMMON_CLK
        select CPU_ARM920T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
@@@ -42,12 -43,14 +43,14 @@@ config SOC_IMX2
        bool
        select MACH_MX21
        select CPU_ARM926T
+       select COMMON_CLK
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
  
  config SOC_IMX25
        bool
        select ARCH_MX25
+       select COMMON_CLK
        select CPU_ARM926T
        select ARCH_MXC_IOMUX_V3
        select MXC_AVIC
@@@ -56,6 -59,7 +59,7 @@@ config SOC_IMX2
        bool
        select MACH_MX27
        select CPU_ARM926T
+       select COMMON_CLK
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
  
@@@ -64,12 -68,14 +68,14 @@@ config SOC_IMX3
        select CPU_V6
        select IMX_HAVE_PLATFORM_MXC_RNGA
        select MXC_AVIC
+       select COMMON_CLK
        select SMP_ON_UP if SMP
  
  config SOC_IMX35
        bool
        select CPU_V6
        select ARCH_MXC_IOMUX_V3
+       select COMMON_CLK
        select HAVE_EPIT
        select MXC_AVIC
        select SMP_ON_UP if SMP
@@@ -77,6 -83,7 +83,7 @@@
  config SOC_IMX5
        select CPU_V7
        select MXC_TZIC
+       select COMMON_CLK
        select ARCH_MXC_IOMUX_V3
        select ARCH_HAS_CPUFREQ
        select ARCH_MX5
@@@ -151,7 -158,6 +158,7 @@@ config MACH_MX25_3D
        select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_IMXDI_RTC
        select IMX_HAVE_PLATFORM_IMX_I2C
 +      select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IMX_FB
        select IMX_HAVE_PLATFORM_IMX_KEYPAD
        select IMX_HAVE_PLATFORM_IMX_UART
@@@ -164,7 -170,6 +171,7 @@@ config MACH_EUKREA_CPUIMX25S
        select SOC_IMX25
        select IMX_HAVE_PLATFORM_FLEXCAN
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
 +      select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_IMXDI_RTC
        select IMX_HAVE_PLATFORM_IMX_FB
        select IMX_HAVE_PLATFORM_IMX_I2C
@@@ -183,7 -188,6 +190,7 @@@ config MACH_EUKREA_MBIMXSD25_BASEBOAR
        bool "Eukrea MBIMXSD development board"
        select IMX_HAVE_PLATFORM_GPIO_KEYS
        select IMX_HAVE_PLATFORM_IMX_SSI
 +      select IMX_HAVE_PLATFORM_SPI_IMX
        select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
@@@ -496,7 -500,6 +503,7 @@@ config MACH_MX31MOBOAR
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_IMX_I2C
 +      select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IMX_UART
        select IMX_HAVE_PLATFORM_IPU_CORE
        select IMX_HAVE_PLATFORM_MXC_EHCI
@@@ -575,10 -578,8 +582,10 @@@ config MACH_MX35_3D
        select MXC_DEBUG_BOARD
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX2_WDT
 +      select IMX_HAVE_PLATFORM_IMX_FB
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
 +      select IMX_HAVE_PLATFORM_IPU_CORE
        select IMX_HAVE_PLATFORM_MXC_EHCI
        select IMX_HAVE_PLATFORM_MXC_NAND
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
@@@ -612,7 -613,6 +619,7 @@@ config MACH_EUKREA_MBIMXSD35_BASEBOAR
        select IMX_HAVE_PLATFORM_GPIO_KEYS
        select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_IPU_CORE
 +      select IMX_HAVE_PLATFORM_SPI_IMX
        select LEDS_GPIO_REGISTER
        help
          This adds board specific devices that can be found on Eukrea's
@@@ -689,13 -689,42 +696,13 @@@ config MACH_MX51_3D
          Include support for MX51PDK (3DS) platform. This includes specific
          configurations for the board and its peripherals.
  
 -config MACH_EUKREA_CPUIMX51
 -      bool "Support Eukrea CPUIMX51 module"
 -      select SOC_IMX51
 -      select IMX_HAVE_PLATFORM_FSL_USB2_UDC
 -      select IMX_HAVE_PLATFORM_IMX_I2C
 -      select IMX_HAVE_PLATFORM_IMX_UART
 -      select IMX_HAVE_PLATFORM_MXC_EHCI
 -      select IMX_HAVE_PLATFORM_MXC_NAND
 -      select IMX_HAVE_PLATFORM_SPI_IMX
 -      help
 -        Include support for Eukrea CPUIMX51 platform. This includes
 -        specific configurations for the module and its peripherals.
 -
 -choice
 -      prompt "Baseboard"
 -      depends on MACH_EUKREA_CPUIMX51
 -      default MACH_EUKREA_MBIMX51_BASEBOARD
 -
 -config MACH_EUKREA_MBIMX51_BASEBOARD
 -      prompt "Eukrea MBIMX51 development board"
 -      bool
 -      select IMX_HAVE_PLATFORM_IMX_KEYPAD
 -      select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
 -      select LEDS_GPIO_REGISTER
 -      help
 -        This adds board specific devices that can be found on Eukrea's
 -        MBIMX51 evaluation board.
 -
 -endchoice
 -
  config MACH_EUKREA_CPUIMX51SD
        bool "Support Eukrea CPUIMX51SD module"
        select SOC_IMX51
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
        select IMX_HAVE_PLATFORM_IMX_I2C
        select IMX_HAVE_PLATFORM_IMX_UART
 +      select IMX_HAVE_PLATFORM_IMX2_WDT
        select IMX_HAVE_PLATFORM_MXC_EHCI
        select IMX_HAVE_PLATFORM_MXC_NAND
        select IMX_HAVE_PLATFORM_SPI_IMX
@@@ -711,7 -740,6 +718,7 @@@ choic
  config MACH_EUKREA_MBIMXSD51_BASEBOARD
        prompt "Eukrea MBIMXSD development board"
        bool
 +      select IMX_HAVE_PLATFORM_IMX_SSI
        select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
        select LEDS_GPIO_REGISTER
        help
@@@ -815,6 -843,7 +822,7 @@@ config SOC_IMX6
        bool "i.MX6 Quad support"
        select ARM_CPU_SUSPEND if PM
        select ARM_GIC
+       select COMMON_CLK
        select CPU_V7
        select HAVE_ARM_SCU
        select HAVE_IMX_GPC
@@@ -1,15 -1,18 +1,18 @@@
- obj-$(CONFIG_SOC_IMX1) += clock-imx1.o mm-imx1.o
- obj-$(CONFIG_SOC_IMX21) += clock-imx21.o mm-imx21.o
+ obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o
+ obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
  
- obj-$(CONFIG_SOC_IMX25) += clock-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o
+ obj-$(CONFIG_SOC_IMX25) += clk-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o
  
  obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
- obj-$(CONFIG_SOC_IMX27) += clock-imx27.o mm-imx27.o ehci-imx27.o
+ obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o
  
- obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clock-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o
- obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clock-imx35.o ehci-imx35.o pm-imx3.o
+ obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o
+ obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o
  
- obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clock-mx51-mx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o
+ obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o pm-imx5.o cpu_op-mx51.o
+ obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
+                           clk-pfd.o clk-busy.o
  
  # Support for CMOS sensor interface
  obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
@@@ -70,7 -73,7 +73,7 @@@ obj-$(CONFIG_CPU_V7) += head-v7.
  AFLAGS_head-v7.o :=-Wa,-march=armv7-a
  obj-$(CONFIG_SMP) += platsmp.o
  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
- obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o
+ obj-$(CONFIG_SOC_IMX6Q) += clk-imx6q.o mach-imx6q.o
  
  ifeq ($(CONFIG_PM),y)
  obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o
@@@ -83,8 -86,10 +86,8 @@@ obj-$(CONFIG_MACH_MX53_EVK) += mach-mx5
  obj-$(CONFIG_MACH_MX53_SMD) += mach-mx53_smd.o
  obj-$(CONFIG_MACH_MX53_LOCO) += mach-mx53_loco.o
  obj-$(CONFIG_MACH_MX53_ARD) += mach-mx53_ard.o
 -obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += mach-cpuimx51.o
 -obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
  obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
 -obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
 +obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
  obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o
  obj-$(CONFIG_MACH_MX51_EFIKAMX) += mach-mx51_efikamx.o
  obj-$(CONFIG_MACH_MX51_EFIKASB) += mach-mx51_efikasb.o
@@@ -14,7 -14,6 +14,7 @@@
  #include <linux/init.h>
  #include <linux/of.h>
  #include <linux/of_platform.h>
 +#include <linux/kexec.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  #include <mach/bridge-regs.h>
@@@ -43,6 -42,9 +43,9 @@@ static void __init kirkwood_dt_init(voi
        kirkwood_l2_init();
  #endif
  
+       /* Setup root of clk tree */
+       kirkwood_clk_init();
        /* internal devices that every board has */
        kirkwood_wdt_init();
        kirkwood_xor0_init();
        if (of_machine_is_compatible("globalscale,dreamplug"))
                dreamplug_init();
  
 +      if (of_machine_is_compatible("dlink,dns-kirkwood"))
 +              dnskw_init();
 +
 +      if (of_machine_is_compatible("iom,iconnect"))
 +              iconnect_init();
 +
 +      if (of_machine_is_compatible("raidsonic,ib-nas62x0"))
 +              ib62x0_init();
 +
        of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
  }
  
  static const char *kirkwood_dt_board_compat[] = {
        "globalscale,dreamplug",
 +      "dlink,dns-320",
 +      "dlink,dns-325",
 +      "iom,iconnect",
 +      "raidsonic,ib-nas62x0",
        NULL
  };
  
@@@ -50,6 -50,7 +50,7 @@@ void kirkwood_nand_init(struct mtd_part
  void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
  void kirkwood_audio_init(void);
  void kirkwood_restart(char, const char *);
+ void kirkwood_clk_init(void);
  
  /* board init functions for boards not fully converted to fdt */
  #ifdef CONFIG_MACH_DREAMPLUG_DT
@@@ -58,24 -59,6 +59,24 @@@ void dreamplug_init(void)
  static inline void dreamplug_init(void) {};
  #endif
  
 +#ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT
 +void dnskw_init(void);
 +#else
 +static inline void dnskw_init(void) {};
 +#endif
 +
 +#ifdef CONFIG_MACH_ICONNECT_DT
 +void iconnect_init(void);
 +#else
 +static inline void iconnect_init(void) {};
 +#endif
 +
 +#ifdef CONFIG_MACH_IB62X0_DT
 +void ib62x0_init(void);
 +#else
 +static inline void ib62x0_init(void) {};
 +#endif
 +
  /* early init functions not converted to fdt yet */
  char *kirkwood_id(void);
  void kirkwood_l2_init(void);
@@@ -11,6 -11,7 +11,7 @@@
  #include <linux/kernel.h>
  #include <linux/pci.h>
  #include <linux/slab.h>
+ #include <linux/clk.h>
  #include <video/vga.h>
  #include <asm/irq.h>
  #include <asm/mach/pci.h>
  #include <plat/addr-map.h>
  #include "common.h"
  
+ static void kirkwood_enable_pcie_clk(const char *port)
+ {
+       struct clk *clk;
+       clk = clk_get_sys("pcie", port);
+       if (IS_ERR(clk)) {
+               printk(KERN_ERR "PCIE clock %s missing\n", port);
+               return;
+       }
+       clk_prepare_enable(clk);
+       clk_put(clk);
+ }
+ /* This function is called very early in the boot when probing the
+    hardware to determine what we actually are, and what rate tclk is
+    ticking at. Hence calling kirkwood_enable_pcie_clk() is not
+    possible since the clk tree has not been created yet. */
  void kirkwood_enable_pcie(void)
  {
        u32 curr = readl(CLOCK_GATING_CTRL);
@@@ -26,7 -44,7 +44,7 @@@
                writel(curr | CGC_PEX0, CLOCK_GATING_CTRL);
  }
  
- void __init kirkwood_pcie_id(u32 *dev, u32 *rev)
+ void kirkwood_pcie_id(u32 *dev, u32 *rev)
  {
        kirkwood_enable_pcie();
        *dev = orion_pcie_dev_id((void __iomem *)PCIE_VIRT_BASE);
@@@ -44,6 -62,12 +62,6 @@@ struct pcie_port 
  static int pcie_port_map[2];
  static int num_pcie_ports;
  
 -static inline struct pcie_port *bus_to_port(struct pci_bus *bus)
 -{
 -      struct pci_sys_data *sys = bus->sysdata;
 -      return sys->private_data;
 -}
 -
  static int pcie_valid_config(struct pcie_port *pp, int bus, int dev)
  {
        /*
@@@ -73,8 -97,7 +91,8 @@@
  static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
                        int size, u32 *val)
  {
 -      struct pcie_port *pp = bus_to_port(bus);
 +      struct pci_sys_data *sys = bus->sysdata;
 +      struct pcie_port *pp = sys->private_data;
        unsigned long flags;
        int ret;
  
  static int pcie_wr_conf(struct pci_bus *bus, u32 devfn,
                        int where, int size, u32 val)
  {
 -      struct pcie_port *pp = bus_to_port(bus);
 +      struct pci_sys_data *sys = bus->sysdata;
 +      struct pcie_port *pp = sys->private_data;
        unsigned long flags;
        int ret;
  
@@@ -159,7 -181,6 +177,6 @@@ static void __init pcie1_ioresources_in
  
  static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
  {
-       extern unsigned int kirkwood_clk_ctrl;
        struct pcie_port *pp;
        int index;
  
  
        switch (index) {
        case 0:
-               kirkwood_clk_ctrl |= CGC_PEX0;
+               kirkwood_enable_pcie_clk("0");
                pcie0_ioresources_init(pp);
                break;
        case 1:
-               kirkwood_clk_ctrl |= CGC_PEX1;
+               kirkwood_enable_pcie_clk("1");
                pcie1_ioresources_init(pp);
                break;
        default:
@@@ -244,13 -265,13 +261,13 @@@ kirkwood_pcie_scan_bus(int nr, struct p
  static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
        u8 pin)
  {
 -      struct pcie_port *pp = bus_to_port(dev->bus);
 +      struct pci_sys_data *sys = dev->sysdata;
 +      struct pcie_port *pp = sys->private_data;
  
        return pp->irq;
  }
  
  static struct hw_pci kirkwood_pci __initdata = {
 -      .swizzle        = pci_std_swizzle,
        .setup          = kirkwood_pcie_setup,
        .scan           = kirkwood_pcie_scan_bus,
        .map_irq        = kirkwood_pcie_map_irq,
@@@ -18,6 -18,7 +18,7 @@@
  #include <linux/mv643xx_i2c.h>
  #include <linux/ata_platform.h>
  #include <linux/delay.h>
+ #include <linux/clk-provider.h>
  #include <net/dsa.h>
  #include <asm/page.h>
  #include <asm/setup.h>
@@@ -70,6 -71,19 +71,19 @@@ void __init orion5x_map_io(void
  
  
  /*****************************************************************************
+  * CLK tree
+  ****************************************************************************/
+ static struct clk *tclk;
+ static void __init clk_init(void)
+ {
+       tclk = clk_register_fixed_rate(NULL, "tclk", NULL, CLK_IS_ROOT,
+                                      orion5x_tclk);
+       orion_clkdev_init(tclk);
+ }
+ /*****************************************************************************
   * EHCI0
   ****************************************************************************/
  void __init orion5x_ehci0_init(void)
@@@ -95,7 -109,7 +109,7 @@@ void __init orion5x_eth_init(struct mv6
  {
        orion_ge00_init(eth_data,
                        ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM,
-                       IRQ_ORION5X_ETH_ERR, orion5x_tclk);
+                       IRQ_ORION5X_ETH_ERR);
  }
  
  
@@@ -132,7 -146,7 +146,7 @@@ void __init orion5x_sata_init(struct mv
   ****************************************************************************/
  void __init orion5x_spi_init()
  {
-       orion_spi_init(SPI_PHYS_BASE, orion5x_tclk);
+       orion_spi_init(SPI_PHYS_BASE);
  }
  
  
  void __init orion5x_uart0_init(void)
  {
        orion_uart0_init(UART0_VIRT_BASE, UART0_PHYS_BASE,
-                        IRQ_ORION5X_UART0, orion5x_tclk);
+                        IRQ_ORION5X_UART0, tclk);
  }
  
  /*****************************************************************************
  void __init orion5x_uart1_init(void)
  {
        orion_uart1_init(UART1_VIRT_BASE, UART1_PHYS_BASE,
-                        IRQ_ORION5X_UART1, orion5x_tclk);
+                        IRQ_ORION5X_UART1, tclk);
  }
  
  /*****************************************************************************
@@@ -179,7 -193,7 +193,7 @@@ static void __init orion5x_crypto_init(
   ****************************************************************************/
  void __init orion5x_wdt_init(void)
  {
-       orion_wdt_init(orion5x_tclk);
+       orion_wdt_init();
  }
  
  
@@@ -205,7 -219,7 +219,7 @@@ int __init orion5x_find_tclk(void
        return 166666667;
  }
  
 -static void orion5x_timer_init(void)
 +static void __init orion5x_timer_init(void)
  {
        orion5x_tclk = orion5x_find_tclk();
  
@@@ -276,6 -290,9 +290,9 @@@ void __init orion5x_init(void
         */
        orion5x_setup_cpu_mbus_bridge();
  
+       /* Setup root of clk tree */
+       clk_init();
        /*
         * Don't issue "Wait for Interrupt" instruction if we are
         * running on D0 5281 silicon.
@@@ -16,7 -16,6 +16,6 @@@
  #include <linux/mtd/physmap.h>
  #include <linux/mv643xx_eth.h>
  #include <linux/spi/spi.h>
- #include <linux/spi/orion_spi.h>
  #include <linux/spi/flash.h>
  #include <linux/ethtool.h>
  #include <net/dsa.h>
@@@ -102,6 -101,7 +101,6 @@@ static void __init rd88f6183ap_ge_init(
  
  static struct hw_pci rd88f6183ap_ge_pci __initdata = {
        .nr_controllers = 2,
 -      .swizzle        = pci_std_swizzle,
        .setup          = orion5x_pci_sys_setup,
        .scan           = orion5x_pci_sys_scan_bus,
        .map_irq        = orion5x_pci_map_irq,
diff --combined drivers/dma/imx-sdma.c
@@@ -24,7 -24,7 +24,7 @@@
  #include <linux/mm.h>
  #include <linux/interrupt.h>
  #include <linux/clk.h>
 -#include <linux/wait.h>
 +#include <linux/delay.h>
  #include <linux/sched.h>
  #include <linux/semaphore.h>
  #include <linux/spinlock.h>
@@@ -271,7 -271,6 +271,7 @@@ struct sdma_channel 
        enum dma_status                 status;
        unsigned int                    chn_count;
        unsigned int                    chn_real_count;
 +      struct tasklet_struct           tasklet;
  };
  
  #define IMX_DMA_SG_LOOP               BIT(0)
@@@ -323,8 -322,9 +323,9 @@@ struct sdma_engine 
        struct sdma_context_data        *context;
        dma_addr_t                      context_phys;
        struct dma_device               dma_device;
-       struct clk                      *clk;
+       struct clk                      *clk_ipg;
+       struct clk                      *clk_ahb;
 -      struct mutex                    channel_0_lock;
 +      spinlock_t                      channel_0_lock;
        struct sdma_script_start_addrs  *script_addrs;
  };
  
@@@ -402,27 -402,19 +403,27 @@@ static void sdma_enable_channel(struct 
  }
  
  /*
 - * sdma_run_channel - run a channel and wait till it's done
 + * sdma_run_channel0 - run a channel and wait till it's done
   */
 -static int sdma_run_channel(struct sdma_channel *sdmac)
 +static int sdma_run_channel0(struct sdma_engine *sdma)
  {
 -      struct sdma_engine *sdma = sdmac->sdma;
 -      int channel = sdmac->channel;
        int ret;
 +      unsigned long timeout = 500;
  
 -      init_completion(&sdmac->done);
 +      sdma_enable_channel(sdma, 0);
  
 -      sdma_enable_channel(sdma, channel);
 +      while (!(ret = readl_relaxed(sdma->regs + SDMA_H_INTR) & 1)) {
 +              if (timeout-- <= 0)
 +                      break;
 +              udelay(1);
 +      }
  
 -      ret = wait_for_completion_timeout(&sdmac->done, HZ);
 +      if (ret) {
 +              /* Clear the interrupt status */
 +              writel_relaxed(ret, sdma->regs + SDMA_H_INTR);
 +      } else {
 +              dev_err(sdma->dev, "Timeout waiting for CH0 ready\n");
 +      }
  
        return ret ? 0 : -ETIMEDOUT;
  }
@@@ -434,17 -426,17 +435,17 @@@ static int sdma_load_script(struct sdma
        void *buf_virt;
        dma_addr_t buf_phys;
        int ret;
 -
 -      mutex_lock(&sdma->channel_0_lock);
 +      unsigned long flags;
  
        buf_virt = dma_alloc_coherent(NULL,
                        size,
                        &buf_phys, GFP_KERNEL);
        if (!buf_virt) {
 -              ret = -ENOMEM;
 -              goto err_out;
 +              return -ENOMEM;
        }
  
 +      spin_lock_irqsave(&sdma->channel_0_lock, flags);
 +
        bd0->mode.command = C0_SETPM;
        bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD;
        bd0->mode.count = size / 2;
  
        memcpy(buf_virt, buf, size);
  
 -      ret = sdma_run_channel(&sdma->channel[0]);
 +      ret = sdma_run_channel0(sdma);
  
 -      dma_free_coherent(NULL, size, buf_virt, buf_phys);
 +      spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
  
 -err_out:
 -      mutex_unlock(&sdma->channel_0_lock);
 +      dma_free_coherent(NULL, size, buf_virt, buf_phys);
  
        return ret;
  }
@@@ -542,11 -535,13 +543,11 @@@ static void mxc_sdma_handle_channel_nor
                sdmac->desc.callback(sdmac->desc.callback_param);
  }
  
 -static void mxc_sdma_handle_channel(struct sdma_channel *sdmac)
 +static void sdma_tasklet(unsigned long data)
  {
 -      complete(&sdmac->done);
 +      struct sdma_channel *sdmac = (struct sdma_channel *) data;
  
 -      /* not interested in channel 0 interrupts */
 -      if (sdmac->channel == 0)
 -              return;
 +      complete(&sdmac->done);
  
        if (sdmac->flags & IMX_DMA_SG_LOOP)
                sdma_handle_channel_loop(sdmac);
@@@ -560,15 -555,13 +561,15 @@@ static irqreturn_t sdma_int_handler(in
        unsigned long stat;
  
        stat = readl_relaxed(sdma->regs + SDMA_H_INTR);
 +      /* not interested in channel 0 interrupts */
 +      stat &= ~1;
        writel_relaxed(stat, sdma->regs + SDMA_H_INTR);
  
        while (stat) {
                int channel = fls(stat) - 1;
                struct sdma_channel *sdmac = &sdma->channel[channel];
  
 -              mxc_sdma_handle_channel(sdmac);
 +              tasklet_schedule(&sdmac->tasklet);
  
                __clear_bit(channel, &stat);
        }
@@@ -667,7 -660,6 +668,7 @@@ static int sdma_load_context(struct sdm
        struct sdma_context_data *context = sdma->context;
        struct sdma_buffer_descriptor *bd0 = sdma->channel[0].bd;
        int ret;
 +      unsigned long flags;
  
        if (sdmac->direction == DMA_DEV_TO_MEM) {
                load_address = sdmac->pc_from_device;
        dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]);
        dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]);
  
 -      mutex_lock(&sdma->channel_0_lock);
 +      spin_lock_irqsave(&sdma->channel_0_lock, flags);
  
        memset(context, 0, sizeof(*context));
        context->channel_state.pc = load_address;
        bd0->mode.count = sizeof(*context) / 4;
        bd0->buffer_addr = sdma->context_phys;
        bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel;
 +      ret = sdma_run_channel0(sdma);
  
 -      ret = sdma_run_channel(&sdma->channel[0]);
 -
 -      mutex_unlock(&sdma->channel_0_lock);
 +      spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
  
        return ret;
  }
@@@ -867,7 -860,8 +868,8 @@@ static int sdma_alloc_chan_resources(st
        sdmac->peripheral_type = data->peripheral_type;
        sdmac->event_id0 = data->dma_request;
  
-       clk_enable(sdmac->sdma->clk);
+       clk_enable(sdmac->sdma->clk_ipg);
+       clk_enable(sdmac->sdma->clk_ahb);
  
        ret = sdma_request_channel(sdmac);
        if (ret)
@@@ -904,7 -898,8 +906,8 @@@ static void sdma_free_chan_resources(st
  
        dma_free_coherent(NULL, PAGE_SIZE, sdmac->bd, sdmac->bd_phys);
  
-       clk_disable(sdma->clk);
+       clk_disable(sdma->clk_ipg);
+       clk_disable(sdma->clk_ahb);
  }
  
  static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
  
                bd->buffer_addr = sg->dma_address;
  
 -              count = sg->length;
 +              count = sg_dma_len(sg);
  
                if (count > 0xffff) {
                        dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n",
@@@ -1177,12 -1172,14 +1180,14 @@@ static void sdma_load_firmware(const st
        addr = (void *)header + header->script_addrs_start;
        ram_code = (void *)header + header->ram_code_start;
  
-       clk_enable(sdma->clk);
+       clk_enable(sdma->clk_ipg);
+       clk_enable(sdma->clk_ahb);
        /* download the RAM image for SDMA */
        sdma_load_script(sdma, ram_code,
                        header->ram_code_size,
                        addr->ram_code_start_addr);
-       clk_disable(sdma->clk);
+       clk_disable(sdma->clk_ipg);
+       clk_disable(sdma->clk_ahb);
  
        sdma_add_scripts(sdma, addr);
  
@@@ -1224,7 -1221,8 +1229,8 @@@ static int __init sdma_init(struct sdma
                return -ENODEV;
        }
  
-       clk_enable(sdma->clk);
+       clk_enable(sdma->clk_ipg);
+       clk_enable(sdma->clk_ahb);
  
        /* Be sure SDMA has not started yet */
        writel_relaxed(0, sdma->regs + SDMA_H_C0PTR);
        /* Initializes channel's priorities */
        sdma_set_channel_priority(&sdma->channel[0], 7);
  
-       clk_disable(sdma->clk);
+       clk_disable(sdma->clk_ipg);
+       clk_disable(sdma->clk_ahb);
  
        return 0;
  
  err_dma_alloc:
-       clk_disable(sdma->clk);
+       clk_disable(sdma->clk_ipg);
+       clk_disable(sdma->clk_ahb);
        dev_err(sdma->dev, "initialisation failed with %d\n", ret);
        return ret;
  }
@@@ -1305,7 -1305,7 +1313,7 @@@ static int __init sdma_probe(struct pla
        if (!sdma)
                return -ENOMEM;
  
 -      mutex_init(&sdma->channel_0_lock);
 +      spin_lock_init(&sdma->channel_0_lock);
  
        sdma->dev = &pdev->dev;
  
                goto err_request_region;
        }
  
-       sdma->clk = clk_get(&pdev->dev, NULL);
-       if (IS_ERR(sdma->clk)) {
-               ret = PTR_ERR(sdma->clk);
+       sdma->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
+       if (IS_ERR(sdma->clk_ipg)) {
+               ret = PTR_ERR(sdma->clk_ipg);
                goto err_clk;
        }
  
+       sdma->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
+       if (IS_ERR(sdma->clk_ahb)) {
+               ret = PTR_ERR(sdma->clk_ahb);
+               goto err_clk;
+       }
+       clk_prepare(sdma->clk_ipg);
+       clk_prepare(sdma->clk_ahb);
        sdma->regs = ioremap(iores->start, resource_size(iores));
        if (!sdma->regs) {
                ret = -ENOMEM;
                dma_cookie_init(&sdmac->chan);
                sdmac->channel = i;
  
 +              tasklet_init(&sdmac->tasklet, sdma_tasklet,
 +                           (unsigned long) sdmac);
                /*
                 * Add the channel to the DMAC list. Do not add channel 0 though
                 * because we need it internally in the SDMA driver. This also means
@@@ -1436,7 -1443,6 +1453,6 @@@ err_alloc
  err_request_irq:
        iounmap(sdma->regs);
  err_ioremap:
-       clk_put(sdma->clk);
  err_clk:
        release_mem_region(iores->start, resource_size(iores));
  err_request_region:
@@@ -199,6 -199,8 +199,6 @@@ static int mx3_videobuf_setup(struct vb
        struct soc_camera_device *icd = soc_camera_from_vb2q(vq);
        struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
        struct mx3_camera_dev *mx3_cam = ici->priv;
 -      int bytes_per_line;
 -      unsigned int height;
  
        if (!mx3_cam->idmac_channel[0])
                return -EINVAL;
        if (fmt) {
                const struct soc_camera_format_xlate *xlate = soc_camera_xlate_by_fourcc(icd,
                                                                fmt->fmt.pix.pixelformat);
 +              unsigned int bytes_per_line;
 +              int ret;
 +
                if (!xlate)
                        return -EINVAL;
 -              bytes_per_line = soc_mbus_bytes_per_line(fmt->fmt.pix.width,
 -                                                       xlate->host_fmt);
 -              height = fmt->fmt.pix.height;
 +
 +              ret = soc_mbus_bytes_per_line(fmt->fmt.pix.width,
 +                                            xlate->host_fmt);
 +              if (ret < 0)
 +                      return ret;
 +
 +              bytes_per_line = max_t(u32, fmt->fmt.pix.bytesperline, ret);
 +
 +              ret = soc_mbus_image_size(xlate->host_fmt, bytes_per_line,
 +                                        fmt->fmt.pix.height);
 +              if (ret < 0)
 +                      return ret;
 +
 +              sizes[0] = max_t(u32, fmt->fmt.pix.sizeimage, ret);
        } else {
                /* Called from VIDIOC_REQBUFS or in compatibility mode */
 -              bytes_per_line = soc_mbus_bytes_per_line(icd->user_width,
 -                                              icd->current_fmt->host_fmt);
 -              height = icd->user_height;
 +              sizes[0] = icd->sizeimage;
        }
 -      if (bytes_per_line < 0)
 -              return bytes_per_line;
 -
 -      sizes[0] = bytes_per_line * height;
  
        alloc_ctxs[0] = mx3_cam->alloc_ctx;
  
@@@ -273,11 -267,14 +273,11 @@@ static void mx3_videobuf_queue(struct v
        struct idmac_channel *ichan = mx3_cam->idmac_channel[0];
        struct idmac_video_param *video = &ichan->params.video;
        const struct soc_mbus_pixelfmt *host_fmt = icd->current_fmt->host_fmt;
 -      int bytes_per_line = soc_mbus_bytes_per_line(icd->user_width, host_fmt);
        unsigned long flags;
        dma_cookie_t cookie;
        size_t new_size;
  
 -      BUG_ON(bytes_per_line <= 0);
 -
 -      new_size = bytes_per_line * icd->user_height;
 +      new_size = icd->sizeimage;
  
        if (vb2_plane_size(vb, 0) < new_size) {
                dev_err(icd->parent, "Buffer #%d too small (%lu < %zu)\n",
                 * horizontal parameters in this case are expressed in bytes,
                 * not in pixels.
                 */
 -              video->out_width        = bytes_per_line;
 +              video->out_width        = icd->bytesperline;
                video->out_height       = icd->user_height;
 -              video->out_stride       = bytes_per_line;
 +              video->out_stride       = icd->bytesperline;
        } else {
                /*
                 * For IPU known formats the pixel unit will be managed
@@@ -511,7 -508,7 +511,7 @@@ static void mx3_camera_activate(struct 
        /* ipu_csi_init_interface() */
        csi_reg_write(mx3_cam, conf, CSI_SENS_CONF);
  
-       clk_enable(mx3_cam->clk);
+       clk_prepare_enable(mx3_cam->clk);
        rate = clk_round_rate(mx3_cam->clk, mx3_cam->mclk);
        dev_dbg(icd->parent, "Set SENS_CONF to %x, rate %ld\n", conf, rate);
        if (rate)
@@@ -552,7 -549,7 +552,7 @@@ static void mx3_camera_remove_device(st
                *ichan = NULL;
        }
  
-       clk_disable(mx3_cam->clk);
+       clk_disable_unprepare(mx3_cam->clk);
  
        mx3_cam->icd = NULL;
  
@@@ -645,14 -642,12 +645,14 @@@ static const struct soc_mbus_pixelfmt m
                .bits_per_sample        = 8,
                .packing                = SOC_MBUS_PACKING_NONE,
                .order                  = SOC_MBUS_ORDER_LE,
 +              .layout                 = SOC_MBUS_LAYOUT_PACKED,
        }, {
                .fourcc                 = V4L2_PIX_FMT_GREY,
                .name                   = "Monochrome 8 bit",
                .bits_per_sample        = 8,
                .packing                = SOC_MBUS_PACKING_NONE,
                .order                  = SOC_MBUS_ORDER_LE,
 +              .layout                 = SOC_MBUS_LAYOUT_PACKED,
        },
  };
  
@@@ -71,6 -71,9 +71,9 @@@ struct pltfm_imx_data 
        enum imx_esdhc_type devtype;
        struct pinctrl *pinctrl;
        struct esdhc_platform_data boarddata;
+       struct clk *clk_ipg;
+       struct clk *clk_ahb;
+       struct clk *clk_per;
  };
  
  static struct platform_device_id imx_esdhc_devtype[] = {
@@@ -404,7 -407,7 +407,7 @@@ sdhci_esdhc_imx_probe_dt(struct platfor
        if (!np)
                return -ENODEV;
  
 -      if (of_get_property(np, "fsl,card-wired", NULL))
 +      if (of_get_property(np, "non-removable", NULL))
                boarddata->cd_type = ESDHC_CD_PERMANENT;
  
        if (of_get_property(np, "fsl,cd-controller", NULL))
@@@ -439,7 -442,6 +442,6 @@@ static int __devinit sdhci_esdhc_imx_pr
        struct sdhci_pltfm_host *pltfm_host;
        struct sdhci_host *host;
        struct esdhc_platform_data *boarddata;
-       struct clk *clk;
        int err;
        struct pltfm_imx_data *imx_data;
  
        imx_data->devtype = pdev->id_entry->driver_data;
        pltfm_host->priv = imx_data;
  
-       clk = clk_get(mmc_dev(host->mmc), NULL);
-       if (IS_ERR(clk)) {
-               dev_err(mmc_dev(host->mmc), "clk err\n");
-               err = PTR_ERR(clk);
+       imx_data->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
+       if (IS_ERR(imx_data->clk_ipg)) {
+               err = PTR_ERR(imx_data->clk_ipg);
                goto err_clk_get;
        }
-       clk_prepare_enable(clk);
-       pltfm_host->clk = clk;
+       imx_data->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
+       if (IS_ERR(imx_data->clk_ahb)) {
+               err = PTR_ERR(imx_data->clk_ahb);
+               goto err_clk_get;
+       }
+       imx_data->clk_per = devm_clk_get(&pdev->dev, "per");
+       if (IS_ERR(imx_data->clk_per)) {
+               err = PTR_ERR(imx_data->clk_per);
+               goto err_clk_get;
+       }
+       pltfm_host->clk = imx_data->clk_per;
+       clk_prepare_enable(imx_data->clk_per);
+       clk_prepare_enable(imx_data->clk_ipg);
+       clk_prepare_enable(imx_data->clk_ahb);
  
        imx_data->pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
        if (IS_ERR(imx_data->pinctrl)) {
@@@ -567,8 -584,9 +584,9 @@@ no_card_detect_irq
  no_card_detect_pin:
  no_board_data:
  pin_err:
-       clk_disable_unprepare(pltfm_host->clk);
-       clk_put(pltfm_host->clk);
+       clk_disable_unprepare(imx_data->clk_per);
+       clk_disable_unprepare(imx_data->clk_ipg);
+       clk_disable_unprepare(imx_data->clk_ahb);
  err_clk_get:
        kfree(imx_data);
  err_imx_data:
@@@ -594,8 -612,10 +612,10 @@@ static int __devexit sdhci_esdhc_imx_re
                gpio_free(boarddata->cd_gpio);
        }
  
-       clk_disable_unprepare(pltfm_host->clk);
-       clk_put(pltfm_host->clk);
+       clk_disable_unprepare(imx_data->clk_per);
+       clk_disable_unprepare(imx_data->clk_ipg);
+       clk_disable_unprepare(imx_data->clk_ahb);
        kfree(imx_data);
  
        sdhci_pltfm_free(pdev);
  #include <linux/slab.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
 +#include <linux/of.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/nand.h>
  #include <linux/mtd/partitions.h>
+ #include <linux/clk.h>
+ #include <linux/err.h>
  #include <asm/io.h>
  #include <asm/sizes.h>
  #include <mach/hardware.h>
@@@ -75,13 -76,12 +77,14 @@@ static void orion_nand_read_buf(struct 
  static int __init orion_nand_probe(struct platform_device *pdev)
  {
        struct mtd_info *mtd;
 +      struct mtd_part_parser_data ppdata = {};
        struct nand_chip *nc;
        struct orion_nand_data *board;
        struct resource *res;
+       struct clk *clk;
        void __iomem *io_base;
        int ret = 0;
 +      u32 val = 0;
  
        nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL);
        if (!nc) {
                goto no_res;
        }
  
 -      board = pdev->dev.platform_data;
 +      if (pdev->dev.of_node) {
 +              board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data),
 +                                      GFP_KERNEL);
 +              if (!board) {
 +                      printk(KERN_ERR "orion_nand: failed to allocate board structure.\n");
 +                      ret = -ENOMEM;
 +                      goto no_res;
 +              }
 +              if (!of_property_read_u32(pdev->dev.of_node, "cle", &val))
 +                      board->cle = (u8)val;
 +              else
 +                      board->cle = 0;
 +              if (!of_property_read_u32(pdev->dev.of_node, "ale", &val))
 +                      board->ale = (u8)val;
 +              else
 +                      board->ale = 1;
 +              if (!of_property_read_u32(pdev->dev.of_node,
 +                                              "bank-width", &val))
 +                      board->width = (u8)val * 8;
 +              else
 +                      board->width = 8;
 +              if (!of_property_read_u32(pdev->dev.of_node,
 +                                              "chip-delay", &val))
 +                      board->chip_delay = (u8)val;
 +      } else
 +              board = pdev->dev.platform_data;
  
        mtd->priv = nc;
        mtd->owner = THIS_MODULE;
        if (board->chip_delay)
                nc->chip_delay = board->chip_delay;
  
 +      WARN(board->width > 16,
 +              "%d bit bus width out of range",
 +              board->width);
 +
        if (board->width == 16)
                nc->options |= NAND_BUSWIDTH_16;
  
  
        platform_set_drvdata(pdev, mtd);
  
+       /* Not all platforms can gate the clock, so it is not
+          an error if the clock does not exists. */
+       clk = clk_get(&pdev->dev, NULL);
+       if (!IS_ERR(clk)) {
+               clk_prepare_enable(clk);
+               clk_put(clk);
+       }
        if (nand_scan(mtd, 1)) {
                ret = -ENXIO;
                goto no_dev;
        }
  
        mtd->name = "orion_nand";
 -      ret = mtd_device_parse_register(mtd, NULL, NULL, board->parts,
 -                                      board->nr_parts);
 +      ppdata.of_node = pdev->dev.of_node;
 +      ret = mtd_device_parse_register(mtd, NULL, &ppdata,
 +                      board->parts, board->nr_parts);
        if (ret) {
                nand_release(mtd);
                goto no_dev;
@@@ -184,6 -162,7 +195,7 @@@ static int __devexit orion_nand_remove(
  {
        struct mtd_info *mtd = platform_get_drvdata(pdev);
        struct nand_chip *nc = mtd->priv;
+       struct clk *clk;
  
        nand_release(mtd);
  
  
        kfree(nc);
  
+       clk = clk_get(&pdev->dev, NULL);
+       if (!IS_ERR(clk)) {
+               clk_disable_unprepare(clk);
+               clk_put(clk);
+       }
        return 0;
  }
  
 +#ifdef CONFIG_OF
 +static struct of_device_id orion_nand_of_match_table[] = {
 +      { .compatible = "mrvl,orion-nand", },
 +      {},
 +};
 +#endif
 +
  static struct platform_driver orion_nand_driver = {
        .remove         = __devexit_p(orion_nand_remove),
        .driver         = {
                .name   = "orion_nand",
                .owner  = THIS_MODULE,
 +              .of_match_table = of_match_ptr(orion_nand_of_match_table),
        },
  };
  
@@@ -207,7 -207,8 +207,8 @@@ struct fec_enet_private 
  
        struct net_device *netdev;
  
-       struct clk *clk;
+       struct clk *clk_ipg;
+       struct clk *clk_ahb;
  
        /* The saved address of a sent-in-place packet/buffer, for skfree(). */
        unsigned char *tx_bounce[TX_RING_SIZE];
@@@ -1065,7 -1066,7 +1066,7 @@@ static int fec_enet_mii_init(struct pla
         * Reference Manual has an error on this, and gets fixed on i.MX6Q
         * document.
         */
-       fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000);
+       fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ahb), 5000000);
        if (id_entry->driver_data & FEC_QUIRK_ENET_MAC)
                fep->phy_speed--;
        fep->phy_speed <<= 1;
@@@ -1162,7 -1163,6 +1163,7 @@@ static const struct ethtool_ops fec_ene
        .set_settings           = fec_enet_set_settings,
        .get_drvinfo            = fec_enet_get_drvinfo,
        .get_link               = ethtool_op_get_link,
 +      .get_ts_info            = ethtool_op_get_ts_info,
  };
  
  static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
@@@ -1618,12 -1618,20 +1619,20 @@@ fec_probe(struct platform_device *pdev
                goto failed_pin;
        }
  
-       fep->clk = clk_get(&pdev->dev, NULL);
-       if (IS_ERR(fep->clk)) {
-               ret = PTR_ERR(fep->clk);
+       fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
+       if (IS_ERR(fep->clk_ipg)) {
+               ret = PTR_ERR(fep->clk_ipg);
                goto failed_clk;
        }
-       clk_prepare_enable(fep->clk);
+       fep->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
+       if (IS_ERR(fep->clk_ahb)) {
+               ret = PTR_ERR(fep->clk_ahb);
+               goto failed_clk;
+       }
+       clk_prepare_enable(fep->clk_ahb);
+       clk_prepare_enable(fep->clk_ipg);
  
        ret = fec_enet_init(ndev);
        if (ret)
@@@ -1646,8 -1654,8 +1655,8 @@@ failed_register
        fec_enet_mii_remove(fep);
  failed_mii_init:
  failed_init:
-       clk_disable_unprepare(fep->clk);
-       clk_put(fep->clk);
+       clk_disable_unprepare(fep->clk_ahb);
+       clk_disable_unprepare(fep->clk_ipg);
  failed_pin:
  failed_clk:
        for (i = 0; i < FEC_IRQ_NUM; i++) {
@@@ -1680,8 -1688,8 +1689,8 @@@ fec_drv_remove(struct platform_device *
                if (irq > 0)
                        free_irq(irq, ndev);
        }
-       clk_disable_unprepare(fep->clk);
-       clk_put(fep->clk);
+       clk_disable_unprepare(fep->clk_ahb);
+       clk_disable_unprepare(fep->clk_ipg);
        iounmap(fep->hwp);
        free_netdev(ndev);
  
@@@ -1705,7 -1713,8 +1714,8 @@@ fec_suspend(struct device *dev
                fec_stop(ndev);
                netif_device_detach(ndev);
        }
-       clk_disable_unprepare(fep->clk);
+       clk_disable_unprepare(fep->clk_ahb);
+       clk_disable_unprepare(fep->clk_ipg);
  
        return 0;
  }
@@@ -1716,7 -1725,8 +1726,8 @@@ fec_resume(struct device *dev
        struct net_device *ndev = dev_get_drvdata(dev);
        struct fec_enet_private *fep = netdev_priv(ndev);
  
-       clk_prepare_enable(fep->clk);
+       clk_prepare_enable(fep->clk_ahb);
+       clk_prepare_enable(fep->clk_ipg);
        if (netif_running(ndev)) {
                fec_restart(ndev, fep->full_duplex);
                netif_device_attach(ndev);
@@@ -57,6 -57,7 +57,7 @@@
  #include <linux/types.h>
  #include <linux/inet_lro.h>
  #include <linux/slab.h>
+ #include <linux/clk.h>
  
  static char mv643xx_eth_driver_name[] = "mv643xx_eth";
  static char mv643xx_eth_driver_version[] = "1.4";
@@@ -289,10 -290,10 +290,10 @@@ struct mv643xx_eth_shared_private 
        /*
         * Hardware-specific parameters.
         */
-       unsigned int t_clk;
        int extended_rx_coal_limit;
        int tx_bw_control;
        int tx_csum_limit;
  };
  
  #define TX_BW_CONTROL_ABSENT          0
@@@ -431,6 -432,12 +432,12 @@@ struct mv643xx_eth_private 
        int tx_desc_sram_size;
        int txq_count;
        struct tx_queue txq[8];
+       /*
+        * Hardware-specific parameters.
+        */
+       struct clk *clk;
+       unsigned int t_clk;
  };
  
  
@@@ -1010,7 -1017,7 +1017,7 @@@ static void tx_set_rate(struct mv643xx_
        int mtu;
        int bucket_size;
  
-       token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
+       token_rate = ((rate / 1000) * 64) / (mp->t_clk / 1000);
        if (token_rate > 1023)
                token_rate = 1023;
  
@@@ -1042,7 -1049,7 +1049,7 @@@ static void txq_set_rate(struct tx_queu
        int token_rate;
        int bucket_size;
  
-       token_rate = ((rate / 1000) * 64) / (mp->shared->t_clk / 1000);
+       token_rate = ((rate / 1000) * 64) / (mp->t_clk / 1000);
        if (token_rate > 1023)
                token_rate = 1023;
  
@@@ -1309,7 -1316,7 +1316,7 @@@ static unsigned int get_rx_coal(struct 
                temp = (val & 0x003fff00) >> 8;
  
        temp *= 64000000;
-       do_div(temp, mp->shared->t_clk);
+       do_div(temp, mp->t_clk);
  
        return (unsigned int)temp;
  }
@@@ -1319,7 -1326,7 +1326,7 @@@ static void set_rx_coal(struct mv643xx_
        u64 temp;
        u32 val;
  
-       temp = (u64)usec * mp->shared->t_clk;
+       temp = (u64)usec * mp->t_clk;
        temp += 31999999;
        do_div(temp, 64000000);
  
@@@ -1345,7 -1352,7 +1352,7 @@@ static unsigned int get_tx_coal(struct 
  
        temp = (rdlp(mp, TX_FIFO_URGENT_THRESHOLD) & 0x3fff0) >> 4;
        temp *= 64000000;
-       do_div(temp, mp->shared->t_clk);
+       do_div(temp, mp->t_clk);
  
        return (unsigned int)temp;
  }
@@@ -1354,7 -1361,7 +1361,7 @@@ static void set_tx_coal(struct mv643xx_
  {
        u64 temp;
  
-       temp = (u64)usec * mp->shared->t_clk;
+       temp = (u64)usec * mp->t_clk;
        temp += 31999999;
        do_div(temp, 64000000);
  
@@@ -1665,7 -1672,6 +1672,7 @@@ static const struct ethtool_ops mv643xx
        .get_strings            = mv643xx_eth_get_strings,
        .get_ethtool_stats      = mv643xx_eth_get_ethtool_stats,
        .get_sset_count         = mv643xx_eth_get_sset_count,
 +      .get_ts_info            = ethtool_op_get_ts_info,
  };
  
  
@@@ -2663,10 -2669,6 +2670,6 @@@ static int mv643xx_eth_shared_probe(str
        if (dram)
                mv643xx_eth_conf_mbus_windows(msp, dram);
  
-       /*
-        * Detect hardware parameters.
-        */
-       msp->t_clk = (pd != NULL && pd->t_clk != 0) ? pd->t_clk : 133000000;
        msp->tx_csum_limit = (pd != NULL && pd->tx_csum_limit) ?
                                        pd->tx_csum_limit : 9 * 1024;
        infer_hw_params(msp);
@@@ -2891,6 -2893,18 +2894,18 @@@ static int mv643xx_eth_probe(struct pla
  
        mp->dev = dev;
  
+       /*
+        * Get the clk rate, if there is one, otherwise use the default.
+        */
+       mp->clk = clk_get(&pdev->dev, (pdev->id ? "1" : "0"));
+       if (!IS_ERR(mp->clk)) {
+               clk_prepare_enable(mp->clk);
+               mp->t_clk = clk_get_rate(mp->clk);
+       } else {
+               mp->t_clk = 133000000;
+               printk(KERN_WARNING "Unable to get clock");
+       }
        set_params(mp, pd);
        netif_set_real_num_tx_queues(dev, mp->txq_count);
        netif_set_real_num_rx_queues(dev, mp->rxq_count);
@@@ -2979,6 -2993,11 +2994,11 @@@ static int mv643xx_eth_remove(struct pl
        if (mp->phy != NULL)
                phy_detach(mp->phy);
        cancel_work_sync(&mp->tx_timeout_task);
+       if (!IS_ERR(mp->clk)) {
+               clk_disable_unprepare(mp->clk);
+               clk_put(mp->clk);
+       }
        free_netdev(mp->dev);
  
        platform_set_drvdata(pdev, NULL);