Skip to contentSkip to conversation

Please fix or remove OMAP2 onenand driver

DISCUSSION Russell King - ARM Linux 2 participants 5 messages Nov 23, 2008 – Nov 26, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Clearly this driver has been put into mainline prematurely - it takes no account of the relocation of headers.

It's causing a regression - omap_2430sdp_defconfig used to build in mainline, and it no longer does.

Please fix, or remove this broken driver from mainline.

drivers/mtd/onenand/omap2.c:38:27: error: asm/arch/gpmc.h: No such file or directory drivers/mtd/onenand/omap2.c:39:30: error: asm/arch/onenand.h: No such file or directory drivers/mtd/onenand/omap2.c:40:27: error: asm/arch/gpio.h: No such file or directory drivers/mtd/onenand/omap2.c:41:25: error: asm/arch/pm.h: No such file or directory drivers/mtd/onenand/omap2.c:45:26: error: asm/arch/dma.h: No such file or directory drivers/mtd/onenand/omap2.c:47:28: error: asm/arch/board.h: No such file or directory drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_wait':
drivers/mtd/onenand/omap2.c:153: error: implicit declaration of function 'omap_get_gpio_datain' drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_read_bufferram':
drivers/mtd/onenand/omap2.c:469: error: implicit declaration of function 'omap_set_dma_transfer_params' drivers/mtd/onenand/omap2.c:469: error: 'OMAP_DMA_DATA_TYPE_S32' undeclared (first use in this function) drivers/mtd/onenand/omap2.c:469: error: (Each undeclared identifier is reported only once drivers/mtd/onenand/omap2.c:469: error: for each function it appears in.) drivers/mtd/onenand/omap2.c:471: error: implicit declaration of function 'omap_set_dma_src_params' drivers/mtd/onenand/omap2.c:471: error: 'OMAP_DMA_AMODE_POST_INC' undeclared (first use in this function) drivers/mtd/onenand/omap2.c:473: error: implicit declaration of function 'omap_set_dma_dest_params' drivers/mtd/onenand/omap2.c:477: error: implicit declaration of function 'omap_start_dma' drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_write_bufferram':
drivers/mtd/onenand/omap2.c:514: error: 'OMAP_DMA_DATA_TYPE_S16' undeclared (first use in this function) drivers/mtd/onenand/omap2.c:516: error: 'OMAP_DMA_AMODE_POST_INC' undeclared (first use in this function) drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe':
drivers/mtd/onenand/omap2.c:595: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:596: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:597: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:603: error: implicit declaration of function 'gpmc_cs_request' drivers/mtd/onenand/omap2.c:622: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:623: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:629: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:633: error: implicit declaration of function 'omap_request_gpio' drivers/mtd/onenand/omap2.c:638: error: implicit declaration of function 'omap_set_gpio_direction' drivers/mtd/onenand/omap2.c:640: error: implicit declaration of function 'OMAP_GPIO_IRQ' drivers/mtd/onenand/omap2.c:647: error: implicit declaration of function 'omap_request_dma' drivers/mtd/onenand/omap2.c:651: error: implicit declaration of function 'omap_set_dma_write_mode' drivers/mtd/onenand/omap2.c:652: error: 'OMAP_DMA_WRITE_NON_POSTED' undeclared (first use in this function) drivers/mtd/onenand/omap2.c:653: error: implicit declaration of function 'omap_set_dma_src_data_pack' drivers/mtd/onenand/omap2.c:654: error: implicit declaration of function 'omap_set_dma_src_burst_mode' drivers/mtd/onenand/omap2.c:655: error: 'OMAP_DMA_DATA_BURST_8' undeclared (first use in this function) drivers/mtd/onenand/omap2.c:656: error: implicit declaration of function 'omap_set_dma_dest_data_pack' drivers/mtd/onenand/omap2.c:657: error: implicit declaration of function 'omap_set_dma_dest_burst_mode' drivers/mtd/onenand/omap2.c:708: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:709: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:710: error: dereferencing pointer to incomplete type drivers/mtd/onenand/omap2.c:725: error: implicit declaration of function 'omap_free_dma' drivers/mtd/onenand/omap2.c:730: error: implicit declaration of function 'omap_free_gpio' drivers/mtd/onenand/omap2.c:736: error: implicit declaration of function 'gpmc_cs_free' make[3]: *** [drivers/mtd/onenand/omap2.o] Error 1

#1 lore raw
Quoted 7 lines · Russell King - ARM Linux

Clearly this driver has been put into mainline prematurely - it takes no account of the relocation of headers.

It's causing a regression - omap_2430sdp_defconfig used to build in mainline, and it no longer does.

Please fix, or remove this broken driver from mainline.

From: Adrian Hunter <[email protected]>
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

---
drivers/mtd/onenand/omap2.c | 12 ++++++------

1 files changed, 6 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +0 -0
index e39b21d..28034ef 100644
@@ -35,16 +35,16 @@
 

