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/setup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/metag/kernel/setup.c') diff --git a/arch/metag/kernel/setup.c b/arch/metag/kernel/setup.c index 74e2c1f..89f9cdc 100644 --- a/arch/metag/kernel/setup.c +++ b/arch/metag/kernel/setup.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,11 @@ extern char _heap_start[]; extern u32 __dtb_start[]; #endif +#ifdef CONFIG_DA_CONSOLE +/* Our early channel based console driver */ +extern struct console dash_console; +#endif + struct machine_desc *machine_desc __initdata; /* @@ -180,6 +186,15 @@ void __init setup_arch(char **cmdline_p) metag_cache_probe(); + metag_da_probe(); +#ifdef CONFIG_DA_CONSOLE + if (metag_da_enabled()) { + /* An early channel based console driver */ + register_console(&dash_console); + add_preferred_console("ttyDA", 1, NULL); + } +#endif + /* try interpreting the argument as a device tree */ machine_desc = setup_machine_fdt(original_cmd_line); /* if it doesn't look like a device tree it must be a command line */ -- cgit v1.1