summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-loki.c
diff options
context:
space:
mode:
authorWill Wu <willw@nvidia.com>2013-11-27 10:57:32 +0800
committerLaxman Dewangan <ldewangan@nvidia.com>2013-11-29 01:35:22 -0800
commit7b568e4e8e82723b6fdfbf161921bc1d7ed54df9 (patch)
treee22d639f9502c3df771cf9bdc3c4065cec7249b2 /arch/arm/mach-tegra/board-loki.c
parent50f957e923ae7795ec943ee25676783f2c40c7ed (diff)
arm: tegra12: Loki: Add C2 debug port support
Enable C2 port for Loki platform for debugging microcontroller in Joystick in case of mcu failure. Bug 1375728 Change-Id: I90ffee220cc2ffa2af6833fd1100ddab1d4077e7 Signed-off-by: Will Wu <willw@nvidia.com> Reviewed-on: http://git-master/r/335984 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-loki.c')
-rw-r--r--arch/arm/mach-tegra/board-loki.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-loki.c b/arch/arm/mach-tegra/board-loki.c
index c63776349577..9ec7f77cc3aa 100644
--- a/arch/arm/mach-tegra/board-loki.c
+++ b/arch/arm/mach-tegra/board-loki.c
@@ -32,6 +32,7 @@
#include <linux/gpio.h>
#include <linux/input.h>
#include <linux/platform_data/tegra_usb.h>
+#include <linux/platform_data/tegra_c2port_platform_data.h>
#include <linux/spi/spi.h>
#include <linux/spi/rm31080a_ts.h>
#include <linux/memblock.h>
@@ -763,6 +764,25 @@ static void __init tegra_loki_early_init(void)
tegra_soc_device_init("loki");
}
+#ifdef CONFIG_C2PORT_LOKI
+/* Init mcu debugger for Loki */
+static struct tegra_c2port_platform_data mcu_init_data = {
+ .gpio_c2ck = TEGRA_GPIO_PK0,
+ .gpio_c2d = TEGRA_GPIO_PS0
+};
+static struct platform_device tegra_loki_mcu_debugger = {
+ .name = "tegra_c2port",
+ .id = 0,
+ .dev = {
+ .platform_data = &mcu_init_data,
+ }
+};
+static void __init tegra_loki_mcu_debugger_init(void)
+{
+ platform_device_register(&tegra_loki_mcu_debugger);
+}
+#endif
+
static void __init tegra_loki_late_init(void)
{
struct board_info board_info;
@@ -804,6 +824,9 @@ static void __init tegra_loki_late_init(void)
loki_setup_bluedroid_pm();
tegra_register_fuse();
tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1);
+#ifdef CONFIG_C2PORT_LOKI
+ tegra_loki_mcu_debugger_init();
+#endif
}
static void __init loki_ramconsole_reserve(unsigned long size)