All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
@ 2012-02-09 21:57 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

This is v3 of a patch series, that uses the recently committed generic 
GPIO card hotplug handler, fixes minor PM issues, adds some cosmetic 
clean up. The series applies on top of mmc-next of 09 Feb. 2012.

Guennadi Liakhovetski (10):
  mmc: simplify mmc_cd_gpio_request() by removing two parameters
  mmc: tmio: calculate the native hotplug condition only once
  mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
  mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
  ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
    hotplug helper
  ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
    hotplug helper
  mmc: tmio_mmc: power status flag doesn't have to be exposed in
    platform data
  mmc: tmio_mmc: remove unused sdio_irq_enabled flag
  mmc: sh_mobile_sdhi: do not manage PM clocks manually
  mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function

 arch/arm/mach-shmobile/board-ag5evm.c   |   22 +------
 arch/arm/mach-shmobile/board-mackerel.c |   22 +------
 drivers/mmc/core/cd-gpio.c              |   13 +++-
 drivers/mmc/host/sh_mobile_sdhi.c       |    7 +--
 drivers/mmc/host/tmio_mmc.h             |    9 +--
 drivers/mmc/host/tmio_mmc_pio.c         |  102 ++++++++++++++-----------------
 include/linux/mfd/tmio.h                |   26 ++++++--
 include/linux/mmc/cd-gpio.h             |    3 +-
 include/linux/mmc/sh_mobile_sdhi.h      |    1 +
 9 files changed, 86 insertions(+), 119 deletions(-)

-- 
1.7.2.5

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
@ 2012-02-09 21:57 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

This is v3 of a patch series, that uses the recently committed generic 
GPIO card hotplug handler, fixes minor PM issues, adds some cosmetic 
clean up. The series applies on top of mmc-next of 09 Feb. 2012.

Guennadi Liakhovetski (10):
  mmc: simplify mmc_cd_gpio_request() by removing two parameters
  mmc: tmio: calculate the native hotplug condition only once
  mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
  mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
  ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
    hotplug helper
  ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
    hotplug helper
  mmc: tmio_mmc: power status flag doesn't have to be exposed in
    platform data
  mmc: tmio_mmc: remove unused sdio_irq_enabled flag
  mmc: sh_mobile_sdhi: do not manage PM clocks manually
  mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function

 arch/arm/mach-shmobile/board-ag5evm.c   |   22 +------
 arch/arm/mach-shmobile/board-mackerel.c |   22 +------
 drivers/mmc/core/cd-gpio.c              |   13 +++-
 drivers/mmc/host/sh_mobile_sdhi.c       |    7 +--
 drivers/mmc/host/tmio_mmc.h             |    9 +--
 drivers/mmc/host/tmio_mmc_pio.c         |  102 ++++++++++++++-----------------
 include/linux/mfd/tmio.h                |   26 ++++++--
 include/linux/mmc/cd-gpio.h             |    3 +-
 include/linux/mmc/sh_mobile_sdhi.h      |    1 +
 9 files changed, 86 insertions(+), 119 deletions(-)

-- 
1.7.2.5

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* [PATCH 01/10 v3] mmc: simplify mmc_cd_gpio_request() by removing two parameters
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Calculate the IRQ number, using gpio_to_irq() and use fixed flags: trigger
on both edges. This makes two out of four arguments of the
mmc_cd_gpio_request() function redundant.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/core/cd-gpio.c  |   13 +++++++++----
 include/linux/mmc/cd-gpio.h |    3 +--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/core/cd-gpio.c b/drivers/mmc/core/cd-gpio.c
index 082202ae..29de31e 100644
--- a/drivers/mmc/core/cd-gpio.c
+++ b/drivers/mmc/core/cd-gpio.c
@@ -28,13 +28,17 @@ static irqreturn_t mmc_cd_gpio_irqt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
-			unsigned int irq, unsigned long flags)
+int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio)
 {
 	size_t len = strlen(dev_name(host->parent)) + 4;
-	struct mmc_cd_gpio *cd = kmalloc(sizeof(*cd) + len, GFP_KERNEL);
+	struct mmc_cd_gpio *cd;
+	int irq = gpio_to_irq(gpio);
 	int ret;
 
+	if (irq < 0)
+		return irq;
+
+	cd = kmalloc(sizeof(*cd) + len, GFP_KERNEL);
 	if (!cd)
 		return -ENOMEM;
 
@@ -45,7 +49,8 @@ int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
 		goto egpioreq;
 
 	ret = request_threaded_irq(irq, NULL, mmc_cd_gpio_irqt,
-				   flags, cd->label, host);
+				   IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				   cd->label, host);
 	if (ret < 0)
 		goto eirqreq;
 
diff --git a/include/linux/mmc/cd-gpio.h b/include/linux/mmc/cd-gpio.h
index a8e4697..cefaba0 100644
--- a/include/linux/mmc/cd-gpio.h
+++ b/include/linux/mmc/cd-gpio.h
@@ -12,8 +12,7 @@
 #define MMC_CD_GPIO_H
 
 struct mmc_host;
-int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
-			unsigned int irq, unsigned long flags);
+int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio);
 void mmc_cd_gpio_free(struct mmc_host *host);
 
 #endif
-- 
1.7.2.5


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

* [PATCH 01/10 v3] mmc: simplify mmc_cd_gpio_request() by removing two parameters
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Calculate the IRQ number, using gpio_to_irq() and use fixed flags: trigger
on both edges. This makes two out of four arguments of the
mmc_cd_gpio_request() function redundant.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/core/cd-gpio.c  |   13 +++++++++----
 include/linux/mmc/cd-gpio.h |    3 +--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/core/cd-gpio.c b/drivers/mmc/core/cd-gpio.c
index 082202ae..29de31e 100644
--- a/drivers/mmc/core/cd-gpio.c
+++ b/drivers/mmc/core/cd-gpio.c
@@ -28,13 +28,17 @@ static irqreturn_t mmc_cd_gpio_irqt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
-			unsigned int irq, unsigned long flags)
+int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio)
 {
 	size_t len = strlen(dev_name(host->parent)) + 4;
-	struct mmc_cd_gpio *cd = kmalloc(sizeof(*cd) + len, GFP_KERNEL);
+	struct mmc_cd_gpio *cd;
+	int irq = gpio_to_irq(gpio);
 	int ret;
 
+	if (irq < 0)
+		return irq;
+
+	cd = kmalloc(sizeof(*cd) + len, GFP_KERNEL);
 	if (!cd)
 		return -ENOMEM;
 
@@ -45,7 +49,8 @@ int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
 		goto egpioreq;
 
 	ret = request_threaded_irq(irq, NULL, mmc_cd_gpio_irqt,
-				   flags, cd->label, host);
+				   IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+				   cd->label, host);
 	if (ret < 0)
 		goto eirqreq;
 
diff --git a/include/linux/mmc/cd-gpio.h b/include/linux/mmc/cd-gpio.h
index a8e4697..cefaba0 100644
--- a/include/linux/mmc/cd-gpio.h
+++ b/include/linux/mmc/cd-gpio.h
@@ -12,8 +12,7 @@
 #define MMC_CD_GPIO_H
 
 struct mmc_host;
-int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio,
-			unsigned int irq, unsigned long flags);
+int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio);
 void mmc_cd_gpio_free(struct mmc_host *host);
 
 #endif
-- 
1.7.2.5


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

* [PATCH 02/10 v3] mmc: tmio: calculate the native hotplug condition only once
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The condition, whether we have to use the native TMIO card hotplug
detection interrupt, is rather complex, it is better to only calculate it
once and store in the private data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    1 +
 drivers/mmc/host/tmio_mmc_pio.c |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index f96c536..8531d8d 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -86,6 +86,7 @@ struct tmio_mmc_host {
 	spinlock_t		lock;		/* protect host private data */
 	unsigned long		last_req_ts;
 	struct mutex		ios_lock;	/* protect set_ios() context */
+	bool			native_hotplug;
 };
 
 int tmio_mmc_host_probe(struct tmio_mmc_host **host,
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 5f9ad74..a5d1052 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -912,6 +912,9 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	else
 		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 
+	_host->native_hotplug = !(pdata->flags & TMIO_MMC_HAS_COLD_CD ||
+				  mmc->caps & MMC_CAP_NEEDS_POLL ||
+				  mmc->caps & MMC_CAP_NONREMOVABLE);
 	pdata->power = false;
 	pm_runtime_enable(&pdev->dev);
 	ret = pm_runtime_resume(&pdev->dev);
@@ -930,9 +933,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	 *  additionally ensure that in case 2) the tmio mmc hardware stays
 	 *  powered on during runtime for the card detection to work.
 	 */
-	if (!(pdata->flags & TMIO_MMC_HAS_COLD_CD
-		|| mmc->caps & MMC_CAP_NEEDS_POLL
-		|| mmc->caps & MMC_CAP_NONREMOVABLE))
+	if (_host->native_hotplug)
 		pm_runtime_get_noresume(&pdev->dev);
 
 	tmio_mmc_clk_stop(_host);
@@ -988,9 +989,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	 * the controller, the runtime PM is suspended and pdata->power = false,
 	 * so, our .runtime_resume() will not try to detect a card in the slot.
 	 */
-	if (host->pdata->flags & TMIO_MMC_HAS_COLD_CD
-		|| host->mmc->caps & MMC_CAP_NEEDS_POLL
-		|| host->mmc->caps & MMC_CAP_NONREMOVABLE)
+	if (!host->native_hotplug)
 		pm_runtime_get_sync(&pdev->dev);
 
 	mmc_remove_host(host->mmc);
-- 
1.7.2.5


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

* [PATCH 02/10 v3] mmc: tmio: calculate the native hotplug condition only once
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The condition, whether we have to use the native TMIO card hotplug
detection interrupt, is rather complex, it is better to only calculate it
once and store in the private data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    1 +
 drivers/mmc/host/tmio_mmc_pio.c |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index f96c536..8531d8d 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -86,6 +86,7 @@ struct tmio_mmc_host {
 	spinlock_t		lock;		/* protect host private data */
 	unsigned long		last_req_ts;
 	struct mutex		ios_lock;	/* protect set_ios() context */
+	bool			native_hotplug;
 };
 
 int tmio_mmc_host_probe(struct tmio_mmc_host **host,
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 5f9ad74..a5d1052 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -912,6 +912,9 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	else
 		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 
+	_host->native_hotplug = !(pdata->flags & TMIO_MMC_HAS_COLD_CD ||
+				  mmc->caps & MMC_CAP_NEEDS_POLL ||
+				  mmc->caps & MMC_CAP_NONREMOVABLE);
 	pdata->power = false;
 	pm_runtime_enable(&pdev->dev);
 	ret = pm_runtime_resume(&pdev->dev);
@@ -930,9 +933,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	 *  additionally ensure that in case 2) the tmio mmc hardware stays
 	 *  powered on during runtime for the card detection to work.
 	 */
-	if (!(pdata->flags & TMIO_MMC_HAS_COLD_CD
-		|| mmc->caps & MMC_CAP_NEEDS_POLL
-		|| mmc->caps & MMC_CAP_NONREMOVABLE))
+	if (_host->native_hotplug)
 		pm_runtime_get_noresume(&pdev->dev);
 
 	tmio_mmc_clk_stop(_host);
@@ -988,9 +989,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	 * the controller, the runtime PM is suspended and pdata->power == false,
 	 * so, our .runtime_resume() will not try to detect a card in the slot.
 	 */
-	if (host->pdata->flags & TMIO_MMC_HAS_COLD_CD
-		|| host->mmc->caps & MMC_CAP_NEEDS_POLL
-		|| host->mmc->caps & MMC_CAP_NONREMOVABLE)
+	if (!host->native_hotplug)
 		pm_runtime_get_sync(&pdev->dev);
 
 	mmc_remove_host(host->mmc);
-- 
1.7.2.5


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

* [PATCH 03/10 v3] mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

If the platform specifies the TMIO_MMC_HAS_COLD_CD flag, use the generic
MMC GPIO card hotplug helper.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    4 --
 drivers/mmc/host/tmio_mmc_pio.c |   69 +++++++++++++++++---------------------
 include/linux/mfd/tmio.h        |   25 +++++++++++---
 3 files changed, 50 insertions(+), 48 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 8531d8d..ede2f4e5 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -53,10 +53,6 @@ struct tmio_mmc_host {
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
 
-	int			pm_error;
-	/* recognise system-wide suspend in runtime PM methods */
-	bool			pm_global;
-
 	/* pio related stuff */
 	struct scatterlist      *sg_ptr;
 	struct scatterlist      *sg_orig;
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index a5d1052..3a28c62 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -34,6 +34,7 @@
 #include <linux/io.h>
 #include <linux/irq.h>
 #include <linux/mfd/tmio.h>
+#include <linux/mmc/cd-gpio.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/tmio.h>
 #include <linux/module.h>
@@ -787,8 +788,10 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_unlock_irqrestore(&host->lock, flags);
 
 	/*
-	 * pdata->power = false only if COLD_CD is available, otherwise only
-	 * in short time intervals during probing or resuming
+	 * pdata->power toggles between false and true in both cases - either
+	 * or not the controller can be runtime-suspended during inactivity. But
+	 * if the controller has to be kept on, the runtime-pm usage_count is
+	 * kept positive, so no suspending actually takes place.
 	 */
 	if (ios->power_mode = MMC_POWER_ON && ios->clock) {
 		if (!pdata->power) {
@@ -913,6 +916,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 
 	_host->native_hotplug = !(pdata->flags & TMIO_MMC_HAS_COLD_CD ||
+				  pdata->flags & TMIO_MMC_USE_GPIO_CD ||
 				  mmc->caps & MMC_CAP_NEEDS_POLL ||
 				  mmc->caps & MMC_CAP_NONREMOVABLE);
 	pdata->power = false;
@@ -928,9 +932,9 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	 *  3) a worker thread polls the sdhi - indicated by MMC_CAP_NEEDS_POLL
 	 *  4) the medium is non-removable - indicated by MMC_CAP_NONREMOVABLE
 	 *
-	 *  While we increment the rtpm counter for all scenarios when the mmc
-	 *  core activates us by calling an appropriate set_ios(), we must
-	 *  additionally ensure that in case 2) the tmio mmc hardware stays
+	 *  While we increment the runtime PM counter for all scenarios when
+	 *  the mmc core activates us by calling an appropriate set_ios(), we
+	 *  must additionally ensure that in case 2) the tmio mmc hardware stays
 	 *  powered on during runtime for the card detection to work.
 	 */
 	if (_host->native_hotplug)
@@ -964,6 +968,14 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 
 	tmio_mmc_enable_mmc_irqs(_host, irq_mask);
 
+	if (pdata->flags & TMIO_MMC_USE_GPIO_CD) {
+		ret = mmc_cd_gpio_request(mmc, pdata->cd_gpio);
+		if (ret < 0) {
+			tmio_mmc_host_remove(_host);
+			return ret;
+		}
+	}
+
 	*host = _host;
 
 	return 0;
@@ -981,18 +993,20 @@ EXPORT_SYMBOL(tmio_mmc_host_probe);
 void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 {
 	struct platform_device *pdev = host->pdev;
+	struct tmio_mmc_data *pdata = host->pdata;
+	struct mmc_host *mmc = host->mmc;
+
+	if (pdata->flags & TMIO_MMC_USE_GPIO_CD)
+		/*
+		 * This means we can miss a card-eject, but this is anyway
+		 * possible, because of delayed processing of hotplug events.
+		 */
+		mmc_cd_gpio_free(mmc);
 
-	/*
-	 * We don't have to manipulate pdata->power here: if there is a card in
-	 * the slot, the runtime PM is active and our .runtime_resume() will not
-	 * be run. If there is no card in the slot and the platform can suspend
-	 * the controller, the runtime PM is suspended and pdata->power = false,
-	 * so, our .runtime_resume() will not try to detect a card in the slot.
-	 */
 	if (!host->native_hotplug)
 		pm_runtime_get_sync(&pdev->dev);
 
-	mmc_remove_host(host->mmc);
+	mmc_remove_host(mmc);
 	cancel_work_sync(&host->done);
 	cancel_delayed_work_sync(&host->delayed_reset_work);
 	tmio_mmc_release_dma(host);
@@ -1001,7 +1015,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	pm_runtime_disable(&pdev->dev);
 
 	iounmap(host->ctl);
-	mmc_free_host(host->mmc);
+	mmc_free_host(mmc);
 }
 EXPORT_SYMBOL(tmio_mmc_host_remove);
 
@@ -1015,8 +1029,6 @@ int tmio_mmc_host_suspend(struct device *dev)
 	if (!ret)
 		tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
 
-	host->pm_error = pm_runtime_put_sync(dev);
-
 	return ret;
 }
 EXPORT_SYMBOL(tmio_mmc_host_suspend);
@@ -1026,20 +1038,10 @@ int tmio_mmc_host_resume(struct device *dev)
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 
-	/* The MMC core will perform the complete set up */
-	host->pdata->power = false;
-
-	host->pm_global = true;
-	if (!host->pm_error)
-		pm_runtime_get_sync(dev);
-
-	if (host->pm_global) {
-		/* Runtime PM resume callback didn't run */
-		tmio_mmc_reset(host);
-		tmio_mmc_enable_dma(host, true);
-		host->pm_global = false;
-	}
+	tmio_mmc_reset(host);
+	tmio_mmc_enable_dma(host, true);
 
+	/* The MMC core will perform the complete set up */
 	return mmc_resume_host(mmc);
 }
 EXPORT_SYMBOL(tmio_mmc_host_resume);
@@ -1056,19 +1058,10 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
-	struct tmio_mmc_data *pdata = host->pdata;
 
 	tmio_mmc_reset(host);
 	tmio_mmc_enable_dma(host, true);
 
-	if (pdata->power) {
-		/* Only entered after a card-insert interrupt */
-		if (!mmc->card)
-			tmio_mmc_set_ios(mmc, &mmc->ios);
-		mmc_detect_change(mmc, msecs_to_jiffies(100));
-	}
-	host->pm_global = false;
-
 	return 0;
 }
 EXPORT_SYMBOL(tmio_mmc_host_runtime_resume);
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 0dc9804..5a197de 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -1,8 +1,10 @@
 #ifndef MFD_TMIO_H
 #define MFD_TMIO_H
 
+#include <linux/device.h>
 #include <linux/fb.h>
 #include <linux/io.h>
+#include <linux/jiffies.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
@@ -64,8 +66,8 @@
 #define TMIO_MMC_SDIO_IRQ		(1 << 2)
 /*
  * Some platforms can detect card insertion events with controller powered
- * down, in which case they have to call tmio_mmc_cd_wakeup() to power up the
- * controller and report the event to the driver.
+ * down, using a GPIO IRQ, in which case they have to fill in cd_irq, cd_gpio,
+ * and cd_flags fields of struct tmio_mmc_data.
  */
 #define TMIO_MMC_HAS_COLD_CD		(1 << 3)
 /*
@@ -73,6 +75,12 @@
  * idle before writing to some registers.
  */
 #define TMIO_MMC_HAS_IDLE_WAIT		(1 << 4)
+/*
+ * A GPIO is used for card hotplug detection. We need an extra flag for this,
+ * because 0 is a valid GPIO number too, and requiring users to specify
+ * cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
+ */
+#define TMIO_MMC_USE_GPIO_CD		(1 << 5)
 
 int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
 int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
@@ -98,18 +106,23 @@ struct tmio_mmc_data {
 	struct tmio_mmc_dma		*dma;
 	struct device			*dev;
 	bool				power;
+	unsigned int			cd_gpio;
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
 	int (*get_cd)(struct platform_device *host);
 	int (*write16_hook)(struct tmio_mmc_host *host, int addr);
 };
 
+/*
+ * This function is deprecated and will be removed soon. Please, convert your
+ * platform to use drivers/mmc/core/cd-gpio.c
+ */
+#include <linux/mmc/host.h>
 static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata)
 {
-	if (pdata && !pdata->power) {
-		pdata->power = true;
-		pm_runtime_get(pdata->dev);
-	}
+	if (pdata)
+		mmc_detect_change(dev_get_drvdata(pdata->dev),
+				  msecs_to_jiffies(100));
 }
 
 /*
-- 
1.7.2.5


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

* [PATCH 03/10 v3] mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

If the platform specifies the TMIO_MMC_HAS_COLD_CD flag, use the generic
MMC GPIO card hotplug helper.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    4 --
 drivers/mmc/host/tmio_mmc_pio.c |   69 +++++++++++++++++---------------------
 include/linux/mfd/tmio.h        |   25 +++++++++++---
 3 files changed, 50 insertions(+), 48 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 8531d8d..ede2f4e5 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -53,10 +53,6 @@ struct tmio_mmc_host {
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
 
-	int			pm_error;
-	/* recognise system-wide suspend in runtime PM methods */
-	bool			pm_global;
-
 	/* pio related stuff */
 	struct scatterlist      *sg_ptr;
 	struct scatterlist      *sg_orig;
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index a5d1052..3a28c62 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -34,6 +34,7 @@
 #include <linux/io.h>
 #include <linux/irq.h>
 #include <linux/mfd/tmio.h>
+#include <linux/mmc/cd-gpio.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/tmio.h>
 #include <linux/module.h>
@@ -787,8 +788,10 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_unlock_irqrestore(&host->lock, flags);
 
 	/*
-	 * pdata->power == false only if COLD_CD is available, otherwise only
-	 * in short time intervals during probing or resuming
+	 * pdata->power toggles between false and true in both cases - either
+	 * or not the controller can be runtime-suspended during inactivity. But
+	 * if the controller has to be kept on, the runtime-pm usage_count is
+	 * kept positive, so no suspending actually takes place.
 	 */
 	if (ios->power_mode == MMC_POWER_ON && ios->clock) {
 		if (!pdata->power) {
@@ -913,6 +916,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 		mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
 
 	_host->native_hotplug = !(pdata->flags & TMIO_MMC_HAS_COLD_CD ||
+				  pdata->flags & TMIO_MMC_USE_GPIO_CD ||
 				  mmc->caps & MMC_CAP_NEEDS_POLL ||
 				  mmc->caps & MMC_CAP_NONREMOVABLE);
 	pdata->power = false;
@@ -928,9 +932,9 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 	 *  3) a worker thread polls the sdhi - indicated by MMC_CAP_NEEDS_POLL
 	 *  4) the medium is non-removable - indicated by MMC_CAP_NONREMOVABLE
 	 *
-	 *  While we increment the rtpm counter for all scenarios when the mmc
-	 *  core activates us by calling an appropriate set_ios(), we must
-	 *  additionally ensure that in case 2) the tmio mmc hardware stays
+	 *  While we increment the runtime PM counter for all scenarios when
+	 *  the mmc core activates us by calling an appropriate set_ios(), we
+	 *  must additionally ensure that in case 2) the tmio mmc hardware stays
 	 *  powered on during runtime for the card detection to work.
 	 */
 	if (_host->native_hotplug)
@@ -964,6 +968,14 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 
 	tmio_mmc_enable_mmc_irqs(_host, irq_mask);
 
+	if (pdata->flags & TMIO_MMC_USE_GPIO_CD) {
+		ret = mmc_cd_gpio_request(mmc, pdata->cd_gpio);
+		if (ret < 0) {
+			tmio_mmc_host_remove(_host);
+			return ret;
+		}
+	}
+
 	*host = _host;
 
 	return 0;
@@ -981,18 +993,20 @@ EXPORT_SYMBOL(tmio_mmc_host_probe);
 void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 {
 	struct platform_device *pdev = host->pdev;
+	struct tmio_mmc_data *pdata = host->pdata;
+	struct mmc_host *mmc = host->mmc;
+
+	if (pdata->flags & TMIO_MMC_USE_GPIO_CD)
+		/*
+		 * This means we can miss a card-eject, but this is anyway
+		 * possible, because of delayed processing of hotplug events.
+		 */
+		mmc_cd_gpio_free(mmc);
 
-	/*
-	 * We don't have to manipulate pdata->power here: if there is a card in
-	 * the slot, the runtime PM is active and our .runtime_resume() will not
-	 * be run. If there is no card in the slot and the platform can suspend
-	 * the controller, the runtime PM is suspended and pdata->power == false,
-	 * so, our .runtime_resume() will not try to detect a card in the slot.
-	 */
 	if (!host->native_hotplug)
 		pm_runtime_get_sync(&pdev->dev);
 
-	mmc_remove_host(host->mmc);
+	mmc_remove_host(mmc);
 	cancel_work_sync(&host->done);
 	cancel_delayed_work_sync(&host->delayed_reset_work);
 	tmio_mmc_release_dma(host);
@@ -1001,7 +1015,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	pm_runtime_disable(&pdev->dev);
 
 	iounmap(host->ctl);
-	mmc_free_host(host->mmc);
+	mmc_free_host(mmc);
 }
 EXPORT_SYMBOL(tmio_mmc_host_remove);
 
@@ -1015,8 +1029,6 @@ int tmio_mmc_host_suspend(struct device *dev)
 	if (!ret)
 		tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
 
-	host->pm_error = pm_runtime_put_sync(dev);
-
 	return ret;
 }
 EXPORT_SYMBOL(tmio_mmc_host_suspend);
@@ -1026,20 +1038,10 @@ int tmio_mmc_host_resume(struct device *dev)
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 
-	/* The MMC core will perform the complete set up */
-	host->pdata->power = false;
-
-	host->pm_global = true;
-	if (!host->pm_error)
-		pm_runtime_get_sync(dev);
-
-	if (host->pm_global) {
-		/* Runtime PM resume callback didn't run */
-		tmio_mmc_reset(host);
-		tmio_mmc_enable_dma(host, true);
-		host->pm_global = false;
-	}
+	tmio_mmc_reset(host);
+	tmio_mmc_enable_dma(host, true);
 
+	/* The MMC core will perform the complete set up */
 	return mmc_resume_host(mmc);
 }
 EXPORT_SYMBOL(tmio_mmc_host_resume);
@@ -1056,19 +1058,10 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
-	struct tmio_mmc_data *pdata = host->pdata;
 
 	tmio_mmc_reset(host);
 	tmio_mmc_enable_dma(host, true);
 
-	if (pdata->power) {
-		/* Only entered after a card-insert interrupt */
-		if (!mmc->card)
-			tmio_mmc_set_ios(mmc, &mmc->ios);
-		mmc_detect_change(mmc, msecs_to_jiffies(100));
-	}
-	host->pm_global = false;
-
 	return 0;
 }
 EXPORT_SYMBOL(tmio_mmc_host_runtime_resume);
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 0dc9804..5a197de 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -1,8 +1,10 @@
 #ifndef MFD_TMIO_H
 #define MFD_TMIO_H
 
+#include <linux/device.h>
 #include <linux/fb.h>
 #include <linux/io.h>
+#include <linux/jiffies.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
@@ -64,8 +66,8 @@
 #define TMIO_MMC_SDIO_IRQ		(1 << 2)
 /*
  * Some platforms can detect card insertion events with controller powered
- * down, in which case they have to call tmio_mmc_cd_wakeup() to power up the
- * controller and report the event to the driver.
+ * down, using a GPIO IRQ, in which case they have to fill in cd_irq, cd_gpio,
+ * and cd_flags fields of struct tmio_mmc_data.
  */
 #define TMIO_MMC_HAS_COLD_CD		(1 << 3)
 /*
@@ -73,6 +75,12 @@
  * idle before writing to some registers.
  */
 #define TMIO_MMC_HAS_IDLE_WAIT		(1 << 4)
+/*
+ * A GPIO is used for card hotplug detection. We need an extra flag for this,
+ * because 0 is a valid GPIO number too, and requiring users to specify
+ * cd_gpio < 0 to disable GPIO hotplug would break backwards compatibility.
+ */
+#define TMIO_MMC_USE_GPIO_CD		(1 << 5)
 
 int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
 int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
@@ -98,18 +106,23 @@ struct tmio_mmc_data {
 	struct tmio_mmc_dma		*dma;
 	struct device			*dev;
 	bool				power;
+	unsigned int			cd_gpio;
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
 	int (*get_cd)(struct platform_device *host);
 	int (*write16_hook)(struct tmio_mmc_host *host, int addr);
 };
 
+/*
+ * This function is deprecated and will be removed soon. Please, convert your
+ * platform to use drivers/mmc/core/cd-gpio.c
+ */
+#include <linux/mmc/host.h>
 static inline void tmio_mmc_cd_wakeup(struct tmio_mmc_data *pdata)
 {
-	if (pdata && !pdata->power) {
-		pdata->power = true;
-		pm_runtime_get(pdata->dev);
-	}
+	if (pdata)
+		mmc_detect_change(dev_get_drvdata(pdata->dev),
+				  msecs_to_jiffies(100));
 }
 
 /*
-- 
1.7.2.5


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

* [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

To use TMIO MMC driver ability to interface to the generic MMC GPIO card
hotplug detection helper, the SDHI driver has to pass the GPIO number
from its own platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c  |    3 ++-
 include/linux/mmc/sh_mobile_sdhi.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 58da3c4..cb279b4 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -129,6 +129,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 			mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
 		mmc_data->ocr_mask = p->tmio_ocr_mask;
 		mmc_data->capabilities |= p->tmio_caps;
+		mmc_data->cd_gpio = p->cd_gpio;
 
 		if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
 			priv->param_tx.slave_id = p->dma_slave_tx;
@@ -211,7 +212,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 
 	dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
 		 mmc_hostname(host->mmc), (unsigned long)
-		 (platform_get_resource(pdev,IORESOURCE_MEM, 0)->start),
+		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
 		 mmc_data->hclk / 1000000);
 
 	return ret;
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index 71b8054..082a736 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -16,6 +16,7 @@ struct sh_mobile_sdhi_info {
 	unsigned long tmio_flags;
 	unsigned long tmio_caps;
 	u32 tmio_ocr_mask;	/* available MMC voltages */
+	unsigned int cd_gpio;
 	struct tmio_mmc_data *pdata;
 	void (*set_pwr)(struct platform_device *pdev, int state);
 	int (*get_cd)(struct platform_device *pdev);
-- 
1.7.2.5


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

* [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

To use TMIO MMC driver ability to interface to the generic MMC GPIO card
hotplug detection helper, the SDHI driver has to pass the GPIO number
from its own platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c  |    3 ++-
 include/linux/mmc/sh_mobile_sdhi.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 58da3c4..cb279b4 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -129,6 +129,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 			mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
 		mmc_data->ocr_mask = p->tmio_ocr_mask;
 		mmc_data->capabilities |= p->tmio_caps;
+		mmc_data->cd_gpio = p->cd_gpio;
 
 		if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
 			priv->param_tx.slave_id = p->dma_slave_tx;
@@ -211,7 +212,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 
 	dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
 		 mmc_hostname(host->mmc), (unsigned long)
-		 (platform_get_resource(pdev,IORESOURCE_MEM, 0)->start),
+		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
 		 mmc_data->hclk / 1000000);
 
 	return ret;
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index 71b8054..082a736 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -16,6 +16,7 @@ struct sh_mobile_sdhi_info {
 	unsigned long tmio_flags;
 	unsigned long tmio_caps;
 	u32 tmio_ocr_mask;	/* available MMC voltages */
+	unsigned int cd_gpio;
 	struct tmio_mmc_data *pdata;
 	void (*set_pwr)(struct platform_device *pdev, int state);
 	int (*get_cd)(struct platform_device *pdev);
-- 
1.7.2.5


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

* [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-mackerel.c |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9c5e598..9501a7a 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1004,21 +1004,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev)
 }
 
 /* SDHI0 */
-static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg)
-{
-	struct device *dev = arg;
-	struct sh_mobile_sdhi_info *info = dev->platform_data;
-	struct tmio_mmc_data *pdata = info->pdata;
-
-	tmio_mmc_cd_wakeup(pdata);
-
-	return IRQ_HANDLED;
-}
-
 static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
+	.tmio_flags	= TMIO_MMC_USE_GPIO_CD,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
+	.cd_gpio	= GPIO_PORT172,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -1408,7 +1399,6 @@ static void __init mackerel_init(void)
 {
 	u32 srcr4;
 	struct clk *clk;
-	int ret;
 
 	sh7372_pinmux_init();
 
@@ -1505,7 +1495,6 @@ static void __init mackerel_init(void)
 	irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
 
 	/* enable SDHI0 */
-	gpio_request(GPIO_FN_SDHICD0, NULL);
 	gpio_request(GPIO_FN_SDHIWP0, NULL);
 	gpio_request(GPIO_FN_SDHICMD0, NULL);
 	gpio_request(GPIO_FN_SDHICLK0, NULL);
@@ -1514,13 +1503,6 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID0_1, NULL);
 	gpio_request(GPIO_FN_SDHID0_0, NULL);
 
-	ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd,
-			  IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev);
-	if (!ret)
-		sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
-	else
-		pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret);
-
 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
 	/* enable SDHI1 */
 	gpio_request(GPIO_FN_SDHICMD1, NULL);
-- 
1.7.2.5


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

* [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-mackerel.c |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9c5e598..9501a7a 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1004,21 +1004,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev)
 }
 
 /* SDHI0 */
-static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg)
-{
-	struct device *dev = arg;
-	struct sh_mobile_sdhi_info *info = dev->platform_data;
-	struct tmio_mmc_data *pdata = info->pdata;
-
-	tmio_mmc_cd_wakeup(pdata);
-
-	return IRQ_HANDLED;
-}
-
 static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
+	.tmio_flags	= TMIO_MMC_USE_GPIO_CD,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
+	.cd_gpio	= GPIO_PORT172,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -1408,7 +1399,6 @@ static void __init mackerel_init(void)
 {
 	u32 srcr4;
 	struct clk *clk;
-	int ret;
 
 	sh7372_pinmux_init();
 
@@ -1505,7 +1495,6 @@ static void __init mackerel_init(void)
 	irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
 
 	/* enable SDHI0 */
-	gpio_request(GPIO_FN_SDHICD0, NULL);
 	gpio_request(GPIO_FN_SDHIWP0, NULL);
 	gpio_request(GPIO_FN_SDHICMD0, NULL);
 	gpio_request(GPIO_FN_SDHICLK0, NULL);
@@ -1514,13 +1503,6 @@ static void __init mackerel_init(void)
 	gpio_request(GPIO_FN_SDHID0_1, NULL);
 	gpio_request(GPIO_FN_SDHID0_0, NULL);
 
-	ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd,
-			  IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev);
-	if (!ret)
-		sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
-	else
-		pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret);
-
 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
 	/* enable SDHI1 */
 	gpio_request(GPIO_FN_SDHICMD1, NULL);
-- 
1.7.2.5


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

* [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-ag5evm.c |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 7119b87..eb6975c 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -340,23 +340,13 @@ static struct platform_device mipidsi0_device = {
 };
 
 /* SDHI0 */
-static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg)
-{
-	struct device *dev = arg;
-	struct sh_mobile_sdhi_info *info = dev->platform_data;
-	struct tmio_mmc_data *pdata = info->pdata;
-
-	tmio_mmc_cd_wakeup(pdata);
-
-	return IRQ_HANDLED;
-}
-
 static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED,
 	.tmio_ocr_mask	= MMC_VDD_27_28 | MMC_VDD_28_29,
+	.cd_gpio	= GPIO_PORT251,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -560,7 +550,6 @@ static void __init ag5evm_init(void)
 	__raw_writel(0x2a809010, DSI0PHYCR);
 
 	/* enable SDHI0 on CN15 [SD I/F] */
-	gpio_request(GPIO_FN_SDHICD0, NULL);
 	gpio_request(GPIO_FN_SDHIWP0, NULL);
 	gpio_request(GPIO_FN_SDHICMD0, NULL);
 	gpio_request(GPIO_FN_SDHICLK0, NULL);
@@ -569,13 +558,6 @@ static void __init ag5evm_init(void)
 	gpio_request(GPIO_FN_SDHID0_1, NULL);
 	gpio_request(GPIO_FN_SDHID0_0, NULL);
 
-	if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd,
-			 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
-			 "sdhi0 cd", &sdhi0_device.dev))
-		sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
-	else
-		pr_warn("Unable to setup SDHI0 GPIO IRQ\n");
-
 	/* enable SDHI1 on CN4 [WLAN I/F] */
 	gpio_request(GPIO_FN_SDHICLK1, NULL);
 	gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
-- 
1.7.2.5


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

* [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 arch/arm/mach-shmobile/board-ag5evm.c |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 7119b87..eb6975c 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -340,23 +340,13 @@ static struct platform_device mipidsi0_device = {
 };
 
 /* SDHI0 */
-static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg)
-{
-	struct device *dev = arg;
-	struct sh_mobile_sdhi_info *info = dev->platform_data;
-	struct tmio_mmc_data *pdata = info->pdata;
-
-	tmio_mmc_cd_wakeup(pdata);
-
-	return IRQ_HANDLED;
-}
-
 static struct sh_mobile_sdhi_info sdhi0_info = {
 	.dma_slave_tx	= SHDMA_SLAVE_SDHI0_TX,
 	.dma_slave_rx	= SHDMA_SLAVE_SDHI0_RX,
-	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT,
+	.tmio_flags	= TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
 	.tmio_caps	= MMC_CAP_SD_HIGHSPEED,
 	.tmio_ocr_mask	= MMC_VDD_27_28 | MMC_VDD_28_29,
+	.cd_gpio	= GPIO_PORT251,
 };
 
 static struct resource sdhi0_resources[] = {
@@ -560,7 +550,6 @@ static void __init ag5evm_init(void)
 	__raw_writel(0x2a809010, DSI0PHYCR);
 
 	/* enable SDHI0 on CN15 [SD I/F] */
-	gpio_request(GPIO_FN_SDHICD0, NULL);
 	gpio_request(GPIO_FN_SDHIWP0, NULL);
 	gpio_request(GPIO_FN_SDHICMD0, NULL);
 	gpio_request(GPIO_FN_SDHICLK0, NULL);
@@ -569,13 +558,6 @@ static void __init ag5evm_init(void)
 	gpio_request(GPIO_FN_SDHID0_1, NULL);
 	gpio_request(GPIO_FN_SDHID0_0, NULL);
 
-	if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd,
-			 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
-			 "sdhi0 cd", &sdhi0_device.dev))
-		sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
-	else
-		pr_warn("Unable to setup SDHI0 GPIO IRQ\n");
-
 	/* enable SDHI1 on CN4 [WLAN I/F] */
 	gpio_request(GPIO_FN_SDHICLK1, NULL);
 	gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
-- 
1.7.2.5


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

