summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2010-05-25 15:18:33 +0530
committerYu-Huan Hsu <yhsu@nvidia.com>2010-05-25 12:23:44 -0700
commitea51db0afcf5f4a1c7b61df64262dbbda00cd397 (patch)
tree9e0eb81dc27de071ace3d1cf6d20b726b48cba66
parent16624522eb677d10c3846f25283f95530a7d5017 (diff)
tegra: Disabling the EC keyboard and mouse driver for E1206tegra-9.12.12.1
The E1206 based platform does not support the EC keyboard and EC mouse. Returning fail in the initialization of the EC keyboard and mouse driver init. Tested that it worked properly on Harmony and do not get enabled in E1206 based platform. Change-Id: Ib487715cda3d82d8c1fff8d5b34a572e0d81fbe7 Reviewed-on: http://git-master/r/1479 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Jitendra Aditya Lanka <jlanka@nvidia.com> Tested-by: Jitendra Aditya Lanka <jlanka@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c9
-rw-r--r--arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c11
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c b/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
index df5990ace3aa..f5f289422947 100644
--- a/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
+++ b/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
@@ -69,6 +69,8 @@ enum {NUM_OF_LEDS = 3};
/* Scan Code Set 1 break mask */
#define SC1_BREAK_MASK (0x80)
+#define EEPROM_ID_E1206 0x0C06
+
static NvEcHandle s_NvEcHandle = NULL; // nvec handle
NvEcEventType EventTypes[] = {NvEcEventType_Keyboard}; // get only keyboard events from EC
NvEcEvent KbdEvent = {0};
@@ -108,6 +110,13 @@ NvBool NvOdmKeyboardInit(void)
NvError NvStatus = NvError_Success;
NvEcRequest Request = {0};
NvEcResponse Response = {0};
+ NvOdmBoardInfo BoardInfo;
+
+ /* Ec based keyboard will not be supported for the E1206 based platform*/
+ if (NvOdmPeripheralGetBoardInfo(EEPROM_ID_E1206, &BoardInfo))
+ {
+ goto fail;
+ }
/* get nvec handle */
NvStatus = NvEcOpen(&s_NvEcHandle, 0 /* instance */);
diff --git a/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c b/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
index a527ea540d55..af97de4b3abf 100644
--- a/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
+++ b/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
@@ -32,6 +32,7 @@
#include "nvodm_mouse.h"
#include "nvodm_mouse_int.h"
#include "nvrm_drf.h"
+#include "nvodm_query_discovery.h"
// Module debug: 0=disable, 1=enable
#define NVODM_ENABLE_PRINTF 0
@@ -63,6 +64,7 @@
#define MOUSE_PS2_PORT_ID_0 NVEC_SUBTYPE_0_AUX_PORT_ID_0
#define MOUSE_PS2_PORT_ID_1 NVEC_SUBTYPE_0_AUX_PORT_ID_1
+#define EEPROM_ID_E1206 0x0C06
/** Implementation for the NvOdm Mouse */
NvBool
@@ -77,6 +79,15 @@ NvOdmMouseDeviceOpen(
NvEcRequest Request = {0};
NvEcResponse Response = {0};
#endif
+ NvOdmBoardInfo BoardInfo;
+
+ // Mouse driver will not be supported for E1206 based platform.
+ if (NvOdmPeripheralGetBoardInfo(EEPROM_ID_E1206, &BoardInfo))
+ {
+ ret = NV_FALSE;
+ NVODMMOUSE_PRINTF(("Mouse is not available on this platform\n"));
+ goto fail_safe;
+ }
// Allocate memory for request type structure
hMouseDev = (NvOdmMouseDevice *)NvOdmOsAlloc(sizeof(NvOdmMouseDevice));