public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/4] mmc: s5p_mmc: fixed wrong function argument
Date: Fri, 31 Aug 2012 10:14:44 +0900	[thread overview]
Message-ID: <50401004.5030004@samsung.com> (raw)
In-Reply-To: <CAKWjMd5C-03f8_0knpUeKB7RM_zo4NXc9eAtq5rTXmaN25sMmg@mail.gmail.com>

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
> 

      reply	other threads:[~2012-08-31  1:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27  2:33 [U-Boot] [PATCH v2 2/4] mmc: s5p_mmc: fixed wrong function argument Jaehoon Chung
2012-08-30 21:46 ` Andy Fleming
2012-08-31  1:14   ` Jaehoon Chung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50401004.5030004@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox