Skip to contentSkip to conversation

ARM: SAMSUNG: Add pm_caps into platform data

PATCH In review Sangwook Lee 3 participants 4 messages Nov 16, 2011 – Dec 1, 2011 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ARM: SAMSUNG: Add pm_caps into platform data

Add pm_caps into platform_data. This is power management, usually for SDIO device such as SDIO WLAN.

---
 arch/arm/plat-samsung/include/plat/sdhci.h |    2 ++
 arch/arm/plat-samsung/platformdata.c       |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/sdhci.h +2 -0
index dcff7dd..fcd02d4 100644
@@ -40,6 +40,7 @@ enum clk_types {
  * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
  * @max_width: The maximum number of data bits supported.
  * @host_caps: Standard MMC host capabilities bit field.
+ * @pm_caps: SDIO host PM capabilities bit field.
  * @cd_type: Type of Card Detection method (see cd_types enum above)
  * @clk_type: Type of clock divider method (see clk_types enum above)
  * @ext_cd_init: Initialize external card detect subsystem. Called on
@@ -63,6 +64,7 @@ enum clk_types {
 struct s3c_sdhci_platdata {
 	unsigned int	max_width;
 	unsigned int	host_caps;
+	unsigned int    pm_caps;
 	enum cd_types	cd_type;
 	enum clk_types	clk_type;
 
arch/arm/plat-samsung/platformdata.c +2 -0
index ceb9fa3..0f70718 100644
@@ -53,6 +53,8 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
 		set->cfg_gpio = pd->cfg_gpio;
 	if (pd->host_caps)
 		set->host_caps |= pd->host_caps;
+	if (pd->pm_caps)
+		set->pm_caps |= pd->pm_caps;
 	if (pd->clk_type)
 		set->clk_type = pd->clk_type;
 }
Signature · 1 line
1.7.4.1
#1 lore raw

Dear Mr. Lee,

Quoted 34 lines · Sangwook Lee

Add pm_caps into platform_data. This is power management, usually for SDIO device such as SDIO WLAN.

---
 arch/arm/plat-samsung/include/plat/sdhci.h |    2 ++ arch/arm/plat-samsung/platformdata.c       |    2 ++

 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/sdhci.h +2 -0
index dcff7dd..fcd02d4 100644
@@ -40,6 +40,7 @@ enum clk_types {
  * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
  * @max_width: The maximum number of data bits supported.
  * @host_caps: Standard MMC host capabilities bit field.
+ * @pm_caps: SDIO host PM capabilities bit field.
  * @cd_type: Type of Card Detection method (see cd_types enum above)
  * @clk_type: Type of clock divider method (see clk_types enum above)
  * @ext_cd_init: Initialize external card detect subsystem. Called on
@@ -63,6 +64,7 @@ enum clk_types {
  struct s3c_sdhci_platdata {
        unsigned int    max_width;
        unsigned int    host_caps;
+       unsigned int    pm_caps;
        enum cd_types   cd_type;
        enum clk_types  clk_type;
 
arch/arm/plat-samsung/platformdata.c +0 -0
index ceb9fa3..0f70718 100644

arch/arm/plat-samsung/platformdata.c void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd, · line 57

Quoted 5 lines
arch/arm/plat-samsung/platformdata.c +2 -0
@@ -53,6 +53,8 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
                set->cfg_gpio = pd->cfg_gpio;
        if (pd->host_caps)
                set->host_caps |= pd->host_caps;
+       if (pd->pm_caps)
+               set->pm_caps |= pd->pm_caps;

Are the 'pm_caps' specific to a (on-board) sdio host attached to the sdhci controller? If yes, then this change should be fine. If no, please let me know. I am kind of worried of any new addition to platform data. Because, if that new addition in platform data is not board specific data, then it becomes difficult to represent that information in device tree.

Thanks,
Thomas.

Quoted 11 lines
arch/arm/plat-samsung/platformdata.c +0 -1
        if (pd->clk_type)
                set->clk_type = pd->clk_type;
  }
--

1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CADPsn1YCsJC1j9jyz3UiL9w3qjWjZDckFAXbww-8XNpds-21rQ@mail.gmail.com

#3 lore raw

Dear Mr. Lee,

Quoted 54 lines · Sangwook Lee

Hi Thomas

Quoted 34 lines · Thomas Abraham

Dear Mr. Lee,

Quoted 30 lines · Sangwook Lee

Add pm_caps into platform_data. This is power management, usually for SDIO device such as SDIO WLAN.

---
 arch/arm/plat-samsung/include/plat/sdhci.h |    2 ++ arch/arm/plat-samsung/platformdata.c       |    2 ++

 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/sdhci.h +2 -0
index dcff7dd..fcd02d4 100644
@@ -40,6 +40,7 @@ enum clk_types {
  * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
  * @max_width: The maximum number of data bits supported.
  * @host_caps: Standard MMC host capabilities bit field.
+ * @pm_caps: SDIO host PM capabilities bit field.
  * @cd_type: Type of Card Detection method (see cd_types enum above)
  * @clk_type: Type of clock divider method (see clk_types enum above)
  * @ext_cd_init: Initialize external card detect subsystem. Called on
@@ -63,6 +64,7 @@ enum clk_types {
  struct s3c_sdhci_platdata {
        unsigned int    max_width;
        unsigned int    host_caps;
+       unsigned int    pm_caps;
        enum cd_types   cd_type;
        enum clk_types  clk_type;
 
Quoted 16 lines

arch/arm/plat-samsung/platformdata.c void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata · line 58

Quoted 12 lines
arch/arm/plat-samsung/platformdata.c +2 -0
index ceb9fa3..0f70718 100644
@@ -53,6 +53,8 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata
 *pd,
                set->cfg_gpio = pd->cfg_gpio;
        if (pd->host_caps)
                set->host_caps |= pd->host_caps;
+       if (pd->pm_caps)
+               set->pm_caps |= pd->pm_caps;

Are the 'pm_caps' specific to a (on-board) sdio host attached to the sdhci controller?

Quoted 2 lines

No, this is not specific to a sdio host controller.

Thanks for your confirmation. Looking at the code, there are two flags for pm_caps - MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ. Though these seem to be flags for linux specific behavior, the same could be supported from device tree as well allowing host system to use and act on these properties or ignore it. So, adding pm_caps in platform data should be fine from dt support perspective.

If you prefer, for the both the patches in this series,

Thanks,
Thomas.

Quoted 25 lines
Quoted 23 lines

If yes, then this change should be fine. If no,
please let me know. I am kind of worried of any new addition to platform data. Because, if that new addition in platform data is not board specific data, then it becomes difficult to represent that information in device tree.

Thanks,
Thomas.

Quoted 12 lines
arch/arm/plat-samsung/platformdata.c +0 -0
        if (pd->clk_type)
                set->clk_type = pd->clk_type;

 }
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 12 lines · Thomas Abraham

Dear Mr. Lee,

Quoted 3 lines · Sangwook Lee

Hi Thomas

On 16 November 2011 11:47, Thomas Abraham <[email protected]>

Quoted 4 lines · wrote:
Quoted 4 lines

Dear Mr. Lee,

On 16 November 2011 15:50, Sangwook Lee <[email protected]>

Quoted 59 lines · wrote:
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Add pm_caps into platform_data. This is power management, usually for SDIO device such as SDIO WLAN.

---
 arch/arm/plat-samsung/include/plat/sdhci.h |    2 ++ arch/arm/plat-samsung/platformdata.c       |    2 ++

 2 files changed, 4 insertions(+), 0 deletions(-)
Quoted 7 lines
Quoted 7 lines

arch/arm/plat-samsung/include/plat/sdhci.h enum clk_types { · line 40

Quoted 7 lines
arch/arm/plat-samsung/include/plat/sdhci.h +0 -0
index dcff7dd..fcd02d4 100644
@@ -40,6 +40,7 @@ enum clk_types {
  * struct s3c_sdhci_platdata() - Platform device data for Samsung

SDHCI

Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
arch/arm/plat-samsung/include/plat/sdhci.h +2 -0
  * @max_width: The maximum number of data bits supported.
  * @host_caps: Standard MMC host capabilities bit field.
+ * @pm_caps: SDIO host PM capabilities bit field.
  * @cd_type: Type of Card Detection method (see cd_types enum above)
  * @clk_type: Type of clock divider method (see clk_types enum above)
  * @ext_cd_init: Initialize external card detect subsystem. Called on
@@ -63,6 +64,7 @@ enum clk_types {
  struct s3c_sdhci_platdata {
        unsigned int    max_width;
        unsigned int    host_caps;
+       unsigned int    pm_caps;
        enum cd_types   cd_type;
        enum clk_types  clk_type;
 
Quoted 6 lines
Quoted 6 lines

arch/arm/plat-samsung/platformdata.c void s3c_sdhci_set_platdata(struct

Quoted 6 lines
arch/arm/plat-samsung/platformdata.c +0 -0
index ceb9fa3..0f70718 100644
@@ -53,6 +53,8 @@ void s3c_sdhci_set_platdata(struct

s3c_sdhci_platdata

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
arch/arm/plat-samsung/platformdata.c +2 -0
 *pd,
                set->cfg_gpio = pd->cfg_gpio;
        if (pd->host_caps)
                set->host_caps |= pd->host_caps;
+       if (pd->pm_caps)
+               set->pm_caps |= pd->pm_caps;
Quoted 5 lines
Quoted 2 lines

Are the 'pm_caps' specific to a (on-board) sdio host attached to the sdhci controller?

No, this is not specific to a sdio host controller.

Thanks for your confirmation. Looking at the code, there are two flags for pm_caps - MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ. Though these seem to be flags for linux specific behavior, the same could be supported from device tree as well allowing host system to use and act on these properties or ignore it. So, adding pm_caps in platform data should be fine from dt support perspective.

Quoted 3 lines

If you prefer, for the both the patches in this series,

OK, will apply.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines

If yes, then this change should be fine. If no,
please let me know. I am kind of worried of any new addition to platform data. Because, if that new addition in platform data is not board specific data, then it becomes difficult to represent that information in device tree.

Thanks,
Thomas.

Quoted 5 lines
arch/arm/plat-samsung/platformdata.c +0 -0
        if (pd->clk_type)
                set->clk_type = pd->clk_type;

 }
--
1.7.4.1