]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'omap-gpmc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2014 00:57:56 +0000 (16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2014 00:57:56 +0000 (16:57 -0800)
Pull ARM SoC/OMAP GPMC driver cleanup and move from Arnd Bergmann:
 "The GPMC driver has traditionally been considered a part of the OMAP
  platform code and tightly interweaved with some of the boards.

  With this cleanup, it has finally come to the point where it makes
  sense to move it out of arch/arm into drivers/memory, where we already
  have other drivers for similar hardware.  The cleanups are still
  ongoing, with the goal of eventually having a standalone driver that
  does not require an interface to architecture code.

  This is a separate branch because of dependencies on multiple other
  branches, and to keep the drivers changes separate from the normal
  cleanups"

* tag 'omap-gpmc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  memory: gpmc: Move omap gpmc code to live under drivers
  ARM: OMAP2+: Move GPMC initcall to devices.c
  ARM: OMAP2+: Prepare to move GPMC to drivers by platform data header
  ARM: OMAP2+: Remove unnecesary include in GPMC driver
  ARM: OMAP2+: Drop board file for 3430sdp
  ARM: OMAP2+: Drop board file for ti8168evm
  ARM: OMAP2+: Drop legacy code for gpmc-smc91x.c
  ARM: OMAP2+: Require proper GPMC timings for devices
  ARM: OMAP2+: Show bootloader GPMC timings to allow configuring the .dts file
  ARM: OMAP2+: Fix support for multiple devices on a GPMC chip select
  ARM: OMAP2+: gpmc: Sanity check GPMC fck on probe
  ARM: OMAP2+: gpmc: Keep Chip Select disabled while configuring it
  ARM: OMAP2+: gpmc: Always enable A26-A11 for non NAND devices
  ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child()
  ARM: OMAP2+: gpmc: Print error message in set_gpmc_timing_reg()

1  2 
MAINTAINERS
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/devices.c
drivers/memory/Kconfig
drivers/memory/Makefile
drivers/memory/omap-gpmc.c

diff --combined MAINTAINERS
index e3a96e42193c90a6ab1356c10f6a7d0a39660ff6,66c0f2f7acf83d38a463f2fb481116d56289864a..0d6469a2cf708d66f7a2a050237c1f250d64f96f
@@@ -861,7 -861,6 +861,7 @@@ W: http://maxim.org.za/at91_26.htm
  W:    http://www.linux4sam.org
  S:    Supported
  F:    arch/arm/mach-at91/
 +F:    include/soc/at91/
  F:    arch/arm/boot/dts/at91*.dts
  F:    arch/arm/boot/dts/at91*.dtsi
  F:    arch/arm/boot/dts/sama*.dts
@@@ -1309,22 -1308,30 +1309,22 @@@ F:   drivers/*/*rockchip
  F:    drivers/*/*/*rockchip*
  F:    sound/soc/rockchip/
  
 -ARM/SAMSUNG ARM ARCHITECTURES
 -M:    Ben Dooks <ben-linux@fluff.org>
 -M:    Kukjin Kim <kgene.kim@samsung.com>
 +ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
 +M:    Kukjin Kim <kgene@kernel.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 -W:    http://www.fluff.org/ben/linux/
  S:    Maintained
  F:    arch/arm/boot/dts/s3c*
  F:    arch/arm/boot/dts/exynos*
  F:    arch/arm/plat-samsung/
  F:    arch/arm/mach-s3c24*/
  F:    arch/arm/mach-s3c64xx/
 +F:    arch/arm/mach-s5p*/
 +F:    arch/arm/mach-exynos*/
  F:    drivers/*/*s3c2410*
  F:    drivers/*/*/*s3c2410*
  F:    drivers/spi/spi-s3c*
  F:    sound/soc/samsung/*
 -
 -ARM/S5P EXYNOS ARM ARCHITECTURES
 -M:    Kukjin Kim <kgene.kim@samsung.com>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 -S:    Maintained
 -F:    arch/arm/mach-s5p*/
 -F:    arch/arm/mach-exynos*/
  N:    exynos
  
  ARM/SAMSUNG MOBILE MACHINE SUPPORT
@@@ -1374,12 -1381,12 +1374,12 @@@ 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/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/include/debug/renesas-scif.S
  F:    arch/arm/mach-shmobile/
  F:    drivers/sh/
  
@@@ -1423,7 -1430,6 +1423,7 @@@ F:      drivers/tty/serial/st-asc.
  F:    drivers/usb/dwc3/dwc3-st.c
  F:    drivers/usb/host/ehci-st.c
  F:    drivers/usb/host/ohci-st.c
 +F:    drivers/ata/ahci_st.c
  
  ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -1497,19 -1503,6 +1497,19 @@@ S:    Maintaine
  F:    drivers/clk/ux500/
  F:    include/linux/platform_data/clk-ux500.h
  
 +ARM/VERSATILE EXPRESS PLATFORM
 +M:    Liviu Dudau <liviu.dudau@arm.com>
 +M:    Sudeep Holla <sudeep.holla@arm.com>
 +M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/boot/dts/vexpress*
 +F:    arch/arm/mach-vexpress/
 +F:    */*/vexpress*
 +F:    */*/*/vexpress*
 +F:    drivers/clk/versatile/clk-vexpress-osc.c
 +F:    drivers/clocksource/versatile.c
 +
  ARM/VFP SUPPORT
  M:    Russell King <linux@arm.linux.org.uk>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1550,7 -1543,6 +1550,7 @@@ F:      arch/arm/mach-pxa/include/mach/z2.
  
  ARM/ZYNQ ARCHITECTURE
  M:    Michal Simek <michal.simek@xilinx.com>
 +R:    Sören Brinkmann <soren.brinkmann@xilinx.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://wiki.xilinx.com
  T:    git git://git.xilinx.com/linux-xlnx.git
@@@ -1835,7 -1827,7 +1835,7 @@@ F:      include/net/ax25.
  F:    net/ax25/
  
  AZ6007 DVB DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -2079,9 -2071,8 +2079,9 @@@ F:      drivers/clocksource/bcm_kona_timer.
  
  BROADCOM BCM2835 ARM ARCHITECTURE
  M:    Stephen Warren <swarren@wwwdotorg.org>
 +M:    Lee Jones <lee@kernel.org>
  L:    linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rpi/linux-rpi.git
  S:    Maintained
  N:    bcm2835
  
@@@ -2104,13 -2095,10 +2104,13 @@@ F:   arch/arm/include/debug/bcm63xx.
  BROADCOM BCM7XXX ARM ARCHITECTURE
  M:    Marc Carino <marc.ceeeee@gmail.com>
  M:    Brian Norris <computersforpeace@gmail.com>
 +M:    Gregory Fong <gregory.0xf0@gmail.com>
 +M:    Florian Fainelli <f.fainelli@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*
 +F:    drivers/bus/brcmstb_gisb.c
  
  BROADCOM TG3 GIGABIT ETHERNET DRIVER
  M:    Prashant Sreedharan <prashant@broadcom.com>
@@@ -2141,20 -2129,6 +2141,20 @@@ L:    linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/scsi/bnx2i/
  
 +BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
 +M:    Ray Jui <rjui@broadcom.com>
 +M:    Scott Branden <sbranden@broadcom.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    bcm-kernel-feedback-list@broadcom.com
 +T:    git git://git.github.com/brcm/linux.git
 +S:    Maintained
 +N:    iproc
 +N:    cygnus
 +N:    bcm9113*
 +N:    bcm9583*
 +N:    bcm583*
 +N:    bcm113*
 +
  BROADCOM KONA GPIO DRIVER
  M:    Ray Jui <rjui@broadcom.com>
  L:    bcm-kernel-feedback-list@broadcom.com
@@@ -2222,7 -2196,7 +2222,7 @@@ F:      Documentation/filesystems/btrfs.tx
  F:    fs/btrfs/
  
  BTTV VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -2743,7 -2717,7 +2743,7 @@@ F:      drivers/media/common/cx2341x
  F:    include/media/cx2341x*
  
  CX88 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -2768,13 -2742,6 +2768,13 @@@ W:    http://www.chelsio.co
  S:    Supported
  F:    drivers/net/ethernet/chelsio/cxgb3/
  
 +CXGB3 ISCSI DRIVER (CXGB3I)
 +M:      Karen Xie <kxie@chelsio.com>
 +L:      linux-scsi@vger.kernel.org
 +W:      http://www.chelsio.com
 +S:      Supported
 +F:      drivers/scsi/cxgbi/cxgb3i
 +
  CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
  M:    Steve Wise <swise@chelsio.com>
  L:    linux-rdma@vger.kernel.org
@@@ -2789,13 -2756,6 +2789,13 @@@ W:    http://www.chelsio.co
  S:    Supported
  F:    drivers/net/ethernet/chelsio/cxgb4/
  
 +CXGB4 ISCSI DRIVER (CXGB4I)
 +M:      Karen Xie <kxie@chelsio.com>
 +L:      linux-scsi@vger.kernel.org
 +W:      http://www.chelsio.com
 +S:      Supported
 +F:      drivers/scsi/cxgbi/cxgb4i
 +
  CXGB4 IWARP RNIC DRIVER (IW_CXGB4)
  M:    Steve Wise <swise@chelsio.com>
  L:    linux-rdma@vger.kernel.org
@@@ -2886,10 -2846,11 +2886,10 @@@ F:   Documentation/networking/dmfe.tx
  F:    drivers/net/ethernet/dec/tulip/dmfe.c
  
  DC390/AM53C974 SCSI driver
 -M:    Kurt Garloff <garloff@suse.de>
 -W:    http://www.garloff.de/kurt/linux/dc390/
 -M:    Guennadi Liakhovetski <g.liakhovetski@gmx.de>
 +M:    Hannes Reinecke <hare@suse.de>
 +L:    linux-scsi@vger.kernel.org
  S:    Maintained
 -F:    drivers/scsi/tmscsim.*
 +F:    drivers/scsi/am53c974.c
  
  DC395x SCSI driver
  M:    Oliver Neukum <oliver@neukum.org>
@@@ -3425,7 -3386,7 +3425,7 @@@ F:      fs/ecryptfs
  EDAC-CORE
  M:    Doug Thompson <dougthompson@xmission.com>
  M:    Borislav Petkov <bp@alien8.de>
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Supported
@@@ -3474,7 -3435,7 +3474,7 @@@ S:      Maintaine
  F:    drivers/edac/e7xxx_edac.c
  
  EDAC-GHES
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3502,21 -3463,21 +3502,21 @@@ S:   Maintaine
  F:    drivers/edac/i5000_edac.c
  
  EDAC-I5400
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i5400_edac.c
  
  EDAC-I7300
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
  F:    drivers/edac/i7300_edac.c
  
  EDAC-I7CORE
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3559,7 -3520,7 +3559,7 @@@ S:      Maintaine
  F:    drivers/edac/r82600_edac.c
  
  EDAC-SBRIDGE
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Maintained
@@@ -3619,7 -3580,7 +3619,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/ibm/ehea/
  
  EM28XX VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -4753,7 -4714,6 +4753,7 @@@ L:      linux-iio@vger.kernel.or
  S:    Maintained
  F:    drivers/iio/
  F:    drivers/staging/iio/
 +F:    include/linux/iio/
  
  IKANOS/ADI EAGLE ADSL USB DRIVER
  M:    Matthieu Castet <castet.matthieu@free.fr>
@@@ -5985,7 -5945,7 +5985,7 @@@ S:      Maintaine
  F:    drivers/media/radio/radio-maxiradio*
  
  MEDIA INPUT INFRASTRUCTURE (V4L/DVB)
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  P:    LinuxTV.org Project
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
@@@ -6014,13 -5974,10 +6014,13 @@@ W:   http://linuxtv.or
  S:    Odd Fixes
  F:    drivers/media/parport/pms*
  
 -MEGARAID SCSI DRIVERS
 -M:    Neela Syam Kolli <megaraidlinux@lsi.com>
 +MEGARAID SCSI/SAS DRIVERS
 +M:    Kashyap Desai <kashyap.desai@avagotech.com>
 +M:    Sumit Saxena <sumit.saxena@avagotech.com>
 +M:    Uday Lingala <uday.lingala@avagotech.com>
 +L:    megaraidlinux.pdl@avagotech.com
  L:    linux-scsi@vger.kernel.org
 -W:    http://megaraid.lsilogic.com
 +W:    http://www.lsi.com
  S:    Maintained
  F:    Documentation/scsi/megaraid.txt
  F:    drivers/scsi/megaraid.*
@@@ -6331,6 -6288,7 +6331,6 @@@ F:      drivers/scsi/g_NCR5380.
  F:    drivers/scsi/g_NCR5380_mmio.c
  F:    drivers/scsi/mac_scsi.*
  F:    drivers/scsi/pas16.*
 -F:    drivers/scsi/sun3_NCR5380.c
  F:    drivers/scsi/sun3_scsi.*
  F:    drivers/scsi/sun3_scsi_vme.c
  F:    drivers/scsi/t128.*
@@@ -6586,13 -6544,6 +6586,13 @@@ S:    Maintaine
  F:    Documentation/scsi/NinjaSCSI.txt
  F:    drivers/scsi/nsp32*
  
 +NIOS2 ARCHITECTURE
 +M:    Ley Foon Tan <lftan@altera.com>
 +L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
 +T:    git git://git.rocketboards.org/linux-socfpga.git
 +S:    Maintained
 +F:    arch/nios2/
 +
  NTB DRIVER
  M:    Jon Mason <jdmason@kudzu.us>
  M:    Dave Jiang <dave.jiang@intel.com>
@@@ -6643,23 -6594,6 +6643,23 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    arch/arm/*omap*/
  F:    drivers/i2c/busses/i2c-omap.c
 +F:    drivers/irqchip/irq-omap-intc.c
 +F:    drivers/mfd/*omap*.c
 +F:    drivers/mfd/menelaus.c
 +F:    drivers/mfd/palmas.c
 +F:    drivers/mfd/tps65217.c
 +F:    drivers/mfd/tps65218.c
 +F:    drivers/mfd/tps65910.c
 +F:    drivers/mfd/twl-core.[ch]
 +F:    drivers/mfd/twl4030*.c
 +F:    drivers/mfd/twl6030*.c
 +F:    drivers/mfd/twl6040*.c
 +F:    drivers/regulator/palmas-regulator*.c
 +F:    drivers/regulator/pbias-regulator.c
 +F:    drivers/regulator/tps65217-regulator.c
 +F:    drivers/regulator/tps65218-regulator.c
 +F:    drivers/regulator/tps65910-regulator.c
 +F:    drivers/regulator/twl-regulator.c
  F:    include/linux/i2c-omap.h
  
  OMAP DEVICE TREE SUPPORT
@@@ -6670,9 -6604,6 +6670,9 @@@ L:      devicetree@vger.kernel.or
  S:    Maintained
  F:    arch/arm/boot/dts/*omap*
  F:    arch/arm/boot/dts/*am3*
 +F:    arch/arm/boot/dts/*am4*
 +F:    arch/arm/boot/dts/*am5*
 +F:    arch/arm/boot/dts/*dra7*
  
  OMAP CLOCK FRAMEWORK SUPPORT
  M:    Paul Walmsley <paul@pwsan.com>
@@@ -6702,6 -6633,14 +6702,14 @@@ L:    linux-omap@vger.kernel.or
  S:    Maintained
  F:    sound/soc/omap/
  
+ OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT
+ M:    Roger Quadros <rogerq@ti.com>
+ M:    Tony Lindgren <tony@atomide.com>
+ L:    linux-omap@vger.kernel.org
+ S:    Maintained
+ F:    drivers/memory/omap-gpmc.c
+ F:    arch/arm/mach-omap2/*gpmc*
  OMAP FRAMEBUFFER SUPPORT
  M:    Tomi Valkeinen <tomi.valkeinen@ti.com>
  L:    linux-fbdev@vger.kernel.org
@@@ -6920,12 -6859,11 +6928,12 @@@ F:   drivers/scsi/osd
  F:    include/scsi/osd_*
  F:    fs/exofs/
  
 -OVERLAYFS FILESYSTEM
 +OVERLAY FILESYSTEM
  M:    Miklos Szeredi <miklos@szeredi.hu>
 -L:    linux-fsdevel@vger.kernel.org
 +L:    linux-unionfs@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
  S:    Supported
 -F:    fs/overlayfs/*
 +F:    fs/overlayfs/
  F:    Documentation/filesystems/overlayfs.txt
  
  P54 WIRELESS DRIVER
@@@ -7249,7 -7187,6 +7257,7 @@@ F:      drivers/crypto/picoxcell
  
  PIN CONTROL SUBSYSTEM
  M:    Linus Walleij <linus.walleij@linaro.org>
 +L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/pinctrl/
  F:    include/linux/pinctrl/
@@@ -8045,7 -7982,7 +8053,7 @@@ S:      Odd Fixe
  F:    drivers/media/i2c/saa6588*
  
  SAA7134 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -8503,7 -8440,7 +8511,7 @@@ S:      Maintaine
  F:    drivers/media/radio/si4713/radio-usb-si4713.c
  
  SIANO DVB DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -8554,6 -8491,7 +8562,6 @@@ F:      arch/arm/mach-s3c24xx/bast-irq.
  TI DAVINCI MACHINE SUPPORT
  M:    Sekhar Nori <nsekhar@ti.com>
  M:    Kevin Hilman <khilman@deeprootsystems.com>
 -L:    davinci-linux-open-source@linux.davincidsp.com (moderated for non-subscribers)
  T:    git git://gitorious.org/linux-davinci/linux-davinci.git
  Q:    http://patchwork.kernel.org/project/linux-davinci/list/
  S:    Supported
@@@ -8563,6 -8501,7 +8571,6 @@@ F:      drivers/i2c/busses/i2c-davinci.
  TI DAVINCI SERIES MEDIA DRIVER
  M:    Lad, Prabhakar <prabhakar.csengg@gmail.com>
  L:    linux-media@vger.kernel.org
 -L:    davinci-linux-open-source@linux.davincidsp.com (moderated for non-subscribers)
  W:    http://linuxtv.org/
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  T:    git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
@@@ -8714,9 -8653,7 +8722,9 @@@ S:      Maintaine
  F:    drivers/leds/leds-net48xx.c
  
  SOFTLOGIC 6x10 MPEG CODEC
 -M:    Ismael Luceno <ismael.luceno@corp.bluecherry.net>
 +M:    Bluecherry Maintainers <maintainers@bluecherrydvr.com>
 +M:    Andrey Utkin <andrey.utkin@corp.bluecherry.net>
 +M:    Andrey Utkin <andrey.krieger.utkin@gmail.com>
  L:    linux-media@vger.kernel.org
  S:    Supported
  F:    drivers/media/pci/solo6x10/
@@@ -9190,7 -9127,7 +9198,7 @@@ S:      Maintaine
  F:    drivers/media/i2c/tda9840*
  
  TEA5761 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -9198,7 -9135,7 +9206,7 @@@ S:      Odd fixe
  F:    drivers/media/tuners/tea5761.*
  
  TEA5767 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -9510,7 -9447,7 +9518,7 @@@ F:      include/linux/shmem_fs.
  F:    mm/shmem.c
  
  TM6000 VIDEO4LINUX DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
@@@ -9774,6 -9711,11 +9782,6 @@@ S:     Maintaine
  F:    Documentation/hid/hiddev.txt
  F:    drivers/hid/usbhid/
  
 -USB/IP DRIVERS
 -L:    linux-usb@vger.kernel.org
 -S:    Orphan
 -F:    drivers/staging/usbip/
 -
  USB ISP116X DRIVER
  M:    Olav Kongas <ok@artecdesign.ee>
  L:    linux-usb@vger.kernel.org
@@@ -10331,7 -10273,7 +10339,7 @@@ S:   Maintaine
  F:    arch/x86/kernel/cpu/mcheck/*
  
  XC2028/3028 TUNER DRIVER
 -M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
 +M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-media@vger.kernel.org
  W:    http://linuxtv.org
  T:    git git://linuxtv.org/media_tree.git
index 3b653b3ac268399e59e5254f057a1f6e1cb87c10,fd3557d7ea766aeccbe079b0f252ef1ac70b3888..08cc94474d1749c8b3be489ed7daa884b25f35ab
@@@ -6,7 -6,7 +6,7 @@@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) :
        -I$(srctree)/arch/arm/plat-omap/include
  
  # Common support
- obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
+ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o timer.o pm.o \
         common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
         omap_device.o sram.o drm.o
  
@@@ -113,7 -113,7 +113,7 @@@ obj-y                                      += prm_common.o cm_common.
  obj-$(CONFIG_ARCH_OMAP2)              += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += vc3xxx_data.o vp3xxx_data.o
 -omap-prcm-4-5-common                  =  cminst44xx.o cm44xx.o prm44xx.o \
 +omap-prcm-4-5-common                  =  cminst44xx.o prm44xx.o \
                                           prcm_mpu44xx.o prminst44xx.o \
                                           vc44xx_data.o vp44xx_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += $(omap-prcm-4-5-common)
@@@ -246,7 -246,6 +246,6 @@@ obj-$(CONFIG_MACH_OMAP3530_LV_SOM
  obj-$(CONFIG_MACH_OMAP3_TORPEDO)        += board-omap3logic.o
  obj-$(CONFIG_MACH_OVERO)              += board-overo.o
  obj-$(CONFIG_MACH_OMAP3_PANDORA)      += board-omap3pandora.o
- obj-$(CONFIG_MACH_OMAP_3430SDP)               += board-3430sdp.o
  obj-$(CONFIG_MACH_NOKIA_N8X0)         += board-n8x0.o
  obj-$(CONFIG_MACH_NOKIA_RX51)         += board-rx51.o sdram-nokia.o
  obj-$(CONFIG_MACH_NOKIA_RX51)         += board-rx51-peripherals.o
@@@ -260,8 -259,6 +259,6 @@@ obj-$(CONFIG_MACH_OMAP3517EVM)             += boar
  obj-$(CONFIG_MACH_CRANEBOARD)         += board-am3517crane.o
  
  obj-$(CONFIG_MACH_SBC3530)            += board-omap3stalker.o
- obj-$(CONFIG_MACH_TI8168EVM)          += board-ti8168evm.o
- obj-$(CONFIG_MACH_TI8148EVM)          += board-ti8168evm.o
  
  # Platform specific device init code
  
@@@ -284,9 -281,6 +281,6 @@@ obj-y                                      += $(onenand-m) $(onenand-y
  nand-$(CONFIG_MTD_NAND_OMAP2)         := gpmc-nand.o
  obj-y                                 += $(nand-m) $(nand-y)
  
- smc91x-$(CONFIG_SMC91X)                       := gpmc-smc91x.o
- obj-y                                 += $(smc91x-m) $(smc91x-y)
  smsc911x-$(CONFIG_SMSC911X)           := gpmc-smsc911x.o
  obj-y                                 += $(smsc911x-m) $(smsc911x-y)
  ifneq ($(CONFIG_HWSPINLOCK_OMAP),)
index e0ad64fde20ee9409c9d3db648de21b52a11a8f6,49c3c25808e75e349e61f803997bbe61c5a9c694..b6443a4e0c78002d6665479a608e7915b1801015
  #include <linux/i2c.h>
  #include <linux/spi/spi.h>
  #include <linux/usb/musb.h>
 +#include <linux/mmc/host.h>
  #include <linux/platform_data/spi-omap2-mcspi.h>
- #include <linux/platform_data/mtd-onenand-omap2.h>
 +#include <linux/platform_data/mmc-omap.h>
  #include <linux/mfd/menelaus.h>
  #include <sound/tlv320aic3x.h>
  
@@@ -34,7 -31,6 +33,6 @@@
  #include "common.h"
  #include "mmc.h"
  #include "soc.h"
- #include "gpmc-onenand.h"
  #include "common-board-devices.h"
  
  #define TUSB6010_ASYNC_CS     1
index 3d5040f82e90a40e53320a40202afa20f27b29d2,e2ad48b5d9c00fddfac07409671a89b2df869274..03502abe4f2efbd82d3140c3cddd0a244275d0ee
@@@ -23,6 -23,7 +23,7 @@@
  #include <linux/regulator/machine.h>
  #include <linux/gpio.h>
  #include <linux/gpio_keys.h>
+ #include <linux/omap-gpmc.h>
  #include <linux/mmc/host.h>
  #include <linux/power/isp1704_charger.h>
  #include <linux/platform_data/spi-omap2-mcspi.h>
@@@ -32,7 -33,6 +33,6 @@@
  
  #include "common.h"
  #include <linux/omap-dma.h>
- #include "gpmc-smc91x.h"
  
  #include "board-rx51.h"
  
@@@ -55,8 -55,6 +55,6 @@@
  #include "omap-pm.h"
  #include "hsmmc.h"
  #include "common-board-devices.h"
- #include "gpmc.h"
- #include "gpmc-onenand.h"
  #include "soc.h"
  #include "omap-secure.h"
  
@@@ -484,7 -482,7 +482,7 @@@ static struct omap_mux_partition *parti
   * Current flows to eMMC when eMMC is off and the data lines are pulled up,
   * so pull them down. N.B. we pull 8 lines because we are using 8 lines.
   */
 -static void rx51_mmc2_remux(struct device *dev, int slot, int power_on)
 +static void rx51_mmc2_remux(struct device *dev, int power_on)
  {
        if (power_on)
                omap_mux_write_array(partition, rx51_mmc2_on_mux);
@@@ -500,6 -498,7 +498,6 @@@ static struct omap2_hsmmc_info mmc[] __
                .cover_only     = true,
                .gpio_cd        = 160,
                .gpio_wp        = -EINVAL,
 -              .power_saving   = true,
        },
        {
                .name           = "internal",
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
                .nonremovable   = true,
 -              .power_saving   = true,
                .remux          = rx51_mmc2_remux,
        },
        {}      /* Terminator */
@@@ -1144,33 -1144,6 +1142,6 @@@ static struct omap_onenand_platform_dat
  };
  #endif
  
- #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
- static struct omap_smc91x_platform_data board_smc91x_data = {
-       .cs             = 1,
-       .gpio_irq       = 54,
-       .gpio_pwrdwn    = 86,
-       .gpio_reset     = 164,
-       .flags          = GPMC_TIMINGS_SMC91C96 | IORESOURCE_IRQ_HIGHLEVEL,
- };
- static void __init board_smc91x_init(void)
- {
-       omap_mux_init_gpio(54, OMAP_PIN_INPUT_PULLDOWN);
-       omap_mux_init_gpio(86, OMAP_PIN_OUTPUT);
-       omap_mux_init_gpio(164, OMAP_PIN_OUTPUT);
-       gpmc_smc91x_init(&board_smc91x_data);
- }
- #else
- static inline void board_smc91x_init(void)
- {
- }
- #endif
  static struct gpio rx51_wl1251_gpios[] __initdata = {
        { RX51_WL1251_IRQ_GPIO,   GPIOF_IN,             "wl1251 irq"    },
  };
@@@ -1301,7 -1274,6 +1272,6 @@@ void __init rx51_peripherals_init(void
        rx51_i2c_init();
        regulator_has_full_constraints();
        gpmc_onenand_init(board_onenand_data);
-       board_smc91x_init();
        rx51_add_gpio_keys();
        rx51_init_wl1251();
        rx51_init_tsc2005();
index 492ef1607115781b0db260389724b1421d549c82,110256a56636d9caa6b4f9c004c2255191c47a59..a7bc4ce81e19e3ebc979c56b158a58afd79b461b
@@@ -49,7 -49,7 +49,7 @@@ static int __init omap3_l3_init(void
         * To avoid code running on other OMAPs in
         * multi-omap builds
         */
 -      if (!(cpu_is_omap34xx()))
 +      if (!(cpu_is_omap34xx()) || of_have_populated_dt())
                return -ENODEV;
  
        snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
  }
  omap_postcore_initcall(omap3_l3_init);
  
 -static int __init omap4_l3_init(void)
 -{
 -      int i;
 -      struct omap_hwmod *oh[3];
 -      struct platform_device *pdev;
 -      char oh_name[L3_MODULES_MAX_LEN];
 -
 -      /* If dtb is there, the devices will be created dynamically */
 -      if (of_have_populated_dt())
 -              return -ENODEV;
 -
 -      /*
 -       * To avoid code running on other OMAPs in
 -       * multi-omap builds
 -       */
 -      if (!cpu_is_omap44xx() && !soc_is_omap54xx())
 -              return -ENODEV;
 -
 -      for (i = 0; i < L3_MODULES; i++) {
 -              snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
 -
 -              oh[i] = omap_hwmod_lookup(oh_name);
 -              if (!(oh[i]))
 -                      pr_err("could not look up %s\n", oh_name);
 -      }
 -
 -      pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, 0);
 -
 -      WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
 -
 -      return PTR_RET(pdev);
 -}
 -omap_postcore_initcall(omap4_l3_init);
 -
  #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
  
  static struct resource omap2cam_resources[] = {
@@@ -411,3 -445,29 +411,29 @@@ static int __init omap2_init_devices(vo
        return 0;
  }
  omap_arch_initcall(omap2_init_devices);
+ static int __init omap_gpmc_init(void)
+ {
+       struct omap_hwmod *oh;
+       struct platform_device *pdev;
+       char *oh_name = "gpmc";
+       /*
+        * if the board boots up with a populated DT, do not
+        * manually add the device from this initcall
+        */
+       if (of_have_populated_dt())
+               return -ENODEV;
+       oh = omap_hwmod_lookup(oh_name);
+       if (!oh) {
+               pr_err("Could not look up %s\n", oh_name);
+               return -ENODEV;
+       }
+       pdev = omap_device_build("omap-gpmc", -1, oh, NULL, 0);
+       WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
+       return PTR_RET(pdev);
+ }
+ omap_postcore_initcall(omap_gpmc_init);
diff --combined drivers/memory/Kconfig
index 08bd4cfca2a4adf53384715683126a40a85fabf5,6759de7ce209c34990bc299c3e224d361ed08388..191383d8c94d6e1d8e6d67bfc3e0ec5494b1d323
@@@ -41,6 -41,14 +41,14 @@@ config TI_EMI
          parameters and other settings during frequency, voltage and
          temperature changes
  
+ config OMAP_GPMC
+       bool
+       help
+         This driver is for the General Purpose Memory Controller (GPMC)
+         present on Texas Instruments SoCs (e.g. OMAP2+). GPMC allows
+         interfacing to a variety of asynchronous as well as synchronous
+         memory drives like NOR, NAND, OneNAND, SRAM.
  config MVEBU_DEVBUS
        bool "Marvell EBU Device Bus Controller"
        default y
@@@ -61,6 -69,16 +69,6 @@@ config TEGRA20_M
          analysis, especially for IOMMU/GART(Graphics Address
          Relocation Table) module.
  
 -config TEGRA30_MC
 -      bool "Tegra30 Memory Controller(MC) driver"
 -      default y
 -      depends on ARCH_TEGRA_3x_SOC
 -      help
 -        This driver is for the Memory Controller(MC) module available
 -        in Tegra30 SoCs, mainly for a address translation fault
 -        analysis, especially for IOMMU/SMMU(System Memory Management
 -        Unit) module.
 -
  config FSL_CORENET_CF
        tristate "Freescale CoreNet Error Reporting"
        depends on FSL_SOC_BOOKE
@@@ -75,6 -93,4 +83,6 @@@ config FSL_IF
        bool
        depends on FSL_SOC
  
 +source "drivers/memory/tegra/Kconfig"
 +
  endif
diff --combined drivers/memory/Makefile
index ad98bb232623cacf24adf591a07f718b253c933a,a7d410f3ca32a8e9604bf714487da4419054d9f2..6b6548124473350a453b8982e341e4bb27264458
@@@ -8,9 -8,9 +8,10 @@@ endi
  obj-$(CONFIG_ATMEL_SDRAMC)    += atmel-sdramc.o
  obj-$(CONFIG_TI_AEMIF)                += ti-aemif.o
  obj-$(CONFIG_TI_EMIF)         += emif.o
+ obj-$(CONFIG_OMAP_GPMC)               += omap-gpmc.o
  obj-$(CONFIG_FSL_CORENET_CF)  += fsl-corenet-cf.o
  obj-$(CONFIG_FSL_IFC)         += fsl_ifc.o
  obj-$(CONFIG_MVEBU_DEVBUS)    += mvebu-devbus.o
  obj-$(CONFIG_TEGRA20_MC)      += tegra20-mc.o
 -obj-$(CONFIG_TEGRA30_MC)      += tegra30-mc.o
 +
 +obj-$(CONFIG_TEGRA_MC)                += tegra/
index 8fb5bbce102fa6274ee31710a9a86582be6db27c,abfc0ddd076e1fa280c6cf861dcce872f588162b..ffc5e60c0664fafc54207a6174ce8ce5189ce20c
  #include <linux/of_address.h>
  #include <linux/of_mtd.h>
  #include <linux/of_device.h>
+ #include <linux/omap-gpmc.h>
  #include <linux/mtd/nand.h>
  #include <linux/pm_runtime.h>
  
  #include <linux/platform_data/mtd-nand-omap2.h>
+ #include <linux/platform_data/mtd-onenand-omap2.h>
  
  #include <asm/mach-types.h>
  
- #include "soc.h"
- #include "common.h"
- #include "omap_device.h"
- #include "gpmc.h"
- #include "gpmc-nand.h"
- #include "gpmc-onenand.h"
  #define       DEVICE_NAME             "omap-gpmc"
  
  /* GPMC register offsets */
@@@ -85,6 -80,8 +80,8 @@@
  #define GPMC_ECC_CTRL_ECCREG8         0x008
  #define GPMC_ECC_CTRL_ECCREG9         0x009
  
+ #define GPMC_CONFIG_LIMITEDADDRESS            BIT(1)
  #define       GPMC_CONFIG2_CSEXTRADELAY               BIT(7)
  #define       GPMC_CONFIG3_ADVEXTRADELAY              BIT(7)
  #define       GPMC_CONFIG4_OEEXTRADELAY               BIT(7)
  
  #define GPMC_NR_WAITPINS              4
  
+ #define GPMC_CS_CONFIG1               0x00
+ #define GPMC_CS_CONFIG2               0x04
+ #define GPMC_CS_CONFIG3               0x08
+ #define GPMC_CS_CONFIG4               0x0c
+ #define GPMC_CS_CONFIG5               0x10
+ #define GPMC_CS_CONFIG6               0x14
+ #define GPMC_CS_CONFIG7               0x18
+ #define GPMC_CS_NAND_COMMAND  0x1c
+ #define GPMC_CS_NAND_ADDRESS  0x20
+ #define GPMC_CS_NAND_DATA     0x24
+ /* Control Commands */
+ #define GPMC_CONFIG_RDY_BSY   0x00000001
+ #define GPMC_CONFIG_DEV_SIZE  0x00000002
+ #define GPMC_CONFIG_DEV_TYPE  0x00000003
+ #define GPMC_SET_IRQ_STATUS   0x00000004
+ #define GPMC_CONFIG1_WRAPBURST_SUPP     (1 << 31)
+ #define GPMC_CONFIG1_READMULTIPLE_SUPP  (1 << 30)
+ #define GPMC_CONFIG1_READTYPE_ASYNC     (0 << 29)
+ #define GPMC_CONFIG1_READTYPE_SYNC      (1 << 29)
+ #define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)
+ #define GPMC_CONFIG1_WRITETYPE_ASYNC    (0 << 27)
+ #define GPMC_CONFIG1_WRITETYPE_SYNC     (1 << 27)
+ #define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
+ #define GPMC_CONFIG1_PAGE_LEN(val)      ((val & 3) << 23)
+ #define GPMC_CONFIG1_WAIT_READ_MON      (1 << 22)
+ #define GPMC_CONFIG1_WAIT_WRITE_MON     (1 << 21)
+ #define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18)
+ #define GPMC_CONFIG1_WAIT_PIN_SEL(val)  ((val & 3) << 16)
+ #define GPMC_CONFIG1_DEVICESIZE(val)    ((val & 3) << 12)
+ #define GPMC_CONFIG1_DEVICESIZE_16      GPMC_CONFIG1_DEVICESIZE(1)
+ #define GPMC_CONFIG1_DEVICETYPE(val)    ((val & 3) << 10)
+ #define GPMC_CONFIG1_DEVICETYPE_NOR     GPMC_CONFIG1_DEVICETYPE(0)
+ #define GPMC_CONFIG1_MUXTYPE(val)       ((val & 3) << 8)
+ #define GPMC_CONFIG1_TIME_PARA_GRAN     (1 << 4)
+ #define GPMC_CONFIG1_FCLK_DIV(val)      (val & 3)
+ #define GPMC_CONFIG1_FCLK_DIV2          (GPMC_CONFIG1_FCLK_DIV(1))
+ #define GPMC_CONFIG1_FCLK_DIV3          (GPMC_CONFIG1_FCLK_DIV(2))
+ #define GPMC_CONFIG1_FCLK_DIV4          (GPMC_CONFIG1_FCLK_DIV(3))
+ #define GPMC_CONFIG7_CSVALID          (1 << 6)
+ #define GPMC_DEVICETYPE_NOR           0
+ #define GPMC_DEVICETYPE_NAND          2
+ #define GPMC_CONFIG_WRITEPROTECT      0x00000010
+ #define WR_RD_PIN_MONITORING          0x00600000
+ #define GPMC_ENABLE_IRQ               0x0000000d
+ /* ECC commands */
+ #define GPMC_ECC_READ         0 /* Reset Hardware ECC for read */
+ #define GPMC_ECC_WRITE                1 /* Reset Hardware ECC for write */
+ #define GPMC_ECC_READSYN      2 /* Reset before syndrom is read back */
  /* XXX: Only NAND irq has been considered,currently these are the only ones used
   */
  #define       GPMC_NR_IRQ             2
  
+ struct gpmc_cs_data {
+       const char *name;
+ #define GPMC_CS_RESERVED      (1 << 0)
+       u32 flags;
+       struct resource mem;
+ };
  struct gpmc_client_irq        {
        unsigned                irq;
        u32                     bitmask;
@@@ -155,10 -215,9 +215,9 @@@ static struct irq_chip gpmc_irq_chip
  static int gpmc_irq_start;
  
  static struct resource        gpmc_mem_root;
- static struct resource        gpmc_cs_mem[GPMC_CS_NUM];
+ static struct gpmc_cs_data gpmc_cs[GPMC_CS_NUM];
  static DEFINE_SPINLOCK(gpmc_mem_lock);
  /* Define chip-selects as reserved by default until probe completes */
- static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1);
  static unsigned int gpmc_cs_num = GPMC_CS_NUM;
  static unsigned int gpmc_nr_waitpins;
  static struct device *gpmc_dev;
@@@ -202,11 -261,6 +261,6 @@@ static unsigned long gpmc_get_fclk_peri
  {
        unsigned long rate = clk_get_rate(gpmc_l3_clk);
  
-       if (rate == 0) {
-               printk(KERN_WARNING "gpmc_l3_clk not enabled\n");
-               return 0;
-       }
        rate /= 1000;
        rate = 1000000000 / rate;       /* In picoseconds */
  
@@@ -284,12 -338,130 +338,130 @@@ static void gpmc_cs_bool_timings(int cs
  }
  
  #ifdef DEBUG
- static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
-                              int time, const char *name)
+ static int get_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
+                              bool raw, bool noval, int shift,
+                              const char *name)
+ {
+       u32 l;
+       int nr_bits, max_value, mask;
+       l = gpmc_cs_read_reg(cs, reg);
+       nr_bits = end_bit - st_bit + 1;
+       max_value = (1 << nr_bits) - 1;
+       mask = max_value << st_bit;
+       l = (l & mask) >> st_bit;
+       if (shift)
+               l = (shift << l);
+       if (noval && (l == 0))
+               return 0;
+       if (!raw) {
+               unsigned int time_ns_min, time_ns, time_ns_max;
+               time_ns_min = gpmc_ticks_to_ns(l ? l - 1 : 0);
+               time_ns = gpmc_ticks_to_ns(l);
+               time_ns_max = gpmc_ticks_to_ns(l + 1 > max_value ?
+                                              max_value : l + 1);
+               pr_info("gpmc,%s = <%u> (%u - %u ns, %i ticks)\n",
+                       name, time_ns, time_ns_min, time_ns_max, l);
+       } else {
+               pr_info("gpmc,%s = <%u>\n", name, l);
+       }
+       return l;
+ }
+ #define GPMC_PRINT_CONFIG(cs, config) \
+       pr_info("cs%i %s: 0x%08x\n", cs, #config, \
+               gpmc_cs_read_reg(cs, config))
+ #define GPMC_GET_RAW(reg, st, end, field) \
+       get_gpmc_timing_reg(cs, (reg), (st), (end), 1, 0, 0, field)
+ #define GPMC_GET_RAW_BOOL(reg, st, end, field) \
+       get_gpmc_timing_reg(cs, (reg), (st), (end), 1, 1, 0, field)
+ #define GPMC_GET_RAW_SHIFT(reg, st, end, shift, field) \
+       get_gpmc_timing_reg(cs, (reg), (st), (end), 1, 1, (shift), field)
+ #define GPMC_GET_TICKS(reg, st, end, field) \
+       get_gpmc_timing_reg(cs, (reg), (st), (end), 0, 0, 0, field)
+ static void gpmc_show_regs(int cs, const char *desc)
+ {
+       pr_info("gpmc cs%i %s:\n", cs, desc);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG1);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG2);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG3);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG4);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG5);
+       GPMC_PRINT_CONFIG(cs, GPMC_CS_CONFIG6);
+ }
+ /*
+  * Note that gpmc,wait-pin handing wrongly assumes bit 8 is available,
+  * see commit c9fb809.
+  */
+ static void gpmc_cs_show_timings(int cs, const char *desc)
+ {
+       gpmc_show_regs(cs, desc);
+       pr_info("gpmc cs%i access configuration:\n", cs);
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1,  4,  4, "time-para-granularity");
+       GPMC_GET_RAW(GPMC_CS_CONFIG1,  8,  9, "mux-add-data");
+       GPMC_GET_RAW(GPMC_CS_CONFIG1, 12, 13, "device-width");
+       GPMC_GET_RAW(GPMC_CS_CONFIG1, 16, 17, "wait-pin");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 21, 21, "wait-on-write");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 22, 22, "wait-on-read");
+       GPMC_GET_RAW_SHIFT(GPMC_CS_CONFIG1, 23, 24, 4, "burst-length");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 27, 27, "sync-write");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 28, 28, "burst-write");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 29, 29, "gpmc,sync-read");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 30, 30, "burst-read");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG1, 31, 31, "burst-wrap");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG2,  7,  7, "cs-extra-delay");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG3,  7,  7, "adv-extra-delay");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG4, 23, 23, "we-extra-delay");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG4,  7,  7, "oe-extra-delay");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG6,  7,  7, "cycle2cycle-samecsen");
+       GPMC_GET_RAW_BOOL(GPMC_CS_CONFIG6,  6,  6, "cycle2cycle-diffcsen");
+       pr_info("gpmc cs%i timings configuration:\n", cs);
+       GPMC_GET_TICKS(GPMC_CS_CONFIG2,  0,  3, "cs-on-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG2,  8, 12, "cs-rd-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG2, 16, 20, "cs-wr-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG3,  0,  3, "adv-on-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG3,  8, 12, "adv-rd-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG3, 16, 20, "adv-wr-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG4,  0,  3, "oe-on-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG4,  8, 12, "oe-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG4, 16, 19, "we-on-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG4, 24, 28, "we-off-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG5,  0,  4, "rd-cycle-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG5,  8, 12, "wr-cycle-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG5, 16, 20, "access-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG5, 24, 27, "page-burst-access-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG6, 0, 3, "bus-turnaround-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG6, 8, 11, "cycle2cycle-delay-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG1, 18, 19, "wait-monitoring-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG1, 25, 26, "clk-activation-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG6, 16, 19, "wr-data-mux-bus-ns");
+       GPMC_GET_TICKS(GPMC_CS_CONFIG6, 24, 28, "wr-access-ns");
+ }
  #else
- static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
-                              int time)
+ static inline void gpmc_cs_show_timings(int cs, const char *desc)
+ {
+ }
  #endif
+ static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
+                              int time, const char *name)
  {
        u32 l;
        int ticks, mask, nr_bits;
        else
                ticks = gpmc_ns_to_ticks(time);
        nr_bits = end_bit - st_bit + 1;
-       if (ticks >= 1 << nr_bits) {
- #ifdef DEBUG
-               printk(KERN_INFO "GPMC CS%d: %-10s* %3d ns, %3d ticks >= %d\n",
-                               cs, name, time, ticks, 1 << nr_bits);
- #endif
+       mask = (1 << nr_bits) - 1;
+       if (ticks > mask) {
+               pr_err("%s: GPMC error! CS%d: %s: %d ns, %d ticks > %d\n",
+                      __func__, cs, name, time, ticks, mask);
                return -1;
        }
  
-       mask = (1 << nr_bits) - 1;
        l = gpmc_cs_read_reg(cs, reg);
  #ifdef DEBUG
        printk(KERN_INFO
        return 0;
  }
  
- #ifdef DEBUG
  #define GPMC_SET_ONE(reg, st, end, field) \
        if (set_gpmc_timing_reg(cs, (reg), (st), (end),         \
                        t->field, #field) < 0)                  \
                return -1
- #else
- #define GPMC_SET_ONE(reg, st, end, field) \
-       if (set_gpmc_timing_reg(cs, (reg), (st), (end), t->field) < 0) \
-               return -1
- #endif
  
  int gpmc_calc_divider(unsigned int sync_clk)
  {
@@@ -353,6 -519,7 +519,7 @@@ int gpmc_cs_set_timings(int cs, const s
        int div;
        u32 l;
  
+       gpmc_cs_show_timings(cs, "before gpmc_cs_set_timings");
        div = gpmc_calc_divider(t->sync_clk);
        if (div < 0)
                return div;
        }
  
        gpmc_cs_bool_timings(cs, &t->bool_timings);
+       gpmc_cs_show_timings(cs, "after gpmc_cs_set_timings");
  
        return 0;
  }
  
- static int gpmc_cs_enable_mem(int cs, u32 base, u32 size)
+ static int gpmc_cs_set_memconf(int cs, u32 base, u32 size)
  {
        u32 l;
        u32 mask;
        return 0;
  }
  
+ static void gpmc_cs_enable_mem(int cs)
+ {
+       u32 l;
+       l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
+       l |= GPMC_CONFIG7_CSVALID;
+       gpmc_cs_write_reg(cs, GPMC_CS_CONFIG7, l);
+ }
  static void gpmc_cs_disable_mem(int cs)
  {
        u32 l;
@@@ -460,13 -637,30 +637,30 @@@ static int gpmc_cs_mem_enabled(int cs
  
  static void gpmc_cs_set_reserved(int cs, int reserved)
  {
-       gpmc_cs_map &= ~(1 << cs);
-       gpmc_cs_map |= (reserved ? 1 : 0) << cs;
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       gpmc->flags |= GPMC_CS_RESERVED;
  }
  
  static bool gpmc_cs_reserved(int cs)
  {
-       return gpmc_cs_map & (1 << cs);
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       return gpmc->flags & GPMC_CS_RESERVED;
+ }
+ static void gpmc_cs_set_name(int cs, const char *name)
+ {
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       gpmc->name = name;
+ }
+ const char *gpmc_cs_get_name(int cs)
+ {
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       return gpmc->name;
  }
  
  static unsigned long gpmc_mem_align(unsigned long size)
  
  static int gpmc_cs_insert_mem(int cs, unsigned long base, unsigned long size)
  {
-       struct resource *res = &gpmc_cs_mem[cs];
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       struct resource *res = &gpmc->mem;
        int r;
  
        size = gpmc_mem_align(size);
  
  static int gpmc_cs_delete_mem(int cs)
  {
-       struct resource *res = &gpmc_cs_mem[cs];
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       struct resource *res = &gpmc->mem;
        int r;
  
        spin_lock(&gpmc_mem_lock);
@@@ -541,23 -737,24 +737,24 @@@ static int gpmc_cs_remap(int cs, u32 ba
        gpmc_cs_get_memconf(cs, &old_base, &size);
        if (base == old_base)
                return 0;
-       gpmc_cs_disable_mem(cs);
        ret = gpmc_cs_delete_mem(cs);
        if (ret < 0)
                return ret;
        ret = gpmc_cs_insert_mem(cs, base, size);
-       if (ret < 0)
-               return ret;
-       ret = gpmc_cs_enable_mem(cs, base, size);
        if (ret < 0)
                return ret;
  
-       return 0;
+       ret = gpmc_cs_set_memconf(cs, base, size);
+       return ret;
  }
  
  int gpmc_cs_request(int cs, unsigned long size, unsigned long *base)
  {
-       struct resource *res = &gpmc_cs_mem[cs];
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       struct resource *res = &gpmc->mem;
        int r = -1;
  
        if (cs > gpmc_cs_num) {
        if (r < 0)
                goto out;
  
-       r = gpmc_cs_enable_mem(cs, res->start, resource_size(res));
+       /* Disable CS while changing base address and size mask */
+       gpmc_cs_disable_mem(cs);
+       r = gpmc_cs_set_memconf(cs, res->start, resource_size(res));
        if (r < 0) {
                release_resource(res);
                goto out;
        }
  
+       /* Enable CS */
+       gpmc_cs_enable_mem(cs);
        *base = res->start;
        gpmc_cs_set_reserved(cs, 1);
  out:
@@@ -597,7 -799,8 +799,8 @@@ EXPORT_SYMBOL(gpmc_cs_request)
  
  void gpmc_cs_free(int cs)
  {
-       struct resource *res = &gpmc_cs_mem[cs];
+       struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
+       struct resource *res = &gpmc->mem;
  
        spin_lock(&gpmc_mem_lock);
        if (cs >= gpmc_cs_num || cs < 0 || !gpmc_cs_reserved(cs)) {
@@@ -1394,6 -1597,8 +1597,6 @@@ static int gpmc_probe_nand_child(struc
        if (gpmc_nand_data->elm_of_node == NULL)
                gpmc_nand_data->elm_of_node =
                                        of_parse_phandle(child, "elm_id", 0);
 -      if (gpmc_nand_data->elm_of_node == NULL)
 -              pr_warn("%s: ti,elm-id property not found\n", __func__);
  
        /* select ecc-scheme for NAND */
        if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) {
@@@ -1509,7 -1714,9 +1712,9 @@@ static int gpmc_probe_generic_child(str
        struct gpmc_timings gpmc_t;
        struct resource res;
        unsigned long base;
+       const char *name;
        int ret, cs;
+       u32 val;
  
        if (of_property_read_u32(child, "reg", &cs) < 0) {
                dev_err(&pdev->dev, "%s has no 'reg' property\n",
                return -ENODEV;
        }
  
+       /*
+        * Check if we have multiple instances of the same device
+        * on a single chip select. If so, use the already initialized
+        * timings.
+        */
+       name = gpmc_cs_get_name(cs);
+       if (name && child->name && of_node_cmp(child->name, name) == 0)
+                       goto no_timings;
        ret = gpmc_cs_request(cs, resource_size(&res), &base);
        if (ret < 0) {
                dev_err(&pdev->dev, "cannot request GPMC CS %d\n", cs);
                return ret;
        }
+       gpmc_cs_set_name(cs, child->name);
+       gpmc_read_settings_dt(child, &gpmc_s);
+       gpmc_read_timings_dt(child, &gpmc_t);
  
        /*
         * For some GPMC devices we still need to rely on the bootloader
-        * timings because the devices can be connected via FPGA. So far
-        * the list is smc91x on the omap2 SDP boards, and 8250 on zooms.
-        * REVISIT: Add timing support from slls644g.pdf and from the
-        * lan91c96 manual.
+        * timings because the devices can be connected via FPGA.
+        * REVISIT: Add timing support from slls644g.pdf.
         */
-       if (of_device_is_compatible(child, "ns16550a") ||
-           of_device_is_compatible(child, "smsc,lan91c94") ||
-           of_device_is_compatible(child, "smsc,lan91c111")) {
-               dev_warn(&pdev->dev,
-                        "%s using bootloader timings on CS%d\n",
-                        child->name, cs);
+       if (!gpmc_t.cs_rd_off) {
+               WARN(1, "enable GPMC debug to configure .dts timings for CS%i\n",
+                       cs);
+               gpmc_cs_show_timings(cs,
+                                    "please add GPMC bootloader timings to .dts");
                goto no_timings;
        }
  
+       /* CS must be disabled while making changes to gpmc configuration */
+       gpmc_cs_disable_mem(cs);
        /*
         * FIXME: gpmc_cs_request() will map the CS to an arbitary
         * location in the gpmc address space. When booting with
                goto err;
        }
  
-       gpmc_read_settings_dt(child, &gpmc_s);
        ret = of_property_read_u32(child, "bank-width", &gpmc_s.device_width);
        if (ret < 0)
                goto err;
        if (ret < 0)
                goto err;
  
-       gpmc_read_timings_dt(child, &gpmc_t);
-       gpmc_cs_set_timings(cs, &gpmc_t);
+       ret = gpmc_cs_set_timings(cs, &gpmc_t);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n",
+                       child->name);
+               goto err;
+       }
+       /* Clear limited address i.e. enable A26-A11 */
+       val = gpmc_read_reg(GPMC_CONFIG);
+       val &= ~GPMC_CONFIG_LIMITEDADDRESS;
+       gpmc_write_reg(GPMC_CONFIG, val);
+       /* Enable CS region */
+       gpmc_cs_enable_mem(cs);
  
  no_timings:
        if (of_platform_device_create(child, NULL, &pdev->dev))
@@@ -1668,13 -1898,18 +1896,18 @@@ static int gpmc_probe(struct platform_d
        else
                gpmc_irq = res->start;
  
-       gpmc_l3_clk = clk_get(&pdev->dev, "fck");
+       gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
        if (IS_ERR(gpmc_l3_clk)) {
-               dev_err(&pdev->dev, "error: clk_get\n");
+               dev_err(&pdev->dev, "Failed to get GPMC fck\n");
                gpmc_irq = 0;
                return PTR_ERR(gpmc_l3_clk);
        }
  
+       if (!clk_get_rate(gpmc_l3_clk)) {
+               dev_err(&pdev->dev, "Invalid GPMC fck clock rate\n");
+               return -EINVAL;
+       }
        pm_runtime_enable(&pdev->dev);
        pm_runtime_get_sync(&pdev->dev);
  
        if (gpmc_setup_irq() < 0)
                dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
  
-       /* Now the GPMC is initialised, unreserve the chip-selects */
-       gpmc_cs_map = 0;
        if (!pdev->dev.of_node) {
                gpmc_cs_num      = GPMC_CS_NUM;
                gpmc_nr_waitpins = GPMC_NR_WAITPINS;
        rc = gpmc_probe_dt(pdev);
        if (rc < 0) {
                pm_runtime_put_sync(&pdev->dev);
-               clk_put(gpmc_l3_clk);
                dev_err(gpmc_dev, "failed to probe DT parameters\n");
                return rc;
        }
@@@ -1775,35 -2006,9 +2004,9 @@@ static __exit void gpmc_exit(void
  
  }
  
omap_postcore_initcall(gpmc_init);
+ postcore_initcall(gpmc_init);
  module_exit(gpmc_exit);
  
- static int __init omap_gpmc_init(void)
- {
-       struct omap_hwmod *oh;
-       struct platform_device *pdev;
-       char *oh_name = "gpmc";
-       /*
-        * if the board boots up with a populated DT, do not
-        * manually add the device from this initcall
-        */
-       if (of_have_populated_dt())
-               return -ENODEV;
-       oh = omap_hwmod_lookup(oh_name);
-       if (!oh) {
-               pr_err("Could not look up %s\n", oh_name);
-               return -ENODEV;
-       }
-       pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
-       WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
-       return PTR_RET(pdev);
- }
- omap_postcore_initcall(omap_gpmc_init);
  static irqreturn_t gpmc_handle_irq(int irq, void *dev)
  {
        int i;