Skip to contentSkip to conversation

mmc: dw_mmc: add specified capabilities2 of the controller

PATCH In review Jaehoon Chung 2 participants 3 messages Aug 1, 2013 – Aug 12, 2013

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 1/1 mmc: dw_mmc: add specified capabilities2 of the controller

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

---
 drivers/mmc/host/dw_mmc.c |    3 +++
 drivers/mmc/host/dw_mmc.h |    2 ++
 2 files changed, 5 insertions(+)
drivers/mmc/host/dw_mmc.c +3 -0
index ee5f167..17fe90c 100644
@@ -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)
drivers/mmc/host/dw_mmc.h +2 -0
index 81b2994..1f0a9ad 100644
@@ -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);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 14 lines · Jaehoon Chung

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

---
 drivers/mmc/host/dw_mmc.c |    3 +++
 drivers/mmc/host/dw_mmc.h |    2 ++
 2 files changed, 5 insertions(+)
drivers/mmc/host/dw_mmc.c +0 -0
index ee5f167..17fe90c 100644

drivers/mmc/host/dw_mmc.c static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) · line 1955

Quoted 5 lines
drivers/mmc/host/dw_mmc.c +2 -0
@@ -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

Quoted 30 lines
drivers/mmc/host/dw_mmc.c +1 -0
+
 	if (host->pdata->get_bus_wd)
 		bus_width = host->pdata->get_bus_wd(slot->id);
 	else if (host->dev->of_node)
drivers/mmc/host/dw_mmc.h +2 -1
index 81b2994..1f0a9ad 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#2 lore raw
Quoted 18 lines · Seungwon Jeon
Quoted 17 lines · Jaehoon Chung

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

---
 drivers/mmc/host/dw_mmc.c |    3 +++
 drivers/mmc/host/dw_mmc.h |    2 ++
 2 files changed, 5 insertions(+)
drivers/mmc/host/dw_mmc.c +0 -0
index ee5f167..17fe90c 100644
@@ -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;
 
Quoted 3 lines

drivers/mmc/host/dw_mmc.c static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) · line 1955

Quoted 2 lines
drivers/mmc/host/dw_mmc.c +2 -0
+	if (drv_data && drv_data->caps2)
+		mmc->caps2 |= drv_data->caps[ctrl_id];

drv_data->caps2?

Sorry, Will fix..

Best Regards,
Jaehoon Chung

Quoted 40 lines

Thanks,
Seungwon Jeon

Quoted 25 lines
drivers/mmc/host/dw_mmc.c +1 -0
+
 	if (host->pdata->get_bus_wd)
 		bus_width = host->pdata->get_bus_wd(slot->id);
 	else if (host->dev->of_node)
drivers/mmc/host/dw_mmc.h +2 -1
index 81b2994..1f0a9ad 100644
@@ -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);
--
Quoted 5 lines

1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html