From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Fri, 31 Aug 2012 10:14:44 +0900 Subject: [U-Boot] [PATCH v2 2/4] mmc: s5p_mmc: fixed wrong function argument In-Reply-To: References: <5011FDF8.5060500@samsung.com> Message-ID: <50401004.5030004@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Andy, >> @@ -80,12 +80,11 @@ int s5p_sdhci_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks) >> >> host->name = S5P_NAME; >> host->ioaddr = (void *)regbase; >> - host->quirks = quirks; > > > I'm very confused by this line. "quirks" is the 4th argument to the > original version of this function, but I see that the original > *caller* of this function passed in "index". This is amazingly broken. > Fortunately, your patch fixes it, but it calls into doubt how it ever > worked with any index but "0". It's just lucky. Because We are using the index "0" for eMMC card. So i fixed this problem. > > >> >> - host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE | >> + host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE | >> SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR; >> host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; >> - if (quirks & SDHCI_QUIRK_REG32_RW) >> + if (host->quirks & SDHCI_QUIRK_REG32_RW) > > > Now that host->quirks is initialized just above, SDHCI_QUIRK_REG32_RW > will never be set, so there's no point in checking for it. Right, we can remove that. i will fix. Best Regards, Jaehoon Chung > > > Andy > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot >