Merge tag 'pinctrl-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Oct 2012 23:20:20 +0000 (16:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Oct 2012 23:20:20 +0000 (16:20 -0700)
Pull pinctrl changes from Linus Walleij:
 "Some of this stuff is hitting arch/arm/* and have been ACKed by the
  ARM SoC folks, or it's device tree bindings pertaining to the specific
  driver.

  These are the bulk pinctrl changes for kernel v3.7:
   - Add subdrivers for the DB8540 and NHK8815 Nomadik-type ASICs,
     provide platform config for the Nomadik.
   - Add a driver for the i.MX35.
   - Add a driver for the BCM2835, an advanced GPIO expander.
   - Various fixes and clean-ups and minor improvements for the core,
     Nomadik, pinctr-single, sirf drivers.
   - Some platform config for the ux500."

* tag 'pinctrl-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (27 commits)
  pinctrl: add bcm2835 driver
  pinctrl: clarify idle vs sleep states
  pinctrl/nomadik: use irq_find_mapping()
  pinctrl: sirf: add lost chained_irq_enter and exit in sirfsoc_gpio_handle_irq
  pinctrl: sirf: initialize the irq_chip pointer of pinctrl_gpio_range
  pinctrl: sirf: fix spinlock deadlock in sirfsoc_gpio_set_input
  pinctrl: sirf: add missing pins to pinctrl list
  pinctrl: sirf: fix a typo in sirfsoc_gpio_probe
  pinctrl: pinctrl-single: add debugfs pin h/w state info
  ARM: ux500: 8500: update I2C sleep states pinctrl
  pinctrl: Fix potential memory leak in pinctrl_register_one_pin()
  ARM: ux500: tidy up pin sleep modes
  ARM: ux500: fix spi2 pin group
  pinctrl: imx: remove duplicated const
  pinctrl: document semantics vs GPIO
  ARM: ux500: 8500: use hsit_a_2 group for HSI
  pinctrl: use kasprintf() in pinmux_request_gpio()
  pinctrl: pinctrl-single: Add pinctrl-single,bits type of mux
  pinctrl/nomadik : add MC1_a_2 pin MC1 function group list
  pinctrl: pinctrl-single: Make sure we do not change bits outside of mask
  ...

1  2 
arch/arm/Kconfig
arch/arm/mach-nomadik/board-nhk8815.c
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/pinctrl-sirf.c

diff --combined arch/arm/Kconfig
index 9d72ed67e43268ed1f679bcaafd14f669da79e79,1d4dd8107b776d4df19d812569dc1a935bd7f741..7bab17ed29729b84c464be57d6aa9e76a9c7369d
@@@ -6,7 -6,7 +6,7 @@@ config AR
        select HAVE_DMA_API_DEBUG
        select HAVE_IDE if PCI || ISA || PCMCIA
        select HAVE_DMA_ATTRS
 -      select HAVE_DMA_CONTIGUOUS if (CPU_V6 || CPU_V6K || CPU_V7)
 +      select HAVE_DMA_CONTIGUOUS if MMU
        select HAVE_MEMBLOCK
        select RTC_LIB
        select SYS_SUPPORTS_APM_EMULATION
@@@ -202,13 -202,6 +202,13 @@@ config ARM_PATCH_PHYS_VIR
          this feature (eg, building a kernel for a single machine) and
          you need to shrink the kernel to the minimal size.
  
 +config NEED_MACH_GPIO_H
 +      bool
 +      help
 +        Select this when mach/gpio.h is required to provide special
 +        definitions for this platform. The need for mach/gpio.h should
 +        be avoided when possible.
 +
  config NEED_MACH_IO_H
        bool
        help
@@@ -254,29 -247,39 +254,29 @@@ config MM
  #
  choice
        prompt "ARM system type"
 -      default ARCH_VERSATILE
 +      default ARCH_MULTIPLATFORM
  
 -config ARCH_SOCFPGA
 -      bool "Altera SOCFPGA family"
 -      select ARCH_WANT_OPTIONAL_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_GIC
 -      select CACHE_L2X0
 -      select CLKDEV_LOOKUP
 +config ARCH_MULTIPLATFORM
 +      bool "Allow multiple platforms to be selected"
 +      select ARM_PATCH_PHYS_VIRT
 +      select AUTO_ZRELADDR
        select COMMON_CLK
 -      select CPU_V7
 -      select DW_APB_TIMER
 -      select DW_APB_TIMER_OF
 -      select GENERIC_CLOCKEVENTS
 -      select GPIO_PL061 if GPIOLIB
 -      select HAVE_ARM_SCU
 +      select MULTI_IRQ_HANDLER
        select SPARSE_IRQ
        select USE_OF
 -      help
 -        This enables support for Altera SOCFPGA Cyclone V platform
 +      depends on MMU
  
  config ARCH_INTEGRATOR
        bool "ARM Ltd. Integrator family"
        select ARM_AMBA
        select ARCH_HAS_CPUFREQ
        select COMMON_CLK
 -      select CLK_VERSATILE
 +      select COMMON_CLK_VERSATILE
        select HAVE_TCM
        select ICST
        select GENERIC_CLOCKEVENTS
        select PLAT_VERSATILE
        select PLAT_VERSATILE_FPGA_IRQ
 -      select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select SPARSE_IRQ
        select MULTI_IRQ_HANDLER
  config ARCH_REALVIEW
        bool "ARM Ltd. RealView family"
        select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select HAVE_MACH_CLKDEV
 +      select COMMON_CLK
 +      select COMMON_CLK_VERSATILE
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select PLAT_VERSATILE
 -      select PLAT_VERSATILE_CLOCK
        select PLAT_VERSATILE_CLCD
        select ARM_TIMER_SP804
        select GPIO_PL061 if GPIOLIB
