All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mmc: Add power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:07 ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: Adrian Hunter, linux-kernel, linux-mmc, driverdev-devel,
	wei_wang, micky_ching, Roger Tseng

Invent MMC_POWER_UNDEFINED to describe the initial host power_mode which
might be either off or turned on by an early driver such as BIOS or UEFI driver.
This lets the later mmc_power_off() do actual power-off things and power_mode
will be in a known state eventually.

Roger Tseng (2):
  mmc: core: Add new power_mode MMC_POWER_UNDEFINED
  mmc: rtsx_pci: Set power related cap2 macros

 drivers/mmc/core/core.c           |    1 +
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 include/linux/mmc/host.h          |    1 +
 4 files changed, 4 insertions(+)

-- 
1.7.10.4


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

* [PATCH 0/2] mmc: Add power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:07 ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Invent MMC_POWER_UNDEFINED to describe the initial host power_mode which
might be either off or turned on by an early driver such as BIOS or UEFI driver.
This lets the later mmc_power_off() do actual power-off things and power_mode
will be in a known state eventually.

Roger Tseng (2):
  mmc: core: Add new power_mode MMC_POWER_UNDEFINED
  mmc: rtsx_pci: Set power related cap2 macros

 drivers/mmc/core/core.c           |    1 +
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 include/linux/mmc/host.h          |    1 +
 4 files changed, 4 insertions(+)

-- 
1.7.10.4

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

* [PATCH 0/2] mmc: Add power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:07 ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Invent MMC_POWER_UNDEFINED to describe the initial host power_mode which
might be either off or turned on by an early driver such as BIOS or UEFI driver.
This lets the later mmc_power_off() do actual power-off things and power_mode
will be in a known state eventually.

Roger Tseng (2):
  mmc: core: Add new power_mode MMC_POWER_UNDEFINED
  mmc: rtsx_pci: Set power related cap2 macros

 drivers/mmc/core/core.c           |    1 +
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 include/linux/mmc/host.h          |    1 +
 4 files changed, 4 insertions(+)

-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
  2014-09-24  9:07 ` Roger Tseng
  (?)
@ 2014-09-24  9:07   ` Roger Tseng
  -1 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: Adrian Hunter, linux-kernel, linux-mmc, driverdev-devel,
	wei_wang, micky_ching, Roger Tseng

Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
It will also be set as the initial value of host->ios.power_mode in
mmc_start_host().

