]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'msm/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Aug 2013 06:56:08 +0000 (16:56 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Aug 2013 06:56:08 +0000 (16:56 +1000)
Conflicts:
arch/arm/Kconfig.debug

1  2 
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/mach-msm/timer.c

diff --combined arch/arm/Kconfig
index 2a6a9ff34324d93284259778ad852de834bd3a05,54ec3d1527f12186da0255329819fc87ced3924d..a4aa9bc20c9491da00cc1e5235a0ba1a10bbaed0
@@@ -20,6 -20,7 +20,6 @@@ config AR
        select GENERIC_STRNCPY_FROM_USER
        select GENERIC_STRNLEN_USER
        select HARDIRQS_SW_RESEND
 -      select HAVE_AOUT
        select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_SECCOMP_FILTER
@@@ -629,6 -630,7 +629,7 @@@ config ARCH_MS
        bool "Qualcomm MSM"
        select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select CLKSRC_OF if OF
        select COMMON_CLK
        select GENERIC_CLOCKEVENTS
        help
@@@ -644,7 -646,7 +645,7 @@@ config ARCH_SHMOBIL
        select CLKDEV_LOOKUP
        select GENERIC_CLOCKEVENTS
        select HAVE_ARM_SCU if SMP
 -      select HAVE_ARM_TWD if LOCAL_TIMERS
 +      select HAVE_ARM_TWD if SMP
        select HAVE_CLK
        select HAVE_MACH_CLKDEV
        select HAVE_SMP
