platform: msm_shared: use lun_cfg only for lun 0 to 8

luncfg to initialize lun blk count and erase block size
is used only for lun0 to lun8 with lun_cfg[8] as the max array size.
RPMB is a special lun with Lun number 0xC4 and updating lun_cfg with
index 0xc4 corrupts DDR and results into unexpected results.
So use rpmb_num_blocks member of ufs_device structure for storing
the rpmb block size and use lun_cfg only for lun 0 to lun 8

Change-Id: Ia6a0d04974e5de4957df179fa505510caf331e43
diff --git a/platform/msm_shared/dme.c b/platform/msm_shared/dme.c
index c6d651d..c98730b 100644
--- a/platform/msm_shared/dme.c
+++ b/platform/msm_shared/dme.c
@@ -493,13 +493,20 @@
 		return -UFS_FAILURE;
 	}
 
-	dev->lun_cfg[index].logical_blk_cnt = BE64(desc->logical_blk_cnt);
-
-	dev->lun_cfg[index].erase_blk_size = BE32(desc->erase_blk_size);
-
 	// use only the lower 32 bits for rpmb partition size
 	if (index == UFS_WLUN_RPMB)
 		dev->rpmb_num_blocks = BE32(desc->logical_blk_cnt >> 32);
+	/*
+	 rpmb will not use blk count and blk size from lun_cfg as it has
+	 its own entries in ufs_dev structure
+	*/
+	else
+	{
+		dev->lun_cfg[index].logical_blk_cnt = BE64(desc->logical_blk_cnt);
+		dev->lun_cfg[index].erase_blk_size = BE32(desc->erase_blk_size);
+	}
+
+
 
 	return UFS_SUCCESS;
 }