For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
mmc_power_off() do real power-off things instead of NOP, and further
prevents state messed up in cards that was already initialized(eg. by
BIOS of UEFI driver).

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/core/core.c  |    1 +
 include/linux/mmc/host.h |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d03a080fb9cd..7dad1a1adf18 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
 {
 	host->f_init = max(freqs[0], host->f_min);
 	host->rescan_disable = 0;
+	host->ios.power_mode = MMC_POWER_UNDEFINED;
 	if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
 		mmc_power_off(host);
 	else
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7960424d0bc0..b3bfa609816a 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -42,6 +42,7 @@ struct mmc_ios {
 #define MMC_POWER_OFF		0
 #define MMC_POWER_UP		1
 #define MMC_POWER_ON		2
+#define MMC_POWER_UNDEFINED	3
 
 	unsigned char	bus_width;		/* data bus width */
 
-- 
1.7.10.4


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

* [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:07   ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
It will also be set as the initial value of host->ios.power_mode in
mmc_start_host().

For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
mmc_power_off() do real power-off things instead of NOP, and further
prevents state messed up in cards that was already initialized(eg. by
BIOS of UEFI driver).

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/core/core.c  |    1 +
 include/linux/mmc/host.h |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d03a080fb9cd..7dad1a1adf18 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
 {
 	host->f_init = max(freqs[0], host->f_min);
 	host->rescan_disable = 0;
+	host->ios.power_mode = MMC_POWER_UNDEFINED;
 	if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
 		mmc_power_off(host);
 	else
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7960424d0bc0..b3bfa609816a 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -42,6 +42,7 @@ struct mmc_ios {
 #define MMC_POWER_OFF		0
 #define MMC_POWER_UP		1
 #define MMC_POWER_ON		2
+#define MMC_POWER_UNDEFINED	3
 
 	unsigned char	bus_width;		/* data bus width */
 
-- 
1.7.10.4

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

* [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:07   ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
It will also be set as the initial value of host->ios.power_mode in
mmc_start_host().

For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
mmc_power_off() do real power-off things instead of NOP, and further
prevents state messed up in cards that was already initialized(eg. by
BIOS of UEFI driver).

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/core/core.c  |    1 +
 include/linux/mmc/host.h |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index d03a080fb9cd..7dad1a1adf18 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
 {
 	host->f_init = max(freqs[0], host->f_min);
 	host->rescan_disable = 0;
+	host->ios.power_mode = MMC_POWER_UNDEFINED;
 	if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
 		mmc_power_off(host);
 	else
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7960424d0bc0..b3bfa609816a 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -42,6 +42,7 @@ struct mmc_ios {
 #define MMC_POWER_OFF		0
 #define MMC_POWER_UP		1
 #define MMC_POWER_ON		2
+#define MMC_POWER_UNDEFINED	3
 
 	unsigned char	bus_width;		/* data bus width */
 
-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
  2014-09-24  9:07 ` Roger Tseng
  (?)
@ 2014-09-24  9:07   ` Roger Tseng
  -1 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: Adrian Hunter, linux-kernel, linux-mmc, driverdev-devel,
	wei_wang, micky_ching, Roger Tseng

Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
card reader hosts.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index dfde4a210238..d49460b5ff07 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
 	mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
 	mmc->ops = &realtek_pci_sdmmc_ops;
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 5d3766e792f0..a884631d7eea 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
 		MMC_CAP_NEEDS_POLL;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
-- 
1.7.10.4


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

* [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
@ 2014-09-24  9:07   ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
card reader hosts.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index dfde4a210238..d49460b5ff07 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
 	mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
 	mmc->ops = &realtek_pci_sdmmc_ops;
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 5d3766e792f0..a884631d7eea 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
 		MMC_CAP_NEEDS_POLL;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
-- 
1.7.10.4

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

* [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
@ 2014-09-24  9:07   ` Roger Tseng
  0 siblings, 0 replies; 15+ messages in thread
From: Roger Tseng @ 2014-09-24  9:07 UTC (permalink / raw)
  To: Chris Ball, Ulf Hansson, Greg Kroah-Hartman
  Cc: driverdev-devel, linux-mmc, Adrian Hunter, linux-kernel,
	wei_wang, Roger Tseng

Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
card reader hosts.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
 drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index dfde4a210238..d49460b5ff07 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
 	mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
 	mmc->ops = &realtek_pci_sdmmc_ops;
diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 5d3766e792f0..a884631d7eea 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
 		MMC_CAP_NEEDS_POLL;
+	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
 
 	mmc->max_current_330 = 400;
 	mmc->max_current_180 = 800;
-- 
1.7.10.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
  2014-09-24  9:07   ` Roger Tseng
  (?)
@ 2014-09-24  9:23     ` Ulf Hansson
  -1 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:23 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Chris Ball, Greg Kroah-Hartman, Adrian Hunter, linux-kernel,
	linux-mmc, driverdev-devel, Wei WANG, micky

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
> It will also be set as the initial value of host->ios.power_mode in
> mmc_start_host().
>
> For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
> mmc_power_off() do real power-off things instead of NOP, and further
> prevents state messed up in cards that was already initialized(eg. by
> BIOS of UEFI driver).
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

I changes some minor parts of the commit message and set the author of
the patch to "Roger Tseng <rogerable@realtek.com>" instead of
"<rogerable@realtek.com>". Please fix that in for future patches.

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c  |    1 +
>  include/linux/mmc/host.h |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index d03a080fb9cd..7dad1a1adf18 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
>  {
>         host->f_init = max(freqs[0], host->f_min);
>         host->rescan_disable = 0;
> +       host->ios.power_mode = MMC_POWER_UNDEFINED;
>         if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
>                 mmc_power_off(host);
>         else
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 7960424d0bc0..b3bfa609816a 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -42,6 +42,7 @@ struct mmc_ios {
>  #define MMC_POWER_OFF          0
>  #define MMC_POWER_UP           1
>  #define MMC_POWER_ON           2
> +#define MMC_POWER_UNDEFINED    3
>
>         unsigned char   bus_width;              /* data bus width */
>
> --
> 1.7.10.4
>

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

* Re: [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:23     ` Ulf Hansson
  0 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:23 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Greg Kroah-Hartman, driverdev-devel, linux-mmc, Chris Ball,
	linux-kernel, Wei WANG, Adrian Hunter

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
> It will also be set as the initial value of host->ios.power_mode in
> mmc_start_host().
>
> For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
> mmc_power_off() do real power-off things instead of NOP, and further
> prevents state messed up in cards that was already initialized(eg. by
> BIOS of UEFI driver).
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

I changes some minor parts of the commit message and set the author of
the patch to "Roger Tseng <rogerable@realtek.com>" instead of
"<rogerable@realtek.com>". Please fix that in for future patches.

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c  |    1 +
>  include/linux/mmc/host.h |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index d03a080fb9cd..7dad1a1adf18 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
>  {
>         host->f_init = max(freqs[0], host->f_min);
>         host->rescan_disable = 0;
> +       host->ios.power_mode = MMC_POWER_UNDEFINED;
>         if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
>                 mmc_power_off(host);
>         else
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 7960424d0bc0..b3bfa609816a 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -42,6 +42,7 @@ struct mmc_ios {
>  #define MMC_POWER_OFF          0
>  #define MMC_POWER_UP           1
>  #define MMC_POWER_ON           2
> +#define MMC_POWER_UNDEFINED    3
>
>         unsigned char   bus_width;              /* data bus width */
>
> --
> 1.7.10.4
>

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

* Re: [PATCH 1/2] mmc: core: Add new power_mode MMC_POWER_UNDEFINED
@ 2014-09-24  9:23     ` Ulf Hansson
  0 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:23 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Greg Kroah-Hartman, driverdev-devel, linux-mmc, Chris Ball,
	linux-kernel, Wei WANG, Adrian Hunter

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Define new macro MMC_POWER_UNDEFINED for power_mode in struct mmc_ios.
> It will also be set as the initial value of host->ios.power_mode in
> mmc_start_host().
>
> For hosts with MMC_CAP2_NO_PRESCAN_POWERUP, this makes the later
> mmc_power_off() do real power-off things instead of NOP, and further
> prevents state messed up in cards that was already initialized(eg. by
> BIOS of UEFI driver).
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

I changes some minor parts of the commit message and set the author of
the patch to "Roger Tseng <rogerable@realtek.com>" instead of
"<rogerable@realtek.com>". Please fix that in for future patches.

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c  |    1 +
>  include/linux/mmc/host.h |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index d03a080fb9cd..7dad1a1adf18 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2489,6 +2489,7 @@ void mmc_start_host(struct mmc_host *host)
>  {
>         host->f_init = max(freqs[0], host->f_min);
>         host->rescan_disable = 0;
> +       host->ios.power_mode = MMC_POWER_UNDEFINED;
>         if (host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)
>                 mmc_power_off(host);
>         else
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 7960424d0bc0..b3bfa609816a 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -42,6 +42,7 @@ struct mmc_ios {
>  #define MMC_POWER_OFF          0
>  #define MMC_POWER_UP           1
>  #define MMC_POWER_ON           2
> +#define MMC_POWER_UNDEFINED    3
>
>         unsigned char   bus_width;              /* data bus width */
>
> --
> 1.7.10.4
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
  2014-09-24  9:07   ` Roger Tseng
  (?)
@ 2014-09-24  9:24     ` Ulf Hansson
  -1 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:24 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Chris Ball, Greg Kroah-Hartman, Adrian Hunter, linux-kernel,
	linux-mmc, driverdev-devel, Wei WANG, micky

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
> rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
> card reader hosts.
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
>  drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
> index dfde4a210238..d49460b5ff07 100644
> --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> @@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
>         mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
>         mmc->ops = &realtek_pci_sdmmc_ops;
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index 5d3766e792f0..a884631d7eea 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
>                 MMC_CAP_NEEDS_POLL;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
> --
> 1.7.10.4
>

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

* Re: [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
@ 2014-09-24  9:24     ` Ulf Hansson
  0 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:24 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Greg Kroah-Hartman, driverdev-devel, linux-mmc, Chris Ball,
	linux-kernel, Wei WANG, Adrian Hunter

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
> rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
> card reader hosts.
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
>  drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
> index dfde4a210238..d49460b5ff07 100644
> --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> @@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
>         mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
>         mmc->ops = &realtek_pci_sdmmc_ops;
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index 5d3766e792f0..a884631d7eea 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
>                 MMC_CAP_NEEDS_POLL;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
> --
> 1.7.10.4
>

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

* Re: [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros
@ 2014-09-24  9:24     ` Ulf Hansson
  0 siblings, 0 replies; 15+ messages in thread
From: Ulf Hansson @ 2014-09-24  9:24 UTC (permalink / raw)
  To: Roger Tseng
  Cc: Greg Kroah-Hartman, driverdev-devel, linux-mmc, Chris Ball,
	linux-kernel, Wei WANG, Adrian Hunter

On 24 September 2014 11:07, Roger Tseng <rogerable@realtek.com> wrote:
> Set MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE for
> rtsx_pci_sdmmc and rtsx_usb_sdmmc to reflect properties of Realtek
> card reader hosts.
>
> Signed-off-by: Roger Tseng <rogerable@realtek.com>

Thanks! Applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/rtsx_pci_sdmmc.c |    1 +
>  drivers/mmc/host/rtsx_usb_sdmmc.c |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
> index dfde4a210238..d49460b5ff07 100644
> --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> @@ -1292,6 +1292,7 @@ static void realtek_init_host(struct realtek_pci_sdmmc *host)
>         mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
>         mmc->ops = &realtek_pci_sdmmc_ops;
> diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
> index 5d3766e792f0..a884631d7eea 100644
> --- a/drivers/mmc/host/rtsx_usb_sdmmc.c
> +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
> @@ -1329,6 +1329,7 @@ static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
>                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
>                 MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
>                 MMC_CAP_NEEDS_POLL;
> +       mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE;
>
>         mmc->max_current_330 = 400;
>         mmc->max_current_180 = 800;
> --
> 1.7.10.4
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2014-09-24  9:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24  9:07 [PATCH 0/2] mmc: Add power_mode MMC_POWER_UNDEFINED Roger Tseng
2014-09-24  9:07 ` Roger Tseng
2014-09-24  9:07 ` Roger Tseng
2014-09-24  9:07 ` [PATCH 1/2] mmc: core: Add new " Roger Tseng
2014-09-24  9:07   ` Roger Tseng
2014-09-24  9:07   ` Roger Tseng
2014-09-24  9:23   ` Ulf Hansson
2014-09-24  9:23     ` Ulf Hansson
2014-09-24  9:23     ` Ulf Hansson
2014-09-24  9:07 ` [PATCH 2/2] mmc: rtsx_pci: Set power related cap2 macros Roger Tseng
2014-09-24  9:07   ` Roger Tseng
2014-09-24  9:07   ` Roger Tseng
2014-09-24  9:24   ` Ulf Hansson
2014-09-24  9:24     ` Ulf Hansson
2014-09-24  9:24     ` Ulf Hansson

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.