* [PATCH 07/10 v3] mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The controller power status flag does not have to be accessed from the
hot-plug detection code any more, it can now be removed from the platform
data and put in the controller private struct.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    3 +++
 drivers/mmc/host/tmio_mmc_pio.c |   13 ++++++-------
 include/linux/mfd/tmio.h        |    1 -
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index ede2f4e5..edfcfd7 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -49,6 +49,9 @@ struct tmio_mmc_host {
 	struct mmc_host         *mmc;
 	unsigned int		sdio_irq_enabled;
 
+	/* Controller power state */
+	bool			power;
+
 	/* Callbacks for clock / power control */
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 3a28c62..2deb676 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -758,7 +758,6 @@ fail:
 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct tmio_mmc_host *host = mmc_priv(mmc);
-	struct tmio_mmc_data *pdata = host->pdata;
 	unsigned long flags;
 
 	mutex_lock(&host->ios_lock);
@@ -788,15 +787,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_unlock_irqrestore(&host->lock, flags);
 
 	/*
-	 * pdata->power toggles between false and true in both cases - either
+	 * host->power toggles between false and true in both cases - either
 	 * or not the controller can be runtime-suspended during inactivity. But
 	 * if the controller has to be kept on, the runtime-pm usage_count is
 	 * kept positive, so no suspending actually takes place.
 	 */
 	if (ios->power_mode = MMC_POWER_ON && ios->clock) {
-		if (!pdata->power) {
+		if (!host->power) {
 			pm_runtime_get_sync(&host->pdev->dev);
-			pdata->power = true;
+			host->power = true;
 		}
 		tmio_mmc_set_clock(host, ios->clock);
 		/* power up SD bus */
@@ -807,8 +806,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	} else if (ios->power_mode != MMC_POWER_UP) {
 		if (host->set_pwr && ios->power_mode = MMC_POWER_OFF)
 			host->set_pwr(host->pdev, 0);
-		if (pdata->power) {
-			pdata->power = false;
+		if (host->power) {
+			host->power = false;
 			pm_runtime_put(&host->pdev->dev);
 		}
 		tmio_mmc_clk_stop(host);
@@ -919,7 +918,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 				  pdata->flags & TMIO_MMC_USE_GPIO_CD ||
 				  mmc->caps & MMC_CAP_NEEDS_POLL ||
 				  mmc->caps & MMC_CAP_NONREMOVABLE);
-	pdata->power = false;
+	_host->power = false;
 	pm_runtime_enable(&pdev->dev);
 	ret = pm_runtime_resume(&pdev->dev);
 	if (ret < 0)
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 5a197de..f5171db 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -105,7 +105,6 @@ struct tmio_mmc_data {
 	u32				ocr_mask;	/* available voltages */
 	struct tmio_mmc_dma		*dma;
 	struct device			*dev;
-	bool				power;
 	unsigned int			cd_gpio;
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
-- 
1.7.2.5


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

* [PATCH 07/10 v3] mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The controller power status flag does not have to be accessed from the
hot-plug detection code any more, it can now be removed from the platform
data and put in the controller private struct.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    3 +++
 drivers/mmc/host/tmio_mmc_pio.c |   13 ++++++-------
 include/linux/mfd/tmio.h        |    1 -
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index ede2f4e5..edfcfd7 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -49,6 +49,9 @@ struct tmio_mmc_host {
 	struct mmc_host         *mmc;
 	unsigned int		sdio_irq_enabled;
 
+	/* Controller power state */
+	bool			power;
+
 	/* Callbacks for clock / power control */
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 3a28c62..2deb676 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -758,7 +758,6 @@ fail:
 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct tmio_mmc_host *host = mmc_priv(mmc);
-	struct tmio_mmc_data *pdata = host->pdata;
 	unsigned long flags;
 
 	mutex_lock(&host->ios_lock);
@@ -788,15 +787,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_unlock_irqrestore(&host->lock, flags);
 
 	/*
-	 * pdata->power toggles between false and true in both cases - either
+	 * host->power toggles between false and true in both cases - either
 	 * or not the controller can be runtime-suspended during inactivity. But
 	 * if the controller has to be kept on, the runtime-pm usage_count is
 	 * kept positive, so no suspending actually takes place.
 	 */
 	if (ios->power_mode == MMC_POWER_ON && ios->clock) {
-		if (!pdata->power) {
+		if (!host->power) {
 			pm_runtime_get_sync(&host->pdev->dev);
-			pdata->power = true;
+			host->power = true;
 		}
 		tmio_mmc_set_clock(host, ios->clock);
 		/* power up SD bus */
@@ -807,8 +806,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	} else if (ios->power_mode != MMC_POWER_UP) {
 		if (host->set_pwr && ios->power_mode == MMC_POWER_OFF)
 			host->set_pwr(host->pdev, 0);
-		if (pdata->power) {
-			pdata->power = false;
+		if (host->power) {
+			host->power = false;
 			pm_runtime_put(&host->pdev->dev);
 		}
 		tmio_mmc_clk_stop(host);
@@ -919,7 +918,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
 				  pdata->flags & TMIO_MMC_USE_GPIO_CD ||
 				  mmc->caps & MMC_CAP_NEEDS_POLL ||
 				  mmc->caps & MMC_CAP_NONREMOVABLE);
-	pdata->power = false;
+	_host->power = false;
 	pm_runtime_enable(&pdev->dev);
 	ret = pm_runtime_resume(&pdev->dev);
 	if (ret < 0)
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 5a197de..f5171db 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -105,7 +105,6 @@ struct tmio_mmc_data {
 	u32				ocr_mask;	/* available voltages */
 	struct tmio_mmc_dma		*dma;
 	struct device			*dev;
-	bool				power;
 	unsigned int			cd_gpio;
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_clk_div)(struct platform_device *host, int state);
-- 
1.7.2.5


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

* [PATCH 08/10 v3] mmc: tmio_mmc: remove unused sdio_irq_enabled flag
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The sdio_irq_enabled member of struct tmio_mmc_host is a left-over from the
previously removed SDIO IRQ workaround. It is no longer needed and can now
be removed too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    1 -
 drivers/mmc/host/tmio_mmc_pio.c |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index edfcfd7..d857f5c 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -47,7 +47,6 @@ struct tmio_mmc_host {
 	struct mmc_request      *mrq;
 	struct mmc_data         *data;
 	struct mmc_host         *mmc;
-	unsigned int		sdio_irq_enabled;
 
 	/* Controller power state */
 	bool			power;
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 2deb676..64f6c99 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -127,7 +127,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 
 	if (enable) {
-		host->sdio_irq_enabled = 1;
 		host->sdio_irq_mask = TMIO_SDIO_MASK_ALL &
 					~TMIO_SDIO_STAT_IOIRQ;
 		sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
@@ -136,7 +135,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 		host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
 		sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
 		sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000);
-		host->sdio_irq_enabled = 0;
 	}
 }
 
-- 
1.7.2.5


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

* [PATCH 08/10 v3] mmc: tmio_mmc: remove unused sdio_irq_enabled flag
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

The sdio_irq_enabled member of struct tmio_mmc_host is a left-over from the
previously removed SDIO IRQ workaround. It is no longer needed and can now
be removed too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc.h     |    1 -
 drivers/mmc/host/tmio_mmc_pio.c |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index edfcfd7..d857f5c 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -47,7 +47,6 @@ struct tmio_mmc_host {
 	struct mmc_request      *mrq;
 	struct mmc_data         *data;
 	struct mmc_host         *mmc;
-	unsigned int		sdio_irq_enabled;
 
 	/* Controller power state */
 	bool			power;
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 2deb676..64f6c99 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -127,7 +127,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 	struct tmio_mmc_host *host = mmc_priv(mmc);
 
 	if (enable) {
-		host->sdio_irq_enabled = 1;
 		host->sdio_irq_mask = TMIO_SDIO_MASK_ALL &
 					~TMIO_SDIO_STAT_IOIRQ;
 		sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
@@ -136,7 +135,6 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 		host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
 		sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
 		sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000);
-		host->sdio_irq_enabled = 0;
 	}
 }
 
-- 
1.7.2.5


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

* [PATCH 09/10 v3] mmc: sh_mobile_sdhi: do not manage PM clocks manually
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On sh-mobile platforms the MMC clock frequency for the TMIO MMC unit is
obtained from the same clock, as the one, that runtime power-manages the
controller. The SDHI glue code has to access that clock directly,
bypassing the runtime PM framework, to get its frequency, but it
shouldn't enable or disable it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index cb279b4..f91c3aa 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -117,8 +117,6 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 		goto eclkget;
 	}
 
-	clk_enable(priv->clk);
-
 	mmc_data->hclk = clk_get_rate(priv->clk);
 	mmc_data->set_pwr = sh_mobile_sdhi_set_pwr;
 	mmc_data->get_cd = sh_mobile_sdhi_get_cd;
@@ -233,7 +231,6 @@ eirq_sdio:
 eirq_card_detect:
 	tmio_mmc_host_remove(host);
 eprobe:
-	clk_disable(priv->clk);
 	clk_put(priv->clk);
 eclkget:
 	kfree(priv);
@@ -259,7 +256,6 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
 		free_irq(irq, host);
 	}
 
-	clk_disable(priv->clk);
 	clk_put(priv->clk);
 	kfree(priv);
 
-- 
1.7.2.5


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

* [PATCH 09/10 v3] mmc: sh_mobile_sdhi: do not manage PM clocks manually
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On sh-mobile platforms the MMC clock frequency for the TMIO MMC unit is
obtained from the same clock, as the one, that runtime power-manages the
controller. The SDHI glue code has to access that clock directly,
bypassing the runtime PM framework, to get its frequency, but it
shouldn't enable or disable it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index cb279b4..f91c3aa 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -117,8 +117,6 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 		goto eclkget;
 	}
 
-	clk_enable(priv->clk);
-
 	mmc_data->hclk = clk_get_rate(priv->clk);
 	mmc_data->set_pwr = sh_mobile_sdhi_set_pwr;
 	mmc_data->get_cd = sh_mobile_sdhi_get_cd;
@@ -233,7 +231,6 @@ eirq_sdio:
 eirq_card_detect:
 	tmio_mmc_host_remove(host);
 eprobe:
-	clk_disable(priv->clk);
 	clk_put(priv->clk);
 eclkget:
 	kfree(priv);
@@ -259,7 +256,6 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
 		free_irq(irq, host);
 	}
 
-	clk_disable(priv->clk);
 	clk_put(priv->clk);
 	kfree(priv);
 
-- 
1.7.2.5


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

* [PATCH 10/10 v3] mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc_pio.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 64f6c99..08f3e67 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -756,6 +756,7 @@ fail:
 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct tmio_mmc_host *host = mmc_priv(mmc);
+	struct device *dev = &host->pdev->dev;
 	unsigned long flags;
 
 	mutex_lock(&host->ios_lock);
@@ -763,13 +764,13 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_lock_irqsave(&host->lock, flags);
 	if (host->mrq) {
 		if (IS_ERR(host->mrq)) {
-			dev_dbg(&host->pdev->dev,
+			dev_dbg(dev,
 				"%s.%d: concurrent .set_ios(), clk %u, mode %u\n",
 				current->comm, task_pid_nr(current),
 				ios->clock, ios->power_mode);
 			host->mrq = ERR_PTR(-EINTR);
 		} else {
-			dev_dbg(&host->pdev->dev,
+			dev_dbg(dev,
 				"%s.%d: CMD%u active since %lu, now %lu!\n",
 				current->comm, task_pid_nr(current),
 				host->mrq->cmd->opcode, host->last_req_ts, jiffies);
@@ -792,7 +793,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	 */
 	if (ios->power_mode = MMC_POWER_ON && ios->clock) {
 		if (!host->power) {
-			pm_runtime_get_sync(&host->pdev->dev);
+			pm_runtime_get_sync(dev);
 			host->power = true;
 		}
 		tmio_mmc_set_clock(host, ios->clock);
@@ -806,7 +807,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 			host->set_pwr(host->pdev, 0);
 		if (host->power) {
 			host->power = false;
-			pm_runtime_put(&host->pdev->dev);
+			pm_runtime_put(dev);
 		}
 		tmio_mmc_clk_stop(host);
 	}
-- 
1.7.2.5


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

* [PATCH 10/10 v3] mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
@ 2012-02-09 21:57   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-02-09 21:57 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/tmio_mmc_pio.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 64f6c99..08f3e67 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -756,6 +756,7 @@ fail:
 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
 	struct tmio_mmc_host *host = mmc_priv(mmc);
+	struct device *dev = &host->pdev->dev;
 	unsigned long flags;
 
 	mutex_lock(&host->ios_lock);
@@ -763,13 +764,13 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	spin_lock_irqsave(&host->lock, flags);
 	if (host->mrq) {
 		if (IS_ERR(host->mrq)) {
-			dev_dbg(&host->pdev->dev,
+			dev_dbg(dev,
 				"%s.%d: concurrent .set_ios(), clk %u, mode %u\n",
 				current->comm, task_pid_nr(current),
 				ios->clock, ios->power_mode);
 			host->mrq = ERR_PTR(-EINTR);
 		} else {
-			dev_dbg(&host->pdev->dev,
+			dev_dbg(dev,
 				"%s.%d: CMD%u active since %lu, now %lu!\n",
 				current->comm, task_pid_nr(current),
 				host->mrq->cmd->opcode, host->last_req_ts, jiffies);
@@ -792,7 +793,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	 */
 	if (ios->power_mode == MMC_POWER_ON && ios->clock) {
 		if (!host->power) {
-			pm_runtime_get_sync(&host->pdev->dev);
+			pm_runtime_get_sync(dev);
 			host->power = true;
 		}
 		tmio_mmc_set_clock(host, ios->clock);
@@ -806,7 +807,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 			host->set_pwr(host->pdev, 0);
 		if (host->power) {
 			host->power = false;
-			pm_runtime_put(&host->pdev->dev);
+			pm_runtime_put(dev);
 		}
 		tmio_mmc_clk_stop(host);
 	}
-- 
1.7.2.5


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

* Re: [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
  2012-02-09 21:57 ` Guennadi Liakhovetski
@ 2012-03-09  4:17   ` Chris Ball
  -1 siblings, 0 replies; 38+ messages in thread
From: Chris Ball @ 2012-03-09  4:17 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, Paul Mundt, linux-sh, Magnus Damm

Hi Guennadi,

On Thu, Feb 09 2012, Guennadi Liakhovetski wrote:
> This is v3 of a patch series, that uses the recently committed generic 
> GPIO card hotplug handler, fixes minor PM issues, adds some cosmetic 
> clean up. The series applies on top of mmc-next of 09 Feb. 2012.
>
> Guennadi Liakhovetski (10):
>   mmc: simplify mmc_cd_gpio_request() by removing two parameters
>   mmc: tmio: calculate the native hotplug condition only once
>   mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
>   mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
>   ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
>     hotplug helper
>   ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
>     hotplug helper
>   mmc: tmio_mmc: power status flag doesn't have to be exposed in
>     platform data
>   mmc: tmio_mmc: remove unused sdio_irq_enabled flag
3C>   mmc: sh_mobile_sdhi: do not manage PM clocks manually
>   mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function

Looks like you didn't get any ACKs for these, and the ARM patches no
longer apply -- would you like me to take all but the two ARM patches
and leave those to you?  (Does that result in working systems?)

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
@ 2012-03-09  4:17   ` Chris Ball
  0 siblings, 0 replies; 38+ messages in thread
From: Chris Ball @ 2012-03-09  4:17 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, Paul Mundt, linux-sh, Magnus Damm

Hi Guennadi,

On Thu, Feb 09 2012, Guennadi Liakhovetski wrote:
> This is v3 of a patch series, that uses the recently committed generic 
> GPIO card hotplug handler, fixes minor PM issues, adds some cosmetic 
> clean up. The series applies on top of mmc-next of 09 Feb. 2012.
>
> Guennadi Liakhovetski (10):
>   mmc: simplify mmc_cd_gpio_request() by removing two parameters
>   mmc: tmio: calculate the native hotplug condition only once
>   mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
>   mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
>   ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
>     hotplug helper
>   ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
>     hotplug helper
>   mmc: tmio_mmc: power status flag doesn't have to be exposed in
>     platform data
>   mmc: tmio_mmc: remove unused sdio_irq_enabled flag
3C>   mmc: sh_mobile_sdhi: do not manage PM clocks manually
>   mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function

Looks like you didn't get any ACKs for these, and the ARM patches no
longer apply -- would you like me to take all but the two ARM patches
and leave those to you?  (Does that result in working systems?)

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
  2012-03-09  4:17   ` Chris Ball
@ 2012-03-16 11:55     ` Chris Ball
  -1 siblings, 0 replies; 38+ messages in thread
From: Chris Ball @ 2012-03-16 11:55 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, Paul Mundt, linux-sh, Magnus Damm

Hi,

On Thu, Mar 08 2012, Chris Ball wrote:
>> Guennadi Liakhovetski (10):
>>   mmc: simplify mmc_cd_gpio_request() by removing two parameters
>>   mmc: tmio: calculate the native hotplug condition only once
>>   mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
>>   mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
>>   ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
>>     hotplug helper
>>   ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
>>     hotplug helper
>>   mmc: tmio_mmc: power status flag doesn't have to be exposed in
>>     platform data
>>   mmc: tmio_mmc: remove unused sdio_irq_enabled flag
>>   mmc: sh_mobile_sdhi: do not manage PM clocks manually
>>   mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
>
> Looks like you didn't get any ACKs for these, and the ARM patches no
> longer apply -- would you like me to take all but the two ARM patches
> and leave those to you?  (Does that result in working systems?)

I've applied all of these except 5/6 to mmc-next for 3.4 now, thanks.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM
@ 2012-03-16 11:55     ` Chris Ball
  0 siblings, 0 replies; 38+ messages in thread
From: Chris Ball @ 2012-03-16 11:55 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, Paul Mundt, linux-sh, Magnus Damm

Hi,

On Thu, Mar 08 2012, Chris Ball wrote:
>> Guennadi Liakhovetski (10):
>>   mmc: simplify mmc_cd_gpio_request() by removing two parameters
>>   mmc: tmio: calculate the native hotplug condition only once
>>   mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper
>>   mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
>>   ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO
>>     hotplug helper
>>   ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO
>>     hotplug helper
>>   mmc: tmio_mmc: power status flag doesn't have to be exposed in
>>     platform data
>>   mmc: tmio_mmc: remove unused sdio_irq_enabled flag
>>   mmc: sh_mobile_sdhi: do not manage PM clocks manually
>>   mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
>
> Looks like you didn't get any ACKs for these, and the ARM patches no
> longer apply -- would you like me to take all but the two ARM patches
> and leave those to you?  (Does that result in working systems?)

I've applied all of these except 5/6 to mmc-next for 3.4 now, thanks.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
  2012-02-09 21:57   ` Guennadi Liakhovetski
@ 2012-04-08 11:33     ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-08 11:33 UTC (permalink / raw)
  To: linux-mmc
  Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm, Rafael J. Wysocki

Now that MMC patches from this series are in the mainline, also 
architecture patches can and should be applied. These are patches 5 and 6 
from this series:

http://article.gmane.org/gmane.linux.kernel.mmc/12748
http://article.gmane.org/gmane.linux.ports.sh.devel/13535

Would be good to have them in 3.4 since they fix modular MMC builds on 
ag5evm and mackerel.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
@ 2012-04-08 11:33     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-08 11:33 UTC (permalink / raw)
  To: linux-mmc
  Cc: Chris Ball, Paul Mundt, linux-sh, Magnus Damm, Rafael J. Wysocki

Now that MMC patches from this series are in the mainline, also 
architecture patches can and should be applied. These are patches 5 and 6 
from this series:

http://article.gmane.org/gmane.linux.kernel.mmc/12748
http://article.gmane.org/gmane.linux.ports.sh.devel/13535

Would be good to have them in 3.4 since they fix modular MMC builds on 
ag5evm and mackerel.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* outstanding ARM patches
  2012-04-08 11:33     ` Guennadi Liakhovetski
@ 2012-04-13 12:46       ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-13 12:46 UTC (permalink / raw)
  To: Linux Media Mailing List, linux-mmc
  Cc: linux-sh, Rafael J. Wysocki, Paul Mundt, Magnus Damm

Hi

Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
recent emails:

http://article.gmane.org/gmane.linux.kernel.mmc/12748
http://article.gmane.org/gmane.linux.ports.sh.devel/13535
http://article.gmane.org/gmane.linux.ports.sh.devel/13975

still apply to the current Linus' tree, though, the former 2 with a fuzz, 
if needed, I can provide a version, that applies cleanly. Compile-tested.

Thanks
Guennadi

On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:

> On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> > 
> > This patch we can push some time after the first one in this series gets 
> > in, no breakage is caused.
> 
> Patch 1/2 from this series is now in the mainline, so, also this patch can 
> be applied now. Not sure whether this qualifies as a fix (in the sense, 
> that the default maximum sizes of 2560x1920, used without this patch are 
> wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> accordingly.
...
> >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> >  2 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > index aab0a34..f67aa03 100644
> > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> >  
> >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > +	.max_width = 8188,
> > +	.max_height = 8188,
> >  	.csi2 = &csi2,
> >  };
> >  
> > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > index 9b42fbd..f790772 100644
> > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> >  
> >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > +	.max_width = 8188,
> > +	.max_height = 8188,
> >  };
> >  
> >  static struct resource ceu_resources[] = {
> > -- 
> > 1.7.2.5

On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:

> Now that MMC patches from this series are in the mainline, also 
> architecture patches can and should be applied. These are patches 5 and 6 
> from this series:
> 
> http://article.gmane.org/gmane.linux.kernel.mmc/12748
> http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> 
> Would be good to have them in 3.4 since they fix modular MMC builds on 
> ag5evm and mackerel.

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* outstanding ARM patches
@ 2012-04-13 12:46       ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-13 12:46 UTC (permalink / raw)
  To: Linux Media Mailing List, linux-mmc
  Cc: linux-sh, Rafael J. Wysocki, Paul Mundt, Magnus Damm

Hi

Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
recent emails:

http://article.gmane.org/gmane.linux.kernel.mmc/12748
http://article.gmane.org/gmane.linux.ports.sh.devel/13535
http://article.gmane.org/gmane.linux.ports.sh.devel/13975

still apply to the current Linus' tree, though, the former 2 with a fuzz, 
if needed, I can provide a version, that applies cleanly. Compile-tested.

Thanks
Guennadi

On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:

> On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> > 
> > This patch we can push some time after the first one in this series gets 
> > in, no breakage is caused.
> 
> Patch 1/2 from this series is now in the mainline, so, also this patch can 
> be applied now. Not sure whether this qualifies as a fix (in the sense, 
> that the default maximum sizes of 2560x1920, used without this patch are 
> wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> accordingly.
...
> >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> >  2 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > index aab0a34..f67aa03 100644
> > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> >  
> >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > +	.max_width = 8188,
> > +	.max_height = 8188,
> >  	.csi2 = &csi2,
> >  };
> >  
> > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > index 9b42fbd..f790772 100644
> > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> >  
> >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > +	.max_width = 8188,
> > +	.max_height = 8188,
> >  };
> >  
> >  static struct resource ceu_resources[] = {
> > -- 
> > 1.7.2.5

On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:

> Now that MMC patches from this series are in the mainline, also 
> architecture patches can and should be applied. These are patches 5 and 6 
> from this series:
> 
> http://article.gmane.org/gmane.linux.kernel.mmc/12748
> http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> 
> Would be good to have them in 3.4 since they fix modular MMC builds on 
> ag5evm and mackerel.

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
  2012-02-09 21:57   ` Guennadi Liakhovetski
@ 2012-04-16  2:08     ` Simon Horman
  -1 siblings, 0 replies; 38+ messages in thread
From: Simon Horman @ 2012-04-16  2:08 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: linux-mmc, Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On Thu, Feb 09, 2012 at 10:57:11PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Tested-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper
@ 2012-04-16  2:08     ` Simon Horman
  0 siblings, 0 replies; 38+ messages in thread
From: Simon Horman @ 2012-04-16  2:08 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: linux-mmc, Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On Thu, Feb 09, 2012 at 10:57:11PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Tested-by: Simon Horman <horms@verge.net.au>

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

* Re: [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
  2012-02-09 21:57   ` Guennadi Liakhovetski
@ 2012-04-16  2:16     ` Simon Horman
  -1 siblings, 0 replies; 38+ messages in thread
From: Simon Horman @ 2012-04-16  2:16 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: linux-mmc, Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On Thu, Feb 09, 2012 at 10:57:12PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Reviewed-by: Simon Horman <horms@verge.net.au>

I don't have access to this HW as far as I know
but the changes are in keeping with those for Mackerel
and I have tested the Mackerel changes.

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

* Re: [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper
@ 2012-04-16  2:16     ` Simon Horman
  0 siblings, 0 replies; 38+ messages in thread
From: Simon Horman @ 2012-04-16  2:16 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: linux-mmc, Chris Ball, Paul Mundt, linux-sh, Magnus Damm

On Thu, Feb 09, 2012 at 10:57:12PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Reviewed-by: Simon Horman <horms@verge.net.au>

I don't have access to this HW as far as I know
but the changes are in keeping with those for Mackerel
and I have tested the Mackerel changes.

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

* Re: outstanding ARM patches
  2012-04-13 12:46       ` Guennadi Liakhovetski
@ 2012-04-16 16:24         ` Rafael J. Wysocki
  -1 siblings, 0 replies; 38+ messages in thread
From: Rafael J. Wysocki @ 2012-04-16 16:24 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Linux Media Mailing List, linux-mmc, linux-sh, Paul Mundt, Magnus Damm

On Friday, April 13, 2012, Guennadi Liakhovetski wrote:
> Hi
> 
> Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
> recent emails:
> 
> http://article.gmane.org/gmane.linux.kernel.mmc/12748
> http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> http://article.gmane.org/gmane.linux.ports.sh.devel/13975
> 
> still apply to the current Linus' tree, though, the former 2 with a fuzz, 
> if needed, I can provide a version, that applies cleanly. Compile-tested.

Can you please repost them in one series on top of v3.2-rc3?

Rafael

 
> On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> 
> > On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> > 
> > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > ---
> > > 
> > > This patch we can push some time after the first one in this series gets 
> > > in, no breakage is caused.
> > 
> > Patch 1/2 from this series is now in the mainline, so, also this patch can 
> > be applied now. Not sure whether this qualifies as a fix (in the sense, 
> > that the default maximum sizes of 2560x1920, used without this patch are 
> > wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> > accordingly.
> ...
> > >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> > >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > > index aab0a34..f67aa03 100644
> > > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> > >  
> > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > +	.max_width = 8188,
> > > +	.max_height = 8188,
> > >  	.csi2 = &csi2,
> > >  };
> > >  
> > > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > > index 9b42fbd..f790772 100644
> > > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> > >  
> > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > +	.max_width = 8188,
> > > +	.max_height = 8188,
> > >  };
> > >  
> > >  static struct resource ceu_resources[] = {
> 
> On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> 
> > Now that MMC patches from this series are in the mainline, also 
> > architecture patches can and should be applied. These are patches 5 and 6 
> > from this series:
> > 
> > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > 
> > Would be good to have them in 3.4 since they fix modular MMC builds on 
> > ag5evm and mackerel.
> 
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> 
> 


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

* Re: outstanding ARM patches
@ 2012-04-16 16:24         ` Rafael J. Wysocki
  0 siblings, 0 replies; 38+ messages in thread
From: Rafael J. Wysocki @ 2012-04-16 16:24 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Linux Media Mailing List, linux-mmc, linux-sh, Paul Mundt, Magnus Damm

On Friday, April 13, 2012, Guennadi Liakhovetski wrote:
> Hi
> 
> Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
> recent emails:
> 
> http://article.gmane.org/gmane.linux.kernel.mmc/12748
> http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> http://article.gmane.org/gmane.linux.ports.sh.devel/13975
> 
> still apply to the current Linus' tree, though, the former 2 with a fuzz, 
> if needed, I can provide a version, that applies cleanly. Compile-tested.

Can you please repost them in one series on top of v3.2-rc3?

Rafael

 
> On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> 
> > On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> > 
> > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > ---
> > > 
> > > This patch we can push some time after the first one in this series gets 
> > > in, no breakage is caused.
> > 
> > Patch 1/2 from this series is now in the mainline, so, also this patch can 
> > be applied now. Not sure whether this qualifies as a fix (in the sense, 
> > that the default maximum sizes of 2560x1920, used without this patch are 
> > wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> > accordingly.
> ...
> > >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> > >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > > index aab0a34..f67aa03 100644
> > > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> > >  
> > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > +	.max_width = 8188,
> > > +	.max_height = 8188,
> > >  	.csi2 = &csi2,
> > >  };
> > >  
> > > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > > index 9b42fbd..f790772 100644
> > > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> > >  
> > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > +	.max_width = 8188,
> > > +	.max_height = 8188,
> > >  };
> > >  
> > >  static struct resource ceu_resources[] = {
> 
> On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> 
> > Now that MMC patches from this series are in the mainline, also 
> > architecture patches can and should be applied. These are patches 5 and 6 
> > from this series:
> > 
> > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > 
> > Would be good to have them in 3.4 since they fix modular MMC builds on 
> > ag5evm and mackerel.
> 
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
> 
> 


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

* Re: outstanding ARM patches
  2012-04-16 16:24         ` Rafael J. Wysocki
@ 2012-04-16 21:08           ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-16 21:08 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Media Mailing List, linux-mmc, linux-sh, Paul Mundt, Magnus Damm

On Mon, 16 Apr 2012, Rafael J. Wysocki wrote:

> On Friday, April 13, 2012, Guennadi Liakhovetski wrote:
> > Hi
> > 
> > Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
> > recent emails:
> > 
> > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13975
> > 
> > still apply to the current Linus' tree, though, the former 2 with a fuzz, 
> > if needed, I can provide a version, that applies cleanly. Compile-tested.
> 
> Can you please repost them in one series on top of v3.2-rc3?

Sure, this is not really a series, but for your convenience I'll post them 
in reply to this mail. I'll also drop all recepients from the cc-list 
except linux-sh to not bother others.

Thanks
Guennadi

> Rafael
> 
>  
> > On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> > 
> > > On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> > > 
> > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > > ---
> > > > 
> > > > This patch we can push some time after the first one in this series gets 
> > > > in, no breakage is caused.
> > > 
> > > Patch 1/2 from this series is now in the mainline, so, also this patch can 
> > > be applied now. Not sure whether this qualifies as a fix (in the sense, 
> > > that the default maximum sizes of 2560x1920, used without this patch are 
> > > wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> > > accordingly.
> > ...
> > > >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> > > >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> > > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > > > index aab0a34..f67aa03 100644
> > > > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > > > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > > > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> > > >  
> > > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > > +	.max_width = 8188,
> > > > +	.max_height = 8188,
> > > >  	.csi2 = &csi2,
> > > >  };
> > > >  
> > > > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > > > index 9b42fbd..f790772 100644
> > > > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > > > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > > > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> > > >  
> > > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > > +	.max_width = 8188,
> > > > +	.max_height = 8188,
> > > >  };
> > > >  
> > > >  static struct resource ceu_resources[] = {
> > 
> > On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> > 
> > > Now that MMC patches from this series are in the mainline, also 
> > > architecture patches can and should be applied. These are patches 5 and 6 
> > > from this series:
> > > 
> > > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > > 
> > > Would be good to have them in 3.4 since they fix modular MMC builds on 
> > > ag5evm and mackerel.
> > 
> > ---
> > Guennadi Liakhovetski, Ph.D.
> > Freelance Open-Source Software Developer
> > http://www.open-technology.de/
> > 
> > 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: outstanding ARM patches
@ 2012-04-16 21:08           ` Guennadi Liakhovetski
  0 siblings, 0 replies; 38+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-16 21:08 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Media Mailing List, linux-mmc, linux-sh, Paul Mundt, Magnus Damm

On Mon, 16 Apr 2012, Rafael J. Wysocki wrote:

> On Friday, April 13, 2012, Guennadi Liakhovetski wrote:
> > Hi
> > 
> > Just confirming, that the 3 outstanding ARM patches, that I mentioned in 
> > recent emails:
> > 
> > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > http://article.gmane.org/gmane.linux.ports.sh.devel/13975
> > 
> > still apply to the current Linus' tree, though, the former 2 with a fuzz, 
> > if needed, I can provide a version, that applies cleanly. Compile-tested.
> 
> Can you please repost them in one series on top of v3.2-rc3?

Sure, this is not really a series, but for your convenience I'll post them 
in reply to this mail. I'll also drop all recepients from the cc-list 
except linux-sh to not bother others.

Thanks
Guennadi

> Rafael
> 
>  
> > On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> > 
> > > On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:
> > > 
> > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > > ---
> > > > 
> > > > This patch we can push some time after the first one in this series gets 
> > > > in, no breakage is caused.
> > > 
> > > Patch 1/2 from this series is now in the mainline, so, also this patch can 
> > > be applied now. Not sure whether this qualifies as a fix (in the sense, 
> > > that the default maximum sizes of 2560x1920, used without this patch are 
> > > wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
> > > accordingly.
> > ...
> > > >  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
> > > >  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
> > > >  2 files changed, 4 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> > > > index aab0a34..f67aa03 100644
> > > > --- a/arch/arm/mach-shmobile/board-ap4evb.c
> > > > +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> > > > @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
> > > >  
> > > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > > +	.max_width = 8188,
> > > > +	.max_height = 8188,
> > > >  	.csi2 = &csi2,
> > > >  };
> > > >  
> > > > diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> > > > index 9b42fbd..f790772 100644
> > > > --- a/arch/arm/mach-shmobile/board-mackerel.c
> > > > +++ b/arch/arm/mach-shmobile/board-mackerel.c
> > > > @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
> > > >  
> > > >  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
> > > >  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> > > > +	.max_width = 8188,
> > > > +	.max_height = 8188,
> > > >  };
> > > >  
> > > >  static struct resource ceu_resources[] = {
> > 
> > On Sun, 8 Apr 2012, Guennadi Liakhovetski wrote:
> > 
> > > Now that MMC patches from this series are in the mainline, also 
> > > architecture patches can and should be applied. These are patches 5 and 6 
> > > from this series:
> > > 
> > > http://article.gmane.org/gmane.linux.kernel.mmc/12748
> > > http://article.gmane.org/gmane.linux.ports.sh.devel/13535
> > > 
> > > Would be good to have them in 3.4 since they fix modular MMC builds on 
> > > ag5evm and mackerel.
> > 
> > ---
> > Guennadi Liakhovetski, Ph.D.
> > Freelance Open-Source Software Developer
> > http://www.open-technology.de/
> > 
> > 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

end of thread, other threads:[~2012-04-16 21:09 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 21:57 [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM Guennadi Liakhovetski
2012-02-09 21:57 ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 01/10 v3] mmc: simplify mmc_cd_gpio_request() by removing two parameters Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 02/10 v3] mmc: tmio: calculate the native hotplug condition only once Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 03/10 v3] mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-04-16  2:08   ` Simon Horman
2012-04-16  2:08     ` Simon Horman
2012-02-09 21:57 ` [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm " Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-04-08 11:33   ` Guennadi Liakhovetski
2012-04-08 11:33     ` Guennadi Liakhovetski
2012-04-13 12:46     ` outstanding ARM patches Guennadi Liakhovetski
2012-04-13 12:46       ` Guennadi Liakhovetski
2012-04-16 16:24       ` Rafael J. Wysocki
2012-04-16 16:24         ` Rafael J. Wysocki
2012-04-16 21:08         ` Guennadi Liakhovetski
2012-04-16 21:08           ` Guennadi Liakhovetski
2012-04-16  2:16   ` [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper Simon Horman
2012-04-16  2:16     ` Simon Horman
2012-02-09 21:57 ` [PATCH 07/10 v3] mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 08/10 v3] mmc: tmio_mmc: remove unused sdio_irq_enabled flag Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 09/10 v3] mmc: sh_mobile_sdhi: do not manage PM clocks manually Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 10/10 v3] mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-03-09  4:17 ` [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM Chris Ball
2012-03-09  4:17   ` Chris Ball
2012-03-16 11:55   ` Chris Ball
2012-03-16 11:55     ` Chris Ball

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.