This patch series has some bug fixes for sdhci-of-arasan driver with
respect to ZynqMP platform. This series also has some code style changes
in the driver.
Manish Narani (6):
mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP
mmc: sdhci-of-arasan: Add "SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12" quirk.
mmc: sdhci-of-arasan: Skip Auto tuning for DDR50 mode in ZynqMP
platform
mmc: host: sdhci-of-arasan: Check return value of non-void funtions
mmc: host: sdhci-of-arasan: Use appropriate type of division macro
mmc: host: sdhci-of-arasan: Modify data type of the clk_phase array
Sai Krishna Potthuri (1):
mmc: arasan: Fix the issue in reading tap values from DT
drivers/mmc/host/sdhci-of-arasan.c | 51 ++++++++++++++++++++++++++++++++------
1 file changed, 44 insertions(+), 7 deletions(-)
--
2.1.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
SD standard speed timing was met only at 19MHz and not 25 MHz, that's
why changing driver to 19MHz. The reason for this is when a level shifter
is used on the board, timing was met for standard speed only at 19MHz.
Since this level shifter is commonly required for high speed modes,
the driver is modified to use standard speed of 19Mhz.
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Arasan controller supports AUTO CMD12, this patch adds
"SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12" quirk to enable auto cmd12
feature.
By using auto cmd12 we can also avoid following error message
"Got data interrupt even though no data operation in progress"
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 1 +
1 file changed, 1 insertion(+)
ZynqMP platform does not perform auto tuning in DDR50 mode. Skip the
same while the card is operating in DDR50 mode.
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -894,6 +894,10 @@ static int arasan_zynqmp_execute_tuning(struct mmc_host *mmc, u32 opcode)NODE_SD_1;interr;+/* ZynqMP SD controller does not perform auto tuning in DDR50 mode */+if(mmc->ios.timing==MMC_TIMING_UHS_DDR50)+return0;+arasan_zynqmp_dll_reset(host,device_id);err=sdhci_execute_tuning(mmc,opcode);
--
2.1.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
At a couple of places, the return values of the non-void functions were
not getting checked. This was reported by the coverity tool. Modify the
code to check the return values of the same.
Addresses-Coverity: ("check_return")
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
@@ -273,7 +273,12 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)*throughlowspeedswithoutpowercycling.*/sdhci_set_clock(host,host->max_clk);-phy_power_on(sdhci_arasan->phy);+if(phy_power_on(sdhci_arasan->phy)){+pr_err("%s: Cannot power on phy.\n",+mmc_hostname(host->mmc));+return;+}+sdhci_arasan->is_phy_on=true;/*
@@ -323,7 +328,12 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)msleep(20);if(ctrl_phy){-phy_power_on(sdhci_arasan->phy);+if(phy_power_on(sdhci_arasan->phy)){+pr_err("%s: Cannot power on phy.\n",+mmc_hostname(host->mmc));+return;+}+sdhci_arasan->is_phy_on=true;}}
@@ -479,7 +489,9 @@ static int sdhci_arasan_suspend(struct device *dev)ret=phy_power_off(sdhci_arasan->phy);if(ret){dev_err(dev,"Cannot power off phy.\n");-sdhci_resume_host(host);+if(sdhci_resume_host(host))+dev_err(dev,"Cannot resume host.\n");+returnret;}sdhci_arasan->is_phy_on=false;
--
2.1.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
The division macro DIV_ROUND_CLOSEST takes int values as the argument.
However the code here uses unsigned int values for this, which is
causing the values comparison with 0 as always true. We can use
DIV_ROUND_CLOSEST_ULL instead for the same.
Addresses-coverity: ("result_independent_of_operands")
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -984,7 +984,7 @@ static void sdhci_arasan_update_baseclkfreq(struct sdhci_host *host)structsdhci_arasan_data*sdhci_arasan=sdhci_pltfm_priv(pltfm_host);conststructsdhci_arasan_soc_ctl_map*soc_ctl_map=sdhci_arasan->soc_ctl_map;-u32mhz=DIV_ROUND_CLOSEST(clk_get_rate(pltfm_host->clk),1000000);+u32mhz=DIV_ROUND_CLOSEST_ULL(clk_get_rate(pltfm_host->clk),1000000);/* Having a map is optional */if(!soc_ctl_map)
--
2.1.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Modify the data type of the clk_phase array to u32 to make it compatible
with the argument requirement of "of_property_read_variable_u32_array".
Addresses-coverity: ("incompatible_param")
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Sai Krishna Potthuri <redacted>
'of_property_read_variable_u32_array' function returns number
of elements read on success. This patch updates the condition
check in the driver to overwrite the tap values from DT if exist.
Signed-off-by: Sai Krishna Potthuri <redacted>
Signed-off-by: Manish Narani <redacted>
---
drivers/mmc/host/sdhci-of-arasan.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
From: Adrian Hunter <adrian.hunter@intel.com> Date: 2021-06-22 15:07:02
On 15/06/21 1:43 pm, Manish Narani wrote:
This patch series has some bug fixes for sdhci-of-arasan driver with
respect to ZynqMP platform. This series also has some code style changes
in the driver.
Manish Narani (6):
mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP
mmc: sdhci-of-arasan: Add "SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12" quirk.
mmc: sdhci-of-arasan: Skip Auto tuning for DDR50 mode in ZynqMP
platform
mmc: host: sdhci-of-arasan: Check return value of non-void funtions
mmc: host: sdhci-of-arasan: Use appropriate type of division macro
mmc: host: sdhci-of-arasan: Modify data type of the clk_phase array
Sai Krishna Potthuri (1):
mmc: arasan: Fix the issue in reading tap values from DT
drivers/mmc/host/sdhci-of-arasan.c | 51 ++++++++++++++++++++++++++++++++------
1 file changed, 44 insertions(+), 7 deletions(-)
The subject prefixes look inconsistent, nevertheless, for all 7:
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Tue, 15 Jun 2021 at 12:44, Manish Narani [off-list ref] wrote:
This patch series has some bug fixes for sdhci-of-arasan driver with
respect to ZynqMP platform. This series also has some code style changes
in the driver.
Manish Narani (6):
mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP
mmc: sdhci-of-arasan: Add "SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12" quirk.
mmc: sdhci-of-arasan: Skip Auto tuning for DDR50 mode in ZynqMP
platform
mmc: host: sdhci-of-arasan: Check return value of non-void funtions
mmc: host: sdhci-of-arasan: Use appropriate type of division macro
mmc: host: sdhci-of-arasan: Modify data type of the clk_phase array
Sai Krishna Potthuri (1):
mmc: arasan: Fix the issue in reading tap values from DT
drivers/mmc/host/sdhci-of-arasan.c | 51 ++++++++++++++++++++++++++++++++------
1 file changed, 44 insertions(+), 7 deletions(-)
--
2.1.1
Queued up for v5.15 (temporary on the devel branch) and by amending
the prefixes, thanks!
Kind regards
Uffe
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel