* [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1
@ 2016-11-09 6:46 Shyam Sundar S K
2016-11-09 7:06 ` kbuild test robot
0 siblings, 1 reply; 4+ messages in thread
From: Shyam Sundar S K @ 2016-11-09 6:46 UTC (permalink / raw)
To: adrian.hunter, Ulf Hansson
Cc: linux-mmc, Pankaj.Sen, Nehal-bakulchandra.Shah,
Agrawal, Nitesh-kumar
This patch adds support for HS200 tuning mode, on AMD eMMC-4.5.1
Made changes to the earlier submission based on the comments
received from Adrian.
Also re-spinned to the latest version based on feedback from Ulf.
Reviewed-by: Sen, Pankaj <Pankaj.Sen@amd.com>
Reviewed-by: Shah, Nehal-bakulchandra <Nehal-bakulchandra.Shah@amd.com>
Signed-off-by: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>
---
drivers/mmc/host/sdhci-pci-core.c | 178 +++++++++++++++++++++++++++++++++++++-
1 file changed, 177 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 782c8d2..9576f82 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -817,6 +817,171 @@ enum amd_chipset_gen {
AMD_CHIPSET_UNKNOWN,
};
+static const struct sdhci_ops amd_sdhci_pci_ops;
+
+struct amd_tuning_descriptor {
+ u8 tune_around;
+ bool this_tune_ok;
+ bool last_tune_ok;
+ u8 valid_front;
+ u8 valid_window_max;
+ u8 tune_low_max;
+ u8 tune_low;
+ u8 valid_window;
+ u8 tune_result;
+};
+
+static int amd_tuning_reset(struct sdhci_host *host)
+{
+ unsigned int val;
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+
+ val = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+ val |= SDHCI_CTRL_PRESET_VAL_ENABLE | SDHCI_CTRL_EXEC_TUNING;
+ sdhci_writew(host, val, SDHCI_HOST_CONTROL2);
+
+ val = sdhci_readw(host, SDHCI_HOST_CONTROL2);
+ val &= ~SDHCI_CTRL_EXEC_TUNING;
+ sdhci_writew(host, val, SDHCI_HOST_CONTROL2);
+
+ spin_unlock_irqrestore(&host->lock, flags);
+
+ return 0;
+}
+
+static int amd_config_tuning_phase(struct sdhci_host *host, u8 phase)
+{
+ struct sdhci_pci_slot *slot = sdhci_priv(host);
+ struct pci_dev *pdev = slot->chip->pdev;
+ unsigned int val;
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+
+ pci_read_config_dword(pdev, 0xb8, &val);
+ val &= ~0x1f;
+ val |= (0x10800 | (phase << 1));
+ pci_write_config_dword(pdev, 0xb8, val);
+
+ spin_unlock_irqrestore(&host->lock, flags);
+
+ return 0;
+}
+
+static int amd_find_good_phase(struct sdhci_host *host)
+{
+ struct sdhci_pci_slot *slot = sdhci_priv(host);
+ struct pci_dev *pdev = slot->chip->pdev;
+ struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
+
+ unsigned int val;
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+
+ if (td->this_tune_ok)
+ td->valid_front += 1;
+ if ((!td->this_tune_ok && td->last_tune_ok) ||
+ (td->tune_around == 11)) {
+ if (td->valid_window > td->valid_window_max) {
+ td->valid_window_max = td->valid_window;
+ td->tune_low_max = td->tune_low;
+ }
+ }
+ if (td->this_tune_ok && (!td->last_tune_ok))
+ td->tune_low = td->tune_around;
+ if (!td->this_tune_ok && td->last_tune_ok)
+ td->valid_window = 0;
+ else if (td->this_tune_ok)
+ td->valid_window += 1;
+
+ td->last_tune_ok = td->this_tune_ok;
+
+ if (td->tune_around == 11) {
+ if ((td->valid_front + td->valid_window) >
+ td->valid_window_max) {
+ if (td->valid_front > td->valid_window)
+ td->tune_result = ((td->valid_front -
+ td->valid_window) >> 1);
+ else
+ td->tune_result = td->tune_low +
+ ((td->valid_window + td->valid_front) >> 1);
+ } else {
+ td->tune_result = td->tune_low_max +
+ (td->valid_window_max >> 1);
+ }
+
+ if (td->tune_result > 0x0b)
+ td->tune_result = 0x0b;
+
+ pci_read_config_dword(pdev, 0xb8, &val);
+ val &= ~0x1f;
+ val |= (0x10800 | (td->tune_result << 1));
+ pci_write_config_dword(pdev, 0xb8, val);
+ }
+
+ spin_unlock_irqrestore(&host->lock, flags);
+
+ return 0;
+}
+
+static int amd_enable_manual_tuning(struct sdhci_pci_slot *slot)
+{
+ struct pci_dev *pdev = slot->chip->pdev;
+ unsigned int val;
+
+ pci_read_config_dword(pdev, 0xd0, &val);
+ val &= 0xffffffcf;
+ val |= 0x30;
+ pci_write_config_dword(pdev, 0xd0, val);
+
+ return 0;
+}
+
+static int amd_execute_tuning(struct sdhci_host *host, u32 opcode)
+{
+ struct sdhci_pci_slot *slot = sdhci_priv(host);
+ struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
+ u8 ctrl;
+
+ amd_tuning_reset(host);
+ memset(td, 0, sizeof(struct amd_tuning_descriptor));
+
+ /*********************************************************************/
+ /* Enabling Software Tuning */
+ /********************************************************************/
+ /* 1. First switch the eMMC to HS200 Mode
+ * 2. Prepare the registers by using the sampling clock select
+ * 3. Send the CMD21 12 times with block length of 64 bytes
+ * 4. Everytime change the clk phase and check for CRC error
+ * (CMD and DATA),if error, soft reset the CMD and DATA line
+ * 5. Calculate the window and set the clock phase.
+ */
+
+ for (td->tune_around = 0; td->tune_around < 12; td->tune_around++) {
+ amd_config_tuning_phase(host, td->tune_around);
+
+ if (mmc_send_tuning(host->mmc, opcode, NULL)) {
+ td->this_tune_ok = false;
+ host->mmc->need_retune = 0;
+ mdelay(4);
+ ctrl = SDHCI_RESET_CMD | SDHCI_RESET_DATA;
+ sdhci_writeb(host, ctrl, SDHCI_SOFTWARE_RESET);
+ } else {
+ td->this_tune_ok = true;
+ }
+
+ amd_find_good_phase(host);
+ }
+
+ host->mmc->retune_period = 0;
+
+ amd_enable_manual_tuning(slot);
+ return 0;
+}
+
static int amd_probe(struct sdhci_pci_chip *chip)
{
struct pci_dev *smbus_dev;
@@ -841,7 +1006,6 @@ static int amd_probe(struct sdhci_pci_chip *chip)
if ((gen == AMD_CHIPSET_BEFORE_ML) || (gen == AMD_CHIPSET_CZ)) {
chip->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD;
- chip->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
}
return 0;
@@ -849,6 +1013,7 @@ static int amd_probe(struct sdhci_pci_chip *chip)
static const struct sdhci_pci_fixes sdhci_amd = {
.probe = amd_probe,
+ .ops = &amd_sdhci_pci_ops,
};
static const struct pci_device_id pci_ids[] = {
@@ -1469,6 +1634,17 @@ static const struct sdhci_ops sdhci_pci_ops = {
.select_drive_strength = sdhci_pci_select_drive_strength,
};
+static const struct sdhci_ops amd_sdhci_pci_ops = {
+ .set_clock = sdhci_set_clock,
+ .enable_dma = sdhci_pci_enable_dma,
+ .set_bus_width = sdhci_pci_set_bus_width,
+ .reset = sdhci_reset,
+ .set_uhs_signaling = sdhci_set_uhs_signaling,
+ .hw_reset = sdhci_pci_hw_reset,
+ .select_drive_strength = sdhci_pci_select_drive_strength,
+ .platform_execute_tuning = amd_execute_tuning,
+};
+
/*****************************************************************************\
* *
* Suspend/resume *
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1
2016-11-09 6:46 [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1 Shyam Sundar S K
@ 2016-11-09 7:06 ` kbuild test robot
2016-11-09 7:14 ` Shyam Sundar S K
0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2016-11-09 7:06 UTC (permalink / raw)
To: Shyam Sundar S K
Cc: kbuild-all, adrian.hunter, Ulf Hansson, linux-mmc, Pankaj.Sen,
Nehal-bakulchandra.Shah, Agrawal, Nitesh-kumar
[-- Attachment #1: Type: text/plain, Size: 9141 bytes --]
Hi Shyam,
[auto build test ERROR on ulf.hansson-mmc/next]
[also build test ERROR on v4.9-rc4 next-20161109]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Shyam-Sundar-S-K/mmc-sdhci-pci-Add-support-for-HS200-tuning-mode-on-AMD-eMMC-4-5-1/20161109-145027
base: https://git.linaro.org/people/ulf.hansson/mmc next
config: i386-randconfig-x006-201645 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
drivers/mmc/host/sdhci-pci-core.c: In function 'amd_find_good_phase':
>> drivers/mmc/host/sdhci-pci-core.c:877:37: error: implicit declaration of function 'sdhci_pci_priv' [-Werror=implicit-function-declaration]
struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
^~~~~~~~~~~~~~
>> drivers/mmc/host/sdhci-pci-core.c:877:37: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
drivers/mmc/host/sdhci-pci-core.c: In function 'amd_execute_tuning':
drivers/mmc/host/sdhci-pci-core.c:946:37: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
^~~~~~~~~~~~~~
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_restore
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_disable
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_save
Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
Cyclomatic Complexity 2 include/linux/err.h:IS_ERR
Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:should_resched
Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
Cyclomatic Complexity 3 include/linux/spinlock.h:spin_unlock_irqrestore
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readb
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readw
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readl
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writeb
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writew
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writel
Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name
Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc
Cyclomatic Complexity 3 include/linux/device.h:dev_name
Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
Cyclomatic Complexity 1 include/linux/pci.h:pci_read_config_byte
Cyclomatic Complexity 1 include/linux/pci.h:pci_read_config_dword
Cyclomatic Complexity 1 include/linux/pci.h:pci_write_config_byte
Cyclomatic Complexity 1 include/linux/pci.h:pci_write_config_dword
Cyclomatic Complexity 1 include/linux/pci.h:pci_get_drvdata
Cyclomatic Complexity 1 include/linux/pci.h:pci_set_drvdata
Cyclomatic Complexity 1 include/linux/mmc/host.h:mmc_priv
Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_is_valid
Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_direction_output
Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_set_value_cansleep
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_allow
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_forbid
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_suspend_ignore_children
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_get_noresume
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_put_noidle
Cyclomatic Complexity 1 include/linux/pm_runtime.h:__pm_runtime_use_autosuspend
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_set_autosuspend_delay
Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_use_autosuspend
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writel
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writew
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writeb
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readl
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readw
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readb
Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_priv
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:ricoh_mmc_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mrst_hc_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mrst_hc_probe
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:pch_hc_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_add_own_cd
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove_own_cd
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mfd_emmc_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mfd_sdio_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:byt_sdio_probe_slot
Cyclomatic Complexity 4 drivers/mmc/host/sdhci-pci-core.c:intel_mrfld_mmc_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:rtsx_probe_slot
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_enable_manual_tuning
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_set_bus_width
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_runtime_pm_allow
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_runtime_pm_forbid
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_driver_init
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_select_drive_strength
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_hw_reset
Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:byt_sd_probe_slot
Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:spt_select_drive_strength
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:via_probe
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:syskt_probe
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:jmicron_enable_mmc
Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:jmicron_pmos
Cyclomatic Complexity 10 drivers/mmc/host/sdhci-pci-core.c:jmicron_suspend
Cyclomatic Complexity 11 drivers/mmc/host/sdhci-pci-core.c:jmicron_remove_slot
Cyclomatic Complexity 15 drivers/mmc/host/sdhci-pci-core.c:jmicron_probe_slot
Cyclomatic Complexity 9 drivers/mmc/host/sdhci-pci-core.c:ricoh_probe
Cyclomatic Complexity 19 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove_slot
Cyclomatic Complexity 4 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove
Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:jmicron_resume
Cyclomatic Complexity 69 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_probe_slot
Cyclomatic Complexity 33 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_probe
Cyclomatic Complexity 29 drivers/mmc/host/sdhci-pci-core.c:spt_read_drive_strength
Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:byt_emmc_probe_slot
Cyclomatic Complexity 8 drivers/mmc/host/sdhci-pci-core.c:syskt_probe_slot
Cyclomatic Complexity 2 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_gpio_hw_reset
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_int_hw_reset
Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_enable_dma
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_tuning_reset
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_config_tuning_phase
Cyclomatic Complexity 42 drivers/mmc/host/sdhci-pci-core.c:amd_find_good_phase
Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:amd_execute_tuning
Cyclomatic Complexity 9 drivers/mmc/host/sdhci-pci-core.c:amd_probe
Cyclomatic Complexity 6 drivers/mmc/host/sdhci-pci-core.c:sdhci_intel_set_power
Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:bxt_get_cd
Cyclomatic Complexity 24 drivers/mmc/host/sdhci-pci-core.c:jmicron_probe
Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:ricoh_mmc_resume
vim +/sdhci_pci_priv +877 drivers/mmc/host/sdhci-pci-core.c
871 }
872
873 static int amd_find_good_phase(struct sdhci_host *host)
874 {
875 struct sdhci_pci_slot *slot = sdhci_priv(host);
876 struct pci_dev *pdev = slot->chip->pdev;
> 877 struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
878
879 unsigned int val;
880 unsigned long flags;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26284 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1
2016-11-09 7:06 ` kbuild test robot
@ 2016-11-09 7:14 ` Shyam Sundar S K
2016-11-09 18:11 ` Ulf Hansson
0 siblings, 1 reply; 4+ messages in thread
From: Shyam Sundar S K @ 2016-11-09 7:14 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, adrian.hunter, Ulf Hansson, linux-mmc, Pankaj.Sen,
Nehal-bakulchandra.Shah, Agrawal, Nitesh-kumar
Hi Ulf, Adrian
> drivers/mmc/host/sdhci-pci-core.c: In function 'amd_find_good_phase':
>>> drivers/mmc/host/sdhci-pci-core.c:877:37: error: implicit declaration of function 'sdhci_pci_priv' [-Werror=implicit-function-declaration]
> struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
This build error is because, it has dependency on Adrian patch "mmc: sdhci-pci: Let devices define their own private data".
Kindly add our patch on top of Adrian's patch and that will resolve the build error.
Thanks,
Shyam
On 11/9/2016 12:36 PM, kbuild test robot wrote:
> Hi Shyam,
>
> [auto build test ERROR on ulf.hansson-mmc/next]
> [also build test ERROR on v4.9-rc4 next-20161109]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Shyam-Sundar-S-K/mmc-sdhci-pci-Add-support-for-HS200-tuning-mode-on-AMD-eMMC-4-5-1/20161109-145027
> base: https://git.linaro.org/people/ulf.hansson/mmc next
> config: i386-randconfig-x006-201645 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> All error/warnings (new ones prefixed by >>):
>
> drivers/mmc/host/sdhci-pci-core.c: In function 'amd_find_good_phase':
>>> drivers/mmc/host/sdhci-pci-core.c:877:37: error: implicit declaration of function 'sdhci_pci_priv' [-Werror=implicit-function-declaration]
> struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
> ^~~~~~~~~~~~~~
>>> drivers/mmc/host/sdhci-pci-core.c:877:37: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
> drivers/mmc/host/sdhci-pci-core.c: In function 'amd_execute_tuning':
> drivers/mmc/host/sdhci-pci-core.c:946:37: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
> struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
> ^~~~~~~~~~~~~~
> Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
> Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_restore
> Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_disable
> Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_save
> Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
> Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
> Cyclomatic Complexity 2 include/linux/err.h:IS_ERR
> Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST
> Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
> Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:should_resched
> Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
> Cyclomatic Complexity 3 include/linux/spinlock.h:spin_unlock_irqrestore
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readb
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readw
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readl
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writeb
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writew
> Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writel
> Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name
> Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc
> Cyclomatic Complexity 3 include/linux/device.h:dev_name
> Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
> Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
> Cyclomatic Complexity 1 include/linux/pci.h:pci_read_config_byte
> Cyclomatic Complexity 1 include/linux/pci.h:pci_read_config_dword
> Cyclomatic Complexity 1 include/linux/pci.h:pci_write_config_byte
> Cyclomatic Complexity 1 include/linux/pci.h:pci_write_config_dword
> Cyclomatic Complexity 1 include/linux/pci.h:pci_get_drvdata
> Cyclomatic Complexity 1 include/linux/pci.h:pci_set_drvdata
> Cyclomatic Complexity 1 include/linux/mmc/host.h:mmc_priv
> Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_is_valid
> Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_direction_output
> Cyclomatic Complexity 1 include/asm-generic/gpio.h:gpio_set_value_cansleep
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_allow
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_forbid
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_suspend_ignore_children
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_get_noresume
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_put_noidle
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:__pm_runtime_use_autosuspend
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_set_autosuspend_delay
> Cyclomatic Complexity 1 include/linux/pm_runtime.h:pm_runtime_use_autosuspend
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writel
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writew
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_writeb
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readl
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readw
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_readb
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci.h:sdhci_priv
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:ricoh_mmc_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mrst_hc_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mrst_hc_probe
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:pch_hc_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_add_own_cd
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove_own_cd
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mfd_emmc_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:mfd_sdio_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:byt_sdio_probe_slot
> Cyclomatic Complexity 4 drivers/mmc/host/sdhci-pci-core.c:intel_mrfld_mmc_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:rtsx_probe_slot
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_enable_manual_tuning
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_set_bus_width
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_runtime_pm_allow
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_runtime_pm_forbid
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_driver_init
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_select_drive_strength
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_hw_reset
> Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:byt_sd_probe_slot
> Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:spt_select_drive_strength
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:via_probe
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:syskt_probe
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:jmicron_enable_mmc
> Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:jmicron_pmos
> Cyclomatic Complexity 10 drivers/mmc/host/sdhci-pci-core.c:jmicron_suspend
> Cyclomatic Complexity 11 drivers/mmc/host/sdhci-pci-core.c:jmicron_remove_slot
> Cyclomatic Complexity 15 drivers/mmc/host/sdhci-pci-core.c:jmicron_probe_slot
> Cyclomatic Complexity 9 drivers/mmc/host/sdhci-pci-core.c:ricoh_probe
> Cyclomatic Complexity 19 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove_slot
> Cyclomatic Complexity 4 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_remove
> Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:jmicron_resume
> Cyclomatic Complexity 69 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_probe_slot
> Cyclomatic Complexity 33 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_probe
> Cyclomatic Complexity 29 drivers/mmc/host/sdhci-pci-core.c:spt_read_drive_strength
> Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:byt_emmc_probe_slot
> Cyclomatic Complexity 8 drivers/mmc/host/sdhci-pci-core.c:syskt_probe_slot
> Cyclomatic Complexity 2 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_gpio_hw_reset
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_int_hw_reset
> Cyclomatic Complexity 12 drivers/mmc/host/sdhci-pci-core.c:sdhci_pci_enable_dma
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_tuning_reset
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:amd_config_tuning_phase
> Cyclomatic Complexity 42 drivers/mmc/host/sdhci-pci-core.c:amd_find_good_phase
> Cyclomatic Complexity 3 drivers/mmc/host/sdhci-pci-core.c:amd_execute_tuning
> Cyclomatic Complexity 9 drivers/mmc/host/sdhci-pci-core.c:amd_probe
> Cyclomatic Complexity 6 drivers/mmc/host/sdhci-pci-core.c:sdhci_intel_set_power
> Cyclomatic Complexity 5 drivers/mmc/host/sdhci-pci-core.c:bxt_get_cd
> Cyclomatic Complexity 24 drivers/mmc/host/sdhci-pci-core.c:jmicron_probe
> Cyclomatic Complexity 1 drivers/mmc/host/sdhci-pci-core.c:ricoh_mmc_resume
>
> vim +/sdhci_pci_priv +877 drivers/mmc/host/sdhci-pci-core.c
>
> 871 }
> 872
> 873 static int amd_find_good_phase(struct sdhci_host *host)
> 874 {
> 875 struct sdhci_pci_slot *slot = sdhci_priv(host);
> 876 struct pci_dev *pdev = slot->chip->pdev;
> > 877 struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
> 878
> 879 unsigned int val;
> 880 unsigned long flags;
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1
2016-11-09 7:14 ` Shyam Sundar S K
@ 2016-11-09 18:11 ` Ulf Hansson
0 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2016-11-09 18:11 UTC (permalink / raw)
To: Shyam Sundar S K
Cc: kbuild test robot, kbuild-all@01.org, Adrian Hunter, linux-mmc,
Sen, Pankaj, Shah, Nehal-bakulchandra, Agrawal, Nitesh-kumar
On 9 November 2016 at 08:14, Shyam Sundar S K <ssundark@amd.com> wrote:
> Hi Ulf, Adrian
>
>> drivers/mmc/host/sdhci-pci-core.c: In function 'amd_find_good_phase':
>>>> drivers/mmc/host/sdhci-pci-core.c:877:37: error: implicit declaration of function 'sdhci_pci_priv' [-Werror=implicit-function-declaration]
>> struct amd_tuning_descriptor *td = sdhci_pci_priv(slot);
>
> This build error is because, it has dependency on Adrian patch "mmc: sdhci-pci: Let devices define their own private data".
>
> Kindly add our patch on top of Adrian's patch and that will resolve the build error.
Please resend as a series, then kbuild will use the first patch before
trying the second.
[...]
Kind regards
Uffe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-09 18:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 6:46 [PATCH] mmc: sdhci-pci: Add support for HS200 tuning mode, on AMD eMMC-4.5.1 Shyam Sundar S K
2016-11-09 7:06 ` kbuild test robot
2016-11-09 7:14 ` Shyam Sundar S K
2016-11-09 18:11 ` Ulf Hansson
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.