@@@ -308,6 -312,7 +308,6 @@@ config ARCH_VERSATIL
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
 -      select NEED_MACH_IO_H if PCI
        select PLAT_VERSATILE
        select PLAT_VERSATILE_CLOCK
        select PLAT_VERSATILE_CLCD
        help
          This enables support for ARM Ltd Versatile board.
  
 -config ARCH_VEXPRESS
 -      bool "ARM Ltd. Versatile Express family"
 -      select ARCH_WANT_OPTIONAL_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_TIMER_SP804
 -      select CLKDEV_LOOKUP
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
 -      select HAVE_PATA_PLATFORM
 -      select ICST
 -      select NO_IOPORT
 -      select PLAT_VERSATILE
 -      select PLAT_VERSATILE_CLCD
 -      select REGULATOR_FIXED_VOLTAGE if REGULATOR
 -      help
 -        This enables support for the ARM Ltd Versatile Express boards.
 -
  config ARCH_AT91
        bool "Atmel AT91"
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_CLK
        select CLKDEV_LOOKUP
        select IRQ_DOMAIN
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H if PCCARD
        help
          This enables support for systems based on Atmel
          AT91RM9200 and AT91SAM9* processors.
  
 -config ARCH_BCMRING
 -      bool "Broadcom BCMRING"
 -      depends on MMU
 -      select CPU_V6
 -      select ARM_AMBA
 -      select ARM_TIMER_SP804
 -      select CLKDEV_LOOKUP
 -      select GENERIC_CLOCKEVENTS
 -      select ARCH_WANT_OPTIONAL_GPIOLIB
 -      help
 -        Support for Broadcom's BCMRing platform.
 -
 -config ARCH_HIGHBANK
 -      bool "Calxeda Highbank-based"
 +config ARCH_BCM2835
 +      bool "Broadcom BCM2835 family"
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select ARM_AMBA
 -      select ARM_GIC
 +      select ARM_ERRATA_411920
        select ARM_TIMER_SP804
 -      select CACHE_L2X0
        select CLKDEV_LOOKUP
        select COMMON_CLK
 -      select CPU_V7
 +      select CPU_V6
        select GENERIC_CLOCKEVENTS
 -      select HAVE_ARM_SCU
 -      select HAVE_SMP
 +      select MULTI_IRQ_HANDLER
        select SPARSE_IRQ
        select USE_OF
        help
 -        Support for the Calxeda Highbank SoC based boards.
 +        This enables support for the Broadcom BCM2835 SoC. This SoC is
 +        use in the Raspberry Pi, and Roku 2 devices.
  
  config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select CPU_ARM720T
        select ARCH_USES_GETTIMEOFFSET
 +      select COMMON_CLK
 +      select CLKDEV_LOOKUP
        select NEED_MACH_MEMORY_H
        help
          Support for Cirrus Logic 711x/721x/731x based boards.
@@@ -374,19 -407,21 +374,19 @@@ config ARCH_GEMIN
        help
          Support for the Cortina Systems Gemini family SoCs
  
 -config ARCH_PRIMA2
 -      bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
 -      select CPU_V7
 +config ARCH_SIRF
 +      bool "CSR SiRF"
        select NO_IOPORT
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select CLKDEV_LOOKUP
 +      select COMMON_CLK
        select GENERIC_IRQ_CHIP
        select MIGHT_HAVE_CACHE_L2X0
        select PINCTRL
        select PINCTRL_SIRF
        select USE_OF
 -      select ZONE_DMA
        help
 -          Support for CSR SiRFSoC ARM Cortex A9 Platform
 +        Support for CSR SiRFprimaII/Marco/Polo platforms
  
  config ARCH_EBSA110
        bool "EBSA-110"
@@@ -421,7 -456,7 +421,7 @@@ config ARCH_FOOTBRIDG
        select FOOTBRIDGE
        select GENERIC_CLOCKEVENTS
        select HAVE_IDE
 -      select NEED_MACH_IO_H
 +      select NEED_MACH_IO_H if !MMU
        select NEED_MACH_MEMORY_H
        help
          Support for systems based on the DC21285 companion chip
@@@ -448,9 -483,7 +448,9 @@@ config ARCH_MX
        select CLKSRC_MMIO
        select COMMON_CLK
        select HAVE_CLK_PREPARE
 +      select MULTI_IRQ_HANDLER
        select PINCTRL
 +      select SPARSE_IRQ
        select USE_OF
        help
          Support for Freescale MXS-based family of processors
@@@ -480,6 -513,7 +480,6 @@@ config ARCH_IOP13X
        select PCI
        select ARCH_SUPPORTS_MSI
        select VMSPLIT_1G
 -      select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select NEED_RET_TO_USER
        help
@@@ -489,7 -523,6 +489,7 @@@ config ARCH_IOP32
        bool "IOP32x-based"
        depends on MMU
        select CPU_XSCALE
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        select NEED_RET_TO_USER
        select PLAT_IOP
@@@ -503,7 -536,6 +503,7 @@@ config ARCH_IOP33
        bool "IOP33x-based"
        depends on MMU
        select CPU_XSCALE
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        select NEED_RET_TO_USER
        select PLAT_IOP
@@@ -526,12 -558,25 +526,12 @@@ config ARCH_IXP4X
        help
          Support for Intel's IXP4XX (XScale) family of processors.
  
 -config ARCH_MVEBU
 -      bool "Marvell SOCs with Device Tree support"
 -      select GENERIC_CLOCKEVENTS
 -      select MULTI_IRQ_HANDLER
 -      select SPARSE_IRQ
 -      select CLKSRC_MMIO
 -      select GENERIC_IRQ_CHIP
 -      select IRQ_DOMAIN
 -      select COMMON_CLK
 -      help
 -        Support for the Marvell SoC Family with device tree support
 -
  config ARCH_DOVE
        bool "Marvell Dove"
        select CPU_V7
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the Marvell Dove SoC 88AP510
@@@ -542,6 -587,7 +542,6 @@@ config ARCH_KIRKWOO
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell Kirkwood series SoCs:
@@@ -568,6 -614,7 +568,6 @@@ config ARCH_MV78XX
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell MV78xx0 series SoCs:
@@@ -580,6 -627,7 +580,6 @@@ config ARCH_ORION5
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell Orion 5x series SoCs:
@@@ -597,7 -645,6 +597,7 @@@ config ARCH_MM
        select PLAT_PXA
        select SPARSE_IRQ
        select GENERIC_ALLOCATOR
 +      select NEED_MACH_GPIO_H
        help
          Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
  
@@@ -605,9 -652,8 +605,9 @@@ config ARCH_KS869
        bool "Micrel/Kendin KS8695"
        select CPU_ARM922T
        select ARCH_REQUIRE_GPIOLIB
 -      select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
 +      select CLKSRC_MMIO
 +      select GENERIC_CLOCKEVENTS
        help
          Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
          System-on-Chip devices.
@@@ -637,13 -683,40 +637,13 @@@ config ARCH_TEGR
        select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
 -      select NEED_MACH_IO_H if PCI
        select ARCH_HAS_CPUFREQ
        select USE_OF
 +      select COMMON_CLK
        help
          This enables support for NVIDIA Tegra based systems (Tegra APX,
          Tegra 6xx and Tegra 2 series).
  
 -config ARCH_PICOXCELL
 -      bool "Picochip picoXcell"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_PATCH_PHYS_VIRT
 -      select ARM_VIC
 -      select CPU_V6K
 -      select DW_APB_TIMER
 -      select DW_APB_TIMER_OF
 -      select GENERIC_CLOCKEVENTS
 -      select GENERIC_GPIO
 -      select HAVE_TCM
 -      select NO_IOPORT
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        This enables support for systems based on the Picochip picoXcell
 -        family of Femtocell devices.  The picoxcell support requires device tree
 -        for all boards.
 -
 -config ARCH_PNX4008
 -      bool "Philips Nexperia PNX4008 Mobile"
 -      select CPU_ARM926T
 -      select CLKDEV_LOOKUP
 -      select ARCH_USES_GETTIMEOFFSET
 -      help
 -        This enables support for Philips PNX4008 mobile platform.
 -
  config ARCH_PXA
        bool "PXA2xx/PXA3xx-based"
        depends on MMU
        select MULTI_IRQ_HANDLER
        select ARM_CPU_SUSPEND if PM
        select HAVE_IDE
 +      select NEED_MACH_GPIO_H
        help
          Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
  
@@@ -723,7 -795,6 +723,7 @@@ config ARCH_SA110
        select CLKDEV_LOOKUP
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_IDE
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_MEMORY_H
        select SPARSE_IRQ
        help
@@@ -739,7 -810,6 +739,7 @@@ config ARCH_S3C24X
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        help
          Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
@@@ -767,7 -837,6 +767,7 @@@ config ARCH_S3C64X
        select SAMSUNG_GPIOLIB_4BIT
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
 +      select NEED_MACH_GPIO_H
        help
          Samsung S3C64XX series based systems
  
@@@ -782,7 -851,6 +782,7 @@@ config ARCH_S5P64X
        select GENERIC_CLOCKEVENTS
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
 +      select NEED_MACH_GPIO_H
        help
          Samsung S5P64X0 CPU based systems, such as the Samsung SMDK6440,
          SMDK6450.
@@@ -797,7 -865,6 +797,7 @@@ config ARCH_S5PC10
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
 +      select NEED_MACH_GPIO_H
        help
          Samsung S5PC100 series based systems
  
@@@ -815,7 -882,6 +815,7 @@@ config ARCH_S5PV21
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_MEMORY_H
        help
          Samsung S5PV210/S5PC110 series based systems
@@@ -833,7 -899,6 +833,7 @@@ config ARCH_EXYNO
        select HAVE_S3C_RTC if RTC_CLASS
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
 +      select NEED_MACH_GPIO_H
        select NEED_MACH_MEMORY_H
        help
          Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
@@@ -847,6 -912,7 +847,6 @@@ config ARCH_SHAR
        select PCI
        select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
 -      select NEED_MACH_IO_H
        help
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
@@@ -865,7 -931,6 +865,7 @@@ config ARCH_U30
        select COMMON_CLK
        select GENERIC_GPIO
        select ARCH_REQUIRE_GPIOLIB
 +      select SPARSE_IRQ
        help
          Support for ST-Ericsson U300 series mobile platforms.
  
@@@ -891,6 -956,7 +891,7 @@@ config ARCH_NOMADI
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        select PINCTRL
+       select PINCTRL_STN8815
        select MIGHT_HAVE_CACHE_L2X0
        select ARCH_REQUIRE_GPIOLIB
        help
@@@ -906,7 -972,6 +907,7 @@@ config ARCH_DAVINC
        select GENERIC_ALLOCATOR
        select GENERIC_IRQ_CHIP
        select ARCH_HAS_HOLES_MEMORYMODEL
 +      select NEED_MACH_GPIO_H
        help
          Support for TI's DaVinci platform.
  
@@@ -919,7 -984,6 +920,7 @@@ config ARCH_OMA
        select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select ARCH_HAS_HOLES_MEMORYMODEL
 +      select NEED_MACH_GPIO_H
        help
          Support for TI's OMAP platform (OMAP1/2/3/4).
  
@@@ -942,10 -1006,6 +943,10 @@@ config ARCH_VT850
        select ARCH_HAS_CPUFREQ
        select GENERIC_CLOCKEVENTS
        select ARCH_REQUIRE_GPIOLIB
 +      select USE_OF
 +      select COMMON_CLK
 +      select HAVE_CLK
 +      select CLKDEV_LOOKUP
        help
          Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
  
@@@ -963,50 -1023,6 +964,50 @@@ config ARCH_ZYN
          Support for Xilinx Zynq ARM Cortex A9 Platform
  endchoice
  
 +menu "Multiple platform selection"
 +      depends on ARCH_MULTIPLATFORM
 +
 +comment "CPU Core family selection"
 +
 +config ARCH_MULTI_V4
 +      bool "ARMv4 based platforms (FA526, StrongARM)"
 +      select ARCH_MULTI_V4_V5
 +      depends on !ARCH_MULTI_V6_V7
 +
 +config ARCH_MULTI_V4T
 +      bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
 +      select ARCH_MULTI_V4_V5
 +      depends on !ARCH_MULTI_V6_V7
 +
 +config ARCH_MULTI_V5
 +      bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
 +      select ARCH_MULTI_V4_V5
 +      depends on !ARCH_MULTI_V6_V7
 +
 +config ARCH_MULTI_V4_V5
 +      bool
 +
 +config ARCH_MULTI_V6
 +      bool "ARMv6 based platforms (ARM11, Scorpion, ...)"
 +      select CPU_V6
 +      select ARCH_MULTI_V6_V7
 +
 +config ARCH_MULTI_V7
 +      bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
 +      select CPU_V7
 +      select ARCH_VEXPRESS
 +      default y
 +      select ARCH_MULTI_V6_V7
 +
 +config ARCH_MULTI_V6_V7
 +      bool
 +
 +config ARCH_MULTI_CPU_AUTO
 +      def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
 +      select ARCH_MULTI_V5
 +
 +endmenu
 +
  #
  # This is sorted alphabetically by mach-* pathname.  However, plat-*
  # Kconfigs may be included either alphabetically (according to the
@@@ -1016,6 -1032,8 +1017,6 @@@ source "arch/arm/mach-mvebu/Kconfig
  
  source "arch/arm/mach-at91/Kconfig"
  
 -source "arch/arm/mach-bcmring/Kconfig"
 -
  source "arch/arm/mach-clps711x/Kconfig"
  
  source "arch/arm/mach-cns3xxx/Kconfig"
@@@ -1032,8 -1050,6 +1033,8 @@@ source "arch/arm/mach-gemini/Kconfig
  
  source "arch/arm/mach-h720x/Kconfig"
  
 +source "arch/arm/mach-highbank/Kconfig"
 +
  source "arch/arm/mach-integrator/Kconfig"
  
  source "arch/arm/mach-iop32x/Kconfig"
@@@ -1069,8 -1085,6 +1070,8 @@@ source "arch/arm/mach-omap2/Kconfig
  
  source "arch/arm/mach-orion5x/Kconfig"
  
 +source "arch/arm/mach-picoxcell/Kconfig"
 +
  source "arch/arm/mach-pxa/Kconfig"
  source "arch/arm/plat-pxa/Kconfig"
  
@@@ -1083,8 -1097,6 +1084,8 @@@ source "arch/arm/mach-sa1100/Kconfig
  source "arch/arm/plat-samsung/Kconfig"
  source "arch/arm/plat-s3c24xx/Kconfig"
  
 +source "arch/arm/mach-socfpga/Kconfig"
 +
  source "arch/arm/plat-spear/Kconfig"
  
  source "arch/arm/mach-s3c24xx/Kconfig"
@@@ -1107,8 -1119,6 +1108,8 @@@ source "arch/arm/mach-exynos/Kconfig
  
  source "arch/arm/mach-shmobile/Kconfig"
  
 +source "arch/arm/mach-prima2/Kconfig"
 +
  source "arch/arm/mach-tegra/Kconfig"
  
  source "arch/arm/mach-u300/Kconfig"
@@@ -1120,6 -1130,8 +1121,6 @@@ source "arch/arm/mach-versatile/Kconfig
  source "arch/arm/mach-vexpress/Kconfig"
  source "arch/arm/plat-versatile/Kconfig"
  
 -source "arch/arm/mach-vt8500/Kconfig"
 -
  source "arch/arm/mach-w90x900/Kconfig"
  
  # Definitions to make life easier
@@@ -1168,6 -1180,12 +1169,6 @@@ config XSCALE_PM
        depends on CPU_XSCALE
        default y
  
 -config CPU_HAS_PMU
 -      depends on (CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU) && \
 -                 (!ARCH_OMAP3 || OMAP3_EMU)
 -      default y
 -      bool
 -
  config MULTI_IRQ_HANDLER
        bool
        help
@@@ -1606,7 -1624,6 +1607,7 @@@ config ARCH_NR_GPI
        default 355 if ARCH_U8500
        default 264 if MACH_H4700
        default 512 if SOC_OMAP5
 +      default 288 if ARCH_VT8500
        default 0
        help
          Maximum number of GPIOs in the system.
@@@ -1741,7 -1758,7 +1742,7 @@@ config HIGHPT
  
  config HW_PERF_EVENTS
        bool "Enable hardware performance counter support for perf events"
 -      depends on PERF_EVENTS && CPU_HAS_PMU
 +      depends on PERF_EVENTS
        default y
        help
          Enable hardware performance counter support for perf events. If
@@@ -1765,6 -1782,59 +1766,6 @@@ config FORCE_MAX_ZONEORDE
          This config option is actually maximum order plus one. For example,
          a value of 11 means that the largest free memory block is 2^10 pages.
  
 -config LEDS
 -      bool "Timer and CPU usage LEDs"
 -      depends on ARCH_CDB89712 || ARCH_EBSA110 || \
 -                 ARCH_EBSA285 || ARCH_INTEGRATOR || \
 -                 ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
 -                 ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
 -                 ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
 -                 ARCH_AT91 || ARCH_DAVINCI || \
 -                 ARCH_KS8695 || MACH_RD88F5182 || ARCH_REALVIEW
 -      help
 -        If you say Y here, the LEDs on your machine will be used
 -        to provide useful information about your current system status.
 -
 -        If you are compiling a kernel for a NetWinder or EBSA-285, you will
 -        be able to select which LEDs are active using the options below. If
 -        you are compiling a kernel for the EBSA-110 or the LART however, the
 -        red LED will simply flash regularly to indicate that the system is
 -        still functional. It is safe to say Y here if you have a CATS
 -        system, but the driver will do nothing.
 -
 -config LEDS_TIMER
 -      bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
 -                          OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
 -                          || MACH_OMAP_PERSEUS2
 -      depends on LEDS
 -      depends on !GENERIC_CLOCKEVENTS
 -      default y if ARCH_EBSA110
 -      help
 -        If you say Y here, one of the system LEDs (the green one on the
 -        NetWinder, the amber one on the EBSA285, or the red one on the LART)
 -        will flash regularly to indicate that the system is still
 -        operational. This is mainly useful to kernel hackers who are
 -        debugging unstable kernels.
 -
 -        The LART uses the same LED for both Timer LED and CPU usage LED
 -        functions. You may choose to use both, but the Timer LED function
 -        will overrule the CPU usage LED.
 -
 -config LEDS_CPU
 -      bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \
 -                      !ARCH_OMAP) \
 -                      || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
 -                      || MACH_OMAP_PERSEUS2
 -      depends on LEDS
 -      help
 -        If you say Y here, the red LED will be used to give a good real
 -        time indication of CPU usage, by lighting whenever the idle task
 -        is not currently executing.
 -
 -        The LART uses the same LED for both Timer LED and CPU usage LED
 -        functions. You may choose to use both, but the Timer LED function
 -        will overrule the CPU usage LED.
 -
  config ALIGNMENT_TRAP
        bool
        depends on CPU_CP15_MMU
@@@ -1991,7 -2061,7 +1992,7 @@@ endchoic
  
  config XIP_KERNEL
        bool "Kernel Execute-In-Place from ROM"
 -      depends on !ZBOOT_ROM && !ARM_LPAE
 +      depends on !ZBOOT_ROM && !ARM_LPAE && !ARCH_MULTIPLATFORM
        help
          Execute-In-Place allows the kernel to run from non-volatile storage
          directly addressable by the CPU, such as NOR flash. This saves RAM
