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/>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html