All of lore.kernel.org
 help / color / mirror / Atom feed
* Fixes for the MSM SDCC driver on msm7200a
@ 2011-08-21 11:52 Alexander Tarasikov
  2011-08-21 11:52 ` [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Alexander Tarasikov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alexander Tarasikov @ 2011-08-21 11:52 UTC (permalink / raw)
  To: davidb, dwalker, bryanh, cjb; +Cc: linux-arm-msm, linux-mmc

These two patches fix issues that prevent the MSM SDCC driver from
being used on msm7200a boards. First one fixes a NULL pointer when
the board does not supply gpio config. Second one adds the init_card
operation instead of the declared but unimplemented embedded_sdio_data
feature.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup
  2011-08-21 11:52 Fixes for the MSM SDCC driver on msm7200a Alexander Tarasikov
@ 2011-08-21 11:52 ` Alexander Tarasikov
  2011-08-22 15:50   ` David Brown
  2011-08-21 11:52 ` [PATCH 2/2] msm: Implement init_card operation for MSM SDCC Alexander Tarasikov
  2011-08-23 10:46 ` Fixes for the MSM SDCC driver on msm7200a Sahitya Tummala
  2 siblings, 1 reply; 8+ messages in thread
From: Alexander Tarasikov @ 2011-08-21 11:52 UTC (permalink / raw)
  To: davidb, dwalker, bryanh, cjb
  Cc: linux-arm-msm, linux-mmc, Alexander Tarasikov

The use of && instead of || caused a NULL pointer dereference if
gpio setup was not passed via platform data

Signed-off-by: Alexander Tarasikov <alexander.tarasikov@gmail.com>
---
 drivers/mmc/host/msm_sdcc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index a4c865a..d06539d 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -939,7 +939,7 @@ static void msmsdcc_setup_gpio(struct msmsdcc_host *host, bool enable)
	struct msm_mmc_gpio_data *curr;
	int i, rc = 0;

-	if (!host->plat->gpio_data && host->gpio_config_status == enable)
+	if (!host->plat->gpio_data || host->gpio_config_status == enable)
		return;

	curr = host->plat->gpio_data;
--
1.7.5.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] msm: Implement init_card operation for MSM SDCC
  2011-08-21 11:52 Fixes for the MSM SDCC driver on msm7200a Alexander Tarasikov
  2011-08-21 11:52 ` [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Alexander Tarasikov
@ 2011-08-21 11:52 ` Alexander Tarasikov
  2011-08-23 10:46 ` Fixes for the MSM SDCC driver on msm7200a Sahitya Tummala
  2 siblings, 0 replies; 8+ messages in thread
From: Alexander Tarasikov @ 2011-08-21 11:52 UTC (permalink / raw)
  To: davidb, dwalker, bryanh, cjb
  Cc: linux-arm-msm, linux-mmc, Alexander Tarasikov

This allows boards with non-standard sdio cards to fill the CIS/CCCR data.
It is particularly important for old msm72k boards using wl1251.
Also drop the obsolete embedded_sdio_data structure from the header
as it was intended to surve a similiar purpose but was not implemented.

Signed-off-by: Alexander Tarasikov <alexander.tarasikov@gmail.com>
---
 arch/arm/mach-msm/include/mach/mmc.h |    9 +--------
 drivers/mmc/host/msm_sdcc.c          |    9 +++++++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-msm/include/mach/mmc.h b/arch/arm/mach-msm/include/mach/mmc.h
index 5631b51..ffcd9e3 100644
--- a/arch/arm/mach-msm/include/mach/mmc.h
+++ b/arch/arm/mach-msm/include/mach/mmc.h
@@ -8,13 +8,6 @@
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>

-struct embedded_sdio_data {
-	struct sdio_cis cis;
-	struct sdio_cccr cccr;
-	struct sdio_embedded_func *funcs;
-	int num_funcs;
-};
-
 struct msm_mmc_gpio {
	unsigned no;
	const char *name;
@@ -29,9 +22,9 @@ struct msm_mmc_platform_data {
	unsigned int ocr_mask;			/* available voltages */
	u32 (*translate_vdd)(struct device *, unsigned int);
	unsigned int (*status)(struct device *);
-	struct embedded_sdio_data *embedded_sdio;
	int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
	struct msm_mmc_gpio_data *gpio_data;
+	void (*init_card)(struct mmc_card *card);
 };

 #endif
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index d06539d..e40d8ec 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1052,10 +1052,19 @@ static void msmsdcc_enable_sdio_irq(struct mmc_host *mmc, int enable)
	spin_unlock_irqrestore(&host->lock, flags);
 }

+static void msmsdcc_init_card(struct mmc_host *mmc, struct mmc_card *card)
+{
+	struct msmsdcc_host *host = mmc_priv(mmc);
+
+	if (host->plat->init_card)
+		host->plat->init_card(card);
+}
+
 static const struct mmc_host_ops msmsdcc_ops = {
	.request	= msmsdcc_request,
	.set_ios	= msmsdcc_set_ios,
	.enable_sdio_irq = msmsdcc_enable_sdio_irq,
+	.init_card = msmsdcc_init_card,
 };

 static void
--
1.7.5.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup
  2011-08-21 11:52 ` [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Alexander Tarasikov
@ 2011-08-22 15:50   ` David Brown
  2011-08-22 16:25     ` Alexander Tarasikov
  0 siblings, 1 reply; 8+ messages in thread
From: David Brown @ 2011-08-22 15:50 UTC (permalink / raw)
  To: Alexander Tarasikov
  Cc: davidb, dwalker, bryanh, cjb, linux-arm-msm, linux-mmc

On Sun, Aug 21, 2011 at 03:52:43PM +0400, Alexander Tarasikov wrote:
> The use of && instead of || caused a NULL pointer dereference if
> gpio setup was not passed via platform data
> 
> Signed-off-by: Alexander Tarasikov <alexander.tarasikov@gmail.com>
> ---
>  drivers/mmc/host/msm_sdcc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
> index a4c865a..d06539d 100644
> --- a/drivers/mmc/host/msm_sdcc.c
> +++ b/drivers/mmc/host/msm_sdcc.c
> @@ -939,7 +939,7 @@ static void msmsdcc_setup_gpio(struct msmsdcc_host *host, bool enable)
> 	struct msm_mmc_gpio_data *curr;
> 	int i, rc = 0;
> 
> -	if (!host->plat->gpio_data && host->gpio_config_status == enable)
> +	if (!host->plat->gpio_data || host->gpio_config_status == enable)
> 		return;
> 
> 	curr = host->plat->gpio_data;

Both of your patches have somehow gotten mangled in transit (the
context lines have lost their leading space).  Did you perhaps edit
the patch files with an editor that is configured to fold spaces into
tabs?

I was able to fix up the files and apply the patches, and will include
these once Sahitya has a chance to review them.

Thanks,
David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup
  2011-08-22 15:50   ` David Brown
@ 2011-08-22 16:25     ` Alexander Tarasikov
  2011-08-22 17:11       ` David Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Tarasikov @ 2011-08-22 16:25 UTC (permalink / raw)
  To: David Brown; +Cc: dwalker, bryanh, cjb, linux-arm-msm, linux-mmc

2011/8/22 David Brown <davidb@codeaurora.org>:
> Both of your patches have somehow gotten mangled in transit (the
> context lines have lost their leading space).  Did you perhaps edit
> the patch files with an editor that is configured to fold spaces into
> tabs?
Sorry for that, it was my first attempt ever at sending patches, i'll
try to do better the next time. I was using git send-email and vim for
compose.

> I was able to fix up the files and apply the patches, and will include
> these once Sahitya has a chance to review them.
>
Okay, thank you. Hope one day the rest of drivers (rpc, i2c, gpio,
usb) get integrated and msm/qsd will be usable with vanilla kernel.

-- 
Regards, Alexander

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup
  2011-08-22 16:25     ` Alexander Tarasikov
@ 2011-08-22 17:11       ` David Brown
  0 siblings, 0 replies; 8+ messages in thread
From: David Brown @ 2011-08-22 17:11 UTC (permalink / raw)
  To: Alexander Tarasikov
  Cc: David Brown, dwalker, bryanh, cjb, linux-arm-msm, linux-mmc

On Mon, Aug 22, 2011 at 08:25:16PM +0400, Alexander Tarasikov wrote:
> 2011/8/22 David Brown <davidb@codeaurora.org>:
> > Both of your patches have somehow gotten mangled in transit (the
> > context lines have lost their leading space).  Did you perhaps edit
> > the patch files with an editor that is configured to fold spaces into
> > tabs?
> Sorry for that, it was my first attempt ever at sending patches, i'll
> try to do better the next time. I was using git send-email and vim for
> compose.

It's mostly important that when you edit a patch file, you make sure
that it doesn't change parts of the file that you aren't editing.

> > I was able to fix up the files and apply the patches, and will include
> > these once Sahitya has a chance to review them.
> >
> Okay, thank you. Hope one day the rest of drivers (rpc, i2c, gpio,
> usb) get integrated and msm/qsd will be usable with vanilla kernel.

We're working on a lot of the stuff.  However, it is unlikely that
there will be much support for anything new on the msm7200 target.
I'm trying to keep the 8x50 going, but even that is hard to get people
interested in working on it.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fixes for the MSM SDCC driver on msm7200a
  2011-08-21 11:52 Fixes for the MSM SDCC driver on msm7200a Alexander Tarasikov
  2011-08-21 11:52 ` [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Alexander Tarasikov
  2011-08-21 11:52 ` [PATCH 2/2] msm: Implement init_card operation for MSM SDCC Alexander Tarasikov
@ 2011-08-23 10:46 ` Sahitya Tummala
  2011-08-23 14:56   ` David Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Sahitya Tummala @ 2011-08-23 10:46 UTC (permalink / raw)
  To: Alexander Tarasikov
  Cc: davidb, dwalker, bryanh, cjb, linux-arm-msm, linux-mmc

Hi Alexander,

Both these patches looks good to me.

Acked-by: Sahitya Tummala <stummala@codeaurora.org>

Thanks,
Sahitya.
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

On 8/21/2011 5:22 PM, Alexander Tarasikov wrote:
> These two patches fix issues that prevent the MSM SDCC driver from
> being used on msm7200a boards. First one fixes a NULL pointer when
> the board does not supply gpio config. Second one adds the init_card
> operation instead of the declared but unimplemented embedded_sdio_data
> feature.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Fixes for the MSM SDCC driver on msm7200a
  2011-08-23 10:46 ` Fixes for the MSM SDCC driver on msm7200a Sahitya Tummala
@ 2011-08-23 14:56   ` David Brown
  0 siblings, 0 replies; 8+ messages in thread
From: David Brown @ 2011-08-23 14:56 UTC (permalink / raw)
  To: Sahitya Tummala
  Cc: Alexander Tarasikov, davidb, dwalker, bryanh, cjb, linux-arm-msm,
	linux-mmc

On Tue, Aug 23, 2011 at 04:16:37PM +0530, Sahitya Tummala wrote:

> Both these patches looks good to me.
> 
> Acked-by: Sahitya Tummala <stummala@codeaurora.org>

I'll pull these in, then.  Thanks.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-23 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-21 11:52 Fixes for the MSM SDCC driver on msm7200a Alexander Tarasikov
2011-08-21 11:52 ` [PATCH 1/2] msm: Fix a typo in MSM SDCC driver gpio setup Alexander Tarasikov
2011-08-22 15:50   ` David Brown
2011-08-22 16:25     ` Alexander Tarasikov
2011-08-22 17:11       ` David Brown
2011-08-21 11:52 ` [PATCH 2/2] msm: Implement init_card operation for MSM SDCC Alexander Tarasikov
2011-08-23 10:46 ` Fixes for the MSM SDCC driver on msm7200a Sahitya Tummala
2011-08-23 14:56   ` David Brown

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.