@@@ -2244,7 -2314,7 +2245,7 @@@ menu "Power management options
  source "kernel/power/Kconfig"
  
  config ARCH_SUSPEND_POSSIBLE
 -      depends on !ARCH_S5PC100 && !ARCH_TEGRA
 +      depends on !ARCH_S5PC100
        depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
                CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
        def_bool y
index 92a00260d074142c2db33f43716d077d8f303511,66862fb981f953107d8409fd1b3418e8fdb5f6fc..bfa1eab91f4142cecb3bdd1ce4c4ec1b8e9a9698
@@@ -23,6 -23,7 +23,7 @@@
  #include <linux/mtd/partitions.h>
  #include <linux/i2c.h>
  #include <linux/io.h>
+ #include <linux/pinctrl/machine.h>
  #include <asm/hardware/vic.h>
  #include <asm/sizes.h>
  #include <asm/mach-types.h>
@@@ -33,8 -34,9 +34,9 @@@
  
  #include <plat/gpio-nomadik.h>
  #include <plat/mtu.h>
+ #include <plat/pincfg.h>
  
 -#include <mach/nand.h>
 +#include <linux/platform_data/mtd-nomadik-nand.h>
  #include <mach/fsmc.h>
  
  #include "cpu-8815.h"
@@@ -112,7 -114,8 +114,7 @@@ static struct mtd_partition nhk8815_par
  static struct nomadik_nand_platform_data nhk8815_nand_data = {
        .parts          = nhk8815_partitions,
        .nparts         = ARRAY_SIZE(nhk8815_partitions),
 -      .options        = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING \
 -                      | NAND_NO_READRDY,
 +      .options        = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING,
        .init           = nhk8815_nand_init,
  };
  
@@@ -290,8 -293,42 +292,42 @@@ static struct i2c_board_info __initdat
        },
  };
  
+ static unsigned long out_low[] = { PIN_OUTPUT_LOW };
+ static unsigned long out_high[] = { PIN_OUTPUT_HIGH };
+ static unsigned long in_nopull[] = { PIN_INPUT_NOPULL };
+ static unsigned long in_pullup[] = { PIN_INPUT_PULLUP };
+ static struct pinctrl_map __initdata nhk8815_pinmap[] = {
+       PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"),
+       PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"),
+       /* Hog in MMC/SD card mux */
+       PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"),
+       /* MCCLK */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO8_B10", out_low),
+       /* MCCMD */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO9_A10", in_pullup),
+       /* MCCMDDIR */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO10_C11", out_high),
+       /* MCDAT3-0 */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO11_B11", in_pullup),
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO12_A11", in_pullup),
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO13_C12", in_pullup),
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO14_B12", in_pullup),
+       /* MCDAT0DIR */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO15_A12", out_high),
+       /* MCDAT31DIR */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO16_C13", out_high),
+       /* MCMSFBCLK */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO24_C15", in_pullup),
+       /* CD input GPIO */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO111_H21", in_nopull),
+       /* CD bias drive */
+       PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO112_J21", out_low),
+ };
  static void __init nhk8815_platform_init(void)
  {
+       pinctrl_register_mappings(nhk8815_pinmap, ARRAY_SIZE(nhk8815_pinmap));
        cpu8815_platform_init();
        nhk8815_onenand_init();
        platform_add_devices(nhk8815_platform_devices,
diff --combined drivers/pinctrl/Kconfig
index 34e94c7f68caabc10181ea999327a8e88c657cfc,0cf12896a6f2617d55f6d32ae98b65d488249709..1ef6e1e8c6c6dac902c486414c164446cc97b290
@@@ -26,11 -26,24 +26,24 @@@ config DEBUG_PINCTR
        help
          Say Y here to add some extra checks and diagnostics to PINCTRL calls.
  
+ config PINCTRL_BCM2835
+       bool
+       select PINMUX
+       select PINCONF
  config PINCTRL_IMX
        bool
        select PINMUX
        select PINCONF
  
+ config PINCTRL_IMX35
+       bool "IMX35 pinctrl driver"
+       depends on OF
+       depends on SOC_IMX35
+       select PINCTRL_IMX
+       help
+         Say Y here to enable the imx35 pinctrl driver
  config PINCTRL_IMX51
        bool "IMX51 pinctrl driver"
        depends on OF
@@@ -86,10 -99,18 +99,18 @@@ config PINCTRL_NOMADI
        select PINMUX
        select PINCONF
  
+ config PINCTRL_STN8815
+       bool "STN8815 pin controller driver"
+       depends on PINCTRL_NOMADIK && ARCH_NOMADIK
  config PINCTRL_DB8500
        bool "DB8500 pin controller driver"
        depends on PINCTRL_NOMADIK && ARCH_U8500
  
+ config PINCTRL_DB8540
+       bool "DB8540 pin controller driver"
+       depends on PINCTRL_NOMADIK && ARCH_U8500
  config PINCTRL_PXA168
        bool "PXA168 pin controller driver"
        depends on ARCH_MMP
@@@ -145,15 -166,6 +166,15 @@@ config PINCTRL_COH90
          COH 901 335 and COH 901 571/3. They contain 3, 5 or 7
          ports of 8 GPIO pins each.
  
 +config PINCTRL_SAMSUNG
 +      bool "Samsung pinctrl driver"
 +      select PINMUX
 +      select PINCONF
 +
 +config PINCTRL_EXYNOS4
 +      bool "Pinctrl driver data for Exynos4 SoC"
 +      select PINCTRL_SAMSUNG
 +
  source "drivers/pinctrl/spear/Kconfig"
  
  endmenu
diff --combined drivers/pinctrl/Makefile
index 6a88113e11d9dff2a7fefd066ace97be9baff840,84952a2db83cf096491e0f605e3673eebca7862e..698527dce29dba381062a3425b04dc006b296682
@@@ -9,7 -9,9 +9,9 @@@ ifeq ($(CONFIG_OF),y
  obj-$(CONFIG_PINCTRL)         += devicetree.o
  endif
  obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
+ obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o
  obj-$(CONFIG_PINCTRL_IMX)     += pinctrl-imx.o
+ obj-$(CONFIG_PINCTRL_IMX35)   += pinctrl-imx35.o
  obj-$(CONFIG_PINCTRL_IMX51)   += pinctrl-imx51.o
  obj-$(CONFIG_PINCTRL_IMX53)   += pinctrl-imx53.o
  obj-$(CONFIG_PINCTRL_IMX6Q)   += pinctrl-imx6q.o
@@@ -19,7 -21,9 +21,9 @@@ obj-$(CONFIG_PINCTRL_MXS)     += pinctrl-mx
  obj-$(CONFIG_PINCTRL_IMX23)   += pinctrl-imx23.o
  obj-$(CONFIG_PINCTRL_IMX28)   += pinctrl-imx28.o
  obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o
+ obj-$(CONFIG_PINCTRL_STN8815) += pinctrl-nomadik-stn8815.o
  obj-$(CONFIG_PINCTRL_DB8500)  += pinctrl-nomadik-db8500.o
+ obj-$(CONFIG_PINCTRL_DB8540)  += pinctrl-nomadik-db8540.o
  obj-$(CONFIG_PINCTRL_PXA168)  += pinctrl-pxa168.o
  obj-$(CONFIG_PINCTRL_PXA910)  += pinctrl-pxa910.o
  obj-$(CONFIG_PINCTRL_SINGLE)  += pinctrl-single.o
@@@ -29,7 -33,5 +33,7 @@@ obj-$(CONFIG_PINCTRL_TEGRA20) += pinctr
  obj-$(CONFIG_PINCTRL_TEGRA30) += pinctrl-tegra30.o
  obj-$(CONFIG_PINCTRL_U300)    += pinctrl-u300.o
  obj-$(CONFIG_PINCTRL_COH901)  += pinctrl-coh901.o
 +obj-$(CONFIG_PINCTRL_SAMSUNG) += pinctrl-samsung.o
 +obj-$(CONFIG_PINCTRL_EXYNOS4) += pinctrl-exynos.o
  
  obj-$(CONFIG_PLAT_SPEAR)      += spear/
index 304360cd213ee400a18e71fce846838f6845ce6b,fa88655c5e965550dd4b156971d0ba0d4191ab5b..675497c15149f2e3725cdb9f1031d78dc1859750
@@@ -17,7 -17,6 +17,7 @@@
  #include <linux/pinctrl/pinctrl.h>
  #include <linux/pinctrl/pinmux.h>
  #include <linux/pinctrl/consumer.h>
 +#include <linux/pinctrl/machine.h>
  #include <linux/of.h>
  #include <linux/of_address.h>
  #include <linux/of_device.h>
@@@ -25,6 -24,7 +25,7 @@@
  #include <linux/bitops.h>
  #include <linux/gpio.h>
  #include <linux/of_gpio.h>
+ #include <asm/mach/irq.h>
  
  #define DRIVER_NAME "pinmux-sirf"
  
@@@ -69,6 -69,10 +70,10 @@@ static DEFINE_SPINLOCK(sgpio_lock)
   * refer to CS-131858-DC-6A.xls
   */
  static const struct pinctrl_pin_desc sirfsoc_pads[] = {
+       PINCTRL_PIN(0, "gpio0-0"),
+       PINCTRL_PIN(1, "gpio0-1"),
+       PINCTRL_PIN(2, "gpio0-2"),
+       PINCTRL_PIN(3, "gpio0-3"),
        PINCTRL_PIN(4, "pwm0"),
        PINCTRL_PIN(5, "pwm1"),
        PINCTRL_PIN(6, "pwm2"),
@@@ -77,7 -81,9 +82,9 @@@
        PINCTRL_PIN(9, "odo_0"),
        PINCTRL_PIN(10, "odo_1"),
        PINCTRL_PIN(11, "dr_dir"),
+       PINCTRL_PIN(12, "viprom_fa"),
        PINCTRL_PIN(13, "scl_1"),
+       PINCTRL_PIN(14, "ntrst"),
        PINCTRL_PIN(15, "sda_1"),
        PINCTRL_PIN(16, "x_ldd[16]"),
        PINCTRL_PIN(17, "x_ldd[17]"),
@@@ -917,66 -923,11 +924,66 @@@ static void sirfsoc_pin_dbg_show(struc
        seq_printf(s, " " DRIVER_NAME);
  }
  
 +static int sirfsoc_dt_node_to_map(struct pinctrl_dev *pctldev,
 +                               struct device_node *np_config,
 +                               struct pinctrl_map **map, unsigned *num_maps)
 +{
 +      struct sirfsoc_pmx *spmx = pinctrl_dev_get_drvdata(pctldev);
 +      struct device_node *np;
 +      struct property *prop;
 +      const char *function, *group;
 +      int ret, index = 0, count = 0;
 +
 +      /* calculate number of maps required */
 +      for_each_child_of_node(np_config, np) {
 +              ret = of_property_read_string(np, "sirf,function", &function);
 +              if (ret < 0)
 +                      return ret;
 +
 +              ret = of_property_count_strings(np, "sirf,pins");
 +              if (ret < 0)
 +                      return ret;
 +
 +              count += ret;
 +      }
 +
 +      if (!count) {
 +              dev_err(spmx->dev, "No child nodes passed via DT\n");
 +              return -ENODEV;
 +      }
 +
 +      *map = kzalloc(sizeof(**map) * count, GFP_KERNEL);
 +      if (!*map)
 +              return -ENOMEM;
 +
 +      for_each_child_of_node(np_config, np) {
 +              of_property_read_string(np, "sirf,function", &function);
 +              of_property_for_each_string(np, "sirf,pins", prop, group) {
 +                      (*map)[index].type = PIN_MAP_TYPE_MUX_GROUP;
 +                      (*map)[index].data.mux.group = group;
 +                      (*map)[index].data.mux.function = function;
 +                      index++;
 +              }
 +      }
 +
 +      *num_maps = count;
 +
 +      return 0;
 +}
 +
 +static void sirfsoc_dt_free_map(struct pinctrl_dev *pctldev,
 +              struct pinctrl_map *map, unsigned num_maps)
 +{
 +      kfree(map);
 +}
 +
  static struct pinctrl_ops sirfsoc_pctrl_ops = {
        .get_groups_count = sirfsoc_get_groups_count,
        .get_group_name = sirfsoc_get_group_name,
        .get_group_pins = sirfsoc_get_group_pins,
        .pin_dbg_show = sirfsoc_pin_dbg_show,
 +      .dt_node_to_map = sirfsoc_dt_node_to_map,
 +      .dt_free_map = sirfsoc_dt_free_map,
  };
  
  struct sirfsoc_pmx_func {
@@@ -1260,8 -1211,10 +1267,10 @@@ static int __devinit sirfsoc_pinmux_pro
                goto out_no_pmx;
        }
  
-       for (i = 0; i < ARRAY_SIZE(sirfsoc_gpio_ranges); i++)
+       for (i = 0; i < ARRAY_SIZE(sirfsoc_gpio_ranges); i++) {
+               sirfsoc_gpio_ranges[i].gc = &sgpio_bank[i].chip.gc;
                pinctrl_add_gpio_range(spmx->pmx, &sirfsoc_gpio_ranges[i]);
+       }
  
        dev_info(&pdev->dev, "initialized SIRFSOC pinmux driver\n");
  
@@@ -1277,7 -1230,7 +1286,7 @@@ out_no_gpio_remap
  }
  
  static const struct of_device_id pinmux_ids[] __devinitconst = {
 -      { .compatible = "sirf,prima2-gpio-pinmux" },
 +      { .compatible = "sirf,prima2-pinctrl" },
        {}
  };
  
@@@ -1475,6 -1428,9 +1484,9 @@@ static void sirfsoc_gpio_handle_irq(uns
        u32 status, ctrl;
        int idx = 0;
        unsigned int first_irq;
+       struct irq_chip *chip = irq_get_chip(irq);
+       chained_irq_enter(chip, desc);
  
        status = readl(bank->chip.regs + SIRFSOC_GPIO_INT_STATUS(bank->id));
        if (!status) {
                idx++;
                status = status >> 1;
        }
+       chained_irq_exit(chip, desc);
  }
  
  static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsigned ctrl_offset)
  {
        u32 val;
-       unsigned long flags;
-       spin_lock_irqsave(&bank->lock, flags);
  
        val = readl(bank->chip.regs + ctrl_offset);
        val &= ~SIRFSOC_GPIO_CTL_OUT_EN_MASK;
        writel(val, bank->chip.regs + ctrl_offset);
-       spin_unlock_irqrestore(&bank->lock, flags);
  }
  
  static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
@@@ -1726,6 -1679,8 +1735,8 @@@ static int __devinit sirfsoc_gpio_probe
                irq_set_handler_data(bank->parent_irq, bank);
        }
  
+       return 0;
  out:
        iounmap(regs);
        return err;