]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: dcc: Add uart dcc support for armv8
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Fri, 29 May 2015 07:54:37 +0000 (09:54 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:47:37 +0000 (00:47 +0200)
Added UART DCC support for armv8

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/serial/arm_dcc.c

index e77773740fb02d46a1c2067ef86b5f07db62c770..df7eb05e82460e998be15e56734e8ff8ff83f5e3 100644 (file)
 #define status_dcc(x)  \
                __asm__ volatile ("mrc p14, 0, %0, c14, c0, 0\n" : "=r" (x))
 
+#elif defined(CONFIG_CPU_ARMV8)
+/*
+ * ARMV8
+ */
+#define DCC_RBIT       (1 << 30)
+#define DCC_WBIT       (1 << 29)
+
+#define write_dcc(x)   \
+               __asm__ volatile ("msr dbgdtrtx_el0, %0\n" : : "r" (x))
+
+#define read_dcc(x)    \
+               __asm__ volatile ("mrs %0, dbgdtrrx_el0\n" : "=r" (x))
+
+#define status_dcc(x)  \
+               __asm__ volatile ("mrs %0, mdccsr_el0\n" : "=r" (x))
+
 #else
 #define DCC_RBIT       (1 << 0)
 #define DCC_WBIT       (1 << 1)