Re: [PATCH 2/2] mmc: dw_mmc: add resets support to dw_mmc

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

 



Hi Guodong,

[auto build test ERROR on ulf.hansson-mmc/next]
[also build test ERROR on v4.5-rc6 next-20160304]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Guodong-Xu/Documentation-synopsys-dw-mshc-add-binding-for-resets/20160306-164955
base:   https://git.linaro.org/people/ulf.hansson/mmc next
config: sparc64-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   drivers/mmc/host/dw_mmc.c: In function 'dw_mci_parse_dt':
>> drivers/mmc/host/dw_mmc.c:2882:7: error: 'struct dw_mci_board' has no member named 'rstc'
     pdata->rstc = devm_reset_control_get_optional(dev, NULL);
          ^
>> drivers/mmc/host/dw_mmc.c:2882:2: error: implicit declaration of function 'devm_reset_control_get_optional' [-Werror=implicit-function-declaration]
     pdata->rstc = devm_reset_control_get_optional(dev, NULL);
     ^
   drivers/mmc/host/dw_mmc.c:2883:18: error: 'struct dw_mci_board' has no member named 'rstc'
     if (IS_ERR(pdata->rstc)) {
                     ^
   drivers/mmc/host/dw_mmc.c:2884:20: error: 'struct dw_mci_board' has no member named 'rstc'
      if (PTR_ERR(pdata->rstc) == -EPROBE_DEFER)
                       ^
   drivers/mmc/host/dw_mmc.c:2886:8: error: 'struct dw_mci_board' has no member named 'rstc'
      pdata->rstc = NULL;
           ^
   drivers/mmc/host/dw_mmc.c: In function 'dw_mci_probe':
   drivers/mmc/host/dw_mmc.c:3025:17: error: 'struct dw_mci_board' has no member named 'rstc'
     if (host->pdata->rstc != NULL)
                    ^
>> drivers/mmc/host/dw_mmc.c:3026:3: error: implicit declaration of function 'reset_control_deassert' [-Werror=implicit-function-declaration]
      reset_control_deassert(host->pdata->rstc);
      ^
   drivers/mmc/host/dw_mmc.c:3026:37: error: 'struct dw_mci_board' has no member named 'rstc'
      reset_control_deassert(host->pdata->rstc);
                                        ^
   drivers/mmc/host/dw_mmc.c:3180:17: error: 'struct dw_mci_board' has no member named 'rstc'
     if (host->pdata->rstc != NULL)
                    ^
>> drivers/mmc/host/dw_mmc.c:3181:3: error: implicit declaration of function 'reset_control_assert' [-Werror=implicit-function-declaration]
      reset_control_assert(host->pdata->rstc);
      ^
   drivers/mmc/host/dw_mmc.c:3181:35: error: 'struct dw_mci_board' has no member named 'rstc'
      reset_control_assert(host->pdata->rstc);
                                      ^
   drivers/mmc/host/dw_mmc.c: In function 'dw_mci_remove':
   drivers/mmc/host/dw_mmc.c:3215:17: error: 'struct dw_mci_board' has no member named 'rstc'
     if (host->pdata->rstc != NULL)
                    ^
   drivers/mmc/host/dw_mmc.c:3216:35: error: 'struct dw_mci_board' has no member named 'rstc'
      reset_control_assert(host->pdata->rstc);
                                      ^
   cc1: some warnings being treated as errors

vim +2882 drivers/mmc/host/dw_mmc.c

  2876	
  2877		pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
  2878		if (!pdata)
  2879			return ERR_PTR(-ENOMEM);
  2880	
  2881		/* find reset controller when exist */
> 2882		pdata->rstc = devm_reset_control_get_optional(dev, NULL);
  2883		if (IS_ERR(pdata->rstc)) {
  2884			if (PTR_ERR(pdata->rstc) == -EPROBE_DEFER)
  2885				return ERR_PTR(-EPROBE_DEFER);
> 2886			pdata->rstc = NULL;
  2887		}
  2888	
  2889		/* find out number of slots supported */
  2890		of_property_read_u32(np, "num-slots", &pdata->num_slots);
  2891	
  2892		if (of_property_read_u32(np, "fifo-depth", &pdata->fifo_depth))
  2893			dev_info(dev,
  2894				 "fifo-depth property not found, using value of FIFOTH register as default\n");
  2895	
  2896		of_property_read_u32(np, "card-detect-delay", &pdata->detect_delay_ms);
  2897	
  2898		if (!of_property_read_u32(np, "clock-frequency", &clock_frequency))
  2899			pdata->bus_hz = clock_frequency;
  2900	
  2901		if (drv_data && drv_data->parse_dt) {
  2902			ret = drv_data->parse_dt(host);
  2903			if (ret)
  2904				return ERR_PTR(ret);
  2905		}
  2906	
  2907		if (of_find_property(np, "supports-highspeed", NULL)) {
  2908			dev_info(dev, "supports-highspeed property is deprecated.\n");
  2909			pdata->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
  2910		}
  2911	
  2912		return pdata;
  2913	}
  2914	
  2915	#else /* CONFIG_OF */
  2916	static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
  2917	{
  2918		return ERR_PTR(-EINVAL);
  2919	}
  2920	#endif /* CONFIG_OF */
  2921	
  2922	static void dw_mci_enable_cd(struct dw_mci *host)
  2923	{
  2924		unsigned long irqflags;
  2925		u32 temp;
  2926		int i;
  2927		struct dw_mci_slot *slot;
  2928	
  2929		/*
  2930		 * No need for CD if all slots have a non-error GPIO
  2931		 * as well as broken card detection is found.
  2932		 */
  2933		for (i = 0; i < host->num_slots; i++) {
  2934			slot = host->slot[i];
  2935			if (slot->mmc->caps & MMC_CAP_NEEDS_POLL)
  2936				return;
  2937	
  2938			if (IS_ERR_VALUE(mmc_gpio_get_cd(slot->mmc)))
  2939				break;
  2940		}
  2941		if (i == host->num_slots)
  2942			return;
  2943	
  2944		spin_lock_irqsave(&host->irq_lock, irqflags);
  2945		temp = mci_readl(host, INTMASK);
  2946		temp  |= SDMMC_INT_CD;
  2947		mci_writel(host, INTMASK, temp);
  2948		spin_unlock_irqrestore(&host->irq_lock, irqflags);
  2949	}
  2950	
  2951	int dw_mci_probe(struct dw_mci *host)
  2952	{
  2953		const struct dw_mci_drv_data *drv_data = host->drv_data;
  2954		int width, i, ret = 0;
  2955		u32 fifo_size;
  2956		int init_slots = 0;
  2957	
  2958		if (!host->pdata) {
  2959			host->pdata = dw_mci_parse_dt(host);
  2960			if (PTR_ERR(host->pdata) == -EPROBE_DEFER)
  2961				return -EPROBE_DEFER;
  2962			else if (IS_ERR(host->pdata)) {
  2963				dev_err(host->dev, "platform data not available\n");
  2964				return -EINVAL;
  2965			}
  2966		}
  2967	
  2968		host->biu_clk = devm_clk_get(host->dev, "biu");
  2969		if (IS_ERR(host->biu_clk)) {
  2970			dev_dbg(host->dev, "biu clock not available\n");
  2971		} else {
  2972			ret = clk_prepare_enable(host->biu_clk);
  2973			if (ret) {
  2974				dev_err(host->dev, "failed to enable biu clock\n");
  2975				return ret;
  2976			}
  2977		}
  2978	
  2979		host->ciu_clk = devm_clk_get(host->dev, "ciu");
  2980		if (IS_ERR(host->ciu_clk)) {
  2981			dev_dbg(host->dev, "ciu clock not available\n");
  2982			host->bus_hz = host->pdata->bus_hz;
  2983		} else {
  2984			ret = clk_prepare_enable(host->ciu_clk);
  2985			if (ret) {
  2986				dev_err(host->dev, "failed to enable ciu clock\n");
  2987				goto err_clk_biu;
  2988			}
  2989	
  2990			if (host->pdata->bus_hz) {
  2991				ret = clk_set_rate(host->ciu_clk, host->pdata->bus_hz);
  2992				if (ret)
  2993					dev_warn(host->dev,
  2994						 "Unable to set bus rate to %uHz\n",
  2995						 host->pdata->bus_hz);
  2996			}
  2997			host->bus_hz = clk_get_rate(host->ciu_clk);
  2998		}
  2999	
  3000		if (!host->bus_hz) {
  3001			dev_err(host->dev,
  3002				"Platform data must supply bus speed\n");
  3003			ret = -ENODEV;
  3004			goto err_clk_ciu;
  3005		}
  3006	
  3007		if (drv_data && drv_data->init) {
  3008			ret = drv_data->init(host);
  3009			if (ret) {
  3010				dev_err(host->dev,
  3011					"implementation specific init failed\n");
  3012				goto err_clk_ciu;
  3013			}
  3014		}
  3015	
  3016		if (drv_data && drv_data->setup_clock) {
  3017			ret = drv_data->setup_clock(host);
  3018			if (ret) {
  3019				dev_err(host->dev,
  3020					"implementation specific clock setup failed\n");
  3021				goto err_clk_ciu;
  3022			}
  3023		}
  3024	
  3025		if (host->pdata->rstc != NULL)
> 3026			reset_control_deassert(host->pdata->rstc);
  3027	
  3028		setup_timer(&host->cmd11_timer,
  3029			    dw_mci_cmd11_timer, (unsigned long)host);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


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

  Powered by Linux