diff options
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/tegra124-loki-mods.dts | 24 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-info.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-loki-sdhci.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-loki.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board.h | 1 |
6 files changed, 45 insertions, 7 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 1c12ea13a2cf..97f3ee16633e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -216,6 +216,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ tegra124-loki.dtb \ tegra124-loki-02-cell-battery.dtb \ tegra124-loki-03-cell-battery.dtb \ + tegra124-loki-mods.dtb \ tegra124-foster.dtb \ tegra124-thor195.dtb \ tegra124-tn8.dtb \ diff --git a/arch/arm/boot/dts/tegra124-loki-mods.dts b/arch/arm/boot/dts/tegra124-loki-mods.dts new file mode 100644 index 000000000000..6e623064bd13 --- /dev/null +++ b/arch/arm/boot/dts/tegra124-loki-mods.dts @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope 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 "tegra124-loki.dts" + + +/ { + nvidia,dtsfilename = __FILE__; + + chosen { + nvidia,tegra-diagnostic-mode; + }; + +}; diff --git a/arch/arm/mach-tegra/board-info.c b/arch/arm/mach-tegra/board-info.c index 3b034cdfe053..188819470764 100644 --- a/arch/arm/mach-tegra/board-info.c +++ b/arch/arm/mach-tegra/board-info.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -22,7 +22,7 @@ #include <linux/export.h> #include "board.h" #include <mach/board_id.h> - +#include <linux/of.h> /* skuinfo is 18 character long xxx-xxxxx-xxxx-xxx *so buffer size is set to 18+1 */ #define SKUINFO_BUF_SIZE 19 @@ -285,3 +285,17 @@ bool tegra_is_board(const char *bom, const char *project, return false; } EXPORT_SYMBOL(tegra_is_board); + +bool is_tegra_diagnostic_mode(void) +{ + static bool is_mode_valid; + static bool is_diagnostic_mode; + + if (!is_mode_valid) { + is_diagnostic_mode = of_property_read_bool(of_chosen, + "nvidia,tegra-diagnostic-mode"); + is_mode_valid = true; + } + return is_diagnostic_mode; +} +EXPORT_SYMBOL(is_tegra_diagnostic_mode); diff --git a/arch/arm/mach-tegra/board-loki-sdhci.c b/arch/arm/mach-tegra/board-loki-sdhci.c index 9e14951a9456..8226bbac2778 100644 --- a/arch/arm/mach-tegra/board-loki-sdhci.c +++ b/arch/arm/mach-tegra/board-loki-sdhci.c @@ -499,10 +499,8 @@ int __init loki_sdhci_init(void) platform_device_register(&tegra_sdhci_device3); - - if (!is_uart_over_sd_enabled()) + if (!is_uart_over_sd_enabled() && !is_tegra_diagnostic_mode()) platform_device_register(&tegra_sdhci_device2); - platform_device_register(&tegra_sdhci_device0); loki_wifi_init(); diff --git a/arch/arm/mach-tegra/board-loki.c b/arch/arm/mach-tegra/board-loki.c index b99a3b964908..123dbea3706f 100644 --- a/arch/arm/mach-tegra/board-loki.c +++ b/arch/arm/mach-tegra/board-loki.c @@ -829,8 +829,8 @@ static void __init tegra_loki_late_init(void) tegra_wdt_recovery_init(); #endif tegra_serial_debug_init(TEGRA_UARTD_BASE, INT_WDT_CPU, NULL, -1, -1); - - loki_sensors_init(); + if (!is_tegra_diagnostic_mode()) + loki_sensors_init(); loki_fan_init(); loki_soctherm_init(); loki_setup_bluedroid_pm(); diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index fb833ce364c3..cd504376216c 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h @@ -273,6 +273,7 @@ int tegra_get_cvb_alignment_uV(void); int tegra_soc_device_init(const char *machine); int get_pwr_i2c_clk_rate(void); bool is_pmic_wdt_disabled_at_boot(void); +bool is_tegra_diagnostic_mode(void); extern void tegra_set_usb_vbus_internal_wake(bool enable); extern void tegra_set_usb_id_internal_wake(bool enable); |