mmc: sdhci-of-arasan: fix timings allocation code
authorManish Narani <manish.narani@xilinx.com>
Tue, 14 Jul 2020 19:12:33 +0000 (00:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:24 +0000 (11:29 +0200)
commit1bbd2c5daed796a411f2f9bc33699013aff8726a
treee5ac5ebec4766de264fc1974d41a8fde3d274f85
parentb082d42f1c1733d057b859a26791176c200f36eb
mmc: sdhci-of-arasan: fix timings allocation code

[ Upstream commit 88e1d0b175ec0bfa775c8629eae2a728726e2c6a ]

The initial code that was adding delays was doing a cast over undefined
memory. This meant that the delays would be all gibberish.

This change, allocates all delays on the stack, and assigns them from the
ZynqMP & Versal macros/phase-list. And then finally copies them over the
common iclk_phase & oclk_phase variables.

Signed-off-by: Manish Narani <manish.narani@xilinx.com>
Link: https://lore.kernel.org/r/1594753953-62980-1-git-send-email-manish.narani@xilinx.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/sdhci-of-arasan.c