Skip to contentSkip to conversation

omap mmc build errors

DISCUSSION Komal Shah 6 participants 9 messages Apr 10, 2006 – May 3, 2006 MMC, SD and SDIO

lore
Share & tools
lore

Komal Shah

author
#0 lore raw

Well, latest OMAP MMC driver even doesn't build for H4.

drivers/mmc/omap.c: In function `mmc_omap_xfer_data':
drivers/mmc/omap.c:343: warning: unused variable reg' drivers/mmc/omap.c:344: warning: unused variable p' drivers/mmc/omap.c:1227:30: unterminated argument list invoking macro "dev_err"
drivers/mmc/omap.c: In function `mmc_omap_dma_cb':
drivers/mmc/omap.c:661: error: `dev_err' undeclared (first use in this function)
drivers/mmc/omap.c:661: error: (Each undeclared identifier is reported only once
drivers/mmc/omap.c:661: error: for each function it appears in.) drivers/mmc/omap.c:661: error: syntax error at end of input drivers/mmc/omap.c:658: warning: unused variable `mmcdat' drivers/mmc/omap.c:111: warning: 'dev_attr_cover_switch' defined but not used
drivers/mmc/omap.c:140: warning: 'dev_attr_enable_poll' defined but not used
drivers/mmc/omap.c:265: warning: 'mmc_omap_dma_timer' defined but not used
drivers/mmc/omap.c:275: warning: 'mmc_omap_dma_done' defined but not used
drivers/mmc/omap.c:383: warning: 'mmc_omap_irq' defined but not used drivers/mmc/omap.c:520: warning: 'mmc_omap_switch_irq' defined but not used
drivers/mmc/omap.c:529: warning: 'mmc_omap_switch_timer' defined but not used
drivers/mmc/omap.c:538: warning: 'mmc_omap_switch_callback' defined but not used
drivers/mmc/omap.c:542: warning: 'mmc_omap_switch_handler' defined but not used
drivers/mmc/omap.c:576: warning: 'mmc_omap_prepare_dma' defined but not used
drivers/mmc/omap.c:656: warning: 'mmc_omap_dma_cb' defined but not used make[2]: *** [drivers/mmc/omap.o] Error 1
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2

Even platform_get_irq is incorrect no. of arguments :).

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 44 lines · ext Komal Shah

Well, latest OMAP MMC driver even doesn't build for H4.

drivers/mmc/omap.c: In function `mmc_omap_xfer_data':
drivers/mmc/omap.c:343: warning: unused variable reg' drivers/mmc/omap.c:344: warning: unused variable p' drivers/mmc/omap.c:1227:30: unterminated argument list invoking macro "dev_err"
drivers/mmc/omap.c: In function `mmc_omap_dma_cb':
drivers/mmc/omap.c:661: error: `dev_err' undeclared (first use in this function)
drivers/mmc/omap.c:661: error: (Each undeclared identifier is reported only once
drivers/mmc/omap.c:661: error: for each function it appears in.) drivers/mmc/omap.c:661: error: syntax error at end of input drivers/mmc/omap.c:658: warning: unused variable `mmcdat' drivers/mmc/omap.c:111: warning: 'dev_attr_cover_switch' defined but not used
drivers/mmc/omap.c:140: warning: 'dev_attr_enable_poll' defined but not used
drivers/mmc/omap.c:265: warning: 'mmc_omap_dma_timer' defined but not used
drivers/mmc/omap.c:275: warning: 'mmc_omap_dma_done' defined but not used
drivers/mmc/omap.c:383: warning: 'mmc_omap_irq' defined but not used drivers/mmc/omap.c:520: warning: 'mmc_omap_switch_irq' defined but not used
drivers/mmc/omap.c:529: warning: 'mmc_omap_switch_timer' defined but not used
drivers/mmc/omap.c:538: warning: 'mmc_omap_switch_callback' defined but not used
drivers/mmc/omap.c:542: warning: 'mmc_omap_switch_handler' defined but not used
drivers/mmc/omap.c:576: warning: 'mmc_omap_prepare_dma' defined but not used
drivers/mmc/omap.c:656: warning: 'mmc_omap_dma_cb' defined but not used make[2]: *** [drivers/mmc/omap.o] Error 1
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2

Even platform_get_irq is incorrect no. of arguments :).

---Komal Shah
http://komalshah.blogspot.com/

Quoted 9 lines

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

Hi Komal and folks,

You have to apply a patch that Tony sent to the list 7 days ago. This patch corrects the bugs mentioned above. Attached to this mail follow the patch.

Try this please.

BR,

Carlos.

Signature · 7 lines
Carlos Eduardo
Software Engineer
Nokia Institute of Technology - INdT
Embedded Linux Laboratory - 10LE
Phone: +55 92 2126-1079
Mobile: +55 92 8127-1797
E-mail: [email protected]
drivers/mmc/omap.c +14 -11
index becb3c6..197fa3b 100644
@@ -61,6 +63,7 @@ struct mmc_omap_host {
 	unsigned char		id; /* 16xx chips have 2 MMC blocks */
 	struct clk *		iclk;
 	struct clk *		fclk;
+	struct resource		*res;
 	void __iomem		*base;
 	int			irq;
 	unsigned char		bus_mode;
@@ -973,20 +976,20 @@ static int __init mmc_omap_probe(struct 
 	struct omap_mmc_conf *minfo = pdev->dev.platform_data;
 	struct mmc_host *mmc;
 	struct mmc_omap_host *host = NULL;
+	struct resource *r;
 	int ret = 0;
+	int irq;
 	
-	if (platform_get_resource(pdev, IORESOURCE_MEM, 0) ||
-			platform_get_irq(pdev, IORESOURCE_IRQ, 0)) {
-		dev_err(&pdev->dev, "mmc_omap_probe: invalid resource type\n");
-		return -ENODEV;
-	}
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	irq = platform_get_irq(pdev, 0);
+	if (!r || irq < 0)
+		return -ENXIO;
 
-	if (!request_mem_region(pdev->resource[0].start,
+	r = request_mem_region(pdev->resource[0].start,
 				pdev->resource[0].end - pdev->resource[0].start + 1,
-				pdev->name)) {
-		dev_dbg(&pdev->dev, "request_mem_region failed\n");
+			       pdev->name);
+	if (!r)
 		return -EBUSY;
-	}
 
 	mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev);
 	if (!mmc) {
@@ -1003,6 +1006,8 @@ static int __init mmc_omap_probe(struct 
 	host->dma_timer.data = (unsigned long) host;
 
 	host->id = pdev->id;
+	host->res = r;
+	host->irq = irq;
 
 	if (cpu_is_omap24xx()) {
 		host->iclk = clk_get(&pdev->dev, "mmc_ick");
@@ -1032,7 +1037,7 @@ static int __init mmc_omap_probe(struct 
 	host->dma_ch = -1;
 
 	host->irq = pdev->resource[1].start;
-	host->base = ioremap(pdev->res.start, SZ_4K);
+	host->base = ioremap(r->start, SZ_4K);
 	if (!host->base) {
 		ret = -ENOMEM;
 		goto out;
@@ -1100,7 +1105,7 @@ static int __init mmc_omap_probe(struct 
 				device_remove_file(&pdev->dev, &dev_attr_cover_switch);
 		}
 		if (ret) {
-			dev_wan(mmc_dev(host->mmc), "Unable to create sysfs attributes\n");
+			dev_warn(mmc_dev(host->mmc), "Unable to create sysfs attributes\n");
 			free_irq(OMAP_GPIO_IRQ(host->switch_pin), host);
 			omap_free_gpio(host->switch_pin);
 			host->switch_pin = -1;
author
#2 lore raw
Quoted 6 lines · --- Carlos Aguiar

Hi Komal and folks,

You have to apply a patch that Tony sent to the list 7 days ago. This

patch corrects the bugs mentioned above. Attached to this mail follow

You still need the attached patch on top of the Tony's patch to build it successfully.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Quoted 1 line

From nobody Mon Sep 17 00:00:00 2001

From: Komal Shah <[email protected]>
Date: Thu Apr 13 16:57:34 2006 +0300
Subject: [PATCH] Fix OMAP MMC build.

---

 drivers/mmc/omap.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

43101f1398ea8610afc366c297ba18b3441bd7a0

drivers/mmc/omap.c +4 -6
index 63e4a7b..1ef94fb 100644
@@ -341,8 +341,6 @@
 mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
 {
 	int n;
-	void __iomem *reg;
-	u16 *p;
 
 	if (host->buffer_bytes_left == 0) {
 		host->sg_idx++;
@@ -659,8 +657,8 @@
 	struct mmc_data *mmcdat = host->data;
 
 	if (unlikely(host->dma_ch < 0)) {
-		dev_err(mmc_dev(host->mmc), "DMA callback while DMA not
-				enabled\n");
+		dev_err(mmc_dev(host->mmc), "DMA callback while DMA not"
+				"enabled\n");
 		return;
 	}
 	/* FIXME: We really should do something to _handle_ the errors */
@@ -1060,8 +1058,8 @@
 
 	if (host->power_pin >= 0) {
 		if ((ret = omap_request_gpio(host->power_pin)) != 0) {
-			dev_err(mmc_dev(host->mmc), "Unable to get GPIO
-					pin for MMC power\n");
+			dev_err(mmc_dev(host->mmc), "Unable to get GPIO"
+					"pin for MMC power\n");
 			goto out;
 		}
 		omap_set_gpio_direction(host->power_pin, 0);
Signature · 1 line
1.3-rc1.GIT
#3 lore raw
Quoted 11 lines · Komal Shah
Quoted 6 lines · --- Carlos Aguiar

Hi Komal and folks,

You have to apply a patch that Tony sent to the list 7 days ago. This

patch corrects the bugs mentioned above. Attached to this mail follow

You still need the attached patch on top of the Tony's patch to build it successfully.

I've just pushed that patch + fixed trying to ioremap a virtual address. Seems to work now, can you test?

Tony

#4 lore raw
Quoted 5 lines

I've just pushed that patch + fixed trying to ioremap a virtual address. Seems to work now, can you test?

I just made omap1510 innovator build and now the mmc build errors I had earlier today disappeared. So build seems at least to work.

Mika

#5 lore raw
In reply to Tony Lindgren
Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Komal Shah
Quoted 4 lines · --- Carlos Aguiar

Hi Komal and folks,

You have to apply a patch that Tony sent to the list 7 days ago. This

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

patch corrects the bugs mentioned above. Attached to this mail follow

You still need the attached patch on top of the Tony's patch to build it successfully.

I've just pushed that patch + fixed trying to ioremap a virtual address. Seems to work now, can you test?

Haven't had time to dig, but this builds but doesn't boot on 1710/H3. Simply disabling CONFIG_MMC_OMAP makes it boot.

Kevin

#6 lore raw

CONFIG_MMC_OMAP also allowed the git kernel to boot on OMAP 2420 H4, Thanks.
----- Original Message -----
From: Kevin Hilman
To: Tony Lindgren
Cc: [email protected]
Sent: Tuesday, May 02, 2006 4:24 PM
Subject: Re: omap mmc build errors

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Komal Shah
Quoted 4 lines · --- Carlos Aguiar

Hi Komal and folks,

You have to apply a patch that Tony sent to the list 7 days ago. This

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

patch corrects the bugs mentioned above. Attached to this mail follow

You still need the attached patch on top of the Tony's patch to build it successfully.

I've just pushed that patch + fixed trying to ioremap a virtual address. Seems to work now, can you test?

Haven't had time to dig, but this builds but doesn't boot on 1710/H3. Simply disabling CONFIG_MMC_OMAP makes it boot.

Kevin
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/328 - Release Date: 5/1/2006

#7 lore raw
Quoted 6 lines · Rick Foos

CONFIG_MMC_OMAP also allowed the git kernel to boot on OMAP 2420 H4, Thanks.
----- Original Message -----
From: Kevin Hilman

Haven't had time to dig, but this builds but doesn't boot on 1710/H3. Simply disabling CONFIG_MMC_OMAP makes it boot.

Hmmm, seems like only 15xx works now. The driver hangs for 16xx in the while loop in mmc_omap_set_ios(). Also I noticed that all the menelaus code is missing so it won't work on 24xx.

Tony

#8 lore raw
Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Rick Foos

CONFIG_MMC_OMAP also allowed the git kernel to boot on OMAP 2420 H4, Thanks.
----- Original Message -----
From: Kevin Hilman

Haven't had time to dig, but this builds but doesn't boot on 1710/H3. Simply disabling CONFIG_MMC_OMAP makes it boot.

Hmmm, seems like only 15xx works now. The driver hangs for 16xx in the while loop in mmc_omap_set_ios(). Also I noticed that all the menelaus code is missing so it won't work on 24xx.

OK, I've pushed a patch that makes MMC work. 24xx is still probably broken because of missing menelaus code.

Regards,

Tony