linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Ball <chris@printf.net>
To: Peter Guo <peter.guo@bayhubtech.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adam Lee <adam.lee@canonical.com>,
	Samuel Guan <samuel.guan@bayhubtech.com>
Subject: Re: [PATCH 1/1] mmc: sdhci-pci-o2micro Add SeaBird SeaEagle SD3 support
Date: Fri, 18 Apr 2014 12:55:10 +0100	[thread overview]
Message-ID: <86zjjiua1t.fsf@void.printf.net> (raw)
In-Reply-To: <1326159439be44efadec7d62612c3130@CO2PR04MB651.namprd04.prod.outlook.com> (Peter Guo's message of "Fri, 18 Apr 2014 07:11:58 +0000")

Hi Peter,

On Fri, Apr 18 2014, Peter Guo wrote:
> @@ -215,6 +251,25 @@ int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip)
>  
>  		scratch &= 0x7f;
>  		pci_write_config_byte(chip->pdev, O2_SD_LOCK_WP, scratch);
> +		if (chip->pdev->device == PCI_DEVICE_ID_O2_FUJIN2) {
> +			ret = pci_read_config_dword(chip->pdev,
> +						O2_SD_FUNC_REG0, &scratch_32);
> +			scratch_32 = ((scratch_32 & 0xFF000000) >> 24);
> +			if ((scratch_32 == 0x11) || (scratch_32 == 0x12)) {
> +				scratch_32 = 0x2c280000;

Can we get a comment added to the code about what the purpose of the
writes below is, and why you're writing this particular value?

Please use a #defined constant for the value, too.

> +				o2_pci_set_baseclk(chip, scratch_32);
> +				ret = pci_read_config_dword(chip->pdev,
> +						O2_SD_FUNC_REG4, &scratch_32);
> +				scratch_32 |= BIT(22);

Same -- what is the purpose of the value you're reading, and what does
adding this bit to it achieve?

> +				pci_write_config_dword(chip->pdev,
> +					O2_SD_FUNC_REG4, scratch_32);

Thanks,

- Chris.
-- 
Chris Ball   <http://printf.net/>

      reply	other threads:[~2014-04-18 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18  7:11 [PATCH 1/1] mmc: sdhci-pci-o2micro Add SeaBird SeaEagle SD3 support Peter Guo
2014-04-18 11:55 ` Chris Ball [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=86zjjiua1t.fsf@void.printf.net \
    --to=chris@printf.net \
    --cc=adam.lee@canonical.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=peter.guo@bayhubtech.com \
    --cc=samuel.guan@bayhubtech.com \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).