Merge branches 'at91/gpio', 'at91/ioremap', 'drivers/macb-gem-cleanup' and 'msm/misc...
authorArnd Bergmann <arnd@arndb.de>
Thu, 1 Dec 2011 12:34:21 +0000 (12:34 +0000)
committerArnd Bergmann <arnd@arndb.de>
Thu, 1 Dec 2011 12:34:21 +0000 (12:34 +0000)
12 files changed:
arch/arm/Kconfig.debug
arch/arm/mach-msm/Kconfig
arch/arm/mach-msm/include/mach/debug-macro.S
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
arch/arm/mach-msm/include/mach/msm_iomap-8960.h
arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
arch/arm/mach-msm/include/mach/msm_iomap.h
arch/arm/mach-msm/include/mach/uncompress.h
arch/arm/mach-msm/io.c
arch/arm/mach-msm/platsmp.c

index 0608c0ba94e68e093131ea9cee7f517b60ca162b..e0d236d7ff7344b28291b37acae16169c955db8c 100644 (file)
@@ -255,6 +255,43 @@ choice
                  their output to the standard serial port on the RealView
                  PB1176 platform.
 
+       config DEBUG_MSM_UART1
+               bool "Kernel low-level debugging messages via MSM UART1"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the first serial port on MSM devices.
+
+       config DEBUG_MSM_UART2
+               bool "Kernel low-level debugging messages via MSM UART2"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the second serial port on MSM devices.
+
+       config DEBUG_MSM_UART3
+               bool "Kernel low-level debugging messages via MSM UART3"
+               depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the third serial port on MSM devices.
+
+       config DEBUG_MSM8660_UART
+               bool "Kernel low-level debugging messages via MSM 8660 UART"
+               depends on ARCH_MSM8X60
+               select MSM_HAS_DEBUG_UART_HS
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the serial port on MSM 8660 devices.
+
+       config DEBUG_MSM8960_UART
+               bool "Kernel low-level debugging messages via MSM 8960 UART"
+               depends on ARCH_MSM8960
+               select MSM_HAS_DEBUG_UART_HS
+               help
+                 Say Y here if you want the debug print routines to direct
+                 their output to the serial port on MSM 8960 devices.
+
 endchoice
 
 config EARLY_PRINTK
index ebde97f5d5f0d94035792972722331862a0ebdd6..000ddf0a4f33935c274504ce45516267b1ddfb5d 100644 (file)
@@ -13,7 +13,6 @@ config ARCH_MSM7X00A
        select CPU_V6
        select GPIO_MSM_V1
        select MSM_PROC_COMM
-       select HAS_MSM_DEBUG_UART_PHYS
 
 config ARCH_MSM7X30
        bool "MSM7x30"
@@ -25,7 +24,6 @@ config ARCH_MSM7X30
        select MSM_GPIOMUX
        select GPIO_MSM_V1
        select MSM_PROC_COMM
-       select HAS_MSM_DEBUG_UART_PHYS
 
 config ARCH_QSD8X50
        bool "QSD8X50"
@@ -37,7 +35,6 @@ config ARCH_QSD8X50
        select MSM_GPIOMUX
        select GPIO_MSM_V1
        select MSM_PROC_COMM
-       select HAS_MSM_DEBUG_UART_PHYS
 
 config ARCH_MSM8X60
        bool "MSM8X60"
@@ -63,6 +60,9 @@ config ARCH_MSM8960
 
 endchoice
 
+config MSM_HAS_DEBUG_UART_HS
+       bool
+
 config MSM_SOC_REV_A
        bool
 config  ARCH_MSM_SCORPIONMP
@@ -73,9 +73,6 @@ config  ARCH_MSM_ARM11
 config  ARCH_MSM_SCORPION
        bool
 
-config HAS_MSM_DEBUG_UART_PHYS
-       bool
-
 config  MSM_VIC
        bool
 
@@ -152,32 +149,6 @@ config MACH_MSM8960_RUMI3
 
 endmenu
 
-config MSM_DEBUG_UART
-       int
-       default 1 if MSM_DEBUG_UART1
-       default 2 if MSM_DEBUG_UART2
-       default 3 if MSM_DEBUG_UART3
-
-if HAS_MSM_DEBUG_UART_PHYS
-choice
-       prompt "Debug UART"
-
-       default MSM_DEBUG_UART_NONE
-
-       config MSM_DEBUG_UART_NONE
-               bool "None"
-
-       config MSM_DEBUG_UART1
-               bool "UART1"
-
-       config MSM_DEBUG_UART2
-               bool "UART2"
-
-       config MSM_DEBUG_UART3
-               bool "UART3"
-endchoice
-endif
-
 config MSM_SMD_PKG3
        bool
 
index 2dc73ccddb11ba946899d3622e0c7c5bf7bf3a3d..3ffd8668c9a5dae483613e8bcc59a98a4bc975a7 100644 (file)
@@ -1,6 +1,7 @@
-/* arch/arm/mach-msm7200/include/mach/debug-macro.S
+/*
  *
  * Copyright (C) 2007 Google, Inc.
+ * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
  * Author: Brian Swetland <swetland@google.com>
  *
  * This software is licensed under the terms of the GNU General Public
  *
  */
 
-
-
 #include <mach/hardware.h>
 #include <mach/msm_iomap.h>
 
-#if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE)
        .macro  addruart, rp, rv, tmp
+#ifdef MSM_DEBUG_UART_PHYS
        ldr     \rp, =MSM_DEBUG_UART_PHYS
        ldr     \rv, =MSM_DEBUG_UART_BASE
+#endif
        .endm
 
-       .macro  senduart,rd,rx
+       .macro  senduart, rd, rx
+#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
+       @ Write the 1 character to UARTDM_TF
+       str     \rd, [\rx, #0x70]
+#else
        teq     \rx, #0
        strne   \rd, [\rx, #0x0C]
+#endif
        .endm
 
-       .macro  waituart,rd,rx
+       .macro  waituart, rd, rx
+#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
+       @ check for TX_EMT in UARTDM_SR
+       ldr     \rd, [\rx, #0x08]
+       tst     \rd, #0x08
+       bne     1002f
+       @ wait for TXREADY in UARTDM_ISR
+1001:  ldr     \rd, [\rx, #0x14]
+       tst     \rd, #0x80
+       beq     1001b
+1002:
+       @ Clear TX_READY by writing to the UARTDM_CR register
+       mov     \rd, #0x300
+       str     \rd, [\rx, #0x10]
+       @ Write 0x1 to NCF register
+       mov     \rd, #0x1
+       str     \rd, [\rx, #0x40]
+       @ UARTDM reg. Read to induce delay
+       ldr     \rd, [\rx, #0x08]
+#else
        @ wait for TX_READY
 1001:  ldr     \rd, [\rx, #0x08]
        tst     \rd, #0x04
        beq     1001b
-       .endm
-#else
-       .macro  addruart, rp, rv, tmp
-       mov     \rv, #0xff000000
-       orr     \rv, \rv, #0x00f00000
-       .endm
-
-       .macro  senduart,rd,rx
-       .endm
-
-       .macro  waituart,rd,rx
-       .endm
 #endif
+       .endm
 
-       .macro  busyuart,rd,rx
+       .macro  busyuart, rd, rx
        .endm
index 94fe9fe6feb35e207a48b88685f143985d6910d1..8af46123dab6856c3870e82ac519edf62eab5ad8 100644 (file)
 #define MSM_UART3_PHYS        0xA9C00000
 #define MSM_UART3_SIZE        SZ_4K
 
-#ifdef CONFIG_MSM_DEBUG_UART
-#define MSM_DEBUG_UART_BASE   0xE1000000
-#if CONFIG_MSM_DEBUG_UART == 1
-#define MSM_DEBUG_UART_PHYS   MSM_UART1_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 2
-#define MSM_DEBUG_UART_PHYS   MSM_UART2_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 3
-#define MSM_DEBUG_UART_PHYS   MSM_UART3_PHYS
-#endif
-#define MSM_DEBUG_UART_SIZE   SZ_4K
-#endif
-
 #define MSM_SDC1_PHYS         0xA0400000
 #define MSM_SDC1_SIZE         SZ_4K
 
index 37694442d1bda079bb1475e71a511cf27ad825f3..198202c267c846d6375be0f59bf2aad38eba277a 100644 (file)
 #define MSM_UART3_PHYS        0xACC00000
 #define MSM_UART3_SIZE        SZ_4K
 
-#ifdef CONFIG_MSM_DEBUG_UART
-#define MSM_DEBUG_UART_BASE   0xE1000000
-#if CONFIG_MSM_DEBUG_UART == 1
-#define MSM_DEBUG_UART_PHYS   MSM_UART1_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 2
-#define MSM_DEBUG_UART_PHYS   MSM_UART2_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 3
-#define MSM_DEBUG_UART_PHYS   MSM_UART3_PHYS
-#endif
-#define MSM_DEBUG_UART_SIZE   SZ_4K
-#endif
-
 #define MSM_MDC_BASE         IOMEM(0xE0200000)
 #define MSM_MDC_PHYS         0xAA500000
 #define MSM_MDC_SIZE         SZ_1M
index 3c9d9602a318b935ebb5e5a940df12fba6fdbeb6..800b55767e6b83ee7856692bf4e8fcf122df5863 100644 (file)
@@ -45,4 +45,9 @@
 #define MSM8960_TMR0_PHYS      0x0208A000
 #define MSM8960_TMR0_SIZE      SZ_4K
 
+#ifdef CONFIG_DEBUG_MSM8960_UART
+#define MSM_DEBUG_UART_BASE    0xE1040000
+#define MSM_DEBUG_UART_PHYS    0x16440000
+#endif
+
 #endif
index d67cd73316f456eaaf7258fc8ea3444ebd884b9d..0faa894729b7737d2c310f890aa27bd339506ec8 100644 (file)
 #define MSM_UART3_PHYS        0xA9C00000
 #define MSM_UART3_SIZE        SZ_4K
 
-#ifdef CONFIG_MSM_DEBUG_UART
-#define MSM_DEBUG_UART_BASE   0xE1000000
-#if CONFIG_MSM_DEBUG_UART == 1
-#define MSM_DEBUG_UART_PHYS   MSM_UART1_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 2
-#define MSM_DEBUG_UART_PHYS   MSM_UART2_PHYS
-#elif CONFIG_MSM_DEBUG_UART == 3
-#define MSM_DEBUG_UART_PHYS   MSM_UART3_PHYS
-#endif
-#define MSM_DEBUG_UART_SIZE   SZ_4K
-#endif
-
 #define MSM_MDC_BASE         IOMEM(0xE0200000)
 #define MSM_MDC_PHYS         0xAA500000
 #define MSM_MDC_SIZE         SZ_1M
index 3b19b8f244b8808d63489a1b92fc1851a38e0ffb..54e12caa8d860a99a4d6c4e11505e25a7d269d62 100644 (file)
@@ -62,4 +62,9 @@
 #define MSM8X60_TMR0_PHYS      0x02040000
 #define MSM8X60_TMR0_SIZE      SZ_4K
 
+#ifdef CONFIG_DEBUG_MSM8660_UART
+#define MSM_DEBUG_UART_BASE    0xE1040000
+#define MSM_DEBUG_UART_PHYS    0x19C40000
+#endif
+
 #endif
index 4ded15238b60267442f4f7aec2f640e131dfd6dd..90682f4599d3dd4842e18129781e949952e237ef 100644 (file)
 
 #include "msm_iomap-8960.h"
 
+#define MSM_DEBUG_UART_SIZE    SZ_4K
+#if defined(CONFIG_DEBUG_MSM_UART1)
+#define MSM_DEBUG_UART_BASE    0xE1000000
+#define MSM_DEBUG_UART_PHYS    MSM_UART1_PHYS
+#elif defined(CONFIG_DEBUG_MSM_UART2)
+#define MSM_DEBUG_UART_BASE    0xE1000000
+#define MSM_DEBUG_UART_PHYS    MSM_UART2_PHYS
+#elif defined(CONFIG_DEBUG_MSM_UART3)
+#define MSM_DEBUG_UART_BASE    0xE1000000
+#define MSM_DEBUG_UART_PHYS    MSM_UART3_PHYS
+#endif
+
 /* Virtual addresses shared across all MSM targets. */
 #define MSM_CSR_BASE           IOMEM(0xE0001000)
 #define MSM_QGIC_DIST_BASE     IOMEM(0xF0000000)
index d94292c29d8e27ed6a736a8bb24b7d8f640d3dd0..169a8400745659171efcfcefa6a4e55b9dbef060 100644 (file)
@@ -1,6 +1,6 @@
-/* arch/arm/mach-msm/include/mach/uncompress.h
- *
+/*
  * Copyright (C) 2007 Google, Inc.
+ * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
  */
 
 #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
+#define __ASM_ARCH_MSM_UNCOMPRESS_H
+
+#include <asm/processor.h>
+#include <mach/msm_iomap.h>
+
+#define UART_CSR      (*(volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x08))
+#define UART_TF       (*(volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x0c))
 
-#include "hardware.h"
-#include "linux/io.h"
-#include "mach/msm_iomap.h"
+#define UART_DM_SR    (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x08)))
+#define UART_DM_CR    (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x10)))
+#define UART_DM_ISR   (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x14)))
+#define UART_DM_NCHAR (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x40)))
+#define UART_DM_TF    (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x70)))
 
 static void putc(int c)
 {
 #if defined(MSM_DEBUG_UART_PHYS)
-       unsigned base = MSM_DEBUG_UART_PHYS;
-       while (!(readl(base + 0x08) & 0x04)) ;
-       writel(c, base + 0x0c);
+#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
+       /*
+        * Wait for TX_READY to be set; but skip it if we have a
+        * TX underrun.
+        */
+       if (UART_DM_SR & 0x08)
+               while (!(UART_DM_ISR & 0x80))
+                       cpu_relax();
+
+       UART_DM_CR = 0x300;
+       UART_DM_NCHAR = 0x1;
+       UART_DM_TF = c;
+#else
+       while (!(UART_CSR & 0x04))
+               cpu_relax();
+       UART_TF = c;
+#endif
 #endif
 }
 
index 8759ecf7454f367cead42922f8de900b24b45879..578b04e42deb8cbc1d29fa66b75fb20c3a21ff43 100644 (file)
@@ -47,7 +47,8 @@ static struct map_desc msm_io_desc[] __initdata = {
        MSM_CHIP_DEVICE(GPIO1, MSM7X00),
        MSM_CHIP_DEVICE(GPIO2, MSM7X00),
        MSM_DEVICE(CLK_CTL),
-#ifdef CONFIG_MSM_DEBUG_UART
+#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
+       defined(CONFIG_DEBUG_MSM_UART3)
        MSM_DEVICE(DEBUG_UART),
 #endif
 #ifdef CONFIG_ARCH_MSM7X30
@@ -84,7 +85,8 @@ static struct map_desc qsd8x50_io_desc[] __initdata = {
        MSM_DEVICE(SCPLL),
        MSM_DEVICE(AD5),
        MSM_DEVICE(MDC),
-#ifdef CONFIG_MSM_DEBUG_UART
+#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
+       defined(CONFIG_DEBUG_MSM_UART3)
        MSM_DEVICE(DEBUG_UART),
 #endif
        {
@@ -109,6 +111,9 @@ static struct map_desc msm8x60_io_desc[] __initdata = {
        MSM_CHIP_DEVICE(TMR0, MSM8X60),
        MSM_DEVICE(ACC),
        MSM_DEVICE(GCC),
+#ifdef CONFIG_DEBUG_MSM8660_UART
+       MSM_DEVICE(DEBUG_UART),
+#endif
 };
 
 void __init msm_map_msm8x60_io(void)
@@ -123,6 +128,9 @@ static struct map_desc msm8960_io_desc[] __initdata = {
        MSM_CHIP_DEVICE(QGIC_CPU, MSM8960),
        MSM_CHIP_DEVICE(TMR, MSM8960),
        MSM_CHIP_DEVICE(TMR0, MSM8960),
+#ifdef CONFIG_DEBUG_MSM8960_UART
+       MSM_DEVICE(DEBUG_UART),
+#endif
 };
 
 void __init msm_map_msm8960_io(void)
@@ -146,7 +154,8 @@ static struct map_desc msm7x30_io_desc[] __initdata = {
        MSM_DEVICE(SAW),
        MSM_DEVICE(GCC),
        MSM_DEVICE(TCSR),
-#ifdef CONFIG_MSM_DEBUG_UART
+#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
+       defined(CONFIG_DEBUG_MSM_UART3)
        MSM_DEVICE(DEBUG_UART),
 #endif
        {
index fdec58aaa35c27c9c4156246f35dae1ad259e955..0b3e357c4c8c8166e144a023a059336bddb660d7 100644 (file)
@@ -79,7 +79,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu)
        ret = scm_set_boot_addr(virt_to_phys(msm_secondary_startup),
                                SCM_FLAG_COLDBOOT_CPU1);
        if (ret == 0) {
-               void *sc1_base_ptr;
+               void __iomem *sc1_base_ptr;
                sc1_base_ptr = ioremap_nocache(0x00902000, SZ_4K*2);
                if (sc1_base_ptr) {
                        writel(0, sc1_base_ptr + VDD_SC1_ARRAY_CLAMP_GFS_CTL);
This page took 0.035284 seconds and 5 git commands to generate.