Skip to contentSkip to conversation

dw_mmc-pci: get resources from a proper BAR

PATCH In review Andy Shevchenko 4 participants 7 messages Aug 8, 2013 – Aug 25, 2013

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

PATCH 1/2 dw_mmc-pci: get resources from a proper BAR

There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead. This patch fixes the typo.

---
 drivers/mmc/host/dw_mmc-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc-pci.c +1 -1
index b456b0c..7d148d6 100644
@@ -59,7 +59,7 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		return ret;
 
-	host->regs = pcim_iomap_table(pdev)[0];
+	host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO];
 
 	ret = dw_mci_probe(host);
 	if (ret)
Signature · 1 line
1.8.4.rc1
#1 lore raw

PATCH 2/2 dw_mmc-pci: enable bus-mastering mode

This patch enables bus-mastering mode for MMC controller to allow IDMAC transfers.

---
 drivers/mmc/host/dw_mmc-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc-pci.c +2 -0
index 7d148d6..f70546a 100644
@@ -61,6 +61,8 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
 
 	host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO];
 
+	pci_set_master(pdev);
+
 	ret = dw_mci_probe(host);
 	if (ret)
 		return ret;
Signature · 1 line
1.8.4.rc1
Tested-by on v1 2/2
#2 lore raw

RE: [PATCH 2/2] dw_mmc-pci: enable bus-mastering mode

Regards,
Prabu Thangamuthu.

Quoted 23 lines · Andy Shevchenko

This patch enables bus-mastering mode for MMC controller to allow IDMAC transfers.

---
 drivers/mmc/host/dw_mmc-pci.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc- renamed from drivers/mmc/host/dw_mmc-pci.c +0 -0

pci.c index 7d148d6..f70546a 100644

drivers/mmc/host/dw_mmc-pci.c +2 -1
@@ -61,6 +61,8 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
 
 	host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO];
 
+	pci_set_master(pdev);
+
 	ret = dw_mci_probe(host);
 	if (ret)
 		return ret;
--

1.8.4.rc1

Tested-by on v1 1/2
#4 lore raw
In reply to Andy Shevchenko

Regards,
Prabu Thangamuthu.

Quoted 24 lines · Andy Shevchenko

There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead.
This patch fixes the typo.

---
 drivers/mmc/host/dw_mmc-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc- renamed from drivers/mmc/host/dw_mmc-pci.c +0 -0

pci.c index b456b0c..7d148d6 100644

drivers/mmc/host/dw_mmc-pci.c +1 -2
@@ -59,7 +59,7 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		return ret;
 
-	host->regs = pcim_iomap_table(pdev)[0];
+	host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO];
 
 	ret = dw_mci_probe(host);
 	if (ret)
--

1.8.4.rc1

#6 lore raw
In reply to Andy Shevchenko

Hi Andy,

Quoted 13 lines · Andy Shevchenko

There is a typo when the mapped space is from BAR 2, but BAR 0 is used instead. This patch fixes the typo.

---
 drivers/mmc/host/dw_mmc-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc-pci.c +0 -0
index b456b0c..7d148d6 100644

drivers/mmc/host/dw_mmc-pci.c static int dw_mci_pci_probe(struct pci_dev *pdev, · line 65

Quoted 8 lines
drivers/mmc/host/dw_mmc-pci.c +1 -1
@@ -59,7 +59,7 @@ static int dw_mci_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		return ret;
 
-	host->regs = pcim_iomap_table(pdev)[0];
+	host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO];
 
 	ret = dw_mci_probe(host);
 	if (ret)

Thanks, pushed to mmc-next for 3.12.

- Chris.

Signature · 1 line
Chris Ball   <[email protected]>   <http://printf.net/>