platform: msm_shared: Pass physical address in BAM descriptor.

Pass physical address of the DDR location in BAM descriptor instead
of virtual address.

Change-Id: I5139392af9271139cdc649708c642de4833d8038
diff --git a/platform/msm_shared/qpic_nand.c b/platform/msm_shared/qpic_nand.c
index 3fec647..5ca87f0 100644
--- a/platform/msm_shared/qpic_nand.c
+++ b/platform/msm_shared/qpic_nand.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -141,7 +141,7 @@
 	/* Enqueue the desc for the above command */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr),
 					 BAM_CE_SIZE,
 					 BAM_DESC_CMD_FLAG | BAM_DESC_INT_FLAG | flags);
 
@@ -158,7 +158,7 @@
 	/* Enqueue the desc for the above command */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr),
 					 BAM_CE_SIZE,
 					 BAM_DESC_CMD_FLAG | BAM_DESC_INT_FLAG);
 
@@ -225,7 +225,7 @@
 	/* Prepare the cmd desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_LOCK_FLAG | BAM_DESC_INT_FLAG |
 					 BAM_DESC_NWD_FLAG | BAM_DESC_CMD_FLAG);
@@ -428,7 +428,7 @@
 	/* Enqueue the desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((addr_t)(uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 desc_flags);
 
@@ -479,7 +479,7 @@
 	/* Enqueue the desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_UNLOCK_FLAG | BAM_DESC_CMD_FLAG| BAM_DESC_INT_FLAG);
 
@@ -825,7 +825,7 @@
 	/* Enqueue the desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 desc_flags);
 
@@ -963,7 +963,7 @@
 	/* Enqueue the desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_NWD_FLAG | BAM_DESC_CMD_FLAG | BAM_DESC_INT_FLAG | BAM_DESC_LOCK_FLAG);
 
@@ -987,7 +987,7 @@
 	/* Enqueue the desc for the NAND_FLASH_STATUS read command */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_read_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_read_ptr_start),
 					 PA((uint32_t)cmd_list_read_ptr - (uint32_t)cmd_list_read_ptr_start),
 					 BAM_DESC_CMD_FLAG) ;
 
@@ -996,7 +996,7 @@
 	/* Enqueue the desc for NAND_FLASH_STATUS and NAND_READ_STATUS write commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_INT_FLAG | BAM_DESC_CMD_FLAG) ;
 	num_desc = 2;
@@ -1057,7 +1057,7 @@
 	/* Enqueue the desc for the above commands */
 	bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_CMD_FLAG | BAM_DESC_LOCK_FLAG);
 
@@ -1075,7 +1075,7 @@
 		/* Enqueue the desc for the above commands */
 		bam_add_one_desc(&bam,
 						 CMD_PIPE_INDEX,
-						 (unsigned char*)cmd_list_ptr_start,
+						 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 						 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 						 BAM_DESC_NWD_FLAG | BAM_DESC_CMD_FLAG);
 
@@ -1087,7 +1087,7 @@
 		/* Enqueue the desc for the NAND_FLASH_STATUS read command */
 		bam_add_one_desc(&bam,
 						 CMD_PIPE_INDEX,
-						 (unsigned char*)cmd_list_read_ptr_start,
+						 (unsigned char*)PA((addr_t)cmd_list_read_ptr_start),
 						 PA((uint32_t)cmd_list_read_ptr - (uint32_t)cmd_list_read_ptr_start),
 						 BAM_DESC_CMD_FLAG);
 
@@ -1100,7 +1100,7 @@
 		/* Enqueue the desc for NAND_FLASH_STATUS and NAND_READ_STATUS write commands */
 		bam_add_one_desc(&bam,
 						 CMD_PIPE_INDEX,
-						 (unsigned char*)cmd_list_ptr_start,
+						 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 						 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 						 int_flag | BAM_DESC_CMD_FLAG);
 		num_desc += 2;
@@ -1532,7 +1532,7 @@
 		/* Enqueue the desc for the above commands */
 		bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_NWD_FLAG | BAM_DESC_CMD_FLAG | flags);
 		num_cmd_desc++;
@@ -1735,7 +1735,7 @@
 		/* Enqueue the desc for the above commands */
 		bam_add_one_desc(&bam,
 					 CMD_PIPE_INDEX,
-					 (unsigned char*)cmd_list_ptr_start,
+					 (unsigned char*)PA((addr_t)cmd_list_ptr_start),
 					 PA((uint32_t)cmd_list_ptr - (uint32_t)cmd_list_ptr_start),
 					 BAM_DESC_NWD_FLAG | BAM_DESC_CMD_FLAG);
 		num_cmd_desc++;