Skip to contentSkip to conversation

mtd: mxc_nand: fix built breakage

PATCH In review Daniel Mack 4 participants 7 messages May 13, 2009 – May 14, 2009

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

PATCH 1/1 mtd: mxc_nand: fix built breakage

The MXC NAND driver does not currently build with CONFIG_PM set.

drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_suspend':
drivers/mtd/nand/mxc_nand.c:1021: error: 'nfc_clk' undeclared (first use in this function) drivers/mtd/nand/mxc_nand.c:1021: error: (Each undeclared identifier is reported only once drivers/mtd/nand/mxc_nand.c:1021: error: for each function it appears in.) drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume':
drivers/mtd/nand/mxc_nand.c:1033: error: 'nfc_clk' undeclared (first use in this function) make[3]: *** [drivers/mtd/nand/mxc_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Cc Sascha Hauer <[email protected]>
Cc Linux MTD list <[email protected]>
---
 drivers/mtd/nand/mxc_nand.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxc_nand.c +6 -2
index 21fd4f1..d352d2a 100644
@@ -1011,6 +1011,8 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
@@ -1018,7 +1020,7 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 		ret = info->suspend(info);
 
 	/* Disable the NFC clock */
-	clk_disable(nfc_clk);	/* FIXME */
+	clk_disable(host->clk);	/* FIXME */
 
 	return ret;
 }
@@ -1026,11 +1028,13 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 	/* Enable the NFC clock */
-	clk_enable(nfc_clk);	/* FIXME */
+	clk_enable(host->clk);	/* FIXME */
 
 	if (info)
 		info->resume(info);
Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 1/1 mtd: mxc_nand: fix built breakage

The MXC NAND driver does not currently build with CONFIG_PM set.

drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_suspend':
drivers/mtd/nand/mxc_nand.c:1021: error: 'nfc_clk' undeclared (first use in this function) drivers/mtd/nand/mxc_nand.c:1021: error: (Each undeclared identifier is reported only once drivers/mtd/nand/mxc_nand.c:1021: error: for each function it appears in.) drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume':
drivers/mtd/nand/mxc_nand.c:1033: error: 'nfc_clk' undeclared (first use in this function) make[3]: *** [drivers/mtd/nand/mxc_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Cc Sascha Hauer <[email protected]>
Cc Linux MTD list <[email protected]>

---
New version with indentation fixes. Sorry.

 drivers/mtd/nand/mxc_nand.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxc_nand.c +6 -2
index 21fd4f1..9208f8c 100644
@@ -1011,6 +1011,8 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+	struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
@@ -1018,7 +1020,7 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 		ret = info->suspend(info);
 
 	/* Disable the NFC clock */
-	clk_disable(nfc_clk);	/* FIXME */
+	clk_disable(host->clk);	/* FIXME */
 
 	return ret;
 }
@@ -1026,11 +1028,13 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+	struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 	/* Enable the NFC clock */
-	clk_enable(nfc_clk);	/* FIXME */
+	clk_enable(host->clk);	/* FIXME */
 
 	if (info)
 		info->resume(info);
Signature · 1 line
1.6.2.1
#2 lore raw
In reply to Daniel Mack

Hello Daniel,

Please find the patch that I've sent some time ago. This patch should fix the issue you described.
http://lists.infradead.org/pipermail/linux-mtd/2009-April/025363.html

Vladimir

Quoted 59 lines · Daniel Mack

The MXC NAND driver does not currently build with CONFIG_PM set.

drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_suspend':
drivers/mtd/nand/mxc_nand.c:1021: error: 'nfc_clk' undeclared (first use in this function) drivers/mtd/nand/mxc_nand.c:1021: error: (Each undeclared identifier is reported only once drivers/mtd/nand/mxc_nand.c:1021: error: for each function it appears in.) drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume':
drivers/mtd/nand/mxc_nand.c:1033: error: 'nfc_clk' undeclared (first use in this function) make[3]: *** [drivers/mtd/nand/mxc_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Cc Sascha Hauer <[email protected]>
Cc Linux MTD list <[email protected]>
---
 drivers/mtd/nand/mxc_nand.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxc_nand.c +2 -0
index 21fd4f1..d352d2a 100644
@@ -1011,6 +1011,8 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
 
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
drivers/mtd/nand/mxc_nand.c +4 -2
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
@@ -1018,7 +1020,7 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 		ret = info->suspend(info);
 
 	/* Disable the NFC clock */
-	clk_disable(nfc_clk);	/* FIXME */
+	clk_disable(host->clk);	/* FIXME */
 
 	return ret;
 }
@@ -1026,11 +1028,13 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
 
 	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 	/* Enable the NFC clock */
-	clk_enable(nfc_clk);	/* FIXME */
+	clk_enable(host->clk);	/* FIXME */
 
 	if (info)
 		info->resume(info);
#3 lore raw
Quoted 3 lines · Vladimir Barinov

Please find the patch that I've sent some time ago. This patch should fix the issue you described.
http://lists.infradead.org/pipermail/linux-mtd/2009-April/025363.html

Ah, ok, thanks.

Did anyone pick it up for mainline already? Sascha, I didn't see that one in your tree either.

Daniel

Quoted 55 lines
Quoted 53 lines · Daniel Mack

The MXC NAND driver does not currently build with CONFIG_PM set.

drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_suspend':
drivers/mtd/nand/mxc_nand.c:1021: error: 'nfc_clk' undeclared (first use in this function) drivers/mtd/nand/mxc_nand.c:1021: error: (Each undeclared identifier is reported only once drivers/mtd/nand/mxc_nand.c:1021: error: for each function it appears in.) drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume':
drivers/mtd/nand/mxc_nand.c:1033: error: 'nfc_clk' undeclared (first use in this function) make[3]: *** [drivers/mtd/nand/mxc_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Cc Sascha Hauer <[email protected]>
Cc Linux MTD list <[email protected]>
---
 drivers/mtd/nand/mxc_nand.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxc_nand.c +5 -2
index 21fd4f1..d352d2a 100644
@@ -1011,6 +1011,8 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
  +	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
  	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
@@ -1018,7 +1020,7 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 		ret = info->suspend(info);
  	/* Disable the NFC clock */
-	clk_disable(nfc_clk);	/* FIXME */
+	clk_disable(host->clk);	/* FIXME */
  	return ret;
 }
@@ -1026,11 +1028,13 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
  	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 	/* Enable the NFC clock */
-	clk_enable(nfc_clk);	/* FIXME */
+	clk_enable(host->clk);	/* FIXME */
  	if (info)
 		info->resume(info);
 
maintainer
#4 lore raw
Quoted 10 lines · Daniel Mack
Quoted 3 lines · Vladimir Barinov

Please find the patch that I've sent some time ago. This patch should fix the issue you described.
http://lists.infradead.org/pipermail/linux-mtd/2009-April/025363.html

Ah, ok, thanks.

Did anyone pick it up for mainline already? Sascha, I didn't see that one in your tree either.

It seems to be pure luck when the patches on the mtd list get picked up. Most of the time I do not even a reaction from the list or David. I wonder if someone will beat me up when I take the i.MX nand patches via my arm tree.

Sascha

Quoted 60 lines

Daniel

Quoted 55 lines
Quoted 53 lines · Daniel Mack

The MXC NAND driver does not currently build with CONFIG_PM set.

drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_suspend':
drivers/mtd/nand/mxc_nand.c:1021: error: 'nfc_clk' undeclared (first use in this function) drivers/mtd/nand/mxc_nand.c:1021: error: (Each undeclared identifier is reported only once drivers/mtd/nand/mxc_nand.c:1021: error: for each function it appears in.) drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_resume':
drivers/mtd/nand/mxc_nand.c:1033: error: 'nfc_clk' undeclared (first use in this function) make[3]: *** [drivers/mtd/nand/mxc_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

Cc Sascha Hauer <[email protected]>
Cc Linux MTD list <[email protected]>
---
 drivers/mtd/nand/mxc_nand.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
drivers/mtd/nand/mxc_nand.c +5 -2
index 21fd4f1..d352d2a 100644
@@ -1011,6 +1011,8 @@ static int __devexit mxcnd_remove(struct platform_device *pdev)
 static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
  +	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
  	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND suspend\n");
@@ -1018,7 +1020,7 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 		ret = info->suspend(info);
  	/* Disable the NFC clock */
-	clk_disable(nfc_clk);	/* FIXME */
+	clk_disable(host->clk);	/* FIXME */
  	return ret;
 }
@@ -1026,11 +1028,13 @@ static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state)
 static int mxcnd_resume(struct platform_device *pdev)
 {
 	struct mtd_info *info = platform_get_drvdata(pdev);
+        struct nand_chip *nand_chip = info->priv;
+	struct mxc_nand_host *host = nand_chip->priv;
 	int ret = 0;
  	DEBUG(MTD_DEBUG_LEVEL0, "MXC_ND : NAND resume\n");
 	/* Enable the NFC clock */
-	clk_enable(nfc_clk);	/* FIXME */
+	clk_enable(host->clk);	/* FIXME */
  	if (info)
 		info->resume(info);
 
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#5 lore raw
Quoted 9 lines · Sascha Hauer
Quoted 8 lines · Daniel Mack
Quoted 3 lines · Vladimir Barinov

Please find the patch that I've sent some time ago. This patch should fix the issue you described.
http://lists.infradead.org/pipermail/linux-mtd/2009-April/025363.html

Ah, ok, thanks.

Quoted 7 lines
Quoted 2 lines

Did anyone pick it up for mainline already? Sascha, I didn't see that one in your tree either.

It seems to be pure luck when the patches on the mtd list get picked up. Most of the time I do not even a reaction from the list or David. I wonder if someone will beat me up when I take the i.MX nand patches via my arm tree.

I've put Vladimir's patch to my l2-mtd-2.6.git tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.git

which means I'll be pinging David about pulling it. This is all I can do for you, unfortunately.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)
maintainer
#6 lore raw
Quoted 18 lines · Artem Bityutskiy
Quoted 9 lines · Sascha Hauer
Quoted 8 lines · Daniel Mack
Quoted 3 lines · Vladimir Barinov

Please find the patch that I've sent some time ago. This patch should fix the issue you described.
http://lists.infradead.org/pipermail/linux-mtd/2009-April/025363.html

Ah, ok, thanks.

Quoted 7 lines
Quoted 2 lines

Did anyone pick it up for mainline already? Sascha, I didn't see that one in your tree either.

It seems to be pure luck when the patches on the mtd list get picked up. Most of the time I do not even a reaction from the list or David. I wonder if someone will beat me up when I take the i.MX nand patches via my arm tree.

Quoted 5 lines

I've put Vladimir's patch to my l2-mtd-2.6.git tree:
http://git.infradead.org/users/dedekind/l2-mtd-2.6.git

which means I'll be pinging David about pulling it. This is all I can do for you, unfortunately.

Thanks a lot. I really prefer driver patches going over the according subsystem tree rather then leaking them in from the architecture tree.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |