Re: [PATCH V9 0/2] HS200 Mode support for device and host

2012-01-08 Thread Chris Ball
Hi Girish,

On Thu, Jan 05 2012, Girish K S wrote:
> Girish K S (2):
>   mmc: core: HS200 mode support for eMMC 4.5
>   mmc: host: Adds support for eMMC 4.5 HS200 mode

Thanks, pushed to mmc-next with the following corrections to 2/2:

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4be50ea..64febf2 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1014,8 +1014,8 @@ static void sdhci_send_command(struct sdhci_host *host, 
struct mmc_command *cmd)
flags |= SDHCI_CMD_INDEX;
 
/* CMD19 is special in that the Data Present Select should be set */
-   if (cmd->data || (cmd->opcode == MMC_SEND_TUNING_BLOCK) ||
-   (cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200))
+   if (cmd->data || cmd->opcode == MMC_SEND_TUNING_BLOCK ||
+   cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200)
flags |= SDHCI_CMD_DATA;
 
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND);
@@ -1710,10 +1710,10 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, 
u32 opcode)
 * If the Host Controller supports the HS200 mode then tuning
 * function has to be executed.
 */
-   if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR104) ||
-   (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR50) &&
-   (host->flags & SDHCI_SDR50_NEEDS_TUNING)) ||
-   (host->flags & SDHCI_HS200_NEEDS_TUNING))
+   if ((ctrl & SDHCI_CTRL_UHS_MASK == SDHCI_CTRL_UHS_SDR104) ||
+   ((ctrl & SDHCI_CTRL_UHS_MASK == SDHCI_CTRL_UHS_SDR50) &&
+host->flags & SDHCI_SDR50_NEEDS_TUNING ||
+host->flags & SDHCI_HS200_NEEDS_TUNING))
ctrl |= SDHCI_CTRL_EXEC_TUNING;
else {
spin_unlock(&host->lock);
@@ -2163,8 +2163,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 
intmask)
/* CMD19 generates _only_ Buffer Read Ready interrupt */
if (intmask & SDHCI_INT_DATA_AVAIL) {
command = SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND));
-   if ((command == MMC_SEND_TUNING_BLOCK) ||
-   (command == MMC_SEND_TUNING_BLOCK_HS200)) {
+   if (command == MMC_SEND_TUNING_BLOCK) ||
+   command == MMC_SEND_TUNING_BLOCK_HS200) {
host->tuning_done = 1;
wake_up(&host->buf_ready_int);
return;
@@ -2765,11 +2765,11 @@ int sdhci_add_host(struct sdhci_host *host)
if (caps[1] & SDHCI_SUPPORT_DDR50)
mmc->caps |= MMC_CAP_UHS_DDR50;
 
-   /* Does the host needs tuning for SDR50? */
+   /* Does the host need tuning for SDR50? */
if (caps[1] & SDHCI_USE_SDR50_TUNING)
host->flags |= SDHCI_SDR50_NEEDS_TUNING;
 
-   /* Does the host needs tuning for HS200? */
+   /* Does the host need tuning for HS200? */
if (mmc->caps2 & MMC_CAP2_HS200)
host->flags |= SDHCI_HS200_NEEDS_TUNING;
 
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index 46fd2ac..ad265b9 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -158,7 +158,7 @@
 #define   SDHCI_CTRL_UHS_SDR50 0x0002
 #define   SDHCI_CTRL_UHS_SDR1040x0003
 #define   SDHCI_CTRL_UHS_DDR50 0x0004
-#define   SDHCI_CTRL_HS_SDR200 0x0005 /*reserved value in SDIO spec */
+#define   SDHCI_CTRL_HS_SDR200 0x0005 /* reserved value in SDIO spec */
 #define  SDHCI_CTRL_VDD_1800x0008
 #define  SDHCI_CTRL_DRV_TYPE_MASK  0x0030
 #define   SDHCI_CTRL_DRV_TYPE_B0x

-- 
Chris Ball  
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V9 0/2] HS200 Mode support for device and host

2012-01-07 Thread Girish K S
HI Chris,
Please have a look at this patch series and add it in your next branch
if everything seems to be Ok

regards
Girish K S

On 6 January 2012 09:56, Girish K S  wrote:
> changes in v9:
>        Updated the changes suggested by Chris for kernel coding comaptibility
> changes in v8:
>        Updated the changes suggested by Philip for bus mode test.
> changes in v7:
>        Updated with review comments for minor changes in host conditional
>        handling. added the handling for 4 bit bus width.
> Changes in v6:
>        split the patch into 2 and classified them as a patch for device
>        and host. Modified to include the review comments.
> Changes in v5:
>        Reduced the case statements for better code readability. Removed
>        unused macro definitions. Modified the tuning function prototype
>        and definition to support tuning for both SD and eMMC cards.
> Changes in v4:
>        Rebased onto chris-mmc/mmc-next branch. This patch is successfully
>        applied on commit with id de022ed3fdc14808299b2fa66dbb1ed5ab921912.
> Changes in v3:
>        In the previous commits of chris-mmc/mmc-next branch, the patch with
>        commit id (c0f22a2c92e357e7cb3988b0b13034d70b7461f9) defines caps2 for
>        more capabilities. This patch version deletes the member ext_caps
>        (created in my earlier patch) from struct mmc_host and reuses already
>        accepted caps2 member.
> Changes in v2:
>        Rebased to latest chris-mmc/mmc-next branch. Resolved indentation
>        problems identified in review. This patch has to be applied before
>        the patch released for modifying the printk messages.
> Changes in v1:
>        Case statements in switch that produce same result have been combined
>        to reduce repeated assignments. patch recreated after rebase to chris
>        Balls mmc-next branch.
>
> Girish K S (2):
>  mmc: core: HS200 mode support for eMMC 4.5
>  mmc: host: Adds support for eMMC 4.5 HS200 mode
>
>  drivers/mmc/core/bus.c     |    3 +-
>  drivers/mmc/core/debugfs.c |    3 +
>  drivers/mmc/core/mmc.c     |  162 
> +---
>  drivers/mmc/core/sd.c      |    3 +-
>  drivers/mmc/core/sdio.c    |    4 +-
>  drivers/mmc/host/sdhci.c   |   45 +---
>  drivers/mmc/host/sdhci.h   |    1 +
>  include/linux/mmc/card.h   |    3 +
>  include/linux/mmc/host.h   |   11 +++-
>  include/linux/mmc/mmc.h    |   66 ++-
>  include/linux/mmc/sdhci.h  |    1 +
>  11 files changed, 277 insertions(+), 25 deletions(-)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V9 0/2] HS200 Mode support for device and host

2012-01-05 Thread Girish K S
changes in v9:
Updated the changes suggested by Chris for kernel coding comaptibility 
changes in v8:
Updated the changes suggested by Philip for bus mode test. 
changes in v7:
Updated with review comments for minor changes in host conditional
handling. added the handling for 4 bit bus width. 
Changes in v6:
split the patch into 2 and classified them as a patch for device
and host. Modified to include the review comments.
Changes in v5:
Reduced the case statements for better code readability. Removed
unused macro definitions. Modified the tuning function prototype
and definition to support tuning for both SD and eMMC cards.
Changes in v4:
Rebased onto chris-mmc/mmc-next branch. This patch is successfully
applied on commit with id de022ed3fdc14808299b2fa66dbb1ed5ab921912.
Changes in v3:
In the previous commits of chris-mmc/mmc-next branch, the patch with
commit id (c0f22a2c92e357e7cb3988b0b13034d70b7461f9) defines caps2 for
more capabilities. This patch version deletes the member ext_caps
(created in my earlier patch) from struct mmc_host and reuses already
accepted caps2 member.
Changes in v2:
Rebased to latest chris-mmc/mmc-next branch. Resolved indentation
problems identified in review. This patch has to be applied before
the patch released for modifying the printk messages.
Changes in v1:
Case statements in switch that produce same result have been combined
to reduce repeated assignments. patch recreated after rebase to chris
Balls mmc-next branch.

Girish K S (2):
  mmc: core: HS200 mode support for eMMC 4.5
  mmc: host: Adds support for eMMC 4.5 HS200 mode

 drivers/mmc/core/bus.c |3 +-
 drivers/mmc/core/debugfs.c |3 +
 drivers/mmc/core/mmc.c |  162 +---
 drivers/mmc/core/sd.c  |3 +-
 drivers/mmc/core/sdio.c|4 +-
 drivers/mmc/host/sdhci.c   |   45 +---
 drivers/mmc/host/sdhci.h   |1 +
 include/linux/mmc/card.h   |3 +
 include/linux/mmc/host.h   |   11 +++-
 include/linux/mmc/mmc.h|   66 ++-
 include/linux/mmc/sdhci.h  |1 +
 11 files changed, 277 insertions(+), 25 deletions(-)

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