OSDN Git Service

ARM: at91: debug: fix non MMU debug
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 4 Mar 2015 14:41:27 +0000 (15:41 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 5 Mar 2015 09:55:13 +0000 (10:55 +0100)
Linux may be used without MMU on atmel SoCs, fix debug in this configuration.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/include/debug/at91.S

index 80a6501..c3c45e6 100644 (file)
 #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */
 #endif
 
-/* Keep in sync with mach-at91/include/mach/hardware.h */
+#ifdef CONFIG_MMU
 #define AT91_IO_P2V(x) ((x) - 0x01000000)
+#else
+#define AT91_IO_P2V(x) (x)
+#endif
 
 #define AT91_DBGU_SR           (0x14)  /* Status Register */
 #define AT91_DBGU_THR          (0x1c)  /* Transmitter Holding Register */