All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Possible bug in s5p_sdhci.c
@ 2015-02-19 18:31 Matt Reimer
  2015-02-23 17:56 ` Pantelis Antoniou
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Reimer @ 2015-02-19 18:31 UTC (permalink / raw)
  To: u-boot

The use of SDHCI_CTRL2_SELBASECLK_SHIFT in s5p_sdhci_set_control_reg() seems wrong, because a shifting offset is being used as a mask, not to generate a mask.

It's unclear what the original intent was. Below is my suggested fix.

What think ye?

Matt


diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index 3899372..0eec731 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -30,7 +30,7 @@ static void s5p_sdhci_set_control_reg(struct sdhci_host *host)
        sdhci_writel(host, SDHCI_CTRL4_DRIVE_MASK(0x3), SDHCI_CONTROL4);
 
        val = sdhci_readl(host, SDHCI_CONTROL2);
-       val &= SDHCI_CTRL2_SELBASECLK_SHIFT;
+       val &= SDHCI_CTRL2_SELBASECLK_MASK(3);
 
        val |=  SDHCI_CTRL2_ENSTAASYNCCLR |
                SDHCI_CTRL2_ENCMDCNFMSK |

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-18  7:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 18:31 [U-Boot] Possible bug in s5p_sdhci.c Matt Reimer
2015-02-23 17:56 ` Pantelis Antoniou
2015-02-23 21:52   ` [U-Boot] [PATCH] mmc: s5p: properly mask SELBASECLK Matt Reimer
2015-02-25  9:32     ` Jaehoon Chung
2015-03-02 18:31     ` Matt Reimer
2015-03-18  7:52     ` Pantelis Antoniou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.