diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-02 18:46:47 -0400 |
---|---|---|
committer | Andy Gross <agross@codeaurora.org> | 2015-10-14 15:51:21 -0400 |
commit | 3b781e55c6cb1afa5da7b2b1b2bb1b0c9ee7bf97 (patch) | |
tree | 735a102ceff37b23e6d53d10e549420fdf47084c /drivers/soc/qcom | |
parent | f02dc82523a72619a10e24355c7b2f12c6814d52 (diff) |
soc: qcom: smd: Use __iowrite32_copy() instead of open-coding it
We already have a function to do this and it silences some sparse
warnings along the way.
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r-- | drivers/soc/qcom/smd.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/soc/qcom/smd.c b/drivers/soc/qcom/smd.c index 3efa3670ce18..f9768bff8051 100644 --- a/drivers/soc/qcom/smd.c +++ b/drivers/soc/qcom/smd.c | |||
@@ -371,20 +371,15 @@ static void qcom_smd_channel_set_state(struct qcom_smd_channel *channel, | |||
371 | /* | 371 | /* |
372 | * Copy count bytes of data using 32bit accesses, if that's required. | 372 | * Copy count bytes of data using 32bit accesses, if that's required. |
373 | */ | 373 | */ |
374 | static void smd_copy_to_fifo(void __iomem *_dst, | 374 | static void smd_copy_to_fifo(void __iomem *dst, |
375 | const void *_src, | 375 | const void *src, |
376 | size_t count, | 376 | size_t count, |
377 | bool word_aligned) | 377 | bool word_aligned) |
378 | { | 378 | { |
379 | u32 *dst = (u32 *)_dst; | ||
380 | u32 *src = (u32 *)_src; | ||
381 | |||
382 | if (word_aligned) { | 379 | if (word_aligned) { |
383 | count /= sizeof(u32); | 380 | __iowrite32_copy(dst, src, count / sizeof(u32)); |
384 | while (count--) | ||
385 | writel_relaxed(*src++, dst++); | ||
386 | } else { | 381 | } else { |
387 | memcpy_toio(_dst, _src, count); | 382 | memcpy_toio(dst, src, count); |
388 | } | 383 | } |
389 | } | 384 | } |
390 | 385 | ||