mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2025-03-01 18:06:45 +00:00
Merge "hvc_dcc: Add support for arm64 cpus"
This commit is contained in:
commit
e19940c9ea
42
arch/arm/include/asm/dcc.h
Normal file
42
arch/arm/include/asm/dcc.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* 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
|
||||
* 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("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg"
|
||||
: "=r" (__ret) : : "cc");
|
||||
|
||||
return __ret;
|
||||
}
|
||||
|
||||
|
||||
static inline char __dcc_getchar(void)
|
||||
{
|
||||
char __c;
|
||||
|
||||
asm volatile("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg"
|
||||
: "=r" (__c));
|
||||
isb();
|
||||
|
||||
return __c;
|
||||
}
|
||||
|
||||
static inline void __dcc_putchar(char c)
|
||||
{
|
||||
asm volatile("mcr p14, 0, %0, c0, c5, 0 @ write a char"
|
||||
: /* no output register */
|
||||
: "r" (c));
|
||||
isb();
|
||||
}
|
41
arch/arm64/include/asm/dcc.h
Normal file
41
arch/arm64/include/asm/dcc.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* 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();
|
||||
}
|
@ -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,4 +1,4 @@
|
||||
/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2010, 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
|
||||
@ -11,12 +11,9 @@
|
||||
*/
|
||||
|
||||
#include <linux/console.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include <asm/dcc.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
#include "hvc_console.h"
|
||||
@ -25,35 +22,6 @@
|
||||
#define DCC_STATUS_RX (1 << 30)
|
||||
#define DCC_STATUS_TX (1 << 29)
|
||||
|
||||
static inline u32 __dcc_getstatus(void)
|
||||
{
|
||||
u32 __ret;
|
||||
asm volatile("mrc p14, 0, %0, c0, c1, 0 @ read comms ctrl reg"
|
||||
: "=r" (__ret) : : "cc");
|
||||
|
||||
return __ret;
|
||||
}
|
||||
|
||||
|
||||
static inline char __dcc_getchar(void)
|
||||
{
|
||||
char __c;
|
||||
|
||||
asm volatile("mrc p14, 0, %0, c0, c5, 0 @ read comms data reg"
|
||||
: "=r" (__c));
|
||||
isb();
|
||||
|
||||
return __c;
|
||||
}
|
||||
|
||||
static inline void __dcc_putchar(char c)
|
||||
{
|
||||
asm volatile("mcr p14, 0, %0, c0, c5, 0 @ write a char"
|
||||
: /* no output register */
|
||||
: "r" (c));
|
||||
isb();
|
||||
}
|
||||
|
||||
static int hvc_dcc_put_chars(uint32_t vt, const char *buf, int count)
|
||||
{
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user