#include <asm/io.h>
#include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>

#include <linux/dma-mapping.h>
#include <asm/dma-mapping.h>
-#include <asm/arch/dma.h>
+#include <mach/dma.h>

-#include <asm/arch/board.h>
+#include <mach/board.h>

#define DRIVER_NAME "omap2-onenand"

Signature · 1 line
1.5.4.3
#2 lore raw
Quoted 5 lines · Adrian Hunter

From: Adrian Hunter <[email protected]>
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Thanks. Only two comments (see below).

drivers/mtd/onenand/omap2.c line 36

Quoted 11 lines

---
drivers/mtd/onenand/omap2.c | 12 ++++++------

1 files changed, 6 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +0 -0
index e39b21d..28034ef 100644
@@ -35,16 +35,16 @@
 
 #include <asm/io.h>

Should be linux/io.h and should be with the other linux/ includes.

drivers/mtd/onenand/omap2.c line 44

Quoted 12 lines
drivers/mtd/onenand/omap2.c +4 -4
 #include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>
 
 #include <linux/dma-mapping.h>
 #include <asm/dma-mapping.h>

asm/dma-mapping.h should not be included - only linux/dma-mapping.h, and that should be up with the other linux/ includes.

Quoted 10 lines
drivers/mtd/onenand/omap2.c +2 -2
-#include <asm/arch/dma.h>
+#include <mach/dma.h>
 
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #define DRIVER_NAME "omap2-onenand"
 
Signature · 1 line
1.5.4.3
#3 lore raw
Quoted 42 lines · ext Russell King - ARM Linux
Quoted 5 lines · Adrian Hunter

From: Adrian Hunter <[email protected]>
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Thanks. Only two comments (see below).

drivers/mtd/onenand/omap2.c line 36

Quoted 11 lines

---
drivers/mtd/onenand/omap2.c | 12 ++++++------

1 files changed, 6 insertions(+), 6 deletions(-)
drivers/mtd/onenand/omap2.c +0 -0
index e39b21d..28034ef 100644
@@ -35,16 +35,16 @@
 
 #include <asm/io.h>

Should be linux/io.h and should be with the other linux/ includes.

drivers/mtd/onenand/omap2.c line 44

Quoted 12 lines
drivers/mtd/onenand/omap2.c +4 -4
 #include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>
 
 #include <linux/dma-mapping.h>
 #include <asm/dma-mapping.h>

asm/dma-mapping.h should not be included - only linux/dma-mapping.h, and that should be up with the other linux/ includes.

Quoted 3 lines
drivers/mtd/onenand/omap2.c +1 -1
-#include <asm/arch/dma.h>
+#include <mach/dma.h>
 
Quoted 8 lines
Quoted 7 lines
drivers/mtd/onenand/omap2.c +1 -1
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #define DRIVER_NAME "omap2-onenand"
 
Signature · 1 line
1.5.4.3

From: Adrian Hunter <[email protected]>
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

---
drivers/mtd/onenand/omap2.c | 17 ++++++++---------

1 files changed, 8 insertions(+), 9 deletions(-)
drivers/mtd/onenand/omap2.c +0 -0
index e39b21d..a7e4d98 100644
@@ -32,19 +32,18 @@

#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/io.h>

-#include <asm/io.h>
#include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>

-#include <linux/dma-mapping.h>
-#include <asm/dma-mapping.h>
-#include <asm/arch/dma.h>
+#include <mach/dma.h>

-#include <asm/arch/board.h>
+#include <mach/board.h>

#define DRIVER_NAME "omap2-onenand"

Signature · 1 line
1.5.4.3
author Acked-by Russell King
#4 lore raw
Quoted 5 lines · Adrian Hunter

From: Adrian Hunter <[email protected]>
Date: Mon, 24 Nov 2008 13:34:53 +0200
Subject: [PATCH] MTD: OMAP: OneNAND: header file relocation

Great.

David, can you merge this patch for 2.6.28 please?

Quoted 38 lines

---
drivers/mtd/onenand/omap2.c | 17 ++++++++---------

1 files changed, 8 insertions(+), 9 deletions(-)
drivers/mtd/onenand/omap2.c +8 -9
index e39b21d..a7e4d98 100644
@@ -32,19 +32,18 @@
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/flash.h>
-#include <asm/arch/gpmc.h>
-#include <asm/arch/onenand.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/pm.h>
+#include <mach/gpmc.h>
+#include <mach/onenand.h>
+#include <mach/gpio.h>
+#include <mach/pm.h>
 
-#include <linux/dma-mapping.h>
-#include <asm/dma-mapping.h>
-#include <asm/arch/dma.h>
+#include <mach/dma.h>
 
-#include <asm/arch/board.h>
+#include <mach/board.h>
 
 #define DRIVER_NAME "omap2-onenand"
 
Signature · 1 line
1.5.4.3