Merge branch 'next/cross-platform' of git://git.linaro.org/people/arnd/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Nov 2011 03:34:22 +0000 (20:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Nov 2011 03:34:22 +0000 (20:34 -0700)
* 'next/cross-platform' of git://git.linaro.org/people/arnd/arm-soc:
  arm/imx: use Kconfig choice for low-level debug UART selection
  ARM: realview: use Kconfig choice for debug UART selection
  ARM: plat-samsung: use Kconfig choice for debug UART selection
  ARM: versatile: convert logical CPU numbers to physical numbers
  ARM: ux500: convert logical CPU numbers to physical numbers
  ARM: shmobile: convert logical CPU numbers to physical numbers
  ARM: msm: convert logical CPU numbers to physical numbers
  ARM: exynos4: convert logical CPU numbers to physical numbers

Fix up trivial conflict (config DEBUG_S3C_UART move/split vs addition of
ARM_KPROBES_TEST option) in arch/arm/Kconfig.debug

1  2 
arch/arm/Kconfig.debug
arch/arm/mach-exynos4/platsmp.c
arch/arm/mach-msm/platsmp.c
arch/arm/mach-mxs/include/mach/debug-macro.S
arch/arm/mach-realview/include/mach/debug-macro.S
arch/arm/mach-ux500/platsmp.c
arch/arm/mach-vexpress/hotplug.c
arch/arm/plat-mxc/include/mach/debug-macro.S
arch/arm/plat-samsung/Kconfig

diff --combined arch/arm/Kconfig.debug
@@@ -128,6 -128,111 +128,111 @@@ choic
                  Say Y here if you want the debug print routines to direct
                  their output to the second serial port on these devices.
  
+       config DEBUG_IMX1_UART
+               bool "i.MX1 Debug UART"
+               depends on SOC_IMX1
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX1.
+       config DEBUG_IMX23_UART
+               bool "i.MX23 Debug UART"
+               depends on SOC_IMX23
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX23.
+       config DEBUG_IMX25_UART
+               bool "i.MX25 Debug UART"
+               depends on SOC_IMX25
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX25.
+       config DEBUG_IMX21_IMX27_UART
+               bool "i.MX21 and i.MX27 Debug UART"
+               depends on SOC_IMX21 || SOC_IMX27
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX21 or i.MX27.
+       config DEBUG_IMX28_UART
+               bool "i.MX28 Debug UART"
+               depends on SOC_IMX28
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX28.
+       config DEBUG_IMX31_IMX35_UART
+               bool "i.MX31 and i.MX35 Debug UART"
+               depends on SOC_IMX31 || SOC_IMX35
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX31 or i.MX35.
+       config DEBUG_IMX51_UART
+               bool "i.MX51 Debug UART"
+               depends on SOC_IMX51
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX51.
+       config DEBUG_IMX50_IMX53_UART
+               bool "i.MX50 and i.MX53 Debug UART"
+               depends on SOC_IMX50 || SOC_IMX53
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on i.MX50 or i.MX53.
+       config DEBUG_S3C_UART0
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 0 for low-level debug"
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to UART 0. The port must have been initialised
+                 by the boot-loader before use.
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+       config DEBUG_S3C_UART1
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 1 for low-level debug"
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to UART 1. The port must have been initialised
+                 by the boot-loader before use.
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+       config DEBUG_S3C_UART2
+               depends on PLAT_SAMSUNG
+               bool "Use S3C UART 2 for low-level debug"
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to UART 2. The port must have been initialised
+                 by the boot-loader before use.
+                 The uncompressor code port configuration is now handled
+                 by CONFIG_S3C_LOWLEVEL_UART_PORT.
+       config DEBUG_REALVIEW_STD_PORT
+               bool "RealView Default UART"
+               depends on ARCH_REALVIEW
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the serial port on RealView EB, PB11MP, PBA8
+                 and PBX platforms.
+       config DEBUG_REALVIEW_PB1176_PORT
+               bool "RealView PB1176 UART"
+               depends on MACH_REALVIEW_PB1176
+               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.
  endchoice
  
  config EARLY_PRINTK
  
  config OC_ETM
        bool "On-chip ETM and ETB"
 -      select ARM_AMBA
 +      depends on ARM_AMBA
        help
          Enables the on-chip embedded trace macrocell and embedded trace
          buffer driver that will allow you to collect traces of the
          kernel code.
  
- config DEBUG_S3C_UART
-       depends on PLAT_SAMSUNG
-       int "S3C UART to use for low-level debug"
-       default "0"
-       help
-         Choice for UART for kernel low-level using S3C UARTS,
-         should be between zero and two. The port must have been
-         initialised by the boot-loader before use.
-         The uncompressor code port configuration is now handled
-         by CONFIG_S3C_LOWLEVEL_UART_PORT.
 +config ARM_KPROBES_TEST
 +      tristate "Kprobes test module"
 +      depends on KPROBES && MODULES
 +      help
 +        Perform tests of kprobes API and instruction set simulation.
 +
  endmenu
  #include <mach/regs-clock.h>
  #include <mach/regs-pmu.h>
  
 +#include <plat/cpu.h>
 +
 +extern unsigned int gic_bank_offset;
  extern void exynos4_secondary_startup(void);
  
 -#define CPU1_BOOT_REG S5P_VA_SYSRAM
 +#define CPU1_BOOT_REG         (samsung_rev() == EXYNOS4210_REV_1_1 ? \
 +                              S5P_INFORM5 : S5P_VA_SYSRAM)
  
  /*
   * control for which core is the next to come out of the secondary
@@@ -68,9 -64,9 +68,9 @@@ static DEFINE_SPINLOCK(boot_lock)
  static void __cpuinit exynos4_gic_secondary_init(void)
  {
        void __iomem *dist_base = S5P_VA_GIC_DIST +
 -                               (EXYNOS4_GIC_BANK_OFFSET * smp_processor_id());
 +                              (gic_bank_offset * smp_processor_id());
        void __iomem *cpu_base = S5P_VA_GIC_CPU +
 -                              (EXYNOS4_GIC_BANK_OFFSET * smp_processor_id());
 +                              (gic_bank_offset * smp_processor_id());
        int i;
  
        /*
@@@ -110,8 -106,6 +110,8 @@@ void __cpuinit platform_secondary_init(
         */
        spin_lock(&boot_lock);
        spin_unlock(&boot_lock);
 +
 +      set_cpu_online(cpu, true);
  }
  
  int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
         * Note that "pen_release" is the hardware CPU ID, whereas
         * "cpu" is Linux's internal ID.
         */
-       write_pen_release(cpu);
+       write_pen_release(cpu_logical_map(cpu));
  
        if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) {
                __raw_writel(S5P_CORE_LOCAL_PWR_EN,
@@@ -197,10 -191,12 +197,10 @@@ void __init smp_init_cpus(void
        ncores = scu_base ? scu_get_core_count(scu_base) : 1;
  
        /* sanity check */
 -      if (ncores > NR_CPUS) {
 -              printk(KERN_WARNING
 -                     "EXYNOS4: no. of cores (%d) greater than configured "
 -                     "maximum of %d - clipping\n",
 -                     ncores, NR_CPUS);
 -              ncores = NR_CPUS;
 +      if (ncores > nr_cpu_ids) {
 +              pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
 +                      ncores, nr_cpu_ids);
 +              ncores = nr_cpu_ids;
        }
  
        for (i = 0; i < ncores; i++)
@@@ -220,6 -216,5 +220,6 @@@ void __init platform_smp_prepare_cpus(u
         * until it receives a soft interrupt, and then the
         * secondary CPU branches to this address.
         */
 -      __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), S5P_VA_SYSRAM);
 +      __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)),
 +                      CPU1_BOOT_REG);
  }
@@@ -117,7 -117,7 +117,7 @@@ int __cpuinit boot_secondary(unsigned i
         * Note that "pen_release" is the hardware CPU ID, whereas
         * "cpu" is Linux's internal ID.
         */
-       pen_release = cpu;
+       pen_release = cpu_logical_map(cpu);
        __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release));
        outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1));
  
@@@ -156,12 -156,6 +156,12 @@@ void __init smp_init_cpus(void
  {
        unsigned int i, ncores = get_core_count();
  
 +      if (ncores > nr_cpu_ids) {
 +              pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
 +                      ncores, nr_cpu_ids);
 +              ncores = nr_cpu_ids;
 +      }
 +
        for (i = 0; i < ncores; i++)
                set_cpu_possible(i, true);
  
  #include <mach/mx23.h>
  #include <mach/mx28.h>
  
- #ifdef CONFIG_SOC_IMX23
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #ifdef CONFIG_DEBUG_IMX23_UART
  #define UART_PADDR    MX23_DUART_BASE_ADDR
- #endif
- #ifdef CONFIG_SOC_IMX28
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX28_UART)
  #define UART_PADDR    MX28_DUART_BASE_ADDR
  #endif
  
  #define UART_VADDR    MXS_IO_ADDRESS(UART_PADDR)
  
 -              .macro  addruart, rp, rv
 +              .macro  addruart, rp, rv, tmp
                ldr     \rp, =UART_PADDR        @ physical
                ldr     \rv, =UART_VADDR        @ virtual
                .endm
   * published by the Free Software Foundation.
   */
  
- #if defined(CONFIG_MACH_REALVIEW_EB) || \
-     defined(CONFIG_MACH_REALVIEW_PB11MP) || \
-     defined(CONFIG_MACH_REALVIEW_PBA8) || \
-     defined(CONFIG_MACH_REALVIEW_PBX)
- #ifndef DEBUG_LL_UART_OFFSET
+ #ifdef CONFIG_DEBUG_REALVIEW_STD_PORT
  #define DEBUG_LL_UART_OFFSET  0x00009000
- #elif DEBUG_LL_UART_OFFSET != 0x00009000
- #warning "DEBUG_LL_UART_OFFSET already defined to a different value"
- #endif
- #endif
- #ifdef CONFIG_MACH_REALVIEW_PB1176
- #ifndef DEBUG_LL_UART_OFFSET
+ #elif defined(CONFIG_DEBUG_REALVIEW_PB1176_PORT)
  #define DEBUG_LL_UART_OFFSET  0x0010c000
- #elif DEBUG_LL_UART_OFFSET != 0x0010c000
- #warning "DEBUG_LL_UART_OFFSET already defined to a different value"
- #endif
  #endif
  
  #ifndef DEBUG_LL_UART_OFFSET
  #error "Unknown RealView platform"
  #endif
  
 -              .macro  addruart, rp, rv
 +              .macro  addruart, rp, rv, tmp
                mov     \rp, #DEBUG_LL_UART_OFFSET
                orr     \rv, \rp, #0xfb000000   @ virtual base
                orr     \rp, \rp, #0x10000000   @ physical base
@@@ -96,7 -96,7 +96,7 @@@ int __cpuinit boot_secondary(unsigned i
         * the holding pen - release it, then wait for it to flag
         * that it has been released by resetting pen_release.
         */
-       write_pen_release(cpu);
+       write_pen_release(cpu_logical_map(cpu));
  
        gic_raise_softirq(cpumask_of(cpu), 1);
  
@@@ -156,10 -156,12 +156,10 @@@ void __init smp_init_cpus(void
        ncores = scu_base ? scu_get_core_count(scu_base) : 1;
  
        /* sanity check */
 -      if (ncores > NR_CPUS) {
 -              printk(KERN_WARNING
 -                     "U8500: no. of cores (%d) greater than configured "
 -                     "maximum of %d - clipping\n",
 -                     ncores, NR_CPUS);
 -              ncores = NR_CPUS;
 +      if (ncores > nr_cpu_ids) {
 +              pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
 +                      ncores, nr_cpu_ids);
 +              ncores = nr_cpu_ids;
        }
  
        for (i = 0; i < ncores; i++)
@@@ -13,7 -13,6 +13,7 @@@
  #include <linux/smp.h>
  
  #include <asm/cacheflush.h>
 +#include <asm/system.h>
  
  extern volatile int pen_release;
  
@@@ -63,9 -62,15 +63,9 @@@ static inline void platform_do_lowpower
         * code will have already disabled interrupts
         */
        for (;;) {
 -              /*
 -               * here's the WFI
 -               */
 -              asm(".word      0xe320f003\n"
 -                  :
 -                  :
 -                  : "memory", "cc");
 +              wfi();
  
-               if (pen_release == cpu) {
+               if (pen_release == cpu_logical_map(cpu)) {
                        /*
                         * OK, proper wakeup, we're done
                         */
   */
  #include <mach/hardware.h>
  
- #ifdef CONFIG_SOC_IMX1
+ #ifdef CONFIG_DEBUG_IMX1_UART
  #define UART_PADDR    MX1_UART1_BASE_ADDR
- #endif
- #ifdef CONFIG_SOC_IMX25
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX25_UART)
  #define UART_PADDR    MX25_UART1_BASE_ADDR
- #endif
- #if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27)
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
  #define UART_PADDR    MX2x_UART1_BASE_ADDR
- #endif
- #if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
  #define UART_PADDR    MX3x_UART1_BASE_ADDR
- #endif
- #ifdef CONFIG_SOC_IMX51
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX51_UART)
  #define UART_PADDR    MX51_UART1_BASE_ADDR
- #endif
- /* iMX50/53 have same addresses, but not iMX51 */
- #if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53)
- #ifdef UART_PADDR
- #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
- #endif
+ #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
  #define UART_PADDR    MX53_UART1_BASE_ADDR
  #endif
  
  #define UART_VADDR    IMX_IO_ADDRESS(UART_PADDR)
  
 -              .macro  addruart, rp, rv
 +              .macro  addruart, rp, rv, tmp
                ldr     \rp, =UART_PADDR        @ physical
                ldr     \rv, =UART_VADDR        @ virtual
                .endm
@@@ -65,6 -65,11 +65,6 @@@ config SAMSUNG_IRQ_VIC_TIME
         help
           Internal configuration to build the VIC timer interrupt code.
  
 -config SAMSUNG_IRQ_UART
 -       bool
 -       help
 -         Internal configuration to build the IRQ UART demux code.
 -
  # options for gpio configuration support
  
  config SAMSUNG_GPIOLIB_4BIT
@@@ -362,4 -367,11 +362,11 @@@ config SAMSUNG_P
        help
          Say Y here if you want to control Power Domain by Runtime PM.
  
+ config DEBUG_S3C_UART
+       depends on PLAT_SAMSUNG
+       int
+       default "0" if DEBUG_S3C_UART0
+       default "1" if DEBUG_S3C_UART1
+       default "2" if DEBUG_S3C_UART2
  endif