From ae85ac71b7433fa974759109c4380c620258f07f Mon Sep 17 00:00:00 2001 From: James Hogan Date: Fri, 21 Sep 2012 17:38:15 +0100 Subject: metag: Add JTAG Debug Adapter (DA) support Add basic JTAG Debug Adapter (DA) support so that drivers which communicate with the DA can detect whether one is actually present (otherwise the target will halt indefinitely). This allows the metag_da TTY driver and imgdafs filesystem driver to be built, updates defconfigs, and sets up the metag_da console early if it's configured in. Signed-off-by: James Hogan --- arch/metag/kernel/da.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 arch/metag/kernel/da.c (limited to 'arch/metag/kernel/da.c') diff --git a/arch/metag/kernel/da.c b/arch/metag/kernel/da.c new file mode 100644 index 0000000..52aabb6 --- /dev/null +++ b/arch/metag/kernel/da.c @@ -0,0 +1,23 @@ +/* + * Meta DA JTAG debugger control. + * + * Copyright 2012 Imagination Technologies Ltd. + */ + + +#include +#include +#include +#include + +bool _metag_da_present; + +int __init metag_da_probe(void) +{ + _metag_da_present = (metag_in32(T0VECINT_BHALT) == 1); + if (_metag_da_present) + pr_info("DA present\n"); + else + pr_info("DA not present\n"); + return 0; +} -- cgit v1.1