All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: dw_mmc: remove parsing for each slot subnode
Date: Tue, 26 Jul 2016 09:49:37 +0900	[thread overview]
Message-ID: <5796B3A1.1050002@samsung.com> (raw)
In-Reply-To: <1468547254-805-1-git-send-email-shawn.lin@rock-chips.com>

On 07/15/2016 10:47 AM, Shawn Lin wrote:
> The intention to remove it comes from the conflict of
> what the mmc-core does with the way dw_mmc treats disable-wp.
> We could see that 'disable-wp' is supported by core but
> it's deprecated by dw_mmc as we don't expect it to be existed
> for each slot subnode but should be in the parent node. Based
> on searching for all the upstream dts using dw_mmc, we're
> confident that none of them use the deprecated way. Maybe
> we should take old dtb in consideration but it was a flag day
> since the time we was considering to take it away. The fact is
> that there are none of dts using the deprecated way since v3.18
> or even earlier. So personally I don't believe the old dtb
> would/could bootup current kernel(may not?). Let's remove it now.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Applied on my repository. Thanks!

Best Regards,
Jaehoon Chung

> ---
> 
>  drivers/mmc/host/dw_mmc.c | 43 -------------------------------------------
>  1 file changed, 43 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 2dfdc58..d0adddb 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2523,47 +2523,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
>  	return IRQ_HANDLED;
>  }
>  
> -#ifdef CONFIG_OF
> -/* given a slot, find out the device node representing that slot */
> -static struct device_node *dw_mci_of_find_slot_node(struct dw_mci_slot *slot)
> -{
> -	struct device *dev = slot->mmc->parent;
> -	struct device_node *np;
> -	const __be32 *addr;
> -	int len;
> -
> -	if (!dev || !dev->of_node)
> -		return NULL;
> -
> -	for_each_child_of_node(dev->of_node, np) {
> -		addr = of_get_property(np, "reg", &len);
> -		if (!addr || (len < sizeof(int)))
> -			continue;
> -		if (be32_to_cpup(addr) == slot->id)
> -			return np;
> -	}
> -	return NULL;
> -}
> -
> -static void dw_mci_slot_of_parse(struct dw_mci_slot *slot)
> -{
> -	struct device_node *np = dw_mci_of_find_slot_node(slot);
> -
> -	if (!np)
> -		return;
> -
> -	if (of_property_read_bool(np, "disable-wp")) {
> -		slot->mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT;
> -		dev_warn(slot->mmc->parent,
> -			"Slot quirk 'disable-wp' is deprecated\n");
> -	}
> -}
> -#else /* CONFIG_OF */
> -static void dw_mci_slot_of_parse(struct dw_mci_slot *slot)
> -{
> -}
> -#endif /* CONFIG_OF */
> -
>  static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  {
>  	struct mmc_host *mmc;
> @@ -2620,8 +2579,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  	if (host->pdata->caps2)
>  		mmc->caps2 = host->pdata->caps2;
>  
> -	dw_mci_slot_of_parse(slot);
> -
>  	ret = mmc_of_parse(mmc);
>  	if (ret)
>  		goto err_host_allocated;
> 


      reply	other threads:[~2016-07-26  0:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160715020607epcas1p1d7c7b7fd23c280be82d74d83225bf795@epcas1p1.samsung.com>
2016-07-15  1:47 ` [PATCH] mmc: dw_mmc: remove parsing for each slot subnode Shawn Lin
2016-07-26  0:49   ` Jaehoon Chung [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=5796B3A1.1050002@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.lin@rock-chips.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 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.