public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: add specified capabilities2 of the controller
@ 2013-08-01 15:12 Jaehoon Chung
  2013-08-09 13:31 ` Seungwon Jeon
  0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2013-08-01 15:12 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org
  Cc: 'Chris Ball', Seungwon Jeon, James Hogan

Add the capabilities2 of controller to use MMC_CAP2_*
In future, we can use the capability like packed command with caps2.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/host/dw_mmc.c |    3 +++
 drivers/mmc/host/dw_mmc.h |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index ee5f167..17fe90c 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1951,6 +1951,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	if (host->pdata->caps2)
 		mmc->caps2 = host->pdata->caps2;
 
+	if (drv_data && drv_data->caps2)
+		mmc->caps2 |= drv_data->caps[ctrl_id];
+
 	if (host->pdata->get_bus_wd)
 		bus_width = host->pdata->get_bus_wd(slot->id);
 	else if (host->dev->of_node)
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 81b2994..1f0a9ad 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -186,6 +186,7 @@ extern int dw_mci_resume(struct dw_mci *host);
 /**
  * dw_mci driver data - dw-mshc implementation specific driver data.
  * @caps: mmc subsystem specified capabilities of the controller(s).
+ * @caps2: mmc subsystem specified capabilities2 of the controller(s).
  * @init: early implementation specific initialization.
  * @setup_clock: implementation specific clock configuration.
  * @prepare_command: handle CMD register extensions.
@@ -198,6 +199,7 @@ extern int dw_mci_resume(struct dw_mci *host);
  */
 struct dw_mci_drv_data {
 	unsigned long	*caps;
+	unsigned long	*caps2;
 	int		(*init)(struct dw_mci *host);
 	int		(*setup_clock)(struct dw_mci *host);
 	void		(*prepare_command)(struct dw_mci *host, u32 *cmdr);
-- 
1.7.9.5

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

* RE: [PATCH] mmc: dw_mmc: add specified capabilities2 of the controller
  2013-08-01 15:12 [PATCH] mmc: dw_mmc: add specified capabilities2 of the controller Jaehoon Chung
@ 2013-08-09 13:31 ` Seungwon Jeon
  2013-08-12  1:28   ` Jaehoon Chung
  0 siblings, 1 reply; 3+ messages in thread
From: Seungwon Jeon @ 2013-08-09 13:31 UTC (permalink / raw)
  To: 'Jaehoon Chung', linux-mmc
  Cc: 'Chris Ball', 'James Hogan'

On Fri, August 02, 2013, Jaehoon Chung wrote:
> Add the capabilities2 of controller to use MMC_CAP2_*
> In future, we can use the capability like packed command with caps2.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc.c |    3 +++
>  drivers/mmc/host/dw_mmc.h |    2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index ee5f167..17fe90c 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1951,6 +1951,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  	if (host->pdata->caps2)
>  		mmc->caps2 = host->pdata->caps2;
> 
> +	if (drv_data && drv_data->caps2)
> +		mmc->caps2 |= drv_data->caps[ctrl_id];
drv_data->caps2?

Thanks,
Seungwon Jeon

> +
>  	if (host->pdata->get_bus_wd)
>  		bus_width = host->pdata->get_bus_wd(slot->id);
>  	else if (host->dev->of_node)
> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
> index 81b2994..1f0a9ad 100644
> --- a/drivers/mmc/host/dw_mmc.h
> +++ b/drivers/mmc/host/dw_mmc.h
> @@ -186,6 +186,7 @@ extern int dw_mci_resume(struct dw_mci *host);
>  /**
>   * dw_mci driver data - dw-mshc implementation specific driver data.
>   * @caps: mmc subsystem specified capabilities of the controller(s).
> + * @caps2: mmc subsystem specified capabilities2 of the controller(s).
>   * @init: early implementation specific initialization.
>   * @setup_clock: implementation specific clock configuration.
>   * @prepare_command: handle CMD register extensions.
> @@ -198,6 +199,7 @@ extern int dw_mci_resume(struct dw_mci *host);
>   */
>  struct dw_mci_drv_data {
>  	unsigned long	*caps;
> +	unsigned long	*caps2;
>  	int		(*init)(struct dw_mci *host);
>  	int		(*setup_clock)(struct dw_mci *host);
>  	void		(*prepare_command)(struct dw_mci *host, u32 *cmdr);
> --
> 1.7.9.5
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH] mmc: dw_mmc: add specified capabilities2 of the controller
  2013-08-09 13:31 ` Seungwon Jeon
@ 2013-08-12  1:28   ` Jaehoon Chung
  0 siblings, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2013-08-12  1:28 UTC (permalink / raw)
  To: Seungwon Jeon
  Cc: 'Jaehoon Chung', linux-mmc, 'Chris Ball',
	'James Hogan'

On 08/09/2013 10:31 PM, Seungwon Jeon wrote:
> On Fri, August 02, 2013, Jaehoon Chung wrote:
>> Add the capabilities2 of controller to use MMC_CAP2_*
>> In future, we can use the capability like packed command with caps2.
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>>  drivers/mmc/host/dw_mmc.c |    3 +++
>>  drivers/mmc/host/dw_mmc.h |    2 ++
>>  2 files changed, 5 insertions(+)
>>
>> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
>> index ee5f167..17fe90c 100644
>> --- a/drivers/mmc/host/dw_mmc.c
>> +++ b/drivers/mmc/host/dw_mmc.c
>> @@ -1951,6 +1951,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>  	if (host->pdata->caps2)
>>  		mmc->caps2 = host->pdata->caps2;
>>
>> +	if (drv_data && drv_data->caps2)
>> +		mmc->caps2 |= drv_data->caps[ctrl_id];
> drv_data->caps2?
Sorry, Will fix..

Best Regards,
Jaehoon Chung
> 
> Thanks,
> Seungwon Jeon
> 
>> +
>>  	if (host->pdata->get_bus_wd)
>>  		bus_width = host->pdata->get_bus_wd(slot->id);
>>  	else if (host->dev->of_node)
>> diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
>> index 81b2994..1f0a9ad 100644
>> --- a/drivers/mmc/host/dw_mmc.h
>> +++ b/drivers/mmc/host/dw_mmc.h
>> @@ -186,6 +186,7 @@ extern int dw_mci_resume(struct dw_mci *host);
>>  /**
>>   * dw_mci driver data - dw-mshc implementation specific driver data.
>>   * @caps: mmc subsystem specified capabilities of the controller(s).
>> + * @caps2: mmc subsystem specified capabilities2 of the controller(s).
>>   * @init: early implementation specific initialization.
>>   * @setup_clock: implementation specific clock configuration.
>>   * @prepare_command: handle CMD register extensions.
>> @@ -198,6 +199,7 @@ extern int dw_mci_resume(struct dw_mci *host);
>>   */
>>  struct dw_mci_drv_data {
>>  	unsigned long	*caps;
>> +	unsigned long	*caps2;
>>  	int		(*init)(struct dw_mci *host);
>>  	int		(*setup_clock)(struct dw_mci *host);
>>  	void		(*prepare_command)(struct dw_mci *host, u32 *cmdr);
>> --
>> 1.7.9.5
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

end of thread, other threads:[~2013-08-12  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 15:12 [PATCH] mmc: dw_mmc: add specified capabilities2 of the controller Jaehoon Chung
2013-08-09 13:31 ` Seungwon Jeon
2013-08-12  1:28   ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox