public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: msm_sdhci: Set mmc->dev pointer in msm_sdc_probe()
Date: Tue, 5 Jul 2016 22:38:58 +0200	[thread overview]
Message-ID: <577C1AE2.6090201@gmail.com> (raw)
In-Reply-To: <1466973835-18125-1-git-send-email-mateusz.kulikowski@gmail.com>

Friendly poke, I would really like to see that in 2016.07 release 
as MMC is currently not working for dragonboard :(

Mateusz
On 26.06.2016 22:43, Mateusz Kulikowski wrote:
> MMC core expects (now) valid mmc->dev pointer.
> During conversion in commit cffe5d86 not every driver was updated.
> 
> This patch fixes crash while accessing MMC on
> boards using Qualcomm SDHCI controller.
> 
> Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
> ---
> This patch fixes MMC support on dragonboard.
> 
> Without it attempts to access MMC caused null-pointer derefernece.
> 
> 
>  drivers/mmc/msm_sdhci.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
> index 64bbf0c..96dcdbe 100644
> --- a/drivers/mmc/msm_sdhci.c
> +++ b/drivers/mmc/msm_sdhci.c
> @@ -136,7 +136,12 @@ static int msm_sdc_probe(struct udevice *dev)
>  	host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
>  
>  	/* automatically detect max and min speed */
> -	return add_sdhci(host, 0, 0);
> +	ret =  add_sdhci(host, 0, 0);
> +	if (ret)
> +		return ret;
> +	host->mmc->dev = dev;
> +
> +	return 0;
>  }
>  
>  static int msm_sdc_remove(struct udevice *dev)
> 

  parent reply	other threads:[~2016-07-05 20:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-26 20:43 [U-Boot] [PATCH] mmc: msm_sdhci: Set mmc->dev pointer in msm_sdc_probe() Mateusz Kulikowski
2016-06-29  3:27 ` Simon Glass
2016-07-05 20:38 ` Mateusz Kulikowski [this message]
2016-07-08 13:57 ` [U-Boot] " Tom Rini

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=577C1AE2.6090201@gmail.com \
    --to=mateusz.kulikowski@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox