From: Dibyendu Roy Date: Thu, 11 Jun 2015 12:07:43 +0530 Subject: [PATCH] Adding MDM specific code under _PLATFORM_MDM_ This patch is added to comment out the commit 84cc0e12983b5761c67789ef93fd6fb164c7314d in x86 as dynamic suspend feature is not available in x86. However, this code shall be active for MDM platform due to dynamic suspend feature. Change-Id: I998f0521b4a5f9744412db40f2c2d3bff2ac3d11 --- tools/hciattach_rome.c | 5 ++++- tools/hciattach_rome.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c index 0d7014f1d2f6..1891de24e21a 100644 --- a/tools/hciattach_rome.c +++ b/tools/hciattach_rome.c @@ -1779,13 +1779,14 @@ int qca_soc_init(int fd, int speed, char *bdaddr) vnd_userial.fd = fd; +#ifdef _PLATFORM_MDM_ /* Vote for UART CLK prior to FW download */ err = ioctl(fd, USERIAL_OP_CLK_ON); if (err < 0) { fprintf(stderr, "%s: Failed to vote UART CLK ON\n", __func__); return -1; } - +#endif /* Get Rome version information */ if((err = rome_patch_ver_req(fd)) <0){ fprintf(stderr, "%s: Fail to get Rome Version (0x%x)\n", __FUNCTION__, err); @@ -1923,10 +1924,12 @@ download: } error: +#ifdef _PLATFORM_MDM_ /* Vote UART CLK OFF post to FW download */ err = ioctl(fd, USERIAL_OP_CLK_OFF); if (err < 0) fprintf(stderr, "%s: Failed to vote UART CLK OFF!!!\n", __func__); +#endif return err; } diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h index 3fdaf208e522..89f7db3bef86 100644 --- a/tools/hciattach_rome.h +++ b/tools/hciattach_rome.h @@ -42,8 +42,11 @@ #define BD_ADDR_LEN 6 #define MSM_DISABLE_FLOW_CTRL 0 #define MSM_ENABLE_FLOW_CTRL 1 + +#ifdef _PLATFORM_MDM_ #define USERIAL_OP_CLK_ON 0x5441 #define USERIAL_OP_CLK_OFF 0x5442 +#endif unsigned char vnd_local_bd_addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; typedef enum {