ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra
authorStephen Warren <swarren@nvidia.com>
Fri, 2 Aug 2013 19:53:37 +0000 (20:53 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Aug 2013 16:13:41 +0000 (17:13 +0100)
DEBUG_UNCOMPRESS was previously disallowed for Tegra due to tegra.S's
use of global data that was not linked into the decompressor. Solve this
by declaring this symbol in tegra.S when it is being built into the
decompressor. For the kernel proper, leave the declaration in
mach-tegra/common.c as explained in the comment.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig.debug
arch/arm/include/debug/tegra.S

index 2d57da32456278118bc9a52390036a87dc8d3651..d739d47fce56da1637d4ac3d3bac482df6854ec1 100644 (file)
@@ -1039,7 +1039,7 @@ config DEBUG_UNCOMPRESS
        bool
        depends on ARCH_MULTIPLATFORM
        default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
-                    !DEBUG_TEGRA_UART
+                    (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
        help
          This option influences the normal decompressor output for
          multiplatform kernels.  Normally, multiplatform kernels disable
index 883d7c22fd9d34e94187d6d5c411f3d01a97d8d0..be6a720dd1834a8f697fc9db98170c15a39f484f 100644 (file)
 1002:
 #endif
                .endm
+
+/*
+ * Storage for the state maintained by the macros above.
+ *
+ * In the kernel proper, this data is located in arch/arm/mach-tegra/common.c.
+ * That's because this header is included from multiple files, and we only
+ * want a single copy of the data. In particular, the UART probing code above
+ * assumes it's running using physical addresses. This is true when this file
+ * is included from head.o, but not when included from debug.o. So we need
+ * to share the probe results between the two copies, rather than having
+ * to re-run the probing again later.
+ *
+ * In the decompressor, we put the symbol/storage right here, since common.c
+ * isn't included in the decompressor build. This symbol gets put in .text
+ * even though it's really data, since .data is discarded from the
+ * decompressor. Luckily, .text is writeable in the decompressor, unless
+ * CONFIG_ZBOOT_ROM. That dependency is handled in arch/arm/Kconfig.debug.
+ */
+#if defined(ZIMAGE)
+tegra_uart_config:
+       /* Debug UART initialization required */
+       .word 1
+       /* Debug UART physical address */
+       .word 0
+       /* Debug UART virtual address */
+       .word 0
+       /* Scratch space for debug macro */
+       .word 0
+#endif
This page took 0.031442 seconds and 5 git commands to generate.