All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] mmc: sdhci-s3c: Rework platform data and add device tree support
@ 2012-01-31 17:56 ` Thomas Abraham
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Abraham @ 2012-01-31 17:56 UTC (permalink / raw)
  To: linux-mmc, devicetree-discuss
  Cc: linux-arm-kernel, cjb, grant.likely, rob.herring,
	linux-samsung-soc, kgene.kim, ben-linux, patches

This patchset removes all uses of 'clk_type' member from the platform data
of sdhci-s3c driver and adds device tree support for sdhci-s3c driver.

In this patchset, all uses of 'clk_type' member from the platform data are
removed from the sdhci-s3c driver and platform code. The clk_type is a SoC
specific information and not a board/machine specific information. Hence, this
information can be more aptly represented using SoC specific driver data in the
sdhci-s3c driver.

Hence all uses of 'clk_type' member in sdhci-s3c driver's platform data is
removed. In place of that, the sdhci host qurik 'SDHCI_QUIRK_NONSTANDARD_CLOCK'
is used to handle controllers that do not have a standard sdclk division
(like those in the exynos4 SoC's).

This is a pre-requisite for adding device tree support for sdhci-s3c driver.
While migrating towards device tree support, retreving 'clk_type' information
from device tree information does not seem correct and hence it has been added
as SoC specific driver data. All this is handled in patches 1 to 3.

Patch 4 to 6 add device tree support for sdhci-s3c driver. The fourth patch
derives the maximum transfer width host capability from the max_width member
in platform data. The fifth patch modifies the sdhci-s3c driver to mainatain
a local copy of the platform data, which makes it easier to add device tree
support for the driver. The last patch adds device tree based discovery for
the sdhci-s3c driver.

This patchset is based on the following tree.
  http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git [for-next]

Thomas Abraham (6):
  mmc: sdhci-s3c: Remove usage of clk_type member in platform data
  arm: exynos4: use 'exynos4-sdhci' as device name for sdhci controllers
  arm: samsung: remove all uses of clk_type member in sdhci platform data
  mmc: sdhci-s3c: derive transfer width host capability from max_width in platform data
  mmc: sdhci-s3c: Keep a copy of platform data and use it
  mmc: sdhci-s3c: Add device tree support

 .../devicetree/bindings/mmc/samsung-sdhci.txt      |   70 ++++++
 arch/arm/mach-exynos/clock.c                       |   24 +-
 arch/arm/mach-exynos/common.c                      |    5 +
 arch/arm/mach-exynos/mach-armlex4210.c             |    3 -
 arch/arm/mach-exynos/mach-nuri.c                   |    3 -
 arch/arm/mach-exynos/mach-origen.c                 |    2 -
 arch/arm/mach-exynos/mach-smdk4x12.c               |    2 -
 arch/arm/mach-exynos/mach-smdkv310.c               |    4 -
 arch/arm/mach-exynos/mach-universal_c210.c         |    2 -
 arch/arm/plat-samsung/devs.c                       |    4 -
 arch/arm/plat-samsung/include/plat/sdhci.h         |   35 +++-
 arch/arm/plat-samsung/platformdata.c               |    2 -
 drivers/mmc/host/sdhci-s3c.c                       |  235 +++++++++++++++++++-
 13 files changed, 341 insertions(+), 50 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/samsung-sdhci.txt

^ permalink raw reply	[flat|nested] 98+ messages in thread
* [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend
@ 2012-02-15 18:15 Mark Brown
  2012-02-15 18:15 ` [PATCH 2/2] mmc: sdhci-s3c: Enable runtime power management Mark Brown
  0 siblings, 1 reply; 98+ messages in thread
From: Mark Brown @ 2012-02-15 18:15 UTC (permalink / raw)
  To: Chris Ball, Ben Dooks; +Cc: linux-mmc, Mark Brown

This matches current best practice as one can have runtime PM enabled
without system sleep and CONFIG_PM is defined for both.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mmc/host/sdhci-s3c.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index b19e7d4..84ea6c7 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -20,6 +20,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/module.h>
+#include <linux/pm.h>
 
 #include <linux/mmc/host.h>
 
@@ -620,8 +621,7 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
 static int sdhci_s3c_suspend(struct device *dev)
 {
 	struct sdhci_host *host = dev_get_drvdata(dev);
@@ -635,10 +635,11 @@ static int sdhci_s3c_resume(struct device *dev)
 
 	return sdhci_resume_host(host);
 }
+#endif
 
+#ifdef CONFIG_PM
 static const struct dev_pm_ops sdhci_s3c_pmops = {
-	.suspend	= sdhci_s3c_suspend,
-	.resume		= sdhci_s3c_resume,
+	SET_SYSTEM_SLEEP_PM_OPS(sdhci_s3c_suspend, sdhci_s3c_resume)
 };
 
 #define SDHCI_S3C_PMOPS (&sdhci_s3c_pmops)
-- 
1.7.9.rc1


^ permalink raw reply related	[flat|nested] 98+ messages in thread
* [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend
@ 2011-12-30  2:24 Mark Brown
  2011-12-30  2:24 ` [PATCH 2/2] mmc: sdhci-s3c: Enable runtime power management Mark Brown
  0 siblings, 1 reply; 98+ messages in thread
From: Mark Brown @ 2011-12-30  2:24 UTC (permalink / raw)
  To: Jaehoon Chung, Chris Ball, Kukjin Kim, Kyungmin Park
  Cc: linux-mmc, Mark Brown

This matches current best practice as one can have runtime PM enabled
without system sleep and CONFIG_PM is defined for both.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/mmc/host/sdhci-s3c.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 1af756e..df066b5 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -20,6 +20,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/module.h>
+#include <linux/pm.h>
 
 #include <linux/mmc/host.h>
 
@@ -620,8 +621,7 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-
+#ifdef CONFIG_PM_SLEEP
 static int sdhci_s3c_suspend(struct device *dev)
 {
 	struct sdhci_host *host = dev_get_drvdata(dev);
@@ -635,10 +635,11 @@ static int sdhci_s3c_resume(struct device *dev)
 
 	return sdhci_resume_host(host);
 }
+#endif
 
+#ifdef CONFIG_PM
 static const struct dev_pm_ops sdhci_s3c_pmops = {
-	.suspend	= sdhci_s3c_suspend,
-	.resume		= sdhci_s3c_resume,
+	SET_SYSTEM_SLEEP_PM_OPS(sdhci_s3c_suspend, sdhci_s3c_resume)
 };
 
 #define SDHCI_S3C_PMOPS (&sdhci_s3c_pmops)
-- 
1.7.7.3


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

end of thread, other threads:[~2012-05-14 19:53 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31 17:56 [PATCH v3 0/6] mmc: sdhci-s3c: Rework platform data and add device tree support Thomas Abraham
2012-01-31 17:56 ` Thomas Abraham
2012-01-31 17:56 ` [PATCH v3 1/6] mmc: sdhci-s3c: Remove usage of clk_type member in platform data Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 17:56 ` [PATCH v3 2/6] arm: exynos4: use 'exynos4-sdhci' as device name for sdhci controllers Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 17:56 ` [PATCH v3 3/6] arm: samsung: remove all uses of clk_type member in sdhci platform data Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 17:56 ` [PATCH v3 4/6] mmc: sdhci-s3c: derive transfer width host capability from max_width in " Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 19:12   ` Sergei Shtylyov
2012-01-31 19:12     ` Sergei Shtylyov
2012-01-31 17:56 ` [PATCH v3 5/6] mmc: sdhci-s3c: Keep a copy of platform data and use it Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 17:56 ` [PATCH v3 6/6] mmc: sdhci-s3c: Add device tree support Thomas Abraham
2012-01-31 17:56   ` Thomas Abraham
2012-01-31 20:08   ` Grant Likely
2012-01-31 20:08     ` Grant Likely
2012-02-01 18:21   ` Karol Lewandowski
2012-02-01 18:21     ` Karol Lewandowski
2012-03-27 16:15   ` Arnd Bergmann
2012-03-27 16:15     ` Arnd Bergmann
2012-03-27 16:19   ` Arnd Bergmann
2012-03-27 16:19     ` Arnd Bergmann
2012-03-30  6:33     ` Viresh Kumar
2012-03-30  6:33       ` Viresh Kumar
2012-03-30 11:36       ` Arnd Bergmann
2012-03-30 11:36         ` Arnd Bergmann
2012-03-30 15:48         ` Stephen Warren
2012-03-30 15:48           ` Stephen Warren
2012-03-30 18:45           ` Arnd Bergmann
2012-03-30 18:45             ` Arnd Bergmann
     [not found]             ` <201203301845.07534.arnd-r2nGTMty4D4@public.gmane.org>
2012-04-01 11:29               ` Mark Brown
2012-04-01 11:29                 ` Mark Brown
2012-05-13  4:14           ` [PATCH v2] mmc: dt: Consolidate DT bindings Chris Ball
2012-05-13  4:14             ` Chris Ball
2012-05-13 19:29             ` Guennadi Liakhovetski
2012-05-13 19:29               ` Guennadi Liakhovetski
     [not found]             ` <871umou38f.fsf_-_-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>
2012-05-13 19:46               ` Arnd Bergmann
2012-05-13 19:46                 ` Arnd Bergmann
2012-05-13 20:10                 ` Chris Ball
2012-05-13 20:10                   ` Chris Ball
2012-05-14 19:53                   ` Arnd Bergmann
2012-05-14 19:53                     ` Arnd Bergmann
2012-04-09 14:48         ` [PATCH v3 6/6] mmc: sdhci-s3c: Add device tree support Chris Ball
2012-04-09 14:48           ` Chris Ball
2012-04-10 21:37         ` Chris Ball
2012-04-10 21:37           ` Chris Ball
2012-02-09 13:42 ` [PATCH v3 0/6] mmc: sdhci-s3c: Rework platform data and add " Kukjin Kim
2012-02-09 13:42   ` Kukjin Kim
2012-02-11 21:37   ` Chris Ball
2012-02-11 21:37     ` Chris Ball
2012-02-16 13:04     ` Kukjin Kim
2012-02-16 13:04       ` Kukjin Kim
2012-02-16 13:08       ` Chris Ball
2012-02-16 13:08         ` Chris Ball
2012-02-21 11:37         ` Kukjin Kim
2012-02-21 11:37           ` Kukjin Kim
2012-02-21 13:17           ` Chris Ball
2012-02-21 13:17             ` Chris Ball
2012-02-22 12:58             ` Mark Brown
2012-02-22 12:58               ` Mark Brown
2012-03-02 20:40               ` Chris Ball
2012-03-02 20:40                 ` Chris Ball
2012-03-03  0:44                 ` Kukjin Kim
2012-03-03  0:44                   ` Kukjin Kim
2012-03-03  0:46                   ` [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend Mark Brown
2012-03-03  0:46                     ` Mark Brown
2012-03-03  0:46                     ` [PATCH 2/2] mmc: sdhci-s3c: Enable runtime power management Mark Brown
2012-03-03  0:46                       ` Mark Brown
2012-03-05 10:48                       ` Jaehoon Chung
2012-03-05 10:48                         ` Jaehoon Chung
2012-03-05 11:52                         ` Mark Brown
2012-03-05 11:52                           ` Mark Brown
2012-03-06  6:40                           ` Jaehoon Chung
2012-03-06  6:40                             ` Jaehoon Chung
2012-03-09  4:57                       ` Chris Ball
2012-03-09  4:57                         ` Chris Ball
2012-03-09  5:08                       ` Chris Ball
2012-03-09  5:08                         ` Chris Ball
2012-03-09 12:26                         ` Mark Brown
2012-03-09 12:26                           ` Mark Brown
2012-03-05 10:24                     ` [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend Jaehoon Chung
2012-03-05 10:24                       ` Jaehoon Chung
2012-03-09  4:56                     ` Chris Ball
2012-03-09  4:56                       ` Chris Ball
2012-03-27 15:50             ` [PATCH v3 0/6] mmc: sdhci-s3c: Rework platform data and add device tree support Chris Ball
2012-03-27 15:50               ` Chris Ball
2012-03-28  9:54               ` Mark Brown
2012-03-28  9:54                 ` Mark Brown
2012-03-29  3:15                 ` Kukjin Kim
2012-03-29  3:15                   ` Kukjin Kim
2012-04-01  1:12                   ` Chris Ball
2012-04-01  1:12                     ` Chris Ball
2012-04-02 19:08                     ` Kukjin Kim
2012-04-02 19:08                       ` Kukjin Kim
  -- strict thread matches above, loose matches on Subject: below --
2012-02-15 18:15 [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend Mark Brown
2012-02-15 18:15 ` [PATCH 2/2] mmc: sdhci-s3c: Enable runtime power management Mark Brown
2011-12-30  2:24 [PATCH 1/2] mmc: sdhci-s3c: Use CONFIG_PM_SLEEP to ifdef system suspend Mark Brown
2011-12-30  2:24 ` [PATCH 2/2] mmc: sdhci-s3c: Enable runtime power management Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.