@@@ -1583,6 -1585,16 +1584,6 @@@ config ARM_PSC
          0022A ("Power State Coordination Interface System Software on
          ARM processors").
  
 -config LOCAL_TIMERS
 -      bool "Use local timer interrupts"
 -      depends on SMP
 -      default y
 -      help
 -        Enable support for local timers on SMP platforms, rather then the
 -        legacy IPI broadcast method.  Local timers allows the system
 -        accounting to be spread across the timer interval, preventing a
 -        "thundering herd" at every timer tick.
 -
  # The GPIO number here must be sorted by descending number. In case of
  # a multiplatform kernel, we just want the highest value required by the
  # selected platforms.
@@@ -1602,49 -1614,13 +1603,49 @@@ config ARCH_NR_GPI
  
  source kernel/Kconfig.preempt
  
 -config HZ
 +config HZ_FIXED
        int
        default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \
                ARCH_S5PV210 || ARCH_EXYNOS4
        default AT91_TIMER_HZ if ARCH_AT91
        default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE
 -      default 100
 +
 +choice
 +      depends on !HZ_FIXED
 +      prompt "Timer frequency"
 +
 +config HZ_100
 +      bool "100 Hz"
 +
 +config HZ_200
 +      bool "200 Hz"
 +
 +config HZ_250
 +      bool "250 Hz"
 +
 +config HZ_300
 +      bool "300 Hz"
 +
 +config HZ_500
 +      bool "500 Hz"
 +
 +config HZ_1000
 +      bool "1000 Hz"
 +
 +endchoice
 +
 +config HZ
 +      int
 +      default HZ_FIXED if HZ_FIXED
 +      default 100 if HZ_100
 +      default 200 if HZ_200
 +      default 250 if HZ_250
 +      default 300 if HZ_300
 +      default 500 if HZ_500
 +      default 1000
 +
 +config SCHED_HRTICK
 +      def_bool HIGH_RES_TIMERS
  
  config SCHED_HRTICK
        def_bool HIGH_RES_TIMERS
@@@ -1781,9 -1757,6 +1782,9 @@@ config HAVE_ARCH_TRANSPARENT_HUGEPAG
         def_bool y
         depends on ARM_LPAE
  
 +config ARCH_WANT_GENERAL_HUGETLB
 +      def_bool y
 +
  source "mm/Kconfig"
  
  config FORCE_MAX_ZONEORDER
@@@ -2203,13 -2176,6 +2204,13 @@@ config NEO
          Say Y to include support code for NEON, the ARMv7 Advanced SIMD
          Extension.
  
 +config KERNEL_MODE_NEON
 +      bool "Support for NEON in kernel mode"
 +      default n
 +      depends on NEON
 +      help
 +        Say Y to include support for NEON in kernel mode.
 +
  endmenu
  
  menu "Userspace binary formats"
diff --combined arch/arm/Kconfig.debug
index 38c92d7b74c1b978c0d9162ed20486e0646ee49c,4a62a8d4f3b686fe077317c5b7bab468825e9b8e..af5d084e8418a5e6ce7945b937bd86a10a67f940
@@@ -92,7 -92,6 +92,7 @@@ choic
        config DEBUG_BCM2835
                bool "Kernel low-level debugging on BCM2835 PL011 UART"
                depends on ARCH_BCM2835
 +              select DEBUG_UART_PL01X
  
        config DEBUG_CLPS711X_UART1
                bool "Kernel low-level debugging messages via UART1"
        config DEBUG_CNS3XXX
                bool "Kernel Kernel low-level debugging on Cavium Networks CNS3xxx"
                depends on ARCH_CNS3XXX
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want the debug print routines to direct
                    their output to the CNS3xxx UART0.
        config DEBUG_DAVINCI_DA8XX_UART1
                bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
                depends on ARCH_DAVINCI_DA8XX
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on DaVinci DA8XX devices.
        config DEBUG_DAVINCI_DA8XX_UART2
                bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
                depends on ARCH_DAVINCI_DA8XX
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART2 serial port on DaVinci DA8XX devices.
        config DEBUG_DAVINCI_DMx_UART0
                bool "Kernel low-level debugging on DaVinci DMx using UART0"
                depends on ARCH_DAVINCI_DMx
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART0 serial port on DaVinci DMx devices.
        config DEBUG_DAVINCI_TNETV107X_UART1
                bool "Kernel low-level debugging on DaVinci TNETV107x using UART1"
                depends on ARCH_DAVINCI_TNETV107X
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on DaVinci TNETV107X
        config DEBUG_HIGHBANK_UART
                bool "Kernel low-level debugging messages via Highbank UART"
                depends on ARCH_HIGHBANK
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want the debug print routines to direct
                  their output to the UART on Highbank based devices.
        config DEBUG_IMX23_UART
                bool "i.MX23 Debug UART"
                depends on SOC_IMX23
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want kernel low-level debugging support
                  on i.MX23.
        config DEBUG_IMX28_UART
                bool "i.MX28 Debug UART"
                depends on SOC_IMX28
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want kernel low-level debugging support
                  on i.MX28.
        config DEBUG_KEYSTONE_UART0
                bool "Kernel low-level debugging on KEYSTONE2 using UART0"
                depends on ARCH_KEYSTONE
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART0 serial port on KEYSTONE2 devices.
        config DEBUG_KEYSTONE_UART1
                bool "Kernel low-level debugging on KEYSTONE2 using UART1"
                depends on ARCH_KEYSTONE
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on KEYSTONE2 devices.
        config DEBUG_MMP_UART2
                bool "Kernel low-level debugging message via MMP UART2"
                depends on ARCH_MMP
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MMP UART2.
        config DEBUG_MMP_UART3
                bool "Kernel low-level debugging message via MMP UART3"
                depends on ARCH_MMP
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MMP UART3.
        config DEBUG_MVEBU_UART
                bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)"
                depends on ARCH_MVEBU
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MVEBU based platforms.
        config DEBUG_MVEBU_UART_ALTERNATE
                bool "Kernel low-level debugging messages via MVEBU UART (new bootloaders)"
                depends on ARCH_MVEBU
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on MVEBU based platforms.
                  when u-boot hands over to the kernel, the system
                  silently crashes, with no serial output at all.
  
 +      config DEBUG_VF_UART
 +              bool "Vybrid UART"
 +              depends on SOC_VF610
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Vybrid based platforms.
 +
        config DEBUG_NOMADIK_UART
                bool "Kernel low-level debugging messages via NOMADIK UART"
                depends on ARCH_NOMADIK
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want kernel low-level debugging support
                  on NOMADIK based platforms.
        config DEBUG_NSPIRE_CLASSIC_UART
                bool "Kernel low-level debugging via TI-NSPIRE 8250 UART"
                depends on ARCH_NSPIRE
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on TI-NSPIRE classic models.
        config DEBUG_NSPIRE_CX_UART
                bool "Kernel low-level debugging via TI-NSPIRE PL011 UART"
                depends on ARCH_NSPIRE
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want kernel low-level debugging support
                  on TI-NSPIRE CX models.
  
 -      config DEBUG_OMAP2PLUS_UART
 -              bool "Kernel low-level debugging messages via OMAP2PLUS UART"
 +      config DEBUG_OMAP2UART1
 +              bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)"
                depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
                help
 -                Say Y here if you want kernel low-level debugging support
 -                on OMAP2PLUS based platforms.
 +                This covers at least h4, 2430sdp, 3430sdp, 3630sdp,
 +                omap3 torpedo and 3530 lv som.
 +
 +      config DEBUG_OMAP2UART2
 +              bool "Kernel low-level debugging messages via OMAP2/3/4 UART2"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_OMAP2UART3
 +              bool "Kernel low-level debugging messages via OMAP2 UART3 (n8x0)"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_OMAP3UART3
 +              bool "Kernel low-level debugging messages via OMAP3 UART3 (most omap3 boards)"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +              help
 +                This covers at least cm_t3x, beagle, crane, devkit8000,
 +                igep00x0, ldp, n900, n9(50), pandora, overo, touchbook,
 +                and 3517evm.
 +
 +      config DEBUG_OMAP4UART3
 +              bool "Kernel low-level debugging messages via OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_OMAP3UART4
 +              bool "Kernel low-level debugging messages via OMAP36XX UART4"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_OMAP4UART4
 +              bool "Kernel low-level debugging messages via OMAP4/5 UART4"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_TI81XXUART1
 +              bool "Kernel low-level debugging messages via TI81XX UART1 (ti8148evm)"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_TI81XXUART2
 +              bool "Kernel low-level debugging messages via TI81XX UART2"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_TI81XXUART3
 +              bool "Kernel low-level debugging messages via TI81XX UART3 (ti8168evm)"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_AM33XXUART1
 +              bool "Kernel low-level debugging messages via AM33XX UART1"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
 +
 +      config DEBUG_ZOOM_UART
 +              bool "Kernel low-level debugging messages via Zoom2/3 UART"
 +              depends on ARCH_OMAP2PLUS
 +              select DEBUG_OMAP2PLUS_UART
  
        config DEBUG_PICOXCELL_UART
                depends on ARCH_PICOXCELL
                bool "Use PicoXcell UART for low-level debug"
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on PicoXcell based platforms.
        config DEBUG_PXA_UART1
                depends on ARCH_PXA
                bool "Use PXA UART1 for low-level debug"
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on PXA UART1.
        config DEBUG_REALVIEW_STD_PORT
                bool "RealView Default UART"
                depends on ARCH_REALVIEW
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want the debug print routines to direct
                  their output to the serial port on RealView EB, PB11MP, PBA8
        config DEBUG_REALVIEW_PB1176_PORT
                bool "RealView PB1176 UART"
                depends on MACH_REALVIEW_PB1176
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want the debug print routines to direct
                  their output to the standard serial port on the RealView
                  PB1176 platform.
  
 -      config DEBUG_ROCKCHIP_UART
 -              bool "Kernel low-level debugging messages via Rockchip UART"
 +      config DEBUG_RK29_UART0
 +              bool "Kernel low-level debugging messages via Rockchip RK29 UART0"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK29_UART1
 +              bool "Kernel low-level debugging messages via Rockchip RK29 UART1"
                depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK29_UART2
 +              bool "Kernel low-level debugging messages via Rockchip RK29 UART2"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK3X_UART0
 +              bool "Kernel low-level debugging messages via Rockchip RK3X UART0"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK3X_UART1
 +              bool "Kernel low-level debugging messages via Rockchip RK3X UART1"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK3X_UART2
 +              bool "Kernel low-level debugging messages via Rockchip RK3X UART2"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Rockchip based platforms.
 +
 +      config DEBUG_RK3X_UART3
 +              bool "Kernel low-level debugging messages via Rockchip RK3X UART3"
 +              depends on ARCH_ROCKCHIP
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
        config DEBUG_SOCFPGA_UART
                depends on ARCH_SOCFPGA
                bool "Use SOCFPGA UART for low-level debug"
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on SOCFPGA based platforms.
        config DEBUG_SUNXI_UART0
                bool "Kernel low-level debugging messages via sunXi UART0"
                depends on ARCH_SUNXI
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Allwinner A1X based platforms on the UART0.
        config DEBUG_SUNXI_UART1
                bool "Kernel low-level debugging messages via sunXi UART1"
                depends on ARCH_SUNXI
 +              select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Allwinner A1X based platforms on the UART1.
  
 -      config DEBUG_TEGRA_UART
 +      config TEGRA_DEBUG_UART_AUTO_ODMDATA
 +              bool "Kernel low-level debugging messages via Tegra UART via ODMDATA"
 +              depends on ARCH_TEGRA
 +              select DEBUG_TEGRA_UART
 +              help
 +                Automatically determines which UART to use for low-level
 +                debug based on the ODMDATA value. This value is part of
 +                the BCT, and is written to the boot memory device using
 +                nvflash, or other flashing tool.  When bits 19:18 are 3,
 +                then bits 17:15 indicate which UART to use; 0/1/2/3/4
 +                are UART A/B/C/D/E.
 +
 +      config TEGRA_DEBUG_UARTA
 +              bool "Kernel low-level debugging messages via Tegra UART A"
 +              depends on ARCH_TEGRA
 +              select DEBUG_TEGRA_UART
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Tegra based platforms.
 +
 +      config TEGRA_DEBUG_UARTB
 +              bool "Kernel low-level debugging messages via Tegra UART B"
 +              depends on ARCH_TEGRA
 +              select DEBUG_TEGRA_UART
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Tegra based platforms.
 +
 +      config TEGRA_DEBUG_UARTC
 +              bool "Kernel low-level debugging messages via Tegra UART C"
 +              depends on ARCH_TEGRA
 +              select DEBUG_TEGRA_UART
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Tegra based platforms.
 +
 +      config TEGRA_DEBUG_UARTD
 +              bool "Kernel low-level debugging messages via Tegra UART D"
 +              depends on ARCH_TEGRA
 +              select DEBUG_TEGRA_UART
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Tegra based platforms.
 +
 +      config TEGRA_DEBUG_UARTE
 +              bool "Kernel low-level debugging messages via Tegra UART E"
                depends on ARCH_TEGRA
 -              bool "Use Tegra UART for low-level debug"
 +              select DEBUG_TEGRA_UART
                help
                  Say Y here if you want kernel low-level debugging support
                  on Tegra based platforms.
                  Say Y here if you want the debug print routines to direct
                  their output to the uart1 port on SiRFmarco devices.
  
 -      config DEBUG_STI_UART
 +      config STIH41X_DEBUG_ASC2
 +              bool "Use StiH415/416 ASC2 UART for low-level debug"
 +              depends on ARCH_STI
 +              select DEBUG_STI_UART
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on STiH415/416 based platforms like b2000, which has
 +                default UART wired up to ASC2.
 +
 +                If unsure, say N.
 +
 +      config STIH41X_DEBUG_SBC_ASC1
 +              bool "Use StiH415/416 SBC ASC1 UART for low-level debug"
                depends on ARCH_STI
 -              bool "Use StiH415/416 ASC for low-level debug"
 +              select DEBUG_STI_UART
                help
                  Say Y here if you want kernel low-level debugging support
 -                on StiH415/416 based platforms like B2000, B2020.
 -                It support UART2 and SBC_UART1.
 +                on STiH415/416 based platforms like b2020. which has
 +                default UART wired up to SBC ASC1.
  
                  If unsure, say N.
  
        config DEBUG_U300_UART
                bool "Kernel low-level debugging messages via U300 UART0"
                depends on ARCH_U300
 +              select DEBUG_UART_PL01X
                help
                  Say Y here if you want the debug print routines to direct
                  their output to the uart port on U300 devices.
        config DEBUG_VEXPRESS_UART0_CA9
                bool "Use PL011 UART0 at 0x10009000 (V2P-CA9 core tile)"
                depends on ARCH_VEXPRESS
 +              select DEBUG_UART_PL01X
                help
                  This option selects UART0 at 0x10009000. Except for custom models,
                  this applies only to the V2P-CA9 tile.
        config DEBUG_VEXPRESS_UART0_RS1
                bool "Use PL011 UART0 at 0x1c090000 (RS1 complaint tiles)"
                depends on ARCH_VEXPRESS
 +              select DEBUG_UART_PL01X
                help
                  This option selects UART0 at 0x1c090000. This applies to most
                  of the tiles using the RS1 memory map, including all new A-class
        config DEBUG_VEXPRESS_UART0_CRX
                bool "Use PL011 UART0 at 0xb0090000 (Cortex-R compliant tiles)"
                depends on ARCH_VEXPRESS && !MMU
 +              select DEBUG_UART_PL01X
                help
                  This option selects UART0 at 0xb0090000. This is appropriate for
                  Cortex-R series tiles and SMMs, such as Cortex-R5 and Cortex-R7
                depends on !ARCH_MULTIPLATFORM
                help
                  Say Y here if your platform doesn't provide a UART option
 -                below. This relies on your platform choosing the right UART
 +                above. This relies on your platform choosing the right UART
                  definition internally in order for low-level debugging to
                  work.
  
                  For more details about semihosting, please see
                  chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
  
 +      config DEBUG_LL_UART_8250
 +              bool "Kernel low-level debugging via 8250 UART"
 +              help
 +                Say Y here if you wish the debug print routes to direct
 +                their output to an 8250 UART.  You can use this option
 +                to provide the parameters for the 8250 UART rather than
 +                selecting one of the platform specific options above if
 +                you know the parameters for the port.
 +
 +                This option is preferred over the platform specific
 +                options; the platform specific options are deprecated
 +                and will be soon removed.
 +
 +      config DEBUG_LL_UART_PL01X
 +              bool "Kernel low-level debugging via ARM Ltd PL01x Primecell UART"
 +              help
 +                Say Y here if you wish the debug print routes to direct
 +                their output to a PL01x Primecell UART.  You can use
 +                this option to provide the parameters for the UART
 +                rather than selecting one of the platform specific
 +                options above if you know the parameters for the port.
 +
 +                This option is preferred over the platform specific
 +                options; the platform specific options are deprecated
 +                and will be soon removed.
 +
  endchoice
  
  config DEBUG_EXYNOS_UART
        bool
  
 +config DEBUG_OMAP2PLUS_UART
 +      bool
 +      depends on ARCH_OMAP2PLUS
 +
  config DEBUG_IMX_UART_PORT
        int "i.MX Debug UART Port Selection" if DEBUG_IMX1_UART || \
                                                DEBUG_IMX25_UART || \
          Choose UART port on which kernel low-level debug messages
          should be output.
  
 -choice
 -      prompt "Low-level debug console UART"
 -      depends on DEBUG_OMAP2PLUS_UART
 -
 -      config DEBUG_OMAP2UART1
 -              bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)"
 -              help
 -                This covers at least h4, 2430sdp, 3430sdp, 3630sdp,
 -                omap3 torpedo and 3530 lv som.
 -
 -      config DEBUG_OMAP2UART2
 -              bool "OMAP2/3/4 UART2"
 -
 -      config DEBUG_OMAP2UART3
 -              bool "OMAP2 UART3 (n8x0)"
 -
 -      config DEBUG_OMAP3UART3
 -              bool "OMAP3 UART3 (most omap3 boards)"
 -              help
 -                This covers at least cm_t3x, beagle, crane, devkit8000,
 -                igep00x0, ldp, n900, n9(50), pandora, overo, touchbook,
 -                and 3517evm.
 -
 -      config DEBUG_OMAP4UART3
 -              bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)"
 -
 -      config DEBUG_OMAP3UART4
 -              bool "OMAP36XX UART4"
 -
 -      config DEBUG_OMAP4UART4
 -              bool "OMAP4/5 UART4"
 -
 -      config DEBUG_TI81XXUART1
 -              bool "TI81XX UART1 (ti8148evm)"
 -
 -      config DEBUG_TI81XXUART2
 -              bool "TI81XX UART2"
 -
 -      config DEBUG_TI81XXUART3
 -              bool "TI81XX UART3 (ti8168evm)"
 -
 -      config DEBUG_AM33XXUART1
 -              bool "AM33XX UART1"
 -
 -      config DEBUG_ZOOM_UART
 -              bool "Zoom2/3 UART"
 -endchoice
 -
 -choice
 -      prompt "Low-level debug console UART"
 -      depends on DEBUG_ROCKCHIP_UART
 -
 -      config DEBUG_RK29_UART0
 -              bool "RK29 UART0"
 -
 -      config DEBUG_RK29_UART1
 -              bool "RK29 UART1"
 -
 -      config DEBUG_RK29_UART2
 -              bool "RK29 UART2"
 -
 -      config DEBUG_RK3X_UART0
 -              bool "RK3X UART0"
 -
 -      config DEBUG_RK3X_UART1
 -              bool "RK3X UART1"
 -
 -      config DEBUG_RK3X_UART2
 -              bool "RK3X UART2"
 -
 -      config DEBUG_RK3X_UART3
 -              bool "RK3X UART3"
 -endchoice
 -
 -choice
 -      prompt "Low-level debug console UART"
 -      depends on DEBUG_LL && DEBUG_TEGRA_UART
 -
 -      config TEGRA_DEBUG_UART_AUTO_ODMDATA
 -      bool "Via ODMDATA"
 -      help
 -        Automatically determines which UART to use for low-level debug based
 -        on the ODMDATA value. This value is part of the BCT, and is written
 -        to the boot memory device using nvflash, or other flashing tool.
 -        When bits 19:18 are 3, then bits 17:15 indicate which UART to use;
 -        0/1/2/3/4 are UART A/B/C/D/E.
 -
 -      config TEGRA_DEBUG_UARTA
 -              bool "UART A"
 -
 -      config TEGRA_DEBUG_UARTB
 -              bool "UART B"
 -
 -      config TEGRA_DEBUG_UARTC
 -              bool "UART C"
 -
 -      config TEGRA_DEBUG_UARTD
 -              bool "UART D"
 -
 -      config TEGRA_DEBUG_UARTE
 -              bool "UART E"
 -
 -endchoice
 -
 -choice
 -      prompt "Low-level debug console UART"
 -      depends on DEBUG_LL && DEBUG_STI_UART
 -
 -      config STIH41X_DEBUG_ASC2
 -              bool "ASC2 UART"
 -              help
 -                Say Y here if you want kernel low-level debugging support
 -                on STiH415/416 based platforms like b2000, which has
 -                default UART wired up to ASC2.
 -
 -                If unsure, say N.
 -
 -      config STIH41X_DEBUG_SBC_ASC1
 -              bool "SBC ASC1 UART"
 -              help
 -                Say Y here if you want kernel low-level debugging support
 -                on STiH415/416 based platforms like b2020. which has
 -                default UART wired up to SBC ASC1.
 -
 -                If unsure, say N.
 +config DEBUG_TEGRA_UART
 +      bool
 +      depends on ARCH_TEGRA
  
 -endchoice
 +config DEBUG_STI_UART
 +      bool
 +      depends on ARCH_STI
  
  config DEBUG_LL_INCLUDE
        string
 -      default "debug/bcm2835.S" if DEBUG_BCM2835
 -      default "debug/cns3xxx.S" if DEBUG_CNS3XXX
 +      default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250
 +      default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X
        default "debug/exynos.S" if DEBUG_EXYNOS_UART
 -      default "debug/highbank.S" if DEBUG_HIGHBANK_UART
        default "debug/icedcc.S" if DEBUG_ICEDCC
        default "debug/imx.S" if DEBUG_IMX1_UART || \
                                 DEBUG_IMX25_UART || \
                                 DEBUG_IMX53_UART ||\
                                 DEBUG_IMX6Q_UART || \
                                 DEBUG_IMX6SL_UART
 -      default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \
 -                                    DEBUG_KEYSTONE_UART1
