Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 613a2f54 authored by Abhimanyu Kapur's avatar Abhimanyu Kapur Committed by Matt Wagantall
Browse files

hvc_dcc: Add support for arm64 cpus



Split out the architecture debug channel register
reads/writes to arch specifc header files and add
support for arm64 dcc operations.

Change-Id: I48df3a1470760ebaa57eafd5a1f3e8cc9c7bd826
[abhimany: resolve trivial merge conflicts]
Signed-off-by: default avatarAbhimanyu Kapur <abhimany@codeaurora.org>
parent cc5d9689
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010, 2014 The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
+41 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <asm/barrier.h>

static inline u32 __dcc_getstatus(void)
{
	u32 __ret;
	asm volatile("mrs %0, mdccsr_el0" : "=r" (__ret)
			: : "cc");

	return __ret;
}


static inline char __dcc_getchar(void)
{
	char __c;

	asm volatile("mrs %0, dbgdtrrx_el0" : "=r" (__c));
	isb();

	return __c;
}

static inline void __dcc_putchar(char c)
{
	asm volatile("msr dbgdtrtx_el0, %0"
		: /* No output register */
		: "r" (c));
	isb();
}
+7 −5
Original line number Diff line number Diff line
@@ -87,13 +87,15 @@ config HVC_UDBG
	 console for userspace. Do NOT enable in production kernels. 

config HVC_DCC
       bool "ARM JTAG DCC console"
       depends on ARM
       bool "ARM/ARM64 JTAG DCC console"
       depends on ARM || ARM64
       select HVC_DRIVER
       help
         This console uses the JTAG DCC on ARM to create a console under the HVC
	 driver. This console is used through a JTAG only on ARM. If you don't have
	 a JTAG then you probably don't want this option.
         This console uses the JTAG DCC on ARM/ARM64
	 to create a console under the HVC
	 driver. This console is used through a JTAG
	 only on ARM/ARM64. If you don't have a JTAG then
	 you probably don't want this option.

config HVC_BFIN_JTAG
	bool "Blackfin JTAG console"
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
 * GNU General Public License for more details.
 */

#include <linux/console.h>
#include <linux/init.h>

#include <asm/dcc.h>