Re: [PATCH v1] mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Judith,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cf6444ba528f043398b112ac36e041a4d8685cb1]

url:    https://github.com/intel-lab-lkp/linux/commits/Judith-Mendez/mmc-sdhci_am654-Add-sdhci_am654_start_signal_voltage_switch/20240907-015144
base:   cf6444ba528f043398b112ac36e041a4d8685cb1
patch link:    https://lore.kernel.org/r/20240906175032.1580281-1-jm%40ti.com
patch subject: [PATCH v1] mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch
config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20240907/202409072350.685m24kB-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240907/202409072350.685m24kB-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409072350.685m24kB-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/mmc/host/sdhci_am654.c:360:5: warning: no previous prototype for 'sdhci_am654_start_signal_voltage_switch' [-Wmissing-prototypes]
     360 | int sdhci_am654_start_signal_voltage_switch(struct mmc_host *mmc,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/sdhci_am654_start_signal_voltage_switch +360 drivers/mmc/host/sdhci_am654.c

   359	
 > 360	int sdhci_am654_start_signal_voltage_switch(struct mmc_host *mmc,
   361						    struct mmc_ios *ios)
   362	{
   363		struct sdhci_host *host = mmc_priv(mmc);
   364		struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
   365		struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host);
   366		u16 ctrl;
   367		int ret;
   368	
   369		if (host->version < SDHCI_SPEC_300)
   370			return 0;
   371	
   372		switch (ios->signal_voltage) {
   373		case MMC_SIGNAL_VOLTAGE_330:
   374			if (!(host->flags & SDHCI_SIGNALING_330))
   375				return -EINVAL;
   376	
   377			ctrl &= ~SDHCI_CTRL_VDD_180;
   378			sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
   379	
   380			if (!IS_ERR(mmc->supply.vqmmc)) {
   381				ret = mmc_regulator_set_vqmmc(mmc, ios);
   382				if (ret < 0) {
   383					pr_warn("%s: Switching to 3.3V signalling voltage failed\n",
   384						mmc_hostname(mmc));
   385					return -EIO;
   386				}
   387			}
   388	
   389			usleep_range(5000, 5500);
   390	
   391			ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
   392			if (!(ctrl & SDHCI_CTRL_VDD_180))
   393				return 0;
   394	
   395			pr_warn("%s: 3.3V regulator output did not become stable\n",
   396				mmc_hostname(mmc));
   397	
   398			return -EAGAIN;
   399	
   400		case MMC_SIGNAL_VOLTAGE_180:
   401			if (!(host->flags & SDHCI_SIGNALING_180))
   402				return -EINVAL;
   403	
   404			if (!IS_ERR(mmc->supply.vqmmc)) {
   405				ret = mmc_regulator_set_vqmmc(mmc, ios);
   406				if (ret < 0) {
   407					pr_warn("%s: Switching to 1.8V signalling voltage failed\n",
   408						mmc_hostname(mmc));
   409					return -EIO;
   410				}
   411			}
   412	
   413			if (sdhci_am654->quirks & SDHCI_AM654_QUIRK_SET_V1P8_ENA) {
   414				ctrl |= SDHCI_CTRL_VDD_180;
   415				sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
   416	
   417				ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
   418				if (ctrl & SDHCI_CTRL_VDD_180)
   419					return 0;
   420	
   421				pr_warn("%s: 1.8V regulator output did not become stable\n",
   422					mmc_hostname(mmc));
   423	
   424				return -EAGAIN;
   425			}
   426			return 0;
   427	
   428		default:
   429			return 0;
   430		}
   431	}
   432	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux