ARM: 7806/1: allow DEBUG_UNCOMPRESS for Tegra
[firefly-linux-kernel-4.4.55.git] / arch / arm / include / debug / tegra.S
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