+       default "debug/msm.S" if DEBUG_MSM_UART1 || \
+                                DEBUG_MSM_UART2 || \
+                                DEBUG_MSM_UART3 || \
+                                DEBUG_MSM8660_UART || \
+                                DEBUG_MSM8960_UART
 -      default "debug/mvebu.S" if DEBUG_MVEBU_UART || \
 -                                 DEBUG_MVEBU_UART_ALTERNATE
 -      default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART
 -      default "debug/nomadik.S" if DEBUG_NOMADIK_UART
 -      default "debug/nspire.S" if     DEBUG_NSPIRE_CX_UART || \
 -                                      DEBUG_NSPIRE_CLASSIC_UART
        default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
 -      default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
 -      default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \
 -                               DEBUG_MMP_UART3
 -      default "debug/rockchip.S" if DEBUG_ROCKCHIP_UART
        default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
 -      default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
        default "debug/sti.S" if DEBUG_STI_UART
 -      default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
        default "debug/tegra.S" if DEBUG_TEGRA_UART
 -      default "debug/u300.S" if DEBUG_U300_UART
        default "debug/ux500.S" if DEBUG_UX500_UART
 -      default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
 -              DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 || \
 -              DEBUG_VEXPRESS_UART0_CRX
 +      default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT
 +      default "debug/vf.S" if DEBUG_VF_UART
        default "debug/vt8500.S" if DEBUG_VT8500_UART0
        default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
        default "mach/debug-macro.S"
  
 +# Compatibility options for PL01x
 +config DEBUG_UART_PL01X
 +      def_bool ARCH_EP93XX || \
 +              ARCH_INTEGRATOR || \
 +              ARCH_SPEAR3XX || \
 +              ARCH_SPEAR6XX || \
 +              ARCH_SPEAR13XX || \
 +              ARCH_VERSATILE
 +
 +# Compatibility options for 8250
 +config DEBUG_UART_8250
 +      def_bool ARCH_DOVE || ARCH_EBSA110 || \
 +              (FOOTBRIDGE && !DEBUG_DC21285_PORT) || \
 +              ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \
 +              ARCH_IOP33X || ARCH_IXP4XX || ARCH_KIRKWOOD || \
 +              ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC
 +
 +config DEBUG_UART_PHYS
 +      hex "Physical base address of debug UART"
 +      default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0
 +      default 0x01c28000 if DEBUG_SUNXI_UART0
 +      default 0x01c28400 if DEBUG_SUNXI_UART1
 +      default 0x01d0c000 if DEBUG_DAVINCI_DA8XX_UART1
 +      default 0x01d0d000 if DEBUG_DAVINCI_DA8XX_UART2
 +      default 0x02530c00 if DEBUG_KEYSTONE_UART0
 +      default 0x02531000 if DEBUG_KEYSTONE_UART1
 +      default 0x03010fe0 if ARCH_RPC
 +      default 0x08108300 if DEBUG_DAVINCI_TNETV107X_UART1
 +      default 0x10009000 if DEBUG_REALVIEW_STD_PORT || DEBUG_CNS3XXX || \
 +                              DEBUG_VEXPRESS_UART0_CA9
 +      default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
 +      default 0x10124000 if DEBUG_RK3X_UART0
 +      default 0x10126000 if DEBUG_RK3X_UART1
 +      default 0x101f1000 if ARCH_VERSATILE
 +      default 0x101fb000 if DEBUG_NOMADIK_UART
 +      default 0x16000000 if ARCH_INTEGRATOR
 +      default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1
 +      default 0x20060000 if DEBUG_RK29_UART0
 +      default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
 +      default 0x20068000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
 +      default 0x20201000 if DEBUG_BCM2835
 +      default 0x40090000 if ARCH_LPC32XX
 +      default 0x40100000 if DEBUG_PXA_UART1
 +      default 0x42000000 if ARCH_GEMINI
 +      default 0x7c0003f8 if FOOTBRIDGE
 +      default 0x80230000 if DEBUG_PICOXCELL_UART
 +      default 0x80070000 if DEBUG_IMX23_UART
 +      default 0x80074000 if DEBUG_IMX28_UART
 +      default 0x808c0000 if ARCH_EP93XX
 +      default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 +      default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
 +      default 0xc0013000 if DEBUG_U300_UART
 +      default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
 +      default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
 +      default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
 +      default 0xd0012000 if DEBUG_MVEBU_UART
 +      default 0xd4017000 if DEBUG_MMP_UART2
 +      default 0xd4018000 if DEBUG_MMP_UART3
 +      default 0xe0000000 if ARCH_SPEAR13XX
 +      default 0xf0000be0 if ARCH_EBSA110
 +      default 0xf1012000 if DEBUG_MVEBU_UART_ALTERNATE
 +      default 0xf1012000 if ARCH_DOVE || ARCH_KIRKWOOD || ARCH_MV78XX0 || \
 +                              ARCH_ORION5X
 +      default 0xfe800000 if ARCH_IOP32X
 +      default 0xffc02000 if DEBUG_SOCFPGA_UART
 +      default 0xffd82340 if ARCH_IOP13XX
 +      default 0xfff36000 if DEBUG_HIGHBANK_UART
 +      default 0xfffff700 if ARCH_IOP33X
 +      depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
 +              DEBUG_UART_8250 || DEBUG_UART_PL01X
 +
 +config DEBUG_UART_VIRT
 +      hex "Virtual base address of debug UART"
 +      default 0xe0010fe0 if ARCH_RPC
 +      default 0xf0000be0 if ARCH_EBSA110
 +      default 0xf0009000 if DEBUG_CNS3XXX
 +      default 0xf01fb000 if DEBUG_NOMADIK_UART
 +      default 0xf0201000 if DEBUG_BCM2835
 +      default 0xf11f1000 if ARCH_VERSATILE
 +      default 0xf1600000 if ARCH_INTEGRATOR
 +      default 0xf1c28000 if DEBUG_SUNXI_UART0
 +      default 0xf1c28400 if DEBUG_SUNXI_UART1
 +      default 0xf2100000 if DEBUG_PXA_UART1
 +      default 0xf4090000 if ARCH_LPC32XX
 +      default 0xf4200000 if ARCH_GEMINI
 +      default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9
 +      default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1
 +      default 0xfb009000 if DEBUG_REALVIEW_STD_PORT
 +      default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT
 +      default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
 +      default 0xfd000000 if ARCH_SPEAR13XX
 +      default 0xfd012000 if ARCH_MV78XX0
 +      default 0xfde12000 if ARCH_DOVE
 +      default 0xfe012000 if ARCH_ORION5X
 +      default 0xfe017000 if DEBUG_MMP_UART2
 +      default 0xfe018000 if DEBUG_MMP_UART3
 +      default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
 +      default 0xfe230000 if DEBUG_PICOXCELL_UART
 +      default 0xfe800000 if ARCH_IOP32X
 +      default 0xfeb24000 if DEBUG_RK3X_UART0
 +      default 0xfeb26000 if DEBUG_RK3X_UART1
 +      default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
 +      default 0xfeb31000 if DEBUG_KEYSTONE_UART1
 +      default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE
 +      default 0xfed60000 if DEBUG_RK29_UART0
 +      default 0xfed64000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2
 +      default 0xfed68000 if DEBUG_RK29_UART2 || DEBUG_RK3X_UART3
 +      default 0xfec02000 if DEBUG_SOCFPGA_UART
 +      default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
 +      default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1
 +      default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2
 +      default 0xfed12000 if ARCH_KIRKWOOD
 +      default 0xfedc0000 if ARCH_EP93XX
 +      default 0xfee003f8 if FOOTBRIDGE
 +      default 0xfee08300 if DEBUG_DAVINCI_TNETV107X_UART1
 +      default 0xfee20000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 +      default 0xfee36000 if DEBUG_HIGHBANK_UART
 +      default 0xfee82340 if ARCH_IOP13XX
 +      default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
 +      default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
 +      default 0xfefff700 if ARCH_IOP33X
 +      default 0xff003000 if DEBUG_U300_UART
 +      default DEBUG_UART_PHYS if !MMU
 +      depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
 +              DEBUG_UART_8250 || DEBUG_UART_PL01X
 +
 +config DEBUG_UART_8250_SHIFT
 +      int "Register offset shift for the 8250 debug UART"
 +      depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
 +      default 0 if FOOTBRIDGE || ARCH_IOP32X
 +      default 2
 +
 +config DEBUG_UART_8250_WORD
 +      bool "Use 32-bit accesses for 8250 UART"
 +      depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
 +      depends on DEBUG_UART_8250_SHIFT >= 2
 +      default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \
 +              ARCH_KEYSTONE || \
 +              DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
 +              DEBUG_DAVINCI_DA8XX_UART2 || DEBUG_DAVINCI_TNETV107X_UART1
 +
 +config DEBUG_UART_8250_FLOW_CONTROL
 +      bool "Enable flow control for 8250 UART"
 +      depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
 +      default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_GEMINI || ARCH_RPC
 +
  config DEBUG_UNCOMPRESS
        bool
-       depends on ARCH_MULTIPLATFORM
 -      default y if (ARCH_MULTIPLATFORM || ARCH_MSM) && DEBUG_LL && \
 -                   !DEBUG_OMAP2PLUS_UART && \
++      depends on ARCH_MULTIPLATFORM || ARCH_MSM
 +      default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
                     !DEBUG_TEGRA_UART
 +      help
 +        This option influences the normal decompressor output for
 +        multiplatform kernels.  Normally, multiplatform kernels disable
 +        decompressor output because it is not possible to know where to
 +        send the decompressor output.
 +
 +        When this option is set, the selected DEBUG_LL output method
 +        will be re-used for normal decompressor output on multiplatform
 +        kernels.
 +        
  
  config UNCOMPRESS_INCLUDE
        string
-       default "debug/uncompress.h" if ARCH_MULTIPLATFORM
+       default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM
        default "mach/uncompress.h"
  
  config EARLY_PRINTK
index a7afbacae61a13715a61c790056fbfe58519d2ba,57a9aecd4f418ecaaa2eca8314e7e0ea30bfb618..696fb73296d0e7bd0d4419e5363c496794a73079
@@@ -16,7 -16,6 +16,7 @@@
  
  #include <linux/clocksource.h>
  #include <linux/clockchips.h>
 +#include <linux/cpu.h>
  #include <linux/init.h>
  #include <linux/interrupt.h>
  #include <linux/irq.h>
@@@ -27,6 -26,7 +27,6 @@@
  #include <linux/sched_clock.h>
  
  #include <asm/mach/time.h>
 -#include <asm/localtimer.h>
  
  #include "common.h"
  
@@@ -49,7 -49,7 +49,7 @@@ static void __iomem *sts_base
  
  static irqreturn_t msm_timer_interrupt(int irq, void *dev_id)
  {
 -      struct clock_event_device *evt = *(struct clock_event_device **)dev_id;
 +      struct clock_event_device *evt = dev_id;
        /* Stop the timer tick */
        if (evt->mode == CLOCK_EVT_MODE_ONESHOT) {
                u32 ctrl = readl_relaxed(event_base + TIMER_ENABLE);
@@@ -101,7 -101,18 +101,7 @@@ static void msm_timer_set_mode(enum clo
        writel_relaxed(ctrl, event_base + TIMER_ENABLE);
  }
  
 -static struct clock_event_device msm_clockevent = {
 -      .name           = "gp_timer",
 -      .features       = CLOCK_EVT_FEAT_ONESHOT,
 -      .rating         = 200,
 -      .set_next_event = msm_timer_set_next_event,
 -      .set_mode       = msm_timer_set_mode,
 -};
 -
 -static union {
 -      struct clock_event_device *evt;
 -      struct clock_event_device * __percpu *percpu_evt;
 -} msm_evt;
 +static struct clock_event_device __percpu *msm_evt;
  
  static void __iomem *source_base;
  
@@@ -127,34 -138,23 +127,34 @@@ static struct clocksource msm_clocksour
        .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
  };
  
 -#ifdef CONFIG_LOCAL_TIMERS
 +static int msm_timer_irq;
 +static int msm_timer_has_ppi;
 +
  static int msm_local_timer_setup(struct clock_event_device *evt)
  {
 -      /* Use existing clock_event for cpu 0 */
 -      if (!smp_processor_id())
 -              return 0;
 -
 -      evt->irq = msm_clockevent.irq;
 -      evt->name = "local_timer";
 -      evt->features = msm_clockevent.features;
 -      evt->rating = msm_clockevent.rating;
 +      int cpu = smp_processor_id();
 +      int err;
 +
 +      evt->irq = msm_timer_irq;
 +      evt->name = "msm_timer";
 +      evt->features = CLOCK_EVT_FEAT_ONESHOT;
 +      evt->rating = 200;
        evt->set_mode = msm_timer_set_mode;
        evt->set_next_event = msm_timer_set_next_event;
 +      evt->cpumask = cpumask_of(cpu);
 +
 +      clockevents_config_and_register(evt, GPT_HZ, 4, 0xffffffff);
 +
 +      if (msm_timer_has_ppi) {
 +              enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
 +      } else {
 +              err = request_irq(evt->irq, msm_timer_interrupt,
 +                              IRQF_TIMER | IRQF_NOBALANCING |
 +                              IRQF_TRIGGER_RISING, "gp_timer", evt);
 +              if (err)
 +                      pr_err("request_irq failed\n");
 +      }
  
 -      *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
 -      clockevents_config_and_register(evt, GPT_HZ, 4, 0xf0000000);
 -      enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
        return 0;
  }
  
@@@ -164,28 -164,11 +164,28 @@@ static void msm_local_timer_stop(struc
        disable_percpu_irq(evt->irq);
  }
  
 -static struct local_timer_ops msm_local_timer_ops = {
 -      .setup  = msm_local_timer_setup,
 -      .stop   = msm_local_timer_stop,
 +static int msm_timer_cpu_notify(struct notifier_block *self,
 +                                         unsigned long action, void *hcpu)
 +{
 +      /*
 +       * Grab cpu pointer in each case to avoid spurious
 +       * preemptible warnings
 +       */
 +      switch (action & ~CPU_TASKS_FROZEN) {
 +      case CPU_STARTING:
 +              msm_local_timer_setup(this_cpu_ptr(msm_evt));
 +              break;
 +      case CPU_DYING:
 +              msm_local_timer_stop(this_cpu_ptr(msm_evt));
 +              break;
 +      }
 +
 +      return NOTIFY_OK;
 +}
 +
 +static struct notifier_block msm_timer_cpu_nb = {
 +      .notifier_call = msm_timer_cpu_notify,
  };
 -#endif /* CONFIG_LOCAL_TIMERS */
  
  static notrace u32 msm_sched_clock_read(void)
  {
  static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq,
                                  bool percpu)
  {
 -      struct clock_event_device *ce = &msm_clockevent;
        struct clocksource *cs = &msm_clocksource;
 -      int res;
 +      int res = 0;
 +
 +      msm_timer_irq = irq;
 +      msm_timer_has_ppi = percpu;
 +
 +      msm_evt = alloc_percpu(struct clock_event_device);
 +      if (!msm_evt) {
 +              pr_err("memory allocation failed for clockevents\n");
 +              goto err;
 +      }
  
 -      ce->cpumask = cpumask_of(0);
 -      ce->irq = irq;
 +      if (percpu)
 +              res = request_percpu_irq(irq, msm_timer_interrupt,
 +                                       "gp_timer", msm_evt);
  
 -      clockevents_config_and_register(ce, GPT_HZ, 4, 0xffffffff);
 -      if (percpu) {
 -              msm_evt.percpu_evt = alloc_percpu(struct clock_event_device *);
 -              if (!msm_evt.percpu_evt) {
 -                      pr_err("memory allocation failed for %s\n", ce->name);
 +      if (res) {
 +              pr_err("request_percpu_irq failed\n");
 +      } else {
 +              res = register_cpu_notifier(&msm_timer_cpu_nb);
 +              if (res) {
 +                      free_percpu_irq(irq, msm_evt);
                        goto err;
                }
 -              *__this_cpu_ptr(msm_evt.percpu_evt) = ce;
 -              res = request_percpu_irq(ce->irq, msm_timer_interrupt,
 -                                       ce->name, msm_evt.percpu_evt);
 -              if (!res) {
 -                      enable_percpu_irq(ce->irq, IRQ_TYPE_EDGE_RISING);
 -#ifdef CONFIG_LOCAL_TIMERS
 -                      local_timer_register(&msm_local_timer_ops);
 -#endif
 -              }
 -      } else {
 -              msm_evt.evt = ce;
 -              res = request_irq(ce->irq, msm_timer_interrupt,
 -                                IRQF_TIMER | IRQF_NOBALANCING |
 -                                IRQF_TRIGGER_RISING, ce->name, &msm_evt.evt);
 +
 +              /* Immediately configure the timer on the boot CPU */
 +              msm_local_timer_setup(__this_cpu_ptr(msm_evt));
        }
  
 -      if (res)
 -              pr_err("request_irq failed for %s\n", ce->name);
  err:
        writel_relaxed(TIMER_ENABLE_EN, source_base + TIMER_ENABLE);
        res = clocksource_register_hz(cs, dgt_hz);
  }
  
  #ifdef CONFIG_OF
- static const struct of_device_id msm_timer_match[] __initconst = {
-       { .compatible = "qcom,kpss-timer" },
-       { .compatible = "qcom,scss-timer" },
-       { },
- };
- void __init msm_dt_timer_init(void)
+ static void __init msm_dt_timer_init(struct device_node *np)
  {
-       struct device_node *np;
        u32 freq;
        int irq;
        struct resource res;
        void __iomem *base;
        void __iomem *cpu0_base;
  
-       np = of_find_matching_node(NULL, msm_timer_match);
-       if (!np) {
-               pr_err("Can't find msm timer DT node\n");
-               return;
-       }
        base = of_iomap(np, 0);
        if (!base) {
                pr_err("Failed to map event base\n");
  
        msm_timer_init(freq, 32, irq, !!percpu_offset);
  }
+ CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
+ CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
  #endif
  
  static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,