mmc: msm_sdcc: Add correct DMA limitations and some cleanup

1) dma_map_sg() should be called before sg_dma_address()
is passed to dmov. This makes sure that buffer adresses
are bounced if present in HIGH_MEM region.

2) The maximum length of data transfer that DMA
can handle in box mode while operating with SDCC
would be 4095 (rows(64K-1)*fifo_size(64)) KiB.
It is likely that upper layers can send more
data than this as suggested by host->max_seg_size.
The data mover hangs if such requests are passed
to driver. Fix this by limiting box mode command
to handle only requests upto 4095KiB and iterate
over many such commands for larger requests.

3) Increase NR_SG to 128 for optimal performance.

4) Clean up hardcoded values to proper macros in .h file

Change-Id: I06d53396a639e2108f87022a2eef6822dda88305
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2 files changed