Merge tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 18:34:32 +0000 (11:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 18:34:32 +0000 (11:34 -0700)
Pull ARM SoC driver changes from Olof Johansson:
 "A handful of driver-related changes.  We've had a bunch of them going
  in through other branches as well, so it's only a part of what we
  really have this release.

  Larger pieces are:

   - Removal of a now unused PWM driver for atmel
     [ This includes AVR32 changes that have been appropriately acked ]
   - Performance counter support for the arm CCN interconnect
   - OMAP mailbox driver cleanups and consolidation
   - PCI and SATA PHY drivers for SPEAr 13xx platforms
   - Redefinition (with backwards compatibility!) of PCI DT bindings for
     Tegra to better model regulators/power"

Note: this merge also fixes up the semantic conflict with the new
calling convention for devm_phy_create(), see commit f0ed817638b5 ("phy:
core: Let node ptr of PHY point to PHY and not of PHY provider") that
came in through Greg's USB tree.

Semantic merge patch by Stephen Rothwell <sfr@canb.auug.org.au> through
the next tree.

* tag 'drivers-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
  bus: arm-ccn: Fix error handling at event allocation
  mailbox/omap: add a parent structure for every IP instance
  mailbox/omap: remove the private mailbox structure
  mailbox/omap: consolidate OMAP mailbox driver
  mailbox/omap: simplify the fifo assignment by using macros
  mailbox/omap: remove omap_mbox_type_t from mailbox ops
  mailbox/omap: remove OMAP1 mailbox driver
  mailbox/omap: use devm_* interfaces
  bus: ARM CCN: add PERF_EVENTS dependency
  bus: ARM CCN PMU driver
  PCI: spear: Remove spear13xx_pcie_remove()
  PCI: spear: Fix Section mismatch compilation warning for probe()
  ARM: tegra: Remove legacy PCIe power supply properties
  PCI: tegra: Remove deprecated power supply properties
  PCI: tegra: Implement accurate power supply scheme
  ARM: SPEAr13xx: Update defconfigs
  ARM: SPEAr13xx: Add pcie and miphy DT nodes
  ARM: SPEAr13xx: Add bindings and dt node for misc block
  ARM: SPEAr13xx: Fix static mapping table
  phy: Add drivers for PCIe and SATA phy on SPEAr13xx
  ...

15 files changed:
1  2 
MAINTAINERS
arch/arm/boot/dts/tegra20-tamonten.dtsi
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-spear/spear13xx.c
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/pci/host/pci-tegra.c
drivers/phy/Kconfig
drivers/phy/Makefile
drivers/phy/phy-spear1310-miphy.c
drivers/phy/phy-spear1340-miphy.c
drivers/pinctrl/pinctrl-tegra-xusb.c
drivers/video/backlight/Kconfig
drivers/video/backlight/Makefile

diff --combined MAINTAINERS
@@@ -70,8 -70,6 +70,8 @@@ Descriptions of section entries
  
        P: Person (obsolete)
        M: Mail patches to: FullName <address@domain>
 +      R: Designated reviewer: FullName <address@domain>
 +         These reviewers should be CCed on patches.
        L: Mailing list that is relevant to this area
        W: Web-page with status/info
        Q: Patchwork web based patch tracking system site
@@@ -150,14 -148,6 +150,14 @@@ L:       linux-scsi@vger.kernel.or
  S:    Maintained
  F:    drivers/scsi/53c700*
  
 +6LOWPAN GENERIC (BTLE/IEEE 802.15.4)
 +M:    Alexander Aring <alex.aring@gmail.com>
 +L:    linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
 +L:    linux-bluetooth@vger.kernel.org
 +S:    Maintained
 +F:    net/6lowpan/
 +F:    include/net/6lowpan.h
 +
  6PACK NETWORK DRIVER FOR AX.25
  M:    Andreas Koensgen <ajk@comnets.uni-bremen.de>
  L:    linux-hams@vger.kernel.org
@@@ -166,6 -156,7 +166,6 @@@ F: drivers/net/hamradio/6pack.
  
  8169 10/100/1000 GIGABIT ETHERNET DRIVER
  M:    Realtek linux nic maintainers <nic_swsd@realtek.com>
 -M:    Francois Romieu <romieu@fr.zoreil.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/realtek/r8169.c
@@@ -524,16 -515,6 +524,16 @@@ S:       Supporte
  F:    fs/aio.c
  F:    include/linux/*aio*.h
  
 +AIRSPY MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/usb/airspy/
 +
  ALCATEL SPEEDTOUCH USB DRIVER
  M:    Duncan Sands <duncan.sands@free.fr>
  L:    linux-usb@vger.kernel.org
@@@ -962,10 -943,16 +962,10 @@@ L:      linux-arm-kernel@lists.infradead.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
  F:    arch/arm/mach-imx/
 +F:    arch/arm/mach-mxs/
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
  
 -ARM/FREESCALE MXS ARM ARCHITECTURE
 -M:    Shawn Guo <shawn.guo@linaro.org>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -T:    git git://git.linaro.org/people/shawnguo/linux-2.6.git
 -F:    arch/arm/mach-mxs/
 -
  ARM/GLOMATION GESBC9312SX MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -985,14 -972,6 +985,14 @@@ F:       arch/arm/mach-pxa/hx4700.
  F:    arch/arm/mach-pxa/include/mach/hx4700.h
  F:    sound/soc/pxa/hx4700.c
  
 +ARM/HISILICON SOC SUPPORT
 +M:    Wei Xu <xuwei5@hisilicon.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +W:    http://www.hisilicon.com
 +S:    Supported
 +T:    git git://github.com/hisilicon/linux-hisi.git
 +F:    arch/arm/mach-hisi/
 +
  ARM/HP JORNADA 7XX MACHINE SUPPORT
  M:    Kristoffer Ericson <kristoffer.ericson@gmail.com>
  W:    www.jlime.com
@@@ -1073,33 -1052,9 +1073,33 @@@ M:    Santosh Shilimkar <santosh.shilimkar
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-keystone/
 -F:    drivers/clk/keystone/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git
  
 +ARM/TEXAS INSTRUMENT KEYSTONE CLOCK FRAMEWORK
 +M:    Santosh Shilimkar <santosh.shilimkar@ti.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/clk/keystone/
 +
 +ARM/TEXAS INSTRUMENT KEYSTONE ClOCKSOURCE
 +M:    Santosh Shilimkar <santosh.shilimkar@ti.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/clocksource/timer-keystone.c
 +
 +ARM/TEXAS INSTRUMENT KEYSTONE RESET DRIVER
 +M:    Santosh Shilimkar <santosh.shilimkar@ti.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/power/reset/keystone-reset.c
 +
 +ARM/TEXAS INSTRUMENT AEMIF/EMIF DRIVERS
 +M:    Santosh Shilimkar <santosh.shilimkar@ti.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/memory/*emif*
 +
  ARM/LOGICPD PXA270 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1124,13 -1079,14 +1124,13 @@@ L:   linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    arch/arm/mach-berlin/
  
 -ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
 +ARM/Marvell Dove/MV78xx0/Orion SOC support
  M:    Jason Cooper <jason@lakedaemon.net>
  M:    Andrew Lunn <andrew@lunn.ch>
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-dove/
 -F:    arch/arm/mach-kirkwood/
  F:    arch/arm/mach-mv78xx0/
  F:    arch/arm/mach-orion5x/
  F:    arch/arm/plat-orion/
@@@ -1340,20 -1296,6 +1340,20 @@@ W:    http://oss.renesas.co
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
  S:    Supported
 +F:    arch/arm/boot/dts/emev2*
 +F:    arch/arm/boot/dts/r7s*
 +F:    arch/arm/boot/dts/r8a*
 +F:    arch/arm/boot/dts/sh*
 +F:    arch/arm/configs/ape6evm_defconfig
 +F:    arch/arm/configs/armadillo800eva_defconfig
 +F:    arch/arm/configs/bockw_defconfig
 +F:    arch/arm/configs/genmai_defconfig
 +F:    arch/arm/configs/koelsch_defconfig
 +F:    arch/arm/configs/kzm9g_defconfig
 +F:    arch/arm/configs/lager_defconfig
 +F:    arch/arm/configs/mackerel_defconfig
 +F:    arch/arm/configs/marzen_defconfig
 +F:    arch/arm/configs/shmobile_defconfig
  F:    arch/arm/mach-shmobile/
  F:    drivers/sh/
  
@@@ -1383,7 -1325,6 +1383,7 @@@ F:      drivers/pinctrl/pinctrl-st.
  F:    drivers/media/rc/st_rc.c
  F:    drivers/i2c/busses/i2c-st.c
  F:    drivers/tty/serial/st-asc.c
 +F:    drivers/mmc/host/sdhci-st.c
  
  ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -1822,13 -1763,6 +1822,13 @@@ W:    http://bcache.evilpiepirate.or
  S:    Maintained:
  F:    drivers/md/bcache/
  
 +BECEEM BCS200/BCS220-3/BCSM250 WIMAX SUPPORT
 +M: Kevin McKinney <klmckinney1@gmail.com>
 +M: Matthias Beyer <mail@beyermatthias.de>
 +L: devel@driverdev.osuosl.org
 +S: Maintained
 +F: drivers/staging/bcm*
 +
  BEFS FILE SYSTEM
  S:    Orphan
  F:    Documentation/filesystems/befs.txt
@@@ -1947,13 -1881,6 +1947,13 @@@ S:    Supporte
  F:    drivers/net/bonding/
  F:    include/uapi/linux/if_bonding.h
  
 +BPF (Safe dynamic programs and tools)
 +M:    Alexei Starovoitov <ast@kernel.org>
 +L:    netdev@vger.kernel.org
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +F:    kernel/bpf/
 +
  BROADCOM B44 10/100 ETHERNET DRIVER
  M:    Gary Zambrano <zambrano@broadcom.com>
  L:    netdev@vger.kernel.org
@@@ -1967,8 -1894,7 +1967,8 @@@ S:      Supporte
  F:    drivers/net/ethernet/broadcom/genet/
  
  BROADCOM BNX2 GIGABIT ETHERNET DRIVER
 -M:    Michael Chan <mchan@broadcom.com>
 +M:    Sony Chacko <sony.chacko@qlogic.com>
 +M:    Dept-HSGLinuxNICDev@qlogic.com
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2.*
@@@ -2012,16 -1938,8 +2012,16 @@@ F:    arch/arm/mach-bcm/bcm_5301x.
  F:    arch/arm/boot/dts/bcm5301x.dtsi
  F:    arch/arm/boot/dts/bcm470*
  
 +BROADCOM BCM7XXX ARM ARCHITECTURE
 +M:    Marc Carino <marc.ceeeee@gmail.com>
 +M:    Brian Norris <computersforpeace@gmail.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/mach-bcm/*brcmstb*
 +F:    arch/arm/boot/dts/bcm7*.dts*
 +
  BROADCOM TG3 GIGABIT ETHERNET DRIVER
 -M:    Nithin Nayak Sujir <nsujir@broadcom.com>
 +M:    Prashant Sreedharan <prashant@broadcom.com>
  M:    Michael Chan <mchan@broadcom.com>
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -2038,13 -1956,13 +2038,13 @@@ S:   Supporte
  F:    drivers/net/wireless/brcm80211/
  
  BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER
 -M:    Eddie Wai <eddie.wai@broadcom.com>
 +M:    QLogic-Storage-Upstream@qlogic.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bnx2fc/
  
  BROADCOM BNX2I 1/10 GIGABIT iSCSI DRIVER
 -M:    Eddie Wai <eddie.wai@broadcom.com>
 +M:    QLogic-Storage-Upstream@qlogic.com
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bnx2i/
@@@ -2572,8 -2490,8 +2572,8 @@@ F:      arch/x86/kernel/cpuid.
  F:    arch/x86/kernel/msr.c
  
  CPU POWER MONITORING SUBSYSTEM
 -M:    Dominik Brodowski <linux@dominikbrodowski.net>
  M:    Thomas Renninger <trenn@suse.de>
 +L:    linux-pm@vger.kernel.org
  S:    Maintained
  F:    tools/power/cpupower/
  
@@@ -2908,7 -2826,6 +2908,7 @@@ F:      drivers/staging/dgnc
  DIGI EPCA PCI PRODUCTS
  M:    Lidza Louina <lidza.louina@gmail.com>
  M:    Mark Hounschell <markh@compro.net>
 +M:    Daeseok Youn <daeseok.youn@gmail.com>
  L:    driverdev-devel@linuxdriverproject.org
  S:    Maintained
  F:    drivers/staging/dgap/
@@@ -2965,8 -2882,8 +2965,8 @@@ S:      Maintaine
  L:    linux-media@vger.kernel.org
  L:    dri-devel@lists.freedesktop.org
  L:    linaro-mm-sig@lists.linaro.org
 -F:    drivers/base/dma-buf*
 -F:    include/linux/dma-buf*
 +F:    drivers/dma-buf/
 +F:    include/linux/dma-buf* include/linux/reservation.h include/linux/*fence.h
  F:    Documentation/dma-buf-sharing.txt
  T:    git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
  
@@@ -3402,13 -3319,6 +3402,13 @@@ W:    bluesmoke.sourceforge.ne
  S:    Maintained
  F:    drivers/edac/i82975x_edac.c
  
 +EDAC-IE31200
 +M:    Jason Baron <jbaron@akamai.com>
 +L:    linux-edac@vger.kernel.org
 +W:    bluesmoke.sourceforge.net
 +S:    Maintained
 +F:    drivers/edac/ie31200_edac.c
 +
  EDAC-MPC85XX
  M:    Johannes Thumshirn <johannes.thumshirn@men.de>
  L:    linux-edac@vger.kernel.org
@@@ -4035,12 -3945,6 +4035,12 @@@ F:    Documentation/isdn/README.gigase
  F:    drivers/isdn/gigaset/
  F:    include/uapi/linux/gigaset_dev.h
  
 +GO7007 MPEG CODEC
 +M:    Hans Verkuil <hans.verkuil@cisco.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/media/usb/go7007/
 +
  GPIO SUBSYSTEM
  M:    Linus Walleij <linus.walleij@linaro.org>
  M:    Alexandre Courbot <gnurou@gmail.com>
@@@ -4269,7 -4173,7 +4269,7 @@@ L:      linux-kernel@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
  S:    Maintained
  F:    Documentation/timers/
 -F:    kernel/hrtimer.c
 +F:    kernel/time/hrtimer.c
  F:    kernel/time/clockevents.c
  F:    kernel/time/tick*.*
  F:    kernel/time/timer_*.c
@@@ -4575,7 -4479,8 +4575,7 @@@ S:      Supporte
  F:    drivers/idle/i7300_idle.c
  
  IEEE 802.15.4 SUBSYSTEM
 -M:    Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
 -M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 +M:    Alexander Aring <alex.aring@gmail.com>
  L:    linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://apps.sourceforge.net/trac/linux-zigbee
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
@@@ -5131,6 -5036,13 +5131,6 @@@ S:     Maintaine
  F:    Documentation/hwmon/k8temp
  F:    drivers/hwmon/k8temp.c
  
 -KTAP
 -M:    Jovi Zhangwei <jovi.zhangwei@gmail.com>
 -W:    http://www.ktap.org
 -L:    ktap@freelists.org
 -S:    Maintained
 -F:    drivers/staging/ktap/
 -
  KCONFIG
  M:    "Yann E. MORIN" <yann.morin.1998@free.fr>
  L:    linux-kbuild@vger.kernel.org
@@@ -5440,7 -5352,6 +5440,7 @@@ F:      arch/powerpc/boot/rs6000.
  LINUX FOR POWERPC (32-BIT AND 64-BIT)
  M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
  M:    Paul Mackerras <paulus@samba.org>
 +M:    Michael Ellerman <mpe@ellerman.id.au>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
  Q:    http://patchwork.ozlabs.org/project/linuxppc-dev/list/
@@@ -5482,17 -5393,16 +5482,17 @@@ F:   arch/powerpc/*/*/*virtex
  
  LINUX FOR POWERPC EMBEDDED PPC8XX
  M:    Vitaly Bordug <vitb@kernel.crashing.org>
 -M:    Marcelo Tosatti <marcelo@kvack.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
  S:    Maintained
  F:    arch/powerpc/platforms/8xx/
  
  LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX
 +M:    Scott Wood <scottwood@freescale.com>
  M:    Kumar Gala <galak@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git
  S:    Maintained
  F:    arch/powerpc/platforms/83xx/
  F:    arch/powerpc/platforms/85xx/
@@@ -5602,11 -5512,10 +5602,11 @@@ S:   Maintaine
  F:    arch/arm/mach-lpc32xx/
  
  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
 -M:    Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
 -M:    Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
 -M:    support@lsi.com
 -L:    DL-MPTFusionLinux@lsi.com
 +M:    Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
 +M:    Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
 +M:    Sreekanth Reddy <sreekanth.reddy@avagotech.com>
 +M:    Abhijit Mahajan <abhijit.mahajan@avagotech.com>
 +L:    MPT-FusionLinux.pdl@avagotech.com
  L:    linux-scsi@vger.kernel.org
  W:    http://www.lsilogic.com/support
  S:    Supported
@@@ -5715,6 -5624,16 +5715,6 @@@ F:     Documentation/networking/mac80211-in
  F:    include/net/mac80211.h
  F:    net/mac80211/
  
 -MAC80211 PID RATE CONTROL
 -M:    Stefano Brivio <stefano.brivio@polimi.it>
 -M:    Mattias Nissler <mattias.nissler@gmx.de>
 -L:    linux-wireless@vger.kernel.org
 -W:    http://wireless.kernel.org/en/developers/Documentation/mac80211/RateControl/PID
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
 -S:    Maintained
 -F:    net/mac80211/rc80211_pid*
 -
  MACVLAN DRIVER
  M:    Patrick McHardy <kaber@trash.net>
  L:    netdev@vger.kernel.org
@@@ -5759,8 -5678,7 +5759,8 @@@ S:      Maintaine
  F:    drivers/net/ethernet/marvell/mvneta.*
  
  MARVELL MWIFIEX WIRELESS DRIVER
 -M:    Bing Zhao <bzhao@marvell.com>
 +M:    Amitkumar Karwar <akarwar@marvell.com>
 +M:    Avinash Patil <patila@marvell.com>
  L:    linux-wireless@vger.kernel.org
  S:    Maintained
  F:    drivers/net/wireless/mwifiex/
@@@ -6006,9 -5924,9 +6006,9 @@@ W:      http://palosaari.fi/linux
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/msi3101/msi001*
 +F:    drivers/media/tuners/msi001*
  
 -MSI3101 MEDIA DRIVER
 +MSI2500 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org/
@@@ -6016,7 -5934,7 +6016,7 @@@ W:      http://palosaari.fi/linux
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/msi3101/sdr-msi3101*
 +F:    drivers/media/usb/msi2500/
  
  MT9M032 APTINA SENSOR DRIVER
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
@@@ -6053,7 -5971,8 +6053,7 @@@ F:      include/media/mt9v032.
  MULTIFUNCTION DEVICES (MFD)
  M:    Samuel Ortiz <sameo@linux.intel.com>
  M:    Lee Jones <lee.jones@linaro.org>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
  S:    Supported
  F:    drivers/mfd/
  F:    include/linux/mfd/
@@@ -6539,12 -6458,11 +6539,12 @@@ L:   linux-omap@vger.kernel.or
  S:    Maintained
  F:    arch/arm/mach-omap2/omap_hwmod_44xx_data.c
  
 -OMAP IMAGE SIGNAL PROCESSOR (ISP)
 +OMAP IMAGING SUBSYSTEM (OMAP3 ISP and OMAP4 ISS)
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    drivers/media/platform/omap3isp/
 +F:    drivers/staging/media/omap4iss/
  
  OMAP USB SUPPORT
  M:    Felipe Balbi <balbi@ti.com>
@@@ -6850,7 -6768,7 +6850,7 @@@ F:      arch/x86/kernel/quirks.
  
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <r65037@freescale.com>
 -M:    Shawn Guo <shawn.guo@linaro.org>
 +M:    Shawn Guo <shawn.guo@freescale.com>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
@@@ -6902,6 -6820,12 +6902,12 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
  F:    drivers/pci/host/pci-host-generic.c
  
+ PCIE DRIVER FOR ST SPEAR13XX
+ M:    Mohit Kumar <mohit.kumar@st.com>
+ L:    linux-pci@vger.kernel.org
+ S:    Maintained
+ F:    drivers/pci/host/*spear*
  PCMCIA SUBSYSTEM
  P:    Linux PCMCIA Team
  L:    linux-pcmcia@lists.infradead.org
@@@ -7007,12 -6931,6 +7013,12 @@@ L:    linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/pinctrl/pinctrl-at91.c
  
 +PIN CONTROLLER - RENESAS
 +M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 +L:    linux-sh@vger.kernel.org
 +S:    Maintained
 +F:    drivers/pinctrl/sh-pfc/
 +
  PIN CONTROLLER - SAMSUNG
  M:    Tomasz Figa <t.figa@samsung.com>
  M:    Thomas Abraham <thomas.abraham@linaro.org>
@@@ -7077,16 -6995,14 +7083,16 @@@ POSIX CLOCKS and TIMER
  M:    Thomas Gleixner <tglx@linutronix.de>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
 -S:    Supported
 +S:    Maintained
  F:    fs/timerfd.c
  F:    include/linux/timer*
 -F:    kernel/*timer*
 +F:    kernel/time/*timer*
  
  POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS
 +M:    Sebastian Reichel <sre@kernel.org>
  M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  M:    David Woodhouse <dwmw2@infradead.org>
 +L:    linux-pm@vger.kernel.org
  T:    git git://git.infradead.org/battery-2.6.git
  S:    Maintained
  F:    include/linux/power_supply.h
@@@ -7296,12 -7212,6 +7302,12 @@@ M:    Robert Jarzmik <robert.jarzmik@free.
  L:    rtc-linux@googlegroups.com
  S:    Maintained
  
 +QAT DRIVER
 +M:      Tadeusz Struk <tadeusz.struk@intel.com>
 +L:      qat-linux@intel.com
 +S:      Supported
 +F:      drivers/crypto/qat/
 +
  QIB DRIVER
  M:    Mike Marciniszyn <infinipath@intel.com>
  L:    linux-rdma@vger.kernel.org
@@@ -7483,20 -7393,16 +7489,20 @@@ S:   Orpha
  F:    drivers/net/wireless/ray*
  
  RCUTORTURE MODULE
 -M:    Josh Triplett <josh@freedesktop.org>
 +M:    Josh Triplett <josh@joshtriplett.org>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    Documentation/RCU/torture.txt
 -F:    kernel/rcu/torture.c
 +F:    kernel/rcu/rcutorture.c
  
  RCUTORTURE TEST FRAMEWORK
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 +R:    Lai Jiangshan <laijs@cn.fujitsu.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
@@@ -7519,11 -7425,8 +7525,11 @@@ S:    Supporte
  F:    net/rds/
  
  READ-COPY UPDATE (RCU)
 -M:    Dipankar Sarma <dipankar@in.ibm.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 +R:    Lai Jiangshan <laijs@cn.fujitsu.com>
  L:    linux-kernel@vger.kernel.org
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
@@@ -7533,7 -7436,7 +7539,7 @@@ X:      Documentation/RCU/torture.tx
  F:    include/linux/rcu*
  X:    include/linux/srcu.h
  F:    kernel/rcu/
 -X:    kernel/rcu/torture.c
 +X:    kernel/torture.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
@@@ -7545,13 -7448,6 +7551,13 @@@ F:    drivers/rtc
  F:    include/linux/rtc.h
  F:    include/uapi/linux/rtc.h
  
 +REALTEK AUDIO CODECS
 +M:    Bard Liao <bardliao@realtek.com>
 +M:    Oder Chiou <oder_chiou@realtek.com>
 +S:    Maintained
 +F:    sound/soc/codecs/rt*
 +F:    include/sound/rt*.h
 +
  REISERFS FILE SYSTEM
  L:    reiserfs-devel@vger.kernel.org
  S:    Supported
@@@ -7661,7 -7557,7 +7667,7 @@@ W:      http://palosaari.fi/linux
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/rtl2832u_sdr/rtl2832_sdr*
 +F:    drivers/media/dvb-frontends/rtl2832_sdr*
  
  RTL8180 WIRELESS DRIVER
  M:    "John W. Linville" <linville@tuxdriver.com>
@@@ -7895,11 -7791,6 +7901,11 @@@ S:    Maintaine
  F:    include/linux/mmc/dw_mmc.h
  F:    drivers/mmc/host/dw_mmc*
  
 +THUNDERBOLT DRIVER
 +M:    Andreas Noever <andreas.noever@gmail.com>
 +S:    Maintained
 +F:    drivers/thunderbolt/
 +
  TIMEKEEPING, CLOCKSOURCE CORE, NTP
  M:    John Stultz <john.stultz@linaro.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
@@@ -8035,16 -7926,6 +8041,16 @@@ S:    Maintaine
  F:    drivers/mmc/host/sdhci.*
  F:    drivers/mmc/host/sdhci-pltfm.[ch]
  
 +SECURE COMPUTING
 +M:    Kees Cook <keescook@chromium.org>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git seccomp
 +S:    Supported
 +F:    kernel/seccomp.c
 +F:    include/uapi/linux/seccomp.h
 +F:    include/linux/seccomp.h
 +K:    \bsecure_computing
 +K:    \bTIF_SECCOMP\b
 +
  SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
  M:    Anton Vorontsov <anton@enomsg.org>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -8113,16 -7994,6 +8119,16 @@@ F:    drivers/ata
  F:    include/linux/ata.h
  F:    include/linux/libata.h
  
 +SERIAL ATA AHCI PLATFORM devices support
 +M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Tejun Heo <tj@kernel.org>
 +L:    linux-ide@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +S:    Supported
 +F:    drivers/ata/ahci_platform.c
 +F:    drivers/ata/libahci_platform.c
 +F:    include/linux/ahci_platform.h
 +
  SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
  M:    Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
  L:    linux-scsi@vger.kernel.org
@@@ -8338,9 -8209,6 +8344,9 @@@ F:      mm/sl?b
  SLEEPABLE READ-COPY UPDATE (SRCU)
  M:    Lai Jiangshan <laijs@cn.fujitsu.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  L:    linux-kernel@vger.kernel.org
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
@@@ -8440,12 -8308,6 +8446,12 @@@ M:    Chris Boot <bootc@bootc.net
  S:    Maintained
  F:    drivers/leds/leds-net48xx.c
  
 +SOFTLOGIC 6x10 MPEG CODEC
 +M:    Ismael Luceno <ismael.luceno@corp.bluecherry.net>
 +L:    linux-media@vger.kernel.org
 +S:    Supported
 +F:    drivers/media/pci/solo6x10/
 +
  SOFTWARE RAID (Multiple Disks) SUPPORT
  M:    Neil Brown <neilb@suse.de>
  L:    linux-raid@vger.kernel.org
@@@ -8636,12 -8498,37 +8642,12 @@@ L:   devel@driverdev.osuosl.or
  S:    Supported
  F:    drivers/staging/
  
 -STAGING - AGERE HERMES II and II.5 WIRELESS DRIVERS
 -M:    Henk de Groot <pe1dnn@amsat.org>
 -S:    Odd Fixes
 -F:    drivers/staging/wlags49_h2/
 -F:    drivers/staging/wlags49_h25/
 -
 -STAGING - ASUS OLED
 -M:    Jakub Schmidtke <sjakub@gmail.com>
 -S:    Odd Fixes
 -F:    drivers/staging/asus_oled/
 -
  STAGING - COMEDI
  M:    Ian Abbott <abbotti@mev.co.uk>
  M:    H Hartley Sweeten <hsweeten@visionengravers.com>
  S:    Odd Fixes
  F:    drivers/staging/comedi/
  
 -STAGING - CRYSTAL HD VIDEO DECODER
 -M:    Naren Sankar <nsankar@broadcom.com>
 -M:    Jarod Wilson <jarod@wilsonet.com>
 -M:    Scott Davilla <davilla@4pi.com>
 -M:    Manu Abraham <abraham.manu@gmail.com>
 -S:    Odd Fixes
 -F:    drivers/staging/crystalhd/
 -
 -STAGING - ECHO CANCELLER
 -M:    Steve Underwood <steveu@coppice.org>
 -M:    David Rowe <david@rowetel.com>
 -S:    Odd Fixes
 -F:    drivers/staging/echo/
 -
  STAGING - ET131X NETWORK DRIVER
  M:    Mark Einon <mark.einon@gmail.com>
  S:    Odd Fixes
@@@ -8652,6 -8539,16 +8658,6 @@@ M:     Marek Belisko <marek.belisko@gmail.c
  S:    Odd Fixes
  F:    drivers/staging/ft1000/
  
 -STAGING - FRONTIER TRANZPORT AND ALPHATRACK
 -M:    David Täht <d@teklibre.com>
 -S:    Odd Fixes
 -F:    drivers/staging/frontier/
 -
 -STAGING - GO7007 MPEG CODEC
 -M:    Hans Verkuil <hans.verkuil@cisco.com>
 -S:    Maintained
 -F:    drivers/staging/media/go7007/
 -
  STAGING - INDUSTRIAL IO
  M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
@@@ -8703,27 -8600,52 +8709,27 @@@ L:   linux-wireless@vger.kernel.or
  S:    Maintained
  F:    drivers/staging/rtl8723au/
  
 -STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER
 -M:    Teddy Wang <teddy.wang@siliconmotion.com.cn>
 -S:    Odd Fixes
 -F:    drivers/staging/sm7xxfb/
 -
  STAGING - SLICOSS
  M:    Lior Dotan <liodot@gmail.com>
  M:    Christopher Harrer <charrer@alacritech.com>
  S:    Odd Fixes
  F:    drivers/staging/slicoss/
  
 -STAGING - SOFTLOGIC 6x10 MPEG CODEC
 -M:    Ismael Luceno <ismael.luceno@corp.bluecherry.net>
 -S:    Supported
 -F:    drivers/staging/media/solo6x10/
 -
  STAGING - SPEAKUP CONSOLE SPEECH DRIVER
  M:    William Hubbs <w.d.hubbs@gmail.com>
  M:    Chris Brannon <chris@the-brannons.com>
  M:    Kirk Reiser <kirk@reisers.ca>
  M:    Samuel Thibault <samuel.thibault@ens-lyon.org>
 -L:    speakup@braille.uwo.ca
 +L:    speakup@linux-speakup.org
  W:    http://www.linux-speakup.org/
  S:    Odd Fixes
  F:    drivers/staging/speakup/
  
 -STAGING - TI DSP BRIDGE DRIVERS
 -M:    Omar Ramirez Luna <omar.ramirez@copitl.com>
 -S:    Odd Fixes
 -F:    drivers/staging/tidspbridge/
 -
 -STAGING - USB ENE SM/MS CARD READER DRIVER
 -M:    Al Cho <acho@novell.com>
 -S:    Odd Fixes
 -F:    drivers/staging/keucr/
 -
  STAGING - VIA VT665X DRIVERS
  M:    Forest Bond <forest@alittletooquiet.net>
  S:    Odd Fixes
  F:    drivers/staging/vt665?/
  
 -STAGING - WINBOND IS89C35 WLAN USB DRIVER
 -M:    Pavel Machek <pavel@ucw.cz>
 -S:    Odd Fixes
 -F:    drivers/staging/winbond/
 -
  STAGING - XGI Z7,Z9,Z11 PCI DISPLAY DRIVER
  M:    Arnaud Patard <arnaud.patard@rtp-net.org>
  S:    Odd Fixes
@@@ -8959,7 -8881,7 +8965,7 @@@ M:      Stephen Warren <swarren@wwwdotorg.or
  M:    Thierry Reding <thierry.reding@gmail.com>
  L:    linux-tegra@vger.kernel.org
  Q:    http://patchwork.ozlabs.org/project/linux-tegra/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git
  S:    Supported
  N:    [^a-z]tegra
  
@@@ -9049,7 -8971,7 +9055,7 @@@ F:      drivers/media/radio/radio-raremono.
  
  THERMAL
  M:    Zhang Rui <rui.zhang@intel.com>
 -M:    Eduardo Valentin <eduardo.valentin@ti.com>
 +M:    Eduardo Valentin <edubezval@gmail.com>
  L:    linux-pm@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
@@@ -9076,18 -8998,11 +9082,18 @@@ S:   Maintaine
  F:    drivers/platform/x86/thinkpad_acpi.c
  
  TI BANDGAP AND THERMAL DRIVER
 -M:    Eduardo Valentin <eduardo.valentin@ti.com>
 +M:    Eduardo Valentin <edubezval@gmail.com>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    drivers/thermal/ti-soc-thermal/
  
 +TI CLOCK DRIVER
 +M:    Tero Kristo <t-kristo@ti.com>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    drivers/clk/ti/
 +F:    include/linux/clk/ti.h
 +
  TI FLASH MEDIA INTERFACE DRIVER
  M:    Alex Dubov <oakad@yahoo.com>
  S:    Maintained
@@@ -9497,6 -9412,12 +9503,6 @@@ S:     Maintaine
  F:    drivers/usb/host/isp116x*
  F:    include/linux/usb/isp116x.h
  
 -USB KAWASAKI LSI DRIVER
 -M:    Oliver Neukum <oliver@neukum.org>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/kl5kusb105.*
 -
  USB MASS STORAGE DRIVER
  M:    Matthew Dharm <mdharm-usb@one-eyed-alien.net>
  L:    linux-usb@vger.kernel.org
@@@ -9524,6 -9445,12 +9530,6 @@@ S:     Maintaine
  F:    Documentation/usb/ohci.txt
  F:    drivers/usb/host/ohci*
  
 -USB OPTION-CARD DRIVER
 -M:    Matthias Urlichs <smurf@smurf.noris.de>
 -L:    linux-usb@vger.kernel.org
 -S:    Maintained
 -F:    drivers/usb/serial/option.c
 -
  USB PEGASUS DRIVER
  M:    Petko Manolov <petkan@nucleusys.com>
  L:    linux-usb@vger.kernel.org
@@@ -9556,7 -9483,7 +9562,7 @@@ S:      Maintaine
  F:    drivers/net/usb/rtl8150.c
  
  USB SERIAL SUBSYSTEM
 -M:    Johan Hovold <jhovold@gmail.com>
 +M:    Johan Hovold <johan@kernel.org>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    Documentation/usb/usb-serial.txt
@@@ -9575,6 -9502,15 +9581,6 @@@ L:     netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/usb/smsc95xx.*
  
 -USB SN9C1xx DRIVER
 -M:    Luca Risolia <luca.risolia@studio.unibo.it>
 -L:    linux-usb@vger.kernel.org
 -L:    linux-media@vger.kernel.org
 -T:    git git://linuxtv.org/media_tree.git
 -W:    http://www.linux-projects.org
 -S:    Maintained
 -F:    drivers/staging/media/sn9c102/
 -
  USB SUBSYSTEM
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-usb@vger.kernel.org
@@@ -10081,13 -10017,6 +10087,13 @@@ S: Supporte
  F:    arch/x86/pci/*xen*
  F:    drivers/pci/*xen*
  
 +XEN BLOCK SUBSYSTEM
 +M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 +L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/block/xen-blkback/*
 +F:    drivers/block/xen*
 +
  XEN SWIOTLB SUBSYSTEM
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
                        #gpio-cells = <2>;
                        gpio-controller;
  
 +                      /* vdd_5v0_reg must be provided by the base board */
                        sys-supply = <&vdd_5v0_reg>;
                        vin-sm0-supply = <&sys_reg>;
                        vin-sm1-supply = <&sys_reg>;
        };
  
        pcie-controller@80003000 {
-               pex-clk-supply = <&pci_clk_reg>;
-               vdd-supply = <&pci_vdd_reg>;
+               avdd-pex-supply = <&pci_vdd_reg>;
+               vdd-pex-supply = <&pci_vdd_reg>;
+               avdd-pex-pll-supply = <&pci_vdd_reg>;
+               avdd-plle-supply = <&pci_vdd_reg>;
+               vddio-pex-clk-supply = <&pci_clk_reg>;
        };
  
        usb@c5008000 {
                #address-cells = <1>;
                #size-cells = <0>;
  
 -              vdd_5v0_reg: regulator@0 {
 -                      compatible = "regulator-fixed";
 -                      reg = <0>;
 -                      regulator-name = "vdd_5v0";
 -                      regulator-min-microvolt = <5000000>;
 -                      regulator-max-microvolt = <5000000>;
 -                      regulator-always-on;
 -              };
 -
                pci_vdd_reg: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
  #include "at91_rstc.h"
  #include "soc.h"
  #include "generic.h"
 -#include "clock.h"
  #include "sam9_smc.h"
  #include "pm.h"
  
 +#if defined(CONFIG_OLD_CLK_AT91)
 +#include "clock.h"
  /* --------------------------------------------------------------------
   *  Clocks
   * -------------------------------------------------------------------- */
@@@ -200,6 -199,7 +200,7 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
        CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
        CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk),
+       CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
        /* fake hclk clock */
        CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk),
        CLKDEV_CON_ID("pioA", &pioA_clk),
@@@ -281,9 -281,6 +282,9 @@@ static void __init at91sam9263_register
        clk_register(&pck2);
        clk_register(&pck3);
  }
 +#else
 +#define at91sam9263_register_clocks NULL
 +#endif
  
  /* --------------------------------------------------------------------
   *  GPIO
  #include "at91_aic.h"
  #include "soc.h"
  #include "generic.h"
 -#include "clock.h"
  #include "sam9_smc.h"
  #include "pm.h"
  
 +#if defined(CONFIG_OLD_CLK_AT91)
 +#include "clock.h"
  /* --------------------------------------------------------------------
   *  Clocks
   * -------------------------------------------------------------------- */
@@@ -252,6 -251,7 +252,7 @@@ static struct clk_lookup periph_clocks_
        CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
        CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
        CLKDEV_CON_DEV_ID(NULL, "atmel_aes", &aestdessha_clk),
+       CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
        /* more usart lookup table for DT entries */
        CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
        CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
@@@ -332,9 -332,6 +333,9 @@@ static void __init at91sam9g45_register
        clk_register(&pck0);
        clk_register(&pck1);
  }
 +#else
 +#define at91sam9g45_register_clocks NULL
 +#endif
  
  /* --------------------------------------------------------------------
   *  GPIO
@@@ -52,12 -52,12 +52,12 @@@ void __init spear13xx_l2x0_init(void
  /*
   * Following will create 16MB static virtual/physical mappings
   * PHYSICAL           VIRTUAL
-  * 0xB3000000         0xFE000000
+  * 0xB3000000         0xF9000000
   * 0xE0000000         0xFD000000
   * 0xEC000000         0xFC000000
   * 0xED000000         0xFB000000
   */
 -struct map_desc spear13xx_io_desc[] __initdata = {
 +static struct map_desc spear13xx_io_desc[] __initdata = {
        {
                .virtual        = (unsigned long)VA_PERIP_GRP2_BASE,
                .pfn            = __phys_to_pfn(PERIP_GRP2_BASE),
diff --combined drivers/leds/Kconfig
@@@ -32,14 -32,6 +32,6 @@@ config LEDS_88PM860
          This option enables support for on-chip LED drivers found on Marvell
          Semiconductor 88PM8606 PMIC.
  
- config LEDS_ATMEL_PWM
-       tristate "LED Support using Atmel PWM outputs"
-       depends on LEDS_CLASS
-       depends on ATMEL_PWM
-       help
-         This option enables support for LEDs driven using outputs
-         of the dedicated PWM controller found on newer Atmel SOCs.
  config LEDS_LM3530
        tristate "LCD Backlight driver for LM3530"
        depends on LEDS_CLASS
@@@ -143,13 -135,6 +135,13 @@@ config LEDS_SUNFIR
          This option enables support for the Left, Middle, and Right
          LEDs on the I/O and CPU boards of SunFire UltraSPARC servers.
  
 +config LEDS_IPAQ_MICRO
 +      tristate "LED Support for the Compaq iPAQ h3xxx"
 +      depends on MFD_IPAQ_MICRO
 +      help
 +        Choose this option if you want to use the notification LED on
 +        Compaq/HP iPAQ h3100 and h3600.
 +
  config LEDS_HP6XX
        tristate "LED Support for the HP Jornada 6xx"
        depends on LEDS_CLASS
diff --combined drivers/leds/Makefile
@@@ -6,7 -6,6 +6,6 @@@ obj-$(CONFIG_LEDS_TRIGGERS)              += led-tri
  
  # LED Platform Drivers
  obj-$(CONFIG_LEDS_88PM860X)           += leds-88pm860x.o
- obj-$(CONFIG_LEDS_ATMEL_PWM)          += leds-atmel-pwm.o
  obj-$(CONFIG_LEDS_BD2802)             += leds-bd2802.o
  obj-$(CONFIG_LEDS_LOCOMO)             += leds-locomo.o
  obj-$(CONFIG_LEDS_LM3530)             += leds-lm3530.o
@@@ -31,7 -30,6 +30,7 @@@ obj-$(CONFIG_LEDS_LP8501)             += leds-lp85
  obj-$(CONFIG_LEDS_LP8788)             += leds-lp8788.o
  obj-$(CONFIG_LEDS_TCA6507)            += leds-tca6507.o
  obj-$(CONFIG_LEDS_CLEVO_MAIL)         += leds-clevo-mail.o
 +obj-$(CONFIG_LEDS_IPAQ_MICRO)         += leds-ipaq-micro.o
  obj-$(CONFIG_LEDS_HP6XX)              += leds-hp6xx.o
  obj-$(CONFIG_LEDS_OT200)              += leds-ot200.o
  obj-$(CONFIG_LEDS_FSG)                        += leds-fsg.o
  #include <linux/reset.h>
  #include <linux/sizes.h>
  #include <linux/slab.h>
 -#include <linux/tegra-cpuidle.h>
 -#include <linux/tegra-powergate.h>
  #include <linux/vmalloc.h>
  #include <linux/regulator/consumer.h>
  
 +#include <soc/tegra/cpuidle.h>
 +#include <soc/tegra/pmc.h>
 +
  #include <asm/mach/irq.h>
  #include <asm/mach/map.h>
  #include <asm/mach/pci.h>
@@@ -234,7 -233,6 +234,6 @@@ struct tegra_pcie_soc_data 
        bool has_pex_clkreq_en;
        bool has_pex_bias_ctrl;
        bool has_intr_prsnt_sense;
-       bool has_avdd_supply;
        bool has_cml_clk;
  };
  
@@@ -273,9 -271,8 +272,8 @@@ struct tegra_pcie 
        unsigned int num_ports;
        u32 xbar_config;
  
-       struct regulator *pex_clk_supply;
-       struct regulator *vdd_supply;
-       struct regulator *avdd_supply;
+       struct regulator_bulk_data *supplies;
+       unsigned int num_supplies;
  
        const struct tegra_pcie_soc_data *soc_data;
  };
@@@ -895,7 -892,6 +893,6 @@@ static int tegra_pcie_enable_controller
  
  static void tegra_pcie_power_off(struct tegra_pcie *pcie)
  {
-       const struct tegra_pcie_soc_data *soc = pcie->soc_data;
        int err;
  
        /* TODO: disable and unprepare clocks? */
  
        tegra_powergate_power_off(TEGRA_POWERGATE_PCIE);
  
-       if (soc->has_avdd_supply) {
-               err = regulator_disable(pcie->avdd_supply);
-               if (err < 0)
-                       dev_warn(pcie->dev,
-                                "failed to disable AVDD regulator: %d\n",
-                                err);
-       }
-       err = regulator_disable(pcie->pex_clk_supply);
+       err = regulator_bulk_disable(pcie->num_supplies, pcie->supplies);
        if (err < 0)
-               dev_warn(pcie->dev, "failed to disable pex-clk regulator: %d\n",
-                        err);
-       err = regulator_disable(pcie->vdd_supply);
-       if (err < 0)
-               dev_warn(pcie->dev, "failed to disable VDD regulator: %d\n",
-                        err);
+               dev_warn(pcie->dev, "failed to disable regulators: %d\n", err);
  }
  
  static int tegra_pcie_power_on(struct tegra_pcie *pcie)
        tegra_powergate_power_off(TEGRA_POWERGATE_PCIE);
  
        /* enable regulators */
-       err = regulator_enable(pcie->vdd_supply);
-       if (err < 0) {
-               dev_err(pcie->dev, "failed to enable VDD regulator: %d\n", err);
-               return err;
-       }
-       err = regulator_enable(pcie->pex_clk_supply);
-       if (err < 0) {
-               dev_err(pcie->dev, "failed to enable pex-clk regulator: %d\n",
-                       err);
-               return err;
-       }
-       if (soc->has_avdd_supply) {
-               err = regulator_enable(pcie->avdd_supply);
-               if (err < 0) {
-                       dev_err(pcie->dev,
-                               "failed to enable AVDD regulator: %d\n",
-                               err);
-                       return err;
-               }
-       }
+       err = regulator_bulk_enable(pcie->num_supplies, pcie->supplies);
+       if (err < 0)
+               dev_err(pcie->dev, "failed to enable regulators: %d\n", err);
  
        err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE,
                                                pcie->pex_clk,
@@@ -1395,14 -1358,157 +1359,157 @@@ static int tegra_pcie_get_xbar_config(s
        return -EINVAL;
  }
  
+ /*
+  * Check whether a given set of supplies is available in a device tree node.
+  * This is used to check whether the new or the legacy device tree bindings
+  * should be used.
+  */
+ static bool of_regulator_bulk_available(struct device_node *np,
+                                       struct regulator_bulk_data *supplies,
+                                       unsigned int num_supplies)
+ {
+       char property[32];
+       unsigned int i;
+       for (i = 0; i < num_supplies; i++) {
+               snprintf(property, 32, "%s-supply", supplies[i].supply);
+               if (of_find_property(np, property, NULL) == NULL)
+                       return false;
+       }
+       return true;
+ }
+ /*
+  * Old versions of the device tree binding for this device used a set of power
+  * supplies that didn't match the hardware inputs. This happened to work for a
+  * number of cases but is not future proof. However to preserve backwards-
+  * compatibility with old device trees, this function will try to use the old
+  * set of supplies.
+  */
+ static int tegra_pcie_get_legacy_regulators(struct tegra_pcie *pcie)
+ {
+       struct device_node *np = pcie->dev->of_node;
+       if (of_device_is_compatible(np, "nvidia,tegra30-pcie"))
+               pcie->num_supplies = 3;
+       else if (of_device_is_compatible(np, "nvidia,tegra20-pcie"))
+               pcie->num_supplies = 2;
+       if (pcie->num_supplies == 0) {
+               dev_err(pcie->dev, "device %s not supported in legacy mode\n",
+                       np->full_name);
+               return -ENODEV;
+       }
+       pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,
+                                     sizeof(*pcie->supplies),
+                                     GFP_KERNEL);
+       if (!pcie->supplies)
+               return -ENOMEM;
+       pcie->supplies[0].supply = "pex-clk";
+       pcie->supplies[1].supply = "vdd";
+       if (pcie->num_supplies > 2)
+               pcie->supplies[2].supply = "avdd";
+       return devm_regulator_bulk_get(pcie->dev, pcie->num_supplies,
+                                      pcie->supplies);
+ }
+ /*
+  * Obtains the list of regulators required for a particular generation of the
+  * IP block.
+  *
+  * This would've been nice to do simply by providing static tables for use
+  * with the regulator_bulk_*() API, but unfortunately Tegra30 is a bit quirky
+  * in that it has two pairs or AVDD_PEX and VDD_PEX supplies (PEXA and PEXB)
+  * and either seems to be optional depending on which ports are being used.
+  */
+ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask)
+ {
+       struct device_node *np = pcie->dev->of_node;
+       unsigned int i = 0;
+       if (of_device_is_compatible(np, "nvidia,tegra30-pcie")) {
+               bool need_pexa = false, need_pexb = false;
+               /* VDD_PEXA and AVDD_PEXA supply lanes 0 to 3 */
+               if (lane_mask & 0x0f)
+                       need_pexa = true;
+               /* VDD_PEXB and AVDD_PEXB supply lanes 4 to 5 */
+               if (lane_mask & 0x30)
+                       need_pexb = true;
+               pcie->num_supplies = 4 + (need_pexa ? 2 : 0) +
+                                        (need_pexb ? 2 : 0);
+               pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,
+                                             sizeof(*pcie->supplies),
+                                             GFP_KERNEL);
+               if (!pcie->supplies)
+                       return -ENOMEM;
+               pcie->supplies[i++].supply = "avdd-pex-pll";
+               pcie->supplies[i++].supply = "hvdd-pex";
+               pcie->supplies[i++].supply = "vddio-pex-ctl";
+               pcie->supplies[i++].supply = "avdd-plle";
+               if (need_pexa) {
+                       pcie->supplies[i++].supply = "avdd-pexa";
+                       pcie->supplies[i++].supply = "vdd-pexa";
+               }
+               if (need_pexb) {
+                       pcie->supplies[i++].supply = "avdd-pexb";
+                       pcie->supplies[i++].supply = "vdd-pexb";
+               }
+       } else if (of_device_is_compatible(np, "nvidia,tegra20-pcie")) {
+               pcie->num_supplies = 5;
+               pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,
+                                             sizeof(*pcie->supplies),
+                                             GFP_KERNEL);
+               if (!pcie->supplies)
+                       return -ENOMEM;
+               pcie->supplies[0].supply = "avdd-pex";
+               pcie->supplies[1].supply = "vdd-pex";
+               pcie->supplies[2].supply = "avdd-pex-pll";
+               pcie->supplies[3].supply = "avdd-plle";
+               pcie->supplies[4].supply = "vddio-pex-clk";
+       }
+       if (of_regulator_bulk_available(pcie->dev->of_node, pcie->supplies,
+                                       pcie->num_supplies))
+               return devm_regulator_bulk_get(pcie->dev, pcie->num_supplies,
+                                              pcie->supplies);
+       /*
+        * If not all regulators are available for this new scheme, assume
+        * that the device tree complies with an older version of the device
+        * tree binding.
+        */
+       dev_info(pcie->dev, "using legacy DT binding for power supplies\n");
+       devm_kfree(pcie->dev, pcie->supplies);
+       pcie->num_supplies = 0;
+       return tegra_pcie_get_legacy_regulators(pcie);
+ }
  static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)
  {
        const struct tegra_pcie_soc_data *soc = pcie->soc_data;
        struct device_node *np = pcie->dev->of_node, *port;
        struct of_pci_range_parser parser;
        struct of_pci_range range;
+       u32 lanes = 0, mask = 0;
+       unsigned int lane = 0;
        struct resource res;
-       u32 lanes = 0;
        int err;
  
        if (of_pci_range_parser_init(&parser, np)) {
                return -EINVAL;
        }
  
-       pcie->vdd_supply = devm_regulator_get(pcie->dev, "vdd");
-       if (IS_ERR(pcie->vdd_supply))
-               return PTR_ERR(pcie->vdd_supply);
-       pcie->pex_clk_supply = devm_regulator_get(pcie->dev, "pex-clk");
-       if (IS_ERR(pcie->pex_clk_supply))
-               return PTR_ERR(pcie->pex_clk_supply);
-       if (soc->has_avdd_supply) {
-               pcie->avdd_supply = devm_regulator_get(pcie->dev, "avdd");
-               if (IS_ERR(pcie->avdd_supply))
-                       return PTR_ERR(pcie->avdd_supply);
-       }
        for_each_of_pci_range(&parser, &range) {
                of_pci_range_to_resource(&range, np, &res);
  
  
                lanes |= value << (index << 3);
  
-               if (!of_device_is_available(port))
+               if (!of_device_is_available(port)) {
+                       lane += value;
                        continue;
+               }
+               mask |= ((1 << value) - 1) << lane;
+               lane += value;
  
                rp = devm_kzalloc(pcie->dev, sizeof(*rp), GFP_KERNEL);
                if (!rp)
                return err;
        }
  
+       err = tegra_pcie_get_regulators(pcie, mask);
+       if (err < 0)
+               return err;
        return 0;
  }
  
@@@ -1616,7 -1717,6 +1718,6 @@@ static const struct tegra_pcie_soc_dat
        .has_pex_clkreq_en = false,
        .has_pex_bias_ctrl = false,
        .has_intr_prsnt_sense = false,
-       .has_avdd_supply = false,
        .has_cml_clk = false,
  };
  
@@@ -1628,7 -1728,6 +1729,6 @@@ static const struct tegra_pcie_soc_dat
        .has_pex_clkreq_en = true,
        .has_pex_bias_ctrl = true,
        .has_intr_prsnt_sense = true,
-       .has_avdd_supply = true,
        .has_cml_clk = true,
  };
  
@@@ -1717,4 -1816,4 +1817,4 @@@ module_platform_driver(tegra_pcie_drive
  
  MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
  MODULE_DESCRIPTION("NVIDIA Tegra PCIe driver");
 -MODULE_LICENSE("GPLv2");
 +MODULE_LICENSE("GPL v2");
diff --combined drivers/phy/Kconfig
@@@ -15,13 -15,6 +15,13 @@@ config GENERIC_PH
          phy users can obtain reference to the PHY. All the users of this
          framework should select this config.
  
 +config PHY_BERLIN_SATA
 +      tristate "Marvell Berlin SATA PHY driver"
 +      depends on ARCH_BERLIN && HAS_IOMEM && OF
 +      select GENERIC_PHY
 +      help
 +        Enable this to support the SATA PHY on Marvell Berlin SoCs.
 +
  config PHY_EXYNOS_MIPI_VIDEO
        tristate "S5P/EXYNOS SoC series MIPI CSI-2/DSI PHY driver"
        depends on HAS_IOMEM
  
  config PHY_MVEBU_SATA
        def_bool y
 -      depends on ARCH_KIRKWOOD || ARCH_DOVE || MACH_DOVE || MACH_KIRKWOOD
 +      depends on ARCH_DOVE || MACH_DOVE || MACH_KIRKWOOD
        depends on OF
        select GENERIC_PHY
  
 +config PHY_MIPHY365X
 +      tristate "STMicroelectronics MIPHY365X PHY driver for STiH41x series"
 +      depends on ARCH_STI
 +      depends on GENERIC_PHY
 +      depends on HAS_IOMEM
 +      depends on OF
 +      help
 +        Enable this to support the miphy transceiver (for SATA/PCIE)
 +        that is part of STMicroelectronics STiH41x SoC series.
 +
  config OMAP_CONTROL_PHY
        tristate "OMAP CONTROL PHY Driver"
        depends on ARCH_OMAP2PLUS || COMPILE_TEST
@@@ -126,18 -109,9 +126,18 @@@ config PHY_EXYNOS5250_SAT
          SATA 3.0 Gb/s, SATA 6.0 Gb/s speeds. It supports one SATA host
          port to accept one SATA device.
  
 +config PHY_HIX5HD2_SATA
 +      tristate "HIX5HD2 SATA PHY Driver"
 +      depends on ARCH_HIX5HD2 && OF && HAS_IOMEM
 +      select GENERIC_PHY
 +      select MFD_SYSCON
 +      help
 +        Support for SATA PHY on Hisilicon hix5hd2 Soc.
 +
  config PHY_SUN4I_USB
        tristate "Allwinner sunxi SoC USB PHY driver"
        depends on ARCH_SUNXI && HAS_IOMEM && OF
 +      depends on RESET_CONTROLLER
        select GENERIC_PHY
        help
          Enable this to support the transceiver that is part of Allwinner
  
  config PHY_SAMSUNG_USB2
        tristate "Samsung USB 2.0 PHY driver"
 +      depends on HAS_IOMEM
 +      depends on USB_EHCI_EXYNOS || USB_OHCI_EXYNOS || USB_DWC2
        select GENERIC_PHY
        select MFD_SYSCON
 +      default ARCH_EXYNOS
        help
          Enable this to support the Samsung USB 2.0 PHY driver for Samsung
 -        SoCs. This driver provides the interface for USB 2.0 PHY. Support for
 -        particular SoCs has to be enabled in addition to this driver. Number
 -        and type of supported phys depends on the SoC.
 +        SoCs. This driver provides the interface for USB 2.0 PHY. Support
 +        for particular PHYs will be enabled based on the SoC type in addition
 +        to this driver.
  
 -config PHY_EXYNOS4210_USB2
 -      bool "Support for Exynos 4210"
 +config PHY_S5PV210_USB2
 +      bool "Support for S5PV210"
        depends on PHY_SAMSUNG_USB2
 -      depends on CPU_EXYNOS4210
 +      depends on ARCH_S5PV210
        help
 -        Enable USB PHY support for Exynos 4210. This option requires that
 -        Samsung USB 2.0 PHY driver is enabled and means that support for this
 -        particular SoC is compiled in the driver. In case of Exynos 4210 four
 -        phys are available - device, host, HSIC0 and HSIC1.
 +        Enable USB PHY support for S5PV210. This option requires that Samsung
 +        USB 2.0 PHY driver is enabled and means that support for this
 +        particular SoC is compiled in the driver. In case of S5PV210 two phys
 +        are available - device and host.
 +
 +config PHY_EXYNOS4210_USB2
 +      bool
 +      depends on PHY_SAMSUNG_USB2
 +      default CPU_EXYNOS4210
  
  config PHY_EXYNOS4X12_USB2
 -      bool "Support for Exynos 4x12"
 +      bool
        depends on PHY_SAMSUNG_USB2
 -      depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412)
 -      help
 -        Enable USB PHY support for Exynos 4x12. This option requires that
 -        Samsung USB 2.0 PHY driver is enabled and means that support for this
 -        particular SoC is compiled in the driver. In case of Exynos 4x12 four
 -        phys are available - device, host, HSIC0 and HSIC1.
 +      default SOC_EXYNOS3250 || SOC_EXYNOS4212 || SOC_EXYNOS4412
  
  config PHY_EXYNOS5250_USB2
 -      bool "Support for Exynos 5250"
 +      bool
        depends on PHY_SAMSUNG_USB2
 -      depends on SOC_EXYNOS5250
 -      help
 -        Enable USB PHY support for Exynos 5250. This option requires that
 -        Samsung USB 2.0 PHY driver is enabled and means that support for this
 -        particular SoC is compiled in the driver. In case of Exynos 5250 four
 -        phys are available - device, host, HSIC0 and HSIC.
 +      default SOC_EXYNOS5250 || SOC_EXYNOS5420
  
  config PHY_EXYNOS5_USBDRD
        tristate "Exynos5 SoC series USB DRD PHY driver"
        depends on ARCH_EXYNOS5 && OF
        depends on HAS_IOMEM
 +      depends on USB_DWC3_EXYNOS
        select GENERIC_PHY
        select MFD_SYSCON
 +      default y
        help
          Enable USB DRD PHY support for Exynos 5 SoC series.
          This driver provides PHY interface for USB 3.0 DRD controller
          present on Exynos5 SoC series.
  
--config PHY_XGENE
--      tristate "APM X-Gene 15Gbps PHY support"
--      depends on HAS_IOMEM && OF && (ARM64 || COMPILE_TEST)
-       select GENERIC_PHY
-       help
-         This option enables support for APM X-Gene SoC multi-purpose PHY.
 +config PHY_QCOM_APQ8064_SATA
 +      tristate "Qualcomm APQ8064 SATA SerDes/PHY driver"
 +      depends on ARCH_QCOM
 +      depends on HAS_IOMEM
 +      depends on OF
 +      select GENERIC_PHY
 +
 +config PHY_QCOM_IPQ806X_SATA
 +      tristate "Qualcomm IPQ806x SATA SerDes/PHY driver"
 +      depends on ARCH_QCOM
 +      depends on HAS_IOMEM
 +      depends on OF
        select GENERIC_PHY
 -      help
 -        This option enables support for APM X-Gene SoC multi-purpose PHY.
  
+ config PHY_ST_SPEAR1310_MIPHY
+       tristate "ST SPEAR1310-MIPHY driver"
+       select GENERIC_PHY
+       help
+         Support for ST SPEAr1310 MIPHY which can be used for PCIe and SATA.
+ config PHY_ST_SPEAR1340_MIPHY
+       tristate "ST SPEAR1340-MIPHY driver"
+       select GENERIC_PHY
+       help
+         Support for ST SPEAr1340 MIPHY which can be used for PCIe and SATA.
++config PHY_XGENE
++      tristate "APM X-Gene 15Gbps PHY support"
++      depends on HAS_IOMEM && OF && (ARM64 || COMPILE_TEST)
++      select GENERIC_PHY
++      help
++        This option enables support for APM X-Gene SoC multi-purpose PHY.
++
  endmenu
diff --combined drivers/phy/Makefile
@@@ -3,26 -3,22 +3,28 @@@
  #
  
  obj-$(CONFIG_GENERIC_PHY)             += phy-core.o
 +obj-$(CONFIG_PHY_BERLIN_SATA)         += phy-berlin-sata.o
  obj-$(CONFIG_BCM_KONA_USB2_PHY)               += phy-bcm-kona-usb2.o
  obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO)     += phy-exynos-dp-video.o
  obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO)   += phy-exynos-mipi-video.o
  obj-$(CONFIG_PHY_MVEBU_SATA)          += phy-mvebu-sata.o
 +obj-$(CONFIG_PHY_MIPHY365X)           += phy-miphy365x.o
  obj-$(CONFIG_OMAP_CONTROL_PHY)                += phy-omap-control.o
  obj-$(CONFIG_OMAP_USB2)                       += phy-omap-usb2.o
  obj-$(CONFIG_TI_PIPE3)                        += phy-ti-pipe3.o
  obj-$(CONFIG_TWL4030_USB)             += phy-twl4030-usb.o
  obj-$(CONFIG_PHY_EXYNOS5250_SATA)     += phy-exynos5250-sata.o
 +obj-$(CONFIG_PHY_HIX5HD2_SATA)                += phy-hix5hd2-sata.o
  obj-$(CONFIG_PHY_SUN4I_USB)           += phy-sun4i-usb.o
  obj-$(CONFIG_PHY_SAMSUNG_USB2)                += phy-exynos-usb2.o
  phy-exynos-usb2-y                     += phy-samsung-usb2.o
  phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o
  phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o
  phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o
 +phy-exynos-usb2-$(CONFIG_PHY_S5PV210_USB2)    += phy-s5pv210-usb2.o
  obj-$(CONFIG_PHY_EXYNOS5_USBDRD)      += phy-exynos5-usbdrd.o
--obj-$(CONFIG_PHY_XGENE)                       += phy-xgene.o
 +obj-$(CONFIG_PHY_QCOM_APQ8064_SATA)   += phy-qcom-apq8064-sata.o
 +obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA)   += phy-qcom-ipq806x-sata.o
+ obj-$(CONFIG_PHY_ST_SPEAR1310_MIPHY)  += phy-spear1310-miphy.o
+ obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY)  += phy-spear1340-miphy.o
++obj-$(CONFIG_PHY_XGENE)                       += phy-xgene.o
index 0000000,c58c869..6dcbfcd
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,274 +1,274 @@@
 -      priv->phy = devm_phy_create(dev, &spear1310_miphy_ops, NULL);
+ /*
+  * ST SPEAr1310-miphy driver
+  *
+  * Copyright (C) 2014 ST Microelectronics
+  * Pratyush Anand <pratyush.anand@st.com>
+  * Mohit Kumar <mohit.kumar@st.com>
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  *
+  */
+ #include <linux/bitops.h>
+ #include <linux/delay.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/kernel.h>
+ #include <linux/mfd/syscon.h>
+ #include <linux/module.h>
+ #include <linux/of_device.h>
+ #include <linux/phy/phy.h>
+ #include <linux/regmap.h>
+ /* SPEAr1310 Registers */
+ #define SPEAR1310_PCIE_SATA_CFG                       0x3A4
+       #define SPEAR1310_PCIE_SATA2_SEL_PCIE           (0 << 31)
+       #define SPEAR1310_PCIE_SATA1_SEL_PCIE           (0 << 30)
+       #define SPEAR1310_PCIE_SATA0_SEL_PCIE           (0 << 29)
+       #define SPEAR1310_PCIE_SATA2_SEL_SATA           BIT(31)
+       #define SPEAR1310_PCIE_SATA1_SEL_SATA           BIT(30)
+       #define SPEAR1310_PCIE_SATA0_SEL_SATA           BIT(29)
+       #define SPEAR1310_SATA2_CFG_TX_CLK_EN           BIT(27)
+       #define SPEAR1310_SATA2_CFG_RX_CLK_EN           BIT(26)
+       #define SPEAR1310_SATA2_CFG_POWERUP_RESET       BIT(25)
+       #define SPEAR1310_SATA2_CFG_PM_CLK_EN           BIT(24)
+       #define SPEAR1310_SATA1_CFG_TX_CLK_EN           BIT(23)
+       #define SPEAR1310_SATA1_CFG_RX_CLK_EN           BIT(22)
+       #define SPEAR1310_SATA1_CFG_POWERUP_RESET       BIT(21)
+       #define SPEAR1310_SATA1_CFG_PM_CLK_EN           BIT(20)
+       #define SPEAR1310_SATA0_CFG_TX_CLK_EN           BIT(19)
+       #define SPEAR1310_SATA0_CFG_RX_CLK_EN           BIT(18)
+       #define SPEAR1310_SATA0_CFG_POWERUP_RESET       BIT(17)
+       #define SPEAR1310_SATA0_CFG_PM_CLK_EN           BIT(16)
+       #define SPEAR1310_PCIE2_CFG_DEVICE_PRESENT      BIT(11)
+       #define SPEAR1310_PCIE2_CFG_POWERUP_RESET       BIT(10)
+       #define SPEAR1310_PCIE2_CFG_CORE_CLK_EN         BIT(9)
+       #define SPEAR1310_PCIE2_CFG_AUX_CLK_EN          BIT(8)
+       #define SPEAR1310_PCIE1_CFG_DEVICE_PRESENT      BIT(7)
+       #define SPEAR1310_PCIE1_CFG_POWERUP_RESET       BIT(6)
+       #define SPEAR1310_PCIE1_CFG_CORE_CLK_EN         BIT(5)
+       #define SPEAR1310_PCIE1_CFG_AUX_CLK_EN          BIT(4)
+       #define SPEAR1310_PCIE0_CFG_DEVICE_PRESENT      BIT(3)
+       #define SPEAR1310_PCIE0_CFG_POWERUP_RESET       BIT(2)
+       #define SPEAR1310_PCIE0_CFG_CORE_CLK_EN         BIT(1)
+       #define SPEAR1310_PCIE0_CFG_AUX_CLK_EN          BIT(0)
+       #define SPEAR1310_PCIE_CFG_MASK(x) ((0xF << (x * 4)) | BIT((x + 29)))
+       #define SPEAR1310_SATA_CFG_MASK(x) ((0xF << (x * 4 + 16)) | \
+                       BIT((x + 29)))
+       #define SPEAR1310_PCIE_CFG_VAL(x) \
+                       (SPEAR1310_PCIE_SATA##x##_SEL_PCIE | \
+                       SPEAR1310_PCIE##x##_CFG_AUX_CLK_EN | \
+                       SPEAR1310_PCIE##x##_CFG_CORE_CLK_EN | \
+                       SPEAR1310_PCIE##x##_CFG_POWERUP_RESET | \
+                       SPEAR1310_PCIE##x##_CFG_DEVICE_PRESENT)
+       #define SPEAR1310_SATA_CFG_VAL(x) \
+                       (SPEAR1310_PCIE_SATA##x##_SEL_SATA | \
+                       SPEAR1310_SATA##x##_CFG_PM_CLK_EN | \
+                       SPEAR1310_SATA##x##_CFG_POWERUP_RESET | \
+                       SPEAR1310_SATA##x##_CFG_RX_CLK_EN | \
+                       SPEAR1310_SATA##x##_CFG_TX_CLK_EN)
+ #define SPEAR1310_PCIE_MIPHY_CFG_1            0x3A8
+       #define SPEAR1310_MIPHY_DUAL_OSC_BYPASS_EXT     BIT(31)
+       #define SPEAR1310_MIPHY_DUAL_CLK_REF_DIV2       BIT(28)
+       #define SPEAR1310_MIPHY_DUAL_PLL_RATIO_TOP(x)   (x << 16)
+       #define SPEAR1310_MIPHY_SINGLE_OSC_BYPASS_EXT   BIT(15)
+       #define SPEAR1310_MIPHY_SINGLE_CLK_REF_DIV2     BIT(12)
+       #define SPEAR1310_MIPHY_SINGLE_PLL_RATIO_TOP(x) (x << 0)
+       #define SPEAR1310_PCIE_SATA_MIPHY_CFG_SATA_MASK (0xFFFF)
+       #define SPEAR1310_PCIE_SATA_MIPHY_CFG_PCIE_MASK (0xFFFF << 16)
+       #define SPEAR1310_PCIE_SATA_MIPHY_CFG_SATA \
+                       (SPEAR1310_MIPHY_DUAL_OSC_BYPASS_EXT | \
+                       SPEAR1310_MIPHY_DUAL_CLK_REF_DIV2 | \
+                       SPEAR1310_MIPHY_DUAL_PLL_RATIO_TOP(60) | \
+                       SPEAR1310_MIPHY_SINGLE_OSC_BYPASS_EXT | \
+                       SPEAR1310_MIPHY_SINGLE_CLK_REF_DIV2 | \
+                       SPEAR1310_MIPHY_SINGLE_PLL_RATIO_TOP(60))
+       #define SPEAR1310_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK \
+                       (SPEAR1310_MIPHY_SINGLE_PLL_RATIO_TOP(120))
+       #define SPEAR1310_PCIE_SATA_MIPHY_CFG_PCIE \
+                       (SPEAR1310_MIPHY_DUAL_OSC_BYPASS_EXT | \
+                       SPEAR1310_MIPHY_DUAL_PLL_RATIO_TOP(25) | \
+                       SPEAR1310_MIPHY_SINGLE_OSC_BYPASS_EXT | \
+                       SPEAR1310_MIPHY_SINGLE_PLL_RATIO_TOP(25))
+ #define SPEAR1310_PCIE_MIPHY_CFG_2            0x3AC
+ enum spear1310_miphy_mode {
+       SATA,
+       PCIE,
+ };
+ struct spear1310_miphy_priv {
+       /* instance id of this phy */
+       u32                             id;
+       /* phy mode: 0 for SATA 1 for PCIe */
+       enum spear1310_miphy_mode       mode;
+       /* regmap for any soc specific misc registers */
+       struct regmap                   *misc;
+       /* phy struct pointer */
+       struct phy                      *phy;
+ };
+ static int spear1310_miphy_pcie_init(struct spear1310_miphy_priv *priv)
+ {
+       u32 val;
+       regmap_update_bits(priv->misc, SPEAR1310_PCIE_MIPHY_CFG_1,
+                          SPEAR1310_PCIE_SATA_MIPHY_CFG_PCIE_MASK,
+                          SPEAR1310_PCIE_SATA_MIPHY_CFG_PCIE);
+       switch (priv->id) {
+       case 0:
+               val = SPEAR1310_PCIE_CFG_VAL(0);
+               break;
+       case 1:
+               val = SPEAR1310_PCIE_CFG_VAL(1);
+               break;
+       case 2:
+               val = SPEAR1310_PCIE_CFG_VAL(2);
+               break;
+       default:
+               return -EINVAL;
+       }
+       regmap_update_bits(priv->misc, SPEAR1310_PCIE_SATA_CFG,
+                          SPEAR1310_PCIE_CFG_MASK(priv->id), val);
+       return 0;
+ }
+ static int spear1310_miphy_pcie_exit(struct spear1310_miphy_priv *priv)
+ {
+       regmap_update_bits(priv->misc, SPEAR1310_PCIE_SATA_CFG,
+                          SPEAR1310_PCIE_CFG_MASK(priv->id), 0);
+       regmap_update_bits(priv->misc, SPEAR1310_PCIE_MIPHY_CFG_1,
+                          SPEAR1310_PCIE_SATA_MIPHY_CFG_PCIE_MASK, 0);
+       return 0;
+ }
+ static int spear1310_miphy_init(struct phy *phy)
+ {
+       struct spear1310_miphy_priv *priv = phy_get_drvdata(phy);
+       int ret = 0;
+       if (priv->mode == PCIE)
+               ret = spear1310_miphy_pcie_init(priv);
+       return ret;
+ }
+ static int spear1310_miphy_exit(struct phy *phy)
+ {
+       struct spear1310_miphy_priv *priv = phy_get_drvdata(phy);
+       int ret = 0;
+       if (priv->mode == PCIE)
+               ret = spear1310_miphy_pcie_exit(priv);
+       return ret;
+ }
+ static const struct of_device_id spear1310_miphy_of_match[] = {
+       { .compatible = "st,spear1310-miphy" },
+       { },
+ };
+ MODULE_DEVICE_TABLE(of, spear1310_miphy_of_match);
+ static struct phy_ops spear1310_miphy_ops = {
+       .init = spear1310_miphy_init,
+       .exit = spear1310_miphy_exit,
+       .owner = THIS_MODULE,
+ };
+ static struct phy *spear1310_miphy_xlate(struct device *dev,
+                                        struct of_phandle_args *args)
+ {
+       struct spear1310_miphy_priv *priv = dev_get_drvdata(dev);
+       if (args->args_count < 1) {
+               dev_err(dev, "DT did not pass correct no of args\n");
+               return NULL;
+       }
+       priv->mode = args->args[0];
+       if (priv->mode != SATA && priv->mode != PCIE) {
+               dev_err(dev, "DT did not pass correct phy mode\n");
+               return NULL;
+       }
+       return priv->phy;
+ }
+ static int spear1310_miphy_probe(struct platform_device *pdev)
+ {
+       struct device *dev = &pdev->dev;
+       struct spear1310_miphy_priv *priv;
+       struct phy_provider *phy_provider;
+       priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+       if (!priv) {
+               dev_err(dev, "can't alloc spear1310_miphy private date memory\n");
+               return -ENOMEM;
+       }
+       priv->misc =
+               syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
+       if (IS_ERR(priv->misc)) {
+               dev_err(dev, "failed to find misc regmap\n");
+               return PTR_ERR(priv->misc);
+       }
+       if (of_property_read_u32(dev->of_node, "phy-id", &priv->id)) {
+               dev_err(dev, "failed to find phy id\n");
+               return -EINVAL;
+       }
++      priv->phy = devm_phy_create(dev, NULL, &spear1310_miphy_ops, NULL);
+       if (IS_ERR(priv->phy)) {
+               dev_err(dev, "failed to create SATA PCIe PHY\n");
+               return PTR_ERR(priv->phy);
+       }
+       dev_set_drvdata(dev, priv);
+       phy_set_drvdata(priv->phy, priv);
+       phy_provider =
+               devm_of_phy_provider_register(dev, spear1310_miphy_xlate);
+       if (IS_ERR(phy_provider)) {
+               dev_err(dev, "failed to register phy provider\n");
+               return PTR_ERR(phy_provider);
+       }
+       return 0;
+ }
+ static struct platform_driver spear1310_miphy_driver = {
+       .probe          = spear1310_miphy_probe,
+       .driver = {
+               .name = "spear1310-miphy",
+               .owner = THIS_MODULE,
+               .of_match_table = of_match_ptr(spear1310_miphy_of_match),
+       },
+ };
+ static int __init spear1310_miphy_phy_init(void)
+ {
+       return platform_driver_register(&spear1310_miphy_driver);
+ }
+ module_init(spear1310_miphy_phy_init);
+ static void __exit spear1310_miphy_phy_exit(void)
+ {
+       platform_driver_unregister(&spear1310_miphy_driver);
+ }
+ module_exit(spear1310_miphy_phy_exit);
+ MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver");
+ MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");
+ MODULE_LICENSE("GPL v2");
index 0000000,8de98ad..7135ba2
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,307 +1,307 @@@
 -      priv->phy = devm_phy_create(dev, &spear1340_miphy_ops, NULL);
+ /*
+  * ST spear1340-miphy driver
+  *
+  * Copyright (C) 2014 ST Microelectronics
+  * Pratyush Anand <pratyush.anand@st.com>
+  * Mohit Kumar <mohit.kumar@st.com>
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  *
+  */
+ #include <linux/bitops.h>
+ #include <linux/delay.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/kernel.h>
+ #include <linux/mfd/syscon.h>
+ #include <linux/module.h>
+ #include <linux/of_device.h>
+ #include <linux/phy/phy.h>
+ #include <linux/regmap.h>
+ /* SPEAr1340 Registers */
+ /* Power Management Registers */
+ #define SPEAR1340_PCM_CFG                     0x100
+       #define SPEAR1340_PCM_CFG_SATA_POWER_EN         BIT(11)
+ #define SPEAR1340_PCM_WKUP_CFG                        0x104
+ #define SPEAR1340_SWITCH_CTR                  0x108
+ #define SPEAR1340_PERIP1_SW_RST                       0x318
+       #define SPEAR1340_PERIP1_SW_RSATA               BIT(12)
+ #define SPEAR1340_PERIP2_SW_RST                       0x31C
+ #define SPEAR1340_PERIP3_SW_RST                       0x320
+ /* PCIE - SATA configuration registers */
+ #define SPEAR1340_PCIE_SATA_CFG                       0x424
+       /* PCIE CFG MASks */
+       #define SPEAR1340_PCIE_CFG_DEVICE_PRESENT       BIT(11)
+       #define SPEAR1340_PCIE_CFG_POWERUP_RESET        BIT(10)
+       #define SPEAR1340_PCIE_CFG_CORE_CLK_EN          BIT(9)
+       #define SPEAR1340_PCIE_CFG_AUX_CLK_EN           BIT(8)
+       #define SPEAR1340_SATA_CFG_TX_CLK_EN            BIT(4)
+       #define SPEAR1340_SATA_CFG_RX_CLK_EN            BIT(3)
+       #define SPEAR1340_SATA_CFG_POWERUP_RESET        BIT(2)
+       #define SPEAR1340_SATA_CFG_PM_CLK_EN            BIT(1)
+       #define SPEAR1340_PCIE_SATA_SEL_PCIE            (0)
+       #define SPEAR1340_PCIE_SATA_SEL_SATA            (1)
+       #define SPEAR1340_PCIE_SATA_CFG_MASK            0xF1F
+       #define SPEAR1340_PCIE_CFG_VAL  (SPEAR1340_PCIE_SATA_SEL_PCIE | \
+                       SPEAR1340_PCIE_CFG_AUX_CLK_EN | \
+                       SPEAR1340_PCIE_CFG_CORE_CLK_EN | \
+                       SPEAR1340_PCIE_CFG_POWERUP_RESET | \
+                       SPEAR1340_PCIE_CFG_DEVICE_PRESENT)
+       #define SPEAR1340_SATA_CFG_VAL  (SPEAR1340_PCIE_SATA_SEL_SATA | \
+                       SPEAR1340_SATA_CFG_PM_CLK_EN | \
+                       SPEAR1340_SATA_CFG_POWERUP_RESET | \
+                       SPEAR1340_SATA_CFG_RX_CLK_EN | \
+                       SPEAR1340_SATA_CFG_TX_CLK_EN)
+ #define SPEAR1340_PCIE_MIPHY_CFG              0x428
+       #define SPEAR1340_MIPHY_OSC_BYPASS_EXT          BIT(31)
+       #define SPEAR1340_MIPHY_CLK_REF_DIV2            BIT(27)
+       #define SPEAR1340_MIPHY_CLK_REF_DIV4            (2 << 27)
+       #define SPEAR1340_MIPHY_CLK_REF_DIV8            (3 << 27)
+       #define SPEAR1340_MIPHY_PLL_RATIO_TOP(x)        (x << 0)
+       #define SPEAR1340_PCIE_MIPHY_CFG_MASK           0xF80000FF
+       #define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA \
+                       (SPEAR1340_MIPHY_OSC_BYPASS_EXT | \
+                       SPEAR1340_MIPHY_CLK_REF_DIV2 | \
+                       SPEAR1340_MIPHY_PLL_RATIO_TOP(60))
+       #define SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK \
+                       (SPEAR1340_MIPHY_PLL_RATIO_TOP(120))
+       #define SPEAR1340_PCIE_SATA_MIPHY_CFG_PCIE \
+                       (SPEAR1340_MIPHY_OSC_BYPASS_EXT | \
+                       SPEAR1340_MIPHY_PLL_RATIO_TOP(25))
+ enum spear1340_miphy_mode {
+       SATA,
+       PCIE,
+ };
+ struct spear1340_miphy_priv {
+       /* phy mode: 0 for SATA 1 for PCIe */
+       enum spear1340_miphy_mode       mode;
+       /* regmap for any soc specific misc registers */
+       struct regmap                   *misc;
+       /* phy struct pointer */
+       struct phy                      *phy;
+ };
+ static int spear1340_miphy_sata_init(struct spear1340_miphy_priv *priv)
+ {
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG,
+                          SPEAR1340_PCIE_SATA_CFG_MASK,
+                          SPEAR1340_SATA_CFG_VAL);
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG,
+                          SPEAR1340_PCIE_MIPHY_CFG_MASK,
+                          SPEAR1340_PCIE_SATA_MIPHY_CFG_SATA_25M_CRYSTAL_CLK);
+       /* Switch on sata power domain */
+       regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG,
+                          SPEAR1340_PCM_CFG_SATA_POWER_EN,
+                          SPEAR1340_PCM_CFG_SATA_POWER_EN);
+       /* Wait for SATA power domain on */
+       msleep(20);
+       /* Disable PCIE SATA Controller reset */
+       regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST,
+                          SPEAR1340_PERIP1_SW_RSATA, 0);
+       /* Wait for SATA reset de-assert completion */
+       msleep(20);
+       return 0;
+ }
+ static int spear1340_miphy_sata_exit(struct spear1340_miphy_priv *priv)
+ {
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG,
+                          SPEAR1340_PCIE_SATA_CFG_MASK, 0);
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG,
+                          SPEAR1340_PCIE_MIPHY_CFG_MASK, 0);
+       /* Enable PCIE SATA Controller reset */
+       regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST,
+                          SPEAR1340_PERIP1_SW_RSATA,
+                          SPEAR1340_PERIP1_SW_RSATA);
+       /* Wait for SATA power domain off */
+       msleep(20);
+       /* Switch off sata power domain */
+       regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG,
+                          SPEAR1340_PCM_CFG_SATA_POWER_EN, 0);
+       /* Wait for SATA reset assert completion */
+       msleep(20);
+       return 0;
+ }
+ static int spear1340_miphy_pcie_init(struct spear1340_miphy_priv *priv)
+ {
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG,
+                          SPEAR1340_PCIE_MIPHY_CFG_MASK,
+                          SPEAR1340_PCIE_SATA_MIPHY_CFG_PCIE);
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG,
+                          SPEAR1340_PCIE_SATA_CFG_MASK,
+                          SPEAR1340_PCIE_CFG_VAL);
+       return 0;
+ }
+ static int spear1340_miphy_pcie_exit(struct spear1340_miphy_priv *priv)
+ {
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG,
+                          SPEAR1340_PCIE_MIPHY_CFG_MASK, 0);
+       regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG,
+                          SPEAR1340_PCIE_SATA_CFG_MASK, 0);
+       return 0;
+ }
+ static int spear1340_miphy_init(struct phy *phy)
+ {
+       struct spear1340_miphy_priv *priv = phy_get_drvdata(phy);
+       int ret = 0;
+       if (priv->mode == SATA)
+               ret = spear1340_miphy_sata_init(priv);
+       else if (priv->mode == PCIE)
+               ret = spear1340_miphy_pcie_init(priv);
+       return ret;
+ }
+ static int spear1340_miphy_exit(struct phy *phy)
+ {
+       struct spear1340_miphy_priv *priv = phy_get_drvdata(phy);
+       int ret = 0;
+       if (priv->mode == SATA)
+               ret = spear1340_miphy_sata_exit(priv);
+       else if (priv->mode == PCIE)
+               ret = spear1340_miphy_pcie_exit(priv);
+       return ret;
+ }
+ static const struct of_device_id spear1340_miphy_of_match[] = {
+       { .compatible = "st,spear1340-miphy" },
+       { },
+ };
+ MODULE_DEVICE_TABLE(of, spear1340_miphy_of_match);
+ static struct phy_ops spear1340_miphy_ops = {
+       .init = spear1340_miphy_init,
+       .exit = spear1340_miphy_exit,
+       .owner = THIS_MODULE,
+ };
+ #ifdef CONFIG_PM_SLEEP
+ static int spear1340_miphy_suspend(struct device *dev)
+ {
+       struct spear1340_miphy_priv *priv = dev_get_drvdata(dev);
+       int ret = 0;
+       if (priv->mode == SATA)
+               ret = spear1340_miphy_sata_exit(priv);
+       return ret;
+ }
+ static int spear1340_miphy_resume(struct device *dev)
+ {
+       struct spear1340_miphy_priv *priv = dev_get_drvdata(dev);
+       int ret = 0;
+       if (priv->mode == SATA)
+               ret = spear1340_miphy_sata_init(priv);
+       return ret;
+ }
+ #endif
+ static SIMPLE_DEV_PM_OPS(spear1340_miphy_pm_ops, spear1340_miphy_suspend,
+                        spear1340_miphy_resume);
+ static struct phy *spear1340_miphy_xlate(struct device *dev,
+                                        struct of_phandle_args *args)
+ {
+       struct spear1340_miphy_priv *priv = dev_get_drvdata(dev);
+       if (args->args_count < 1) {
+               dev_err(dev, "DT did not pass correct no of args\n");
+               return NULL;
+       }
+       priv->mode = args->args[0];
+       if (priv->mode != SATA && priv->mode != PCIE) {
+               dev_err(dev, "DT did not pass correct phy mode\n");
+               return NULL;
+       }
+       return priv->phy;
+ }
+ static int spear1340_miphy_probe(struct platform_device *pdev)
+ {
+       struct device *dev = &pdev->dev;
+       struct spear1340_miphy_priv *priv;
+       struct phy_provider *phy_provider;
+       priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+       if (!priv) {
+               dev_err(dev, "can't alloc spear1340_miphy private date memory\n");
+               return -ENOMEM;
+       }
+       priv->misc =
+               syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
+       if (IS_ERR(priv->misc)) {
+               dev_err(dev, "failed to find misc regmap\n");
+               return PTR_ERR(priv->misc);
+       }
++      priv->phy = devm_phy_create(dev, NULL, &spear1340_miphy_ops, NULL);
+       if (IS_ERR(priv->phy)) {
+               dev_err(dev, "failed to create SATA PCIe PHY\n");
+               return PTR_ERR(priv->phy);
+       }
+       dev_set_drvdata(dev, priv);
+       phy_set_drvdata(priv->phy, priv);
+       phy_provider =
+               devm_of_phy_provider_register(dev, spear1340_miphy_xlate);
+       if (IS_ERR(phy_provider)) {
+               dev_err(dev, "failed to register phy provider\n");
+               return PTR_ERR(phy_provider);
+       }
+       return 0;
+ }
+ static struct platform_driver spear1340_miphy_driver = {
+       .probe          = spear1340_miphy_probe,
+       .driver = {
+               .name = "spear1340-miphy",
+               .owner = THIS_MODULE,
+               .pm = &spear1340_miphy_pm_ops,
+               .of_match_table = of_match_ptr(spear1340_miphy_of_match),
+       },
+ };
+ static int __init spear1340_miphy_phy_init(void)
+ {
+       return platform_driver_register(&spear1340_miphy_driver);
+ }
+ module_init(spear1340_miphy_phy_init);
+ static void __exit spear1340_miphy_phy_exit(void)
+ {
+       platform_driver_unregister(&spear1340_miphy_driver);
+ }
+ module_exit(spear1340_miphy_phy_exit);
+ MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");
+ MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");
+ MODULE_LICENSE("GPL v2");
index 4a7daf5,0000000..a066204
mode 100644,000000..100644
--- /dev/null
@@@ -1,973 -1,0 +1,973 @@@
-       phy = devm_phy_create(&pdev->dev, &pcie_phy_ops, NULL);
 +/*
 + * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
 + *
 + * This program is free software; you can redistribute it and/or modify it
 + * under the terms and conditions of the GNU General Public License,
 + * version 2, as published by the Free Software Foundation.
 + *
 + * This program is distributed in the hope it will be useful, but WITHOUT
 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 + * more details.
 + */
 +
 +#include <linux/delay.h>
 +#include <linux/io.h>
 +#include <linux/module.h>
 +#include <linux/of.h>
 +#include <linux/phy/phy.h>
 +#include <linux/pinctrl/pinctrl.h>
 +#include <linux/pinctrl/pinmux.h>
 +#include <linux/platform_device.h>
 +#include <linux/reset.h>
 +
 +#include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h>
 +
 +#include "core.h"
 +#include "pinctrl-utils.h"
 +
 +#define XUSB_PADCTL_ELPG_PROGRAM 0x01c
 +#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN (1 << 26)
 +#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY (1 << 25)
 +#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN (1 << 24)
 +
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1 0x040
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL0_LOCKDET (1 << 19)
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_REFCLK_SEL_MASK (0xf << 12)
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST (1 << 1)
 +
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2 0x044
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_REFCLKBUF_EN (1 << 6)
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_EN (1 << 5)
 +#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_SEL (1 << 4)
 +
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1 0x138
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET (1 << 27)
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE (1 << 24)
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD (1 << 3)
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST (1 << 1)
 +#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ (1 << 0)
 +
 +#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1 0x148
 +#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD (1 << 1)
 +#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ (1 << 0)
 +
 +struct tegra_xusb_padctl_function {
 +      const char *name;
 +      const char * const *groups;
 +      unsigned int num_groups;
 +};
 +
 +struct tegra_xusb_padctl_group {
 +      const unsigned int *funcs;
 +      unsigned int num_funcs;
 +};
 +
 +struct tegra_xusb_padctl_soc {
 +      const struct pinctrl_pin_desc *pins;
 +      unsigned int num_pins;
 +
 +      const struct tegra_xusb_padctl_function *functions;
 +      unsigned int num_functions;
 +
 +      const struct tegra_xusb_padctl_lane *lanes;
 +      unsigned int num_lanes;
 +};
 +
 +struct tegra_xusb_padctl_lane {
 +      const char *name;
 +
 +      unsigned int offset;
 +      unsigned int shift;
 +      unsigned int mask;
 +      unsigned int iddq;
 +
 +      const unsigned int *funcs;
 +      unsigned int num_funcs;
 +};
 +
 +struct tegra_xusb_padctl {
 +      struct device *dev;
 +      void __iomem *regs;
 +      struct mutex lock;
 +      struct reset_control *rst;
 +
 +      const struct tegra_xusb_padctl_soc *soc;
 +      struct pinctrl_dev *pinctrl;
 +      struct pinctrl_desc desc;
 +
 +      struct phy_provider *provider;
 +      struct phy *phys[2];
 +
 +      unsigned int enable;
 +};
 +
 +static inline void padctl_writel(struct tegra_xusb_padctl *padctl, u32 value,
 +                               unsigned long offset)
 +{
 +      writel(value, padctl->regs + offset);
 +}
 +
 +static inline u32 padctl_readl(struct tegra_xusb_padctl *padctl,
 +                             unsigned long offset)
 +{
 +      return readl(padctl->regs + offset);
 +}
 +
 +static int tegra_xusb_padctl_get_groups_count(struct pinctrl_dev *pinctrl)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +
 +      return padctl->soc->num_pins;
 +}
 +
 +static const char *tegra_xusb_padctl_get_group_name(struct pinctrl_dev *pinctrl,
 +                                                  unsigned int group)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +
 +      return padctl->soc->pins[group].name;
 +}
 +
 +enum tegra_xusb_padctl_param {
 +      TEGRA_XUSB_PADCTL_IDDQ,
 +};
 +
 +static const struct tegra_xusb_padctl_property {
 +      const char *name;
 +      enum tegra_xusb_padctl_param param;
 +} properties[] = {
 +      { "nvidia,iddq", TEGRA_XUSB_PADCTL_IDDQ },
 +};
 +
 +#define TEGRA_XUSB_PADCTL_PACK(param, value) ((param) << 16 | (value))
 +#define TEGRA_XUSB_PADCTL_UNPACK_PARAM(config) ((config) >> 16)
 +#define TEGRA_XUSB_PADCTL_UNPACK_VALUE(config) ((config) & 0xffff)
 +
 +static int tegra_xusb_padctl_parse_subnode(struct tegra_xusb_padctl *padctl,
 +                                         struct device_node *np,
 +                                         struct pinctrl_map **maps,
 +                                         unsigned int *reserved_maps,
 +                                         unsigned int *num_maps)
 +{
 +      unsigned int i, reserve = 0, num_configs = 0;
 +      unsigned long config, *configs = NULL;
 +      const char *function, *group;
 +      struct property *prop;
 +      int err = 0;
 +      u32 value;
 +
 +      err = of_property_read_string(np, "nvidia,function", &function);
 +      if (err < 0) {
 +              if (err != -EINVAL)
 +                      return err;
 +
 +              function = NULL;
 +      }
 +
 +      for (i = 0; i < ARRAY_SIZE(properties); i++) {
 +              err = of_property_read_u32(np, properties[i].name, &value);
 +              if (err < 0) {
 +                      if (err == -EINVAL)
 +                              continue;
 +
 +                      return err;
 +              }
 +
 +              config = TEGRA_XUSB_PADCTL_PACK(properties[i].param, value);
 +
 +              err = pinctrl_utils_add_config(padctl->pinctrl, &configs,
 +                                             &num_configs, config);
 +              if (err < 0)
 +                      return err;
 +      }
 +
 +      if (function)
 +              reserve++;
 +
 +      if (num_configs)
 +              reserve++;
 +
 +      err = of_property_count_strings(np, "nvidia,lanes");
 +      if (err < 0)
 +              return err;
 +
 +      reserve *= err;
 +
 +      err = pinctrl_utils_reserve_map(padctl->pinctrl, maps, reserved_maps,
 +                                      num_maps, reserve);
 +      if (err < 0)
 +              return err;
 +
 +      of_property_for_each_string(np, "nvidia,lanes", prop, group) {
 +              if (function) {
 +                      err = pinctrl_utils_add_map_mux(padctl->pinctrl, maps,
 +                                      reserved_maps, num_maps, group,
 +                                      function);
 +                      if (err < 0)
 +                              return err;
 +              }
 +
 +              if (num_configs) {
 +                      err = pinctrl_utils_add_map_configs(padctl->pinctrl,
 +                                      maps, reserved_maps, num_maps, group,
 +                                      configs, num_configs,
 +                                      PIN_MAP_TYPE_CONFIGS_GROUP);
 +                      if (err < 0)
 +                              return err;
 +              }
 +      }
 +
 +      return 0;
 +}
 +
 +static int tegra_xusb_padctl_dt_node_to_map(struct pinctrl_dev *pinctrl,
 +                                          struct device_node *parent,
 +                                          struct pinctrl_map **maps,
 +                                          unsigned int *num_maps)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +      unsigned int reserved_maps = 0;
 +      struct device_node *np;
 +      int err;
 +
 +      *num_maps = 0;
 +      *maps = NULL;
 +
 +      for_each_child_of_node(parent, np) {
 +              err = tegra_xusb_padctl_parse_subnode(padctl, np, maps,
 +                                                    &reserved_maps,
 +                                                    num_maps);
 +              if (err < 0)
 +                      return err;
 +      }
 +
 +      return 0;
 +}
 +
 +static const struct pinctrl_ops tegra_xusb_padctl_pinctrl_ops = {
 +      .get_groups_count = tegra_xusb_padctl_get_groups_count,
 +      .get_group_name = tegra_xusb_padctl_get_group_name,
 +      .dt_node_to_map = tegra_xusb_padctl_dt_node_to_map,
 +      .dt_free_map = pinctrl_utils_dt_free_map,
 +};
 +
 +static int tegra_xusb_padctl_get_functions_count(struct pinctrl_dev *pinctrl)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +
 +      return padctl->soc->num_functions;
 +}
 +
 +static const char *
 +tegra_xusb_padctl_get_function_name(struct pinctrl_dev *pinctrl,
 +                                  unsigned int function)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +
 +      return padctl->soc->functions[function].name;
 +}
 +
 +static int tegra_xusb_padctl_get_function_groups(struct pinctrl_dev *pinctrl,
 +                                               unsigned int function,
 +                                               const char * const **groups,
 +                                               unsigned * const num_groups)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +
 +      *num_groups = padctl->soc->functions[function].num_groups;
 +      *groups = padctl->soc->functions[function].groups;
 +
 +      return 0;
 +}
 +
 +static int tegra_xusb_padctl_pinmux_enable(struct pinctrl_dev *pinctrl,
 +                                         unsigned int function,
 +                                         unsigned int group)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +      const struct tegra_xusb_padctl_lane *lane;
 +      unsigned int i;
 +      u32 value;
 +
 +      lane = &padctl->soc->lanes[group];
 +
 +      for (i = 0; i < lane->num_funcs; i++)
 +              if (lane->funcs[i] == function)
 +                      break;
 +
 +      if (i >= lane->num_funcs)
 +              return -EINVAL;
 +
 +      value = padctl_readl(padctl, lane->offset);
 +      value &= ~(lane->mask << lane->shift);
 +      value |= i << lane->shift;
 +      padctl_writel(padctl, value, lane->offset);
 +
 +      return 0;
 +}
 +
 +static const struct pinmux_ops tegra_xusb_padctl_pinmux_ops = {
 +      .get_functions_count = tegra_xusb_padctl_get_functions_count,
 +      .get_function_name = tegra_xusb_padctl_get_function_name,
 +      .get_function_groups = tegra_xusb_padctl_get_function_groups,
 +      .enable = tegra_xusb_padctl_pinmux_enable,
 +};
 +
 +static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl,
 +                                             unsigned int group,
 +                                             unsigned long *config)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +      const struct tegra_xusb_padctl_lane *lane;
 +      enum tegra_xusb_padctl_param param;
 +      u32 value;
 +
 +      param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(*config);
 +      lane = &padctl->soc->lanes[group];
 +
 +      switch (param) {
 +      case TEGRA_XUSB_PADCTL_IDDQ:
 +              /* lanes with iddq == 0 don't support this parameter */
 +              if (lane->iddq == 0)
 +                      return -EINVAL;
 +
 +              value = padctl_readl(padctl, lane->offset);
 +
 +              if (value & BIT(lane->iddq))
 +                      value = 0;
 +              else
 +                      value = 1;
 +
 +              *config = TEGRA_XUSB_PADCTL_PACK(param, value);
 +              break;
 +
 +      default:
 +              dev_err(padctl->dev, "invalid configuration parameter: %04x\n",
 +                      param);
 +              return -ENOTSUPP;
 +      }
 +
 +      return 0;
 +}
 +
 +static int tegra_xusb_padctl_pinconf_group_set(struct pinctrl_dev *pinctrl,
 +                                             unsigned int group,
 +                                             unsigned long *configs,
 +                                             unsigned int num_configs)
 +{
 +      struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
 +      const struct tegra_xusb_padctl_lane *lane;
 +      enum tegra_xusb_padctl_param param;
 +      unsigned long value;
 +      unsigned int i;
 +      u32 regval;
 +
 +      lane = &padctl->soc->lanes[group];
 +
 +      for (i = 0; i < num_configs; i++) {
 +              param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(configs[i]);
 +              value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(configs[i]);
 +
 +              switch (param) {
 +              case TEGRA_XUSB_PADCTL_IDDQ:
 +                      /* lanes with iddq == 0 don't support this parameter */
 +                      if (lane->iddq == 0)
 +                              return -EINVAL;
 +
 +                      regval = padctl_readl(padctl, lane->offset);
 +
 +                      if (value)
 +                              regval &= ~BIT(lane->iddq);
 +                      else
 +                              regval |= BIT(lane->iddq);
 +
 +                      padctl_writel(padctl, regval, lane->offset);
 +                      break;
 +
 +              default:
 +                      dev_err(padctl->dev,
 +                              "invalid configuration parameter: %04x\n",
 +                              param);
 +                      return -ENOTSUPP;
 +              }
 +      }
 +
 +      return 0;
 +}
 +
 +#ifdef CONFIG_DEBUG_FS
 +static const char *strip_prefix(const char *s)
 +{
 +      const char *comma = strchr(s, ',');
 +      if (!comma)
 +              return s;
 +
 +      return comma + 1;
 +}
 +
 +static void
 +tegra_xusb_padctl_pinconf_group_dbg_show(struct pinctrl_dev *pinctrl,
 +                                       struct seq_file *s,
 +                                       unsigned int group)
 +{
 +      unsigned int i;
 +
 +      for (i = 0; i < ARRAY_SIZE(properties); i++) {
 +              unsigned long config, value;
 +              int err;
 +
 +              config = TEGRA_XUSB_PADCTL_PACK(properties[i].param, 0);
 +
 +              err = tegra_xusb_padctl_pinconf_group_get(pinctrl, group,
 +                                                        &config);
 +              if (err < 0)
 +                      continue;
 +
 +              value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(config);
 +
 +              seq_printf(s, "\n\t%s=%lu\n", strip_prefix(properties[i].name),
 +                         value);
 +      }
 +}
 +
 +static void
 +tegra_xusb_padctl_pinconf_config_dbg_show(struct pinctrl_dev *pinctrl,
 +                                        struct seq_file *s,
 +                                        unsigned long config)
 +{
 +      enum tegra_xusb_padctl_param param;
 +      const char *name = "unknown";
 +      unsigned long value;
 +      unsigned int i;
 +
 +      param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(config);
 +      value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(config);
 +
 +      for (i = 0; i < ARRAY_SIZE(properties); i++) {
 +              if (properties[i].param == param) {
 +                      name = properties[i].name;
 +                      break;
 +              }
 +      }
 +
 +      seq_printf(s, "%s=%lu", strip_prefix(name), value);
 +}
 +#endif
 +
 +static const struct pinconf_ops tegra_xusb_padctl_pinconf_ops = {
 +      .pin_config_group_get = tegra_xusb_padctl_pinconf_group_get,
 +      .pin_config_group_set = tegra_xusb_padctl_pinconf_group_set,
 +#ifdef CONFIG_DEBUG_FS
 +      .pin_config_group_dbg_show = tegra_xusb_padctl_pinconf_group_dbg_show,
 +      .pin_config_config_dbg_show = tegra_xusb_padctl_pinconf_config_dbg_show,
 +#endif
 +};
 +
 +static int tegra_xusb_padctl_enable(struct tegra_xusb_padctl *padctl)
 +{
 +      u32 value;
 +
 +      mutex_lock(&padctl->lock);
 +
 +      if (padctl->enable++ > 0)
 +              goto out;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +      usleep_range(100, 200);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +      usleep_range(100, 200);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +out:
 +      mutex_unlock(&padctl->lock);
 +      return 0;
 +}
 +
 +static int tegra_xusb_padctl_disable(struct tegra_xusb_padctl *padctl)
 +{
 +      u32 value;
 +
 +      mutex_lock(&padctl->lock);
 +
 +      if (WARN_ON(padctl->enable == 0))
 +              goto out;
 +
 +      if (--padctl->enable > 0)
 +              goto out;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +      usleep_range(100, 200);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +      usleep_range(100, 200);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
 +      value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN;
 +      padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
 +
 +out:
 +      mutex_unlock(&padctl->lock);
 +      return 0;
 +}
 +
 +static int tegra_xusb_phy_init(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +
 +      return tegra_xusb_padctl_enable(padctl);
 +}
 +
 +static int tegra_xusb_phy_exit(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +
 +      return tegra_xusb_padctl_disable(padctl);
 +}
 +
 +static int pcie_phy_power_on(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +      unsigned long timeout;
 +      int err = -ETIMEDOUT;
 +      u32 value;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_P0_CTL1_REFCLK_SEL_MASK;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL2);
 +      value |= XUSB_PADCTL_IOPHY_PLL_P0_CTL2_REFCLKBUF_EN |
 +               XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_EN |
 +               XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_SEL;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL2);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +      value |= XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +
 +      timeout = jiffies + msecs_to_jiffies(50);
 +
 +      while (time_before(jiffies, timeout)) {
 +              value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +              if (value & XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL0_LOCKDET) {
 +                      err = 0;
 +                      break;
 +              }
 +
 +              usleep_range(100, 200);
 +      }
 +
 +      return err;
 +}
 +
 +static int pcie_phy_power_off(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +      u32 value;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
 +
 +      return 0;
 +}
 +
 +static const struct phy_ops pcie_phy_ops = {
 +      .init = tegra_xusb_phy_init,
 +      .exit = tegra_xusb_phy_exit,
 +      .power_on = pcie_phy_power_on,
 +      .power_off = pcie_phy_power_off,
 +      .owner = THIS_MODULE,
 +};
 +
 +static int sata_phy_power_on(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +      unsigned long timeout;
 +      int err = -ETIMEDOUT;
 +      u32 value;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD;
 +      value &= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD;
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      timeout = jiffies + msecs_to_jiffies(50);
 +
 +      while (time_before(jiffies, timeout)) {
 +              value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +              if (value & XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET) {
 +                      err = 0;
 +                      break;
 +              }
 +
 +              usleep_range(100, 200);
 +      }
 +
 +      return err;
 +}
 +
 +static int sata_phy_power_off(struct phy *phy)
 +{
 +      struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
 +      u32 value;
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +      value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD;
 +      value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
 +
 +      value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
 +      value |= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD;
 +      value |= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ;
 +      padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
 +
 +      return 0;
 +}
 +
 +static const struct phy_ops sata_phy_ops = {
 +      .init = tegra_xusb_phy_init,
 +      .exit = tegra_xusb_phy_exit,
 +      .power_on = sata_phy_power_on,
 +      .power_off = sata_phy_power_off,
 +      .owner = THIS_MODULE,
 +};
 +
 +static struct phy *tegra_xusb_padctl_xlate(struct device *dev,
 +                                         struct of_phandle_args *args)
 +{
 +      struct tegra_xusb_padctl *padctl = dev_get_drvdata(dev);
 +      unsigned int index = args->args[0];
 +
 +      if (args->args_count <= 0)
 +              return ERR_PTR(-EINVAL);
 +
 +      if (index > ARRAY_SIZE(padctl->phys))
 +              return ERR_PTR(-EINVAL);
 +
 +      return padctl->phys[index];
 +}
 +
 +#define PIN_OTG_0   0
 +#define PIN_OTG_1   1
 +#define PIN_OTG_2   2
 +#define PIN_ULPI_0  3
 +#define PIN_HSIC_0  4
 +#define PIN_HSIC_1  5
 +#define PIN_PCIE_0  6
 +#define PIN_PCIE_1  7
 +#define PIN_PCIE_2  8
 +#define PIN_PCIE_3  9
 +#define PIN_PCIE_4 10
 +#define PIN_SATA_0 11
 +
 +static const struct pinctrl_pin_desc tegra124_pins[] = {
 +      PINCTRL_PIN(PIN_OTG_0,  "otg-0"),
 +      PINCTRL_PIN(PIN_OTG_1,  "otg-1"),
 +      PINCTRL_PIN(PIN_OTG_2,  "otg-2"),
 +      PINCTRL_PIN(PIN_ULPI_0, "ulpi-0"),
 +      PINCTRL_PIN(PIN_HSIC_0, "hsic-0"),
 +      PINCTRL_PIN(PIN_HSIC_1, "hsic-1"),
 +      PINCTRL_PIN(PIN_PCIE_0, "pcie-0"),
 +      PINCTRL_PIN(PIN_PCIE_1, "pcie-1"),
 +      PINCTRL_PIN(PIN_PCIE_2, "pcie-2"),
 +      PINCTRL_PIN(PIN_PCIE_3, "pcie-3"),
 +      PINCTRL_PIN(PIN_PCIE_4, "pcie-4"),
 +      PINCTRL_PIN(PIN_SATA_0, "sata-0"),
 +};
 +
 +static const char * const tegra124_snps_groups[] = {
 +      "otg-0",
 +      "otg-1",
 +      "otg-2",
 +      "ulpi-0",
 +      "hsic-0",
 +      "hsic-1",
 +};
 +
 +static const char * const tegra124_xusb_groups[] = {
 +      "otg-0",
 +      "otg-1",
 +      "otg-2",
 +      "ulpi-0",
 +      "hsic-0",
 +      "hsic-1",
 +};
 +
 +static const char * const tegra124_uart_groups[] = {
 +      "otg-0",
 +      "otg-1",
 +      "otg-2",
 +};
 +
 +static const char * const tegra124_pcie_groups[] = {
 +      "pcie-0",
 +      "pcie-1",
 +      "pcie-2",
 +      "pcie-3",
 +      "pcie-4",
 +      "sata-0",
 +};
 +
 +static const char * const tegra124_usb3_groups[] = {
 +      "pcie-0",
 +      "pcie-1",
 +      "pcie-2",
 +      "pcie-3",
 +      "pcie-4",
 +      "sata-0",
 +};
 +
 +static const char * const tegra124_sata_groups[] = {
 +      "pcie-0",
 +      "pcie-1",
 +      "pcie-2",
 +      "pcie-3",
 +      "pcie-4",
 +      "sata-0",
 +};
 +
 +static const char * const tegra124_rsvd_groups[] = {
 +      "otg-0",
 +      "otg-1",
 +      "otg-2",
 +      "pcie-0",
 +      "pcie-1",
 +      "pcie-2",
 +      "pcie-3",
 +      "pcie-4",
 +      "sata-0",
 +};
 +
 +#define TEGRA124_FUNCTION(_name)                                      \
 +      {                                                               \
 +              .name = #_name,                                         \
 +              .num_groups = ARRAY_SIZE(tegra124_##_name##_groups),    \
 +              .groups = tegra124_##_name##_groups,                    \
 +      }
 +
 +static struct tegra_xusb_padctl_function tegra124_functions[] = {
 +      TEGRA124_FUNCTION(snps),
 +      TEGRA124_FUNCTION(xusb),
 +      TEGRA124_FUNCTION(uart),
 +      TEGRA124_FUNCTION(pcie),
 +      TEGRA124_FUNCTION(usb3),
 +      TEGRA124_FUNCTION(sata),
 +      TEGRA124_FUNCTION(rsvd),
 +};
 +
 +enum tegra124_function {
 +      TEGRA124_FUNC_SNPS,
 +      TEGRA124_FUNC_XUSB,
 +      TEGRA124_FUNC_UART,
 +      TEGRA124_FUNC_PCIE,
 +      TEGRA124_FUNC_USB3,
 +      TEGRA124_FUNC_SATA,
 +      TEGRA124_FUNC_RSVD,
 +};
 +
 +static const unsigned int tegra124_otg_functions[] = {
 +      TEGRA124_FUNC_SNPS,
 +      TEGRA124_FUNC_XUSB,
 +      TEGRA124_FUNC_UART,
 +      TEGRA124_FUNC_RSVD,
 +};
 +
 +static const unsigned int tegra124_usb_functions[] = {
 +      TEGRA124_FUNC_SNPS,
 +      TEGRA124_FUNC_XUSB,
 +};
 +
 +static const unsigned int tegra124_pci_functions[] = {
 +      TEGRA124_FUNC_PCIE,
 +      TEGRA124_FUNC_USB3,
 +      TEGRA124_FUNC_SATA,
 +      TEGRA124_FUNC_RSVD,
 +};
 +
 +#define TEGRA124_LANE(_name, _offset, _shift, _mask, _iddq, _funcs)   \
 +      {                                                               \
 +              .name = _name,                                          \
 +              .offset = _offset,                                      \
 +              .shift = _shift,                                        \
 +              .mask = _mask,                                          \
 +              .iddq = _iddq,                                          \
 +              .num_funcs = ARRAY_SIZE(tegra124_##_funcs##_functions), \
 +              .funcs = tegra124_##_funcs##_functions,                 \
 +      }
 +
 +static const struct tegra_xusb_padctl_lane tegra124_lanes[] = {
 +      TEGRA124_LANE("otg-0",  0x004,  0, 0x3, 0, otg),
 +      TEGRA124_LANE("otg-1",  0x004,  2, 0x3, 0, otg),
 +      TEGRA124_LANE("otg-2",  0x004,  4, 0x3, 0, otg),
 +      TEGRA124_LANE("ulpi-0", 0x004, 12, 0x1, 0, usb),
 +      TEGRA124_LANE("hsic-0", 0x004, 14, 0x1, 0, usb),
 +      TEGRA124_LANE("hsic-1", 0x004, 15, 0x1, 0, usb),
 +      TEGRA124_LANE("pcie-0", 0x134, 16, 0x3, 1, pci),
 +      TEGRA124_LANE("pcie-1", 0x134, 18, 0x3, 2, pci),
 +      TEGRA124_LANE("pcie-2", 0x134, 20, 0x3, 3, pci),
 +      TEGRA124_LANE("pcie-3", 0x134, 22, 0x3, 4, pci),
 +      TEGRA124_LANE("pcie-4", 0x134, 24, 0x3, 5, pci),
 +      TEGRA124_LANE("sata-0", 0x134, 26, 0x3, 6, pci),
 +};
 +
 +static const struct tegra_xusb_padctl_soc tegra124_soc = {
 +      .num_pins = ARRAY_SIZE(tegra124_pins),
 +      .pins = tegra124_pins,
 +      .num_functions = ARRAY_SIZE(tegra124_functions),
 +      .functions = tegra124_functions,
 +      .num_lanes = ARRAY_SIZE(tegra124_lanes),
 +      .lanes = tegra124_lanes,
 +};
 +
 +static const struct of_device_id tegra_xusb_padctl_of_match[] = {
 +      { .compatible = "nvidia,tegra124-xusb-padctl", .data = &tegra124_soc },
 +      { }
 +};
 +MODULE_DEVICE_TABLE(of, tegra_xusb_padctl_of_match);
 +
 +static int tegra_xusb_padctl_probe(struct platform_device *pdev)
 +{
 +      struct tegra_xusb_padctl *padctl;
 +      const struct of_device_id *match;
 +      struct resource *res;
 +      struct phy *phy;
 +      int err;
 +
 +      padctl = devm_kzalloc(&pdev->dev, sizeof(*padctl), GFP_KERNEL);
 +      if (!padctl)
 +              return -ENOMEM;
 +
 +      platform_set_drvdata(pdev, padctl);
 +      mutex_init(&padctl->lock);
 +      padctl->dev = &pdev->dev;
 +
 +      match = of_match_node(tegra_xusb_padctl_of_match, pdev->dev.of_node);
 +      padctl->soc = match->data;
 +
 +      res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 +      padctl->regs = devm_ioremap_resource(&pdev->dev, res);
 +      if (IS_ERR(padctl->regs))
 +              return PTR_ERR(padctl->regs);
 +
 +      padctl->rst = devm_reset_control_get(&pdev->dev, NULL);
 +      if (IS_ERR(padctl->rst))
 +              return PTR_ERR(padctl->rst);
 +
 +      err = reset_control_deassert(padctl->rst);
 +      if (err < 0)
 +              return err;
 +
 +      memset(&padctl->desc, 0, sizeof(padctl->desc));
 +      padctl->desc.name = dev_name(padctl->dev);
 +      padctl->desc.pctlops = &tegra_xusb_padctl_pinctrl_ops;
 +      padctl->desc.pmxops = &tegra_xusb_padctl_pinmux_ops;
 +      padctl->desc.confops = &tegra_xusb_padctl_pinconf_ops;
 +      padctl->desc.owner = THIS_MODULE;
 +
 +      padctl->pinctrl = pinctrl_register(&padctl->desc, &pdev->dev, padctl);
 +      if (!padctl->pinctrl) {
 +              dev_err(&pdev->dev, "failed to register pincontrol\n");
 +              err = -ENODEV;
 +              goto reset;
 +      }
 +
-       phy = devm_phy_create(&pdev->dev, &sata_phy_ops, NULL);
++      phy = devm_phy_create(&pdev->dev, NULL, &pcie_phy_ops, NULL);
 +      if (IS_ERR(phy)) {
 +              err = PTR_ERR(phy);
 +              goto unregister;
 +      }
 +
 +      padctl->phys[TEGRA_XUSB_PADCTL_PCIE] = phy;
 +      phy_set_drvdata(phy, padctl);
 +
++      phy = devm_phy_create(&pdev->dev, NULL, &sata_phy_ops, NULL);
 +      if (IS_ERR(phy)) {
 +              err = PTR_ERR(phy);
 +              goto unregister;
 +      }
 +
 +      padctl->phys[TEGRA_XUSB_PADCTL_SATA] = phy;
 +      phy_set_drvdata(phy, padctl);
 +
 +      padctl->provider = devm_of_phy_provider_register(&pdev->dev,
 +                                                       tegra_xusb_padctl_xlate);
 +      if (err < 0) {
 +              dev_err(&pdev->dev, "failed to register PHYs: %d\n", err);
 +              goto unregister;
 +      }
 +
 +      return 0;
 +
 +unregister:
 +      pinctrl_unregister(padctl->pinctrl);
 +reset:
 +      reset_control_assert(padctl->rst);
 +      return err;
 +}
 +
 +static int tegra_xusb_padctl_remove(struct platform_device *pdev)
 +{
 +      struct tegra_xusb_padctl *padctl = platform_get_drvdata(pdev);
 +      int err;
 +
 +      pinctrl_unregister(padctl->pinctrl);
 +
 +      err = reset_control_assert(padctl->rst);
 +      if (err < 0)
 +              dev_err(&pdev->dev, "failed to assert reset: %d\n", err);
 +
 +      return err;
 +}
 +
 +static struct platform_driver tegra_xusb_padctl_driver = {
 +      .driver = {
 +              .name = "tegra-xusb-padctl",
 +              .of_match_table = tegra_xusb_padctl_of_match,
 +      },
 +      .probe = tegra_xusb_padctl_probe,
 +      .remove = tegra_xusb_padctl_remove,
 +};
 +module_platform_driver(tegra_xusb_padctl_driver);
 +
 +MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
 +MODULE_DESCRIPTION("Tegra 124 XUSB Pad Control driver");
 +MODULE_LICENSE("GPL v2");
@@@ -178,17 -178,6 +178,6 @@@ config BACKLIGHT_ATMEL_LCD
          If in doubt, it's safe to enable this option; it doesn't kick
          in unless the board's description says it's wired that way.
  
- config BACKLIGHT_ATMEL_PWM
-       tristate "Atmel PWM backlight control"
-       depends on ATMEL_PWM
-       help
-         Say Y here if you want to use the PWM peripheral in Atmel AT91 and
-         AVR32 devices. This driver will need additional platform data to know
-         which PWM instance to use and how to configure it.
-         To compile this driver as a module, choose M here: the module will be
-         called atmel-pwm-bl.
  config BACKLIGHT_EP93XX
        tristate "Cirrus EP93xx Backlight Driver"
        depends on FB_EP93XX
@@@ -207,15 -196,6 +196,15 @@@ config BACKLIGHT_GENERI
          known as the Corgi backlight driver. If you have a Sharp Zaurus
          SL-C7xx, SL-Cxx00 or SL-6000x say y.
  
 +config BACKLIGHT_IPAQ_MICRO
 +      tristate "iPAQ microcontroller backlight driver"
 +      depends on MFD_IPAQ_MICRO
 +      default y
 +      help
 +        Say y to enable the backlight driver for Compaq iPAQ handheld
 +        computers. Say yes if you have one of the h3100/h3600/h3700
 +        machines.
 +
  config BACKLIGHT_LM3533
        tristate "Backlight Driver for LM3533"
        depends on BACKLIGHT_CLASS_DEVICE
@@@ -25,7 -25,6 +25,6 @@@ obj-$(CONFIG_BACKLIGHT_ADP8860)               += adp
  obj-$(CONFIG_BACKLIGHT_ADP8870)               += adp8870_bl.o
  obj-$(CONFIG_BACKLIGHT_APPLE)         += apple_bl.o
  obj-$(CONFIG_BACKLIGHT_AS3711)                += as3711_bl.o
- obj-$(CONFIG_BACKLIGHT_ATMEL_PWM)     += atmel-pwm-bl.o
  obj-$(CONFIG_BACKLIGHT_BD6107)                += bd6107.o
  obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
  obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE)  += backlight.o
@@@ -36,7 -35,6 +35,7 @@@ obj-$(CONFIG_BACKLIGHT_GENERIC)               += gen
  obj-$(CONFIG_BACKLIGHT_GPIO)          += gpio_backlight.o
  obj-$(CONFIG_BACKLIGHT_HP680)         += hp680_bl.o
  obj-$(CONFIG_BACKLIGHT_HP700)         += jornada720_bl.o
 +obj-$(CONFIG_BACKLIGHT_IPAQ_MICRO)    += ipaq_micro_bl.o
  obj-$(CONFIG_BACKLIGHT_LM3533)                += lm3533_bl.o
  obj-$(CONFIG_BACKLIGHT_LM3630A)               += lm3630a_bl.o
  obj-$(CONFIG_BACKLIGHT_LM3639)                += lm